aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-06-30 22:07:04 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-06-30 22:07:04 +0000
commitd4f7af436d07c7bc4dd61ac45bff3414a1c12c74 (patch)
tree049f5903fea26153466932a6b271c49f10b75ba8 /packages
parent873ce28c40814edb45f534003450318c6e9b2650 (diff)
parent7339a83b4095582728045cee92aa215373607caf (diff)
downloadopenembedded-d4f7af436d07c7bc4dd61ac45bff3414a1c12c74.tar.gz
merge of '08199c52a592fe71e2675200cf618a439d710884'
and '3e5f187370604cf4577025ebc49d90ca52a72d4d'
Diffstat (limited to 'packages')
-rw-r--r--packages/abiword/abiword_2.6.3.bb10
-rw-r--r--packages/acpid/acpid/gcc40.patch1
-rw-r--r--packages/acpid/acpid_1.0.6.bb3
-rw-r--r--packages/alsa/alsa-plugins_1.0.15.bb (renamed from packages/alsa/alsa-plugins_1.0.14.bb)0
-rw-r--r--packages/alsa/alsa-scenario_git.bb12
-rw-r--r--packages/alsa/alsa-state.bb26
-rw-r--r--packages/alsa/alsa-state/asound.conf (renamed from packages/alsa/alsa-state/asoundrc)8
-rw-r--r--packages/angstrom/angstrom-led-config.bb30
-rw-r--r--packages/angstrom/angstrom-led-config/.mtn2git_empty (renamed from packages/apex/apex-nslu2-1.5.13/.mtn2git_empty)0
-rw-r--r--packages/angstrom/angstrom-led-config/beagleboard/.mtn2git_empty (renamed from packages/apex/apex-nslu2-1.5.8/.mtn2git_empty)0
-rw-r--r--packages/angstrom/angstrom-led-config/beagleboard/leds3
-rwxr-xr-xpackages/angstrom/angstrom-led-config/led-config31
-rw-r--r--packages/angstrom/angstrom-led-config/leds1
-rw-r--r--packages/angstrom/angstrom-zeroconf-audio.bb19
-rw-r--r--packages/angstrom/epiphany-firefox-replacement.bb10
-rw-r--r--packages/apex/apex-env_1.5.14.bb (renamed from packages/apex/apex-env_1.5.13.bb)2
-rw-r--r--packages/apex/apex-nslu2-1.5.14/.mtn2git_empty (renamed from packages/apex/apex-nslu2-16mb-1.5.13/.mtn2git_empty)0
-rw-r--r--packages/apex/apex-nslu2-1.5.14/defconfig (renamed from packages/apex/apex-nslu2-1.5.13/defconfig)0
-rw-r--r--packages/apex/apex-nslu2-1.5.8/defconfig156
-rw-r--r--packages/apex/apex-nslu2-16mb-1.5.14/.mtn2git_empty (renamed from packages/apex/apex-nslu2-16mb-1.5.8/.mtn2git_empty)0
-rw-r--r--packages/apex/apex-nslu2-16mb-1.5.14/defconfig (renamed from packages/apex/apex-nslu2-16mb-1.5.13/defconfig)0
-rw-r--r--packages/apex/apex-nslu2-16mb-1.5.8/defconfig156
-rw-r--r--packages/apex/apex-nslu2-16mb_1.5.14.bb (renamed from packages/apex/apex-nslu2-16mb_1.5.13.bb)2
-rw-r--r--packages/apex/apex-nslu2-16mb_1.5.8.bb61
-rw-r--r--packages/apex/apex-nslu2_1.5.14.bb (renamed from packages/apex/apex-nslu2_1.5.13.bb)2
-rw-r--r--packages/apex/apex-nslu2_1.5.8.bb61
-rw-r--r--packages/apmd/apmd-3.2.2/libtool.patch16
-rw-r--r--packages/apmd/apmd_3.2.2.bb3
-rw-r--r--packages/aspell/aspell_0.60.6.bb19
-rw-r--r--packages/asterisk/asterisk-addons_1.6.0-beta2.bb2
-rw-r--r--packages/asterisk/asterisk-core-sounds-en-alaw_1.4.8.bb2
-rw-r--r--packages/asterisk/asterisk-core-sounds-en-g729_1.4.8.bb2
-rw-r--r--packages/asterisk/asterisk-core-sounds-en-gsm_1.4.8.bb2
-rw-r--r--packages/asterisk/asterisk-core-sounds-en-ulaw_1.4.8.bb2
-rw-r--r--packages/asterisk/asterisk-extra-sounds-en-alaw_1.4.7.bb2
-rw-r--r--packages/asterisk/asterisk-extra-sounds-en-g729_1.4.7.bb2
-rw-r--r--packages/asterisk/asterisk-extra-sounds-en-gsm_1.4.7.bb2
-rw-r--r--packages/asterisk/asterisk-extra-sounds-en-ulaw_1.4.7.bb2
-rw-r--r--packages/asterisk/asterisk-moh-freeplay-alaw_0.0.0.bb2
-rw-r--r--packages/asterisk/asterisk-moh-freeplay-g729_0.0.0.bb2
-rw-r--r--packages/asterisk/asterisk-moh-freeplay-gsm_0.0.0.bb2
-rw-r--r--packages/asterisk/asterisk-moh-freeplay-ulaw_0.0.0.bb2
-rw-r--r--packages/asterisk/asterisk_1.2.24.bb2
-rw-r--r--packages/asterisk/asterisk_1.2.28.bb2
-rw-r--r--packages/asterisk/asterisk_1.4.17.bb2
-rw-r--r--packages/asterisk/asterisk_1.4.19.1.bb2
-rw-r--r--packages/asterisk/asterisk_1.6.0-beta8.bb2
-rw-r--r--packages/autoconf/autoconf-2.59/autoconf-sh.patch22
-rw-r--r--packages/autoconf/autoconf_2.59.bb3
-rw-r--r--packages/automake/automake_1.10.bb8
-rw-r--r--packages/avahi/avahi-python_0.6.21.bb2
-rw-r--r--packages/avahi/avahi-ui_0.6.21.bb2
-rw-r--r--packages/avahi/avahi_0.6.19.bb2
-rw-r--r--packages/avahi/avahi_0.6.20.bb2
-rw-r--r--packages/avahi/avahi_0.6.21.bb2
-rw-r--r--packages/avahi/avahi_0.6.22.bb2
-rw-r--r--packages/bacula/bacula-client_1.38.11.bb2
-rw-r--r--packages/base-passwd/base-passwd_3.5.9.bb2
-rw-r--r--packages/bash/bash.inc11
-rw-r--r--packages/bash/bash_3.0.bb9
-rw-r--r--packages/bash/bash_3.2.bb6
-rw-r--r--packages/bash/files/.mtn2git_empty (renamed from packages/dropbear/dropbear-0.50/.mtn2git_empty)0
-rw-r--r--packages/bash/files/builtins.patch13
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/.mtn2git_empty (renamed from packages/gcc/gcc-4.3.0/.mtn2git_empty)0
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/110-arm-eabi-conf.patch22
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/binutils-2.16.1-e300c2c3.patch19
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch39
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-100-uclibc-conf.patch34
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-gas-needs-libm.patch38
-rw-r--r--packages/binutils/binutils-cross-sdk_2.18.50.0.7.bb3
-rw-r--r--packages/binutils/binutils-cross_2.18.50.0.7.bb4
-rw-r--r--packages/binutils/binutils_2.14.90.0.6.bb2
-rw-r--r--packages/binutils/binutils_2.14.90.0.7.bb2
-rw-r--r--packages/binutils/binutils_2.15.94.0.1.bb2
-rw-r--r--packages/binutils/binutils_2.16.1.bb1
-rw-r--r--packages/binutils/binutils_2.16.91.0.6.bb2
-rw-r--r--packages/binutils/binutils_2.16.91.0.7.bb2
-rw-r--r--packages/binutils/binutils_2.16.bb2
-rw-r--r--packages/binutils/binutils_2.17.50.0.1.bb2
-rw-r--r--packages/binutils/binutils_2.17.50.0.12.bb2
-rw-r--r--packages/binutils/binutils_2.17.50.0.5.bb2
-rw-r--r--packages/binutils/binutils_2.17.50.0.8.bb2
-rw-r--r--packages/binutils/binutils_2.17.bb2
-rw-r--r--packages/binutils/binutils_2.18.50.0.7.bb18
-rw-r--r--packages/binutils/binutils_2.18.bb2
-rw-r--r--packages/binutils/binutils_csl-arm-20050416.bb2
-rw-r--r--packages/binutils/binutils_csl-arm-20050603.bb2
-rw-r--r--packages/binutils/binutils_cvs.bb4
-rw-r--r--packages/bluesnarfer/bluesnarfer.bb16
-rw-r--r--packages/bluez/bluez-hcidump_1.42.bb13
-rw-r--r--packages/bluez/bluez-libs_3.33.bb1
-rw-r--r--packages/bluez/bluez-utils-3.33/.mtn2git_empty (renamed from packages/gcc/gcc-4.3.0/debian/.mtn2git_empty)0
-rw-r--r--packages/bluez/bluez-utils-3.33/hciattach-ti-bts.patch477
-rw-r--r--packages/bluez/bluez-utils.inc2
-rw-r--r--packages/bluez/bluez-utils3.inc5
-rw-r--r--packages/bluez/bluez-utils_3.33.bb55
-rw-r--r--packages/bwmon/bwmon_1.3.bb4
-rw-r--r--packages/cacao/cacao.inc33
-rw-r--r--packages/cacao/cacao_0.98+hg20071001.bb3
-rw-r--r--packages/cacao/cacao_0.98+hg20080519.bb22
-rw-r--r--packages/cacao/cacao_0.99.1.bb14
-rw-r--r--packages/cacao/cacaoh-native.inc12
-rw-r--r--packages/cacao/cacaoh-native_0.98+hg20071001.bb2
-rw-r--r--packages/cacao/cacaoh-native_0.98+hg20080519.bb8
-rw-r--r--packages/cacao/cacaoh-native_0.99.1.bb5
-rw-r--r--packages/cacao/files/cacao-0.98+hg20080519-build-java-runtime-library-classes.patch53
-rw-r--r--packages/cacao/files/cacao-0.98+svn-libdir.diff30
-rw-r--r--packages/cacao/files/cacao-0.99.1-build-java-runtime-library-classes.patch51
-rw-r--r--packages/cacao/files/cacao-hg20080519-classpath_var.patch67
-rw-r--r--packages/cacao/files/cacao-hg20080519-libdir.patch30
-rw-r--r--packages/cairo/cairo-1.6.4/.mtn2git_empty (renamed from packages/gcc/gcc-4.3.0/fedora/.mtn2git_empty)0
-rw-r--r--packages/cairo/cairo-1.6.4/configure_fix.patch70
-rw-r--r--packages/cairo/cairo-directfb-1.6.4/.mtn2git_empty (renamed from packages/gdb/gdb-6.8/.mtn2git_empty)0
-rw-r--r--packages/cairo/cairo-directfb-1.6.4/configure_fix.patch70
-rw-r--r--packages/cairo/cairo-directfb_1.6.4.bb17
-rw-r--r--packages/cairo/cairo_1.6.4.bb5
-rw-r--r--packages/cairo/libsvg-0.1.4/configure_fix.patch22
-rw-r--r--packages/cairo/libsvg_0.1.4.bb3
-rw-r--r--packages/callweaver/callweaver_1.2.0-rc5.bb2
-rw-r--r--packages/changedfiles/changedfiles-modules_1.0-rc1.bb2
-rw-r--r--packages/clamav/clamav_0.90.2.bb2
-rw-r--r--packages/clamav/clamav_0.90.3.bb2
-rw-r--r--packages/clamav/clamav_0.91.1.bb2
-rw-r--r--packages/classpath/classpath-minimal_0.97.2.bb (renamed from packages/classpath/classpath-minimal_0.97.1.bb)2
-rw-r--r--packages/classpath/classpath-native_0.96.1.bb4
-rw-r--r--packages/classpath/classpath_0.97.2.bb (renamed from packages/classpath/classpath_0.97.1.bb)2
-rw-r--r--packages/classpath/files/getopt-filelist.patch271
-rw-r--r--packages/classpath/files/netif_16.patch36
-rw-r--r--packages/classpath/files/sun-security-getproperty_0.96.1.patch503
-rw-r--r--packages/cmake/cmake-native_2.4.8.bb1
-rw-r--r--packages/cmake/cmake-native_2.6.0.bb11
-rw-r--r--packages/cmake/cmake.inc3
-rw-r--r--packages/cmake/cmake_2.4.8.bb1
-rw-r--r--packages/console-tools/console-tools_0.3.2.bb2
-rw-r--r--packages/curl/curl-sdk_7.18.0.bb14
-rw-r--r--packages/cyrus-imapd/cyrus-imapd_2.2.12.bb2
-rw-r--r--packages/cyrus-imapd/cyrus-imapd_2.2.5.bb2
-rw-r--r--packages/cyrus-sasl/cyrus-sasl_2.1.17.bb2
-rw-r--r--packages/cyrus-sasl/cyrus-sasl_2.1.18.bb2
-rw-r--r--packages/cyrus-sasl/cyrus-sasl_2.1.19.bb2
-rw-r--r--packages/dbus-java/dbus-java_2.4.bb87
-rw-r--r--packages/dbus/dbus-1.2.1/dbus-1.init2
-rw-r--r--packages/dbus/dbus-glib-0.76/.mtn2git_empty (renamed from packages/icewm/icewm-1.2.20/.mtn2git_empty)0
-rw-r--r--packages/dbus/dbus-glib-0.76/no-examples.patch8
-rw-r--r--packages/dbus/dbus-glib-0.76/no-introspect.patch14
-rw-r--r--packages/dbus/dbus-glib-native-0.76/.mtn2git_empty (renamed from packages/linux/linux-ml403-slab-2.6.x/.mtn2git_empty)0
-rw-r--r--packages/dbus/dbus-glib-native-0.76/run-with-tmp-session-bus.patch24
-rw-r--r--packages/dbus/dbus-glib-native_0.76.bb21
-rw-r--r--packages/dbus/dbus-glib_0.76.bb28
-rw-r--r--packages/dbus/dbus_1.0.3.bb2
-rw-r--r--packages/dbus/dbus_1.2.1.bb2
-rw-r--r--packages/devio/devio-sdk.inc5
-rw-r--r--packages/devio/devio-sdk_1.2.bb3
-rw-r--r--packages/dfu-util/dfu-util-native_svn.bb6
-rw-r--r--packages/dfu-util/dfu-util_svn.bb4
-rw-r--r--packages/directfb/directfb.inc3
-rw-r--r--packages/directfb/directfb_1.0.0.bb1
-rw-r--r--packages/directfb/directfb_1.1.0.bb1
-rw-r--r--packages/directfb/files/dont-use-linux-config.patch12
-rw-r--r--packages/distcc/distcc_2.18.3.bb4
-rw-r--r--packages/distcc/files/distccmon-gnome.desktop12
-rw-r--r--packages/dropbear/dropbear-0.51/.mtn2git_empty (renamed from packages/netbase/netbase/mpc8313e-rdb/.mtn2git_empty)0
-rw-r--r--packages/dropbear/dropbear-0.51/allow-nopw.patch40
-rw-r--r--packages/dropbear/dropbear-0.51/configure.patch (renamed from packages/dropbear/dropbear-0.50/configure.patch)0
-rw-r--r--packages/dropbear/dropbear-0.51/fix-2kb-keys.patch (renamed from packages/dropbear/dropbear-0.50/fix-2kb-keys.patch)0
-rw-r--r--packages/dropbear/dropbear-0.51/no-host-lookup.patch12
-rw-r--r--packages/dropbear/dropbear-0.51/urandom-xauth-changes-to-options.h.patch (renamed from packages/dropbear/dropbear-0.50/urandom-xauth-changes-to-options.h.patch)0
-rw-r--r--packages/dropbear/dropbear.inc46
-rw-r--r--packages/dropbear/dropbear_0.50.bb6
-rw-r--r--packages/dropbear/dropbear_0.51.bb4
-rw-r--r--packages/dsniff/dsniff_2.3.bb28
-rw-r--r--packages/dsplink/codec-engine_2.10.bb77
-rw-r--r--packages/dsplink/dsplink-1.51/.mtn2git_empty (renamed from packages/obsolete/classpath/.mtn2git_empty)0
-rw-r--r--packages/dsplink/dsplink-1.51/prcs-fix-include.patch49
-rw-r--r--packages/dsplink/dsplink.inc87
-rw-r--r--packages/dsplink/dsplink_1.50.bb47
-rw-r--r--packages/dsplink/dsplink_1.51.00.08.bb19
-rw-r--r--packages/dsplink/files/CURRENTCFG.MK6
-rw-r--r--packages/dsplink/files/prcs-fix-include.patch40
-rw-r--r--packages/e17/e-wm/applications.menu13
-rw-r--r--packages/e17/e-wm_cvs.bb6
-rw-r--r--packages/e2fsprogs/e2fsprogs_1.38.bb2
-rw-r--r--packages/efl1/epsilon_cvs.bb2
-rw-r--r--packages/eglibc/eglibc-stage.inc5
-rw-r--r--packages/esound/esound_0.2.36.bb6
-rw-r--r--packages/esound/files/configure-fix.patch10
-rw-r--r--packages/exmap-console/exmap-console_0.4.1.bb2
-rw-r--r--packages/exmap-console/exmap-console_svn.bb1
-rw-r--r--packages/ezx/ezx-boot-usb-native.inc32
-rw-r--r--packages/ezx/ezx-boot-usb-native_0.1.0.bb25
-rw-r--r--packages/ezx/ezx-boot-usb-native_0.2.0.bb28
-rw-r--r--packages/ezx/ezx-boot-usb-native_svn.bb34
-rw-r--r--packages/fakeroot/fakeroot-native_1.2.13.bb20
-rw-r--r--packages/fakeroot/fakeroot-native_1.7.1.bb4
-rw-r--r--packages/fakeroot/fakeroot-native_1.9.5.bb (renamed from packages/fakeroot/fakeroot-native_1.9.4.bb)0
-rw-r--r--packages/fakeroot/fakeroot_1.2.13.bb17
-rw-r--r--packages/fakeroot/fakeroot_1.7.1.bb6
-rw-r--r--packages/fakeroot/fakeroot_1.9.5.bb (renamed from packages/fakeroot/fakeroot_1.9.4.bb)0
-rw-r--r--packages/fetchmail/fetchmail-6.3.8/.mtn2git_empty (renamed from packages/obsolete/classpath/files/.mtn2git_empty)0
-rw-r--r--packages/fetchmail/fetchmail-6.3.8/CVE-2007-4565.patch11
-rw-r--r--packages/fetchmail/fetchmail_6.3.8.bb20
-rw-r--r--packages/fftw/fftw_3.2.bb11
-rw-r--r--packages/fftw/fftwf_3.2.bb11
-rw-r--r--packages/fftw/fftwl_3.2.bb11
-rw-r--r--packages/fltk/files/.mtn2git_empty (renamed from packages/obsolete/jamvm/.mtn2git_empty)0
-rw-r--r--packages/fltk/files/disable_test.patch13
-rw-r--r--packages/fltk/fltk_1.1.9.bb35
-rw-r--r--packages/fluxbox/fluxbox_0.99+1.0rc.bb2
-rw-r--r--packages/fluxbox/fluxbox_svn.bb2
-rw-r--r--packages/fontconfig/fontconfig-2.4.1/.mtn2git_empty (renamed from packages/obsolete/jamvm/files/.mtn2git_empty)0
-rw-r--r--packages/fontconfig/fontconfig-2.4.1/configure_fix.patch14
-rw-r--r--packages/fontconfig/fontconfig_2.4.1.bb5
-rw-r--r--packages/freesmartphone/frameworkd/.mtn2git_empty (renamed from packages/obsolete/jamvm/jamvm-1.3.0/.mtn2git_empty)0
-rw-r--r--packages/freesmartphone/frameworkd/frameworkd40
-rw-r--r--packages/freesmartphone/frameworkd/frameworkd.conf1
-rw-r--r--packages/freesmartphone/frameworkd/om-gta02/.mtn2git_empty (renamed from packages/olsr/.mtn2git_empty)0
-rw-r--r--packages/freesmartphone/frameworkd/om-gta02/frameworkd.conf15
-rw-r--r--packages/freesmartphone/frameworkd_git.bb38
-rw-r--r--packages/freesmartphone/fso-sounds.bb15
-rw-r--r--packages/freesmartphone/gsmd2_git.bb17
-rw-r--r--packages/freesmartphone/python-odeviced/om-gta02/odeviced.conf4
-rw-r--r--packages/freesmartphone/python-odeviced_git.bb4
-rw-r--r--packages/freesmartphone/python-oeventd/.mtn2git_empty (renamed from packages/opie-dasher/.mtn2git_empty)0
-rw-r--r--packages/freesmartphone/python-oeventd/oeventd40
-rw-r--r--packages/freesmartphone/python-oeventd_git.bb34
-rw-r--r--packages/freesmartphone/python-ophoned_git.bb4
-rw-r--r--packages/freesmartphone/python-ousaged_git.bb4
-rw-r--r--packages/freesmartphone/zhone/80zhone2
-rw-r--r--packages/freesmartphone/zhone_git.bb4
-rw-r--r--packages/freetype/freetype-2.3.6/.mtn2git_empty (renamed from packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/.mtn2git_empty)0
-rw-r--r--packages/freetype/freetype-2.3.6/fix-configure.patch13
-rw-r--r--packages/freetype/freetype-native_2.3.6.bb21
-rw-r--r--packages/freetype/freetype_2.3.5.bb5
-rw-r--r--packages/freetype/freetype_2.3.6.bb40
-rw-r--r--packages/gcc/gcc-3.4.3/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-3.4.4/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-3.4.6/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-4.0.0/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-4.1.2/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-4.2.3/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-4.2.4.inc73
-rw-r--r--packages/gcc/gcc-4.2.4/.mtn2git_empty0
-rw-r--r--packages/gcc/gcc-4.2.4/100-uclibc-conf.patch (renamed from packages/gcc/gcc-4.3.0/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/103-uclibc-conf-noupstream.patch (renamed from packages/gcc/gcc-4.3.0/103-uclibc-conf-noupstream.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/110-arm-eabi.patch (renamed from packages/gcc/gcc-4.3.0/110-arm-eabi.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/200-uclibc-locale.patch (renamed from packages/gcc/gcc-4.3.0/200-uclibc-locale.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/203-uclibc-locale-no__x.patch (renamed from packages/gcc/gcc-4.3.0/203-uclibc-locale-no__x.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/204-uclibc-locale-wchar_fix.patch (renamed from packages/gcc/gcc-4.3.0/204-uclibc-locale-wchar_fix.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/205-uclibc-locale-update.patch (renamed from packages/gcc/gcc-4.3.0/205-uclibc-locale-update.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/300-libstdc++-pic.patch (renamed from packages/gcc/gcc-4.3.0/300-libstdc++-pic.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/301-missing-execinfo_h.patch (renamed from packages/gcc/gcc-4.3.0/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/302-c99-snprintf.patch (renamed from packages/gcc/gcc-4.3.0/302-c99-snprintf.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/303-c99-complex-ugly-hack.patch (renamed from packages/gcc/gcc-4.3.0/303-c99-complex-ugly-hack.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/304-index_macro.patch (renamed from packages/gcc/gcc-4.3.0/304-index_macro.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/305-libmudflap-susv3-legacy.patch (renamed from packages/gcc/gcc-4.3.0/305-libmudflap-susv3-legacy.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/306-libstdc++-namespace.patch (renamed from packages/gcc/gcc-4.3.0/306-libstdc++-namespace.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/307-locale_facets.patch (renamed from packages/gcc/gcc-4.3.0/307-locale_facets.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/402-libbackend_dep_gcov-iov.h.patch (renamed from packages/gcc/gcc-4.3.0/402-libbackend_dep_gcov-iov.h.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/602-sdk-libstdc++-includes.patch (renamed from packages/gcc/gcc-4.3.0/602-sdk-libstdc++-includes.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/740-sh-pr24836.patch (renamed from packages/gcc/gcc-4.3.0/740-sh-pr24836.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/800-arm-bigendian.patch (renamed from packages/gcc/gcc-4.3.0/800-arm-bigendian.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/801-arm-bigendian-eabi.patch (renamed from packages/gcc/gcc-4.3.0/801-arm-bigendian-eabi.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/904-flatten-switch-stmt-00.patch (renamed from packages/gcc/gcc-4.3.0/904-flatten-switch-stmt-00.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/README4
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-20000320.patch11
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-32bit-disable.patch85
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-64bit-disable-4.2.0.patch169
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-64bit-disable0.patch47
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-and-or.patch67
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-cfcvt64-disable.patch19
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-cfcvtds-disable.patch32
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-cirrus-bugfixes.patch573
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-compare-geu.patch48
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-compare-unordered.patch98
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-compare-unordered.patch-z-eq98
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-compare.patch400
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-compare.patch-z-eq400
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-dominance.patch12
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-eabi-ieee754-div.patch139
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-eabi-ieee754.patch100
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-eabi.patch64
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-floatsi-disable-single.patch38
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-floatsi-disable.patch61
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-floatunsidf.patch37
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-fp_consts.patch13
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-neg.patch30
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-neg2.patch25
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-offset.patch20
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-predicates.patch20
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-predicates2.patch10
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-predicates3.patch116
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-saveregs.patch153
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-scc.patch38
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-truncsi-disable-new.patch33
-rw-r--r--packages/gcc/gcc-4.2.4/arm-crunch-truncsi-disable.patch56
-rw-r--r--packages/gcc/gcc-4.2.4/arm-nolibfloat.patch (renamed from packages/gcc/gcc-4.3.0/arm-nolibfloat.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/arm-softfloat.patch (renamed from packages/gcc/gcc-4.3.0/arm-softfloat.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/arm-thumb-cache.patch (renamed from packages/gcc/gcc-4.3.0/arm-thumb-cache.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/arm-thumb.patch (renamed from packages/gcc/gcc-4.3.0/arm-thumb.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/cache-amnesia.patch (renamed from packages/gcc/gcc-4.3.0/cache-amnesia.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/fix-ICE-in-arm_unwind_emit_set.diff18
-rw-r--r--packages/gcc/gcc-4.2.4/fortran-cross-compile-hack.patch (renamed from packages/gcc/gcc-4.3.0/fortran-cross-compile-hack.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/fortran-static-linking.patch (renamed from packages/gcc/gcc-4.3.0/fortran-static-linking.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/gcc-4.0.2-e300c2c3.patch (renamed from packages/gcc/gcc-4.3.0/gcc-4.0.2-e300c2c3.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/gcc41-configure.in.patch (renamed from packages/gcc/gcc-4.3.0/gcc41-configure.in.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/gfortran.patch40
-rw-r--r--packages/gcc/gcc-4.2.4/intermask-bigendian.patch (renamed from packages/gcc/gcc-4.3.0/intermask-bigendian.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/ldflags.patch (renamed from packages/gcc/gcc-4.3.0/ldflags.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/sdk-libstdc++-includes.patch (renamed from packages/gcc/gcc-4.3.0/sdk-libstdc++-includes.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/sh3-installfix-fixheaders.patch (renamed from packages/gcc/gcc-4.3.0/sh3-installfix-fixheaders.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/unbreak-armv4t.patch (renamed from packages/gcc/gcc-4.3.0/unbreak-armv4t.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/zecke-no-host-includes.patch (renamed from packages/gcc/gcc-4.3.0/zecke-no-host-includes.patch)0
-rw-r--r--packages/gcc/gcc-4.2.4/zecke-xgcc-cpp.patch (renamed from packages/gcc/gcc-4.3.0/zecke-xgcc-cpp.patch)2
-rw-r--r--packages/gcc/gcc-4.3.1.inc (renamed from packages/gcc/gcc-4.3.0.inc)6
-rw-r--r--packages/gcc/gcc-4.3.1/.mtn2git_empty0
-rw-r--r--packages/gcc/gcc-4.3.1/100-uclibc-conf.patch200
-rw-r--r--packages/gcc/gcc-4.3.1/103-uclibc-conf-noupstream.patch11
-rw-r--r--packages/gcc/gcc-4.3.1/110-arm-eabi.patch27
-rw-r--r--packages/gcc/gcc-4.3.1/200-uclibc-locale.patch2790
-rw-r--r--packages/gcc/gcc-4.3.1/203-uclibc-locale-no__x.patch213
-rw-r--r--packages/gcc/gcc-4.3.1/204-uclibc-locale-wchar_fix.patch48
-rw-r--r--packages/gcc/gcc-4.3.1/205-uclibc-locale-update.patch347
-rw-r--r--packages/gcc/gcc-4.3.1/300-libstdc++-pic.patch46
-rw-r--r--packages/gcc/gcc-4.3.1/301-missing-execinfo_h.patch11
-rw-r--r--packages/gcc/gcc-4.3.1/302-c99-snprintf.patch11
-rw-r--r--packages/gcc/gcc-4.3.1/303-c99-complex-ugly-hack.patch12
-rw-r--r--packages/gcc/gcc-4.3.1/304-index_macro.patch24
-rw-r--r--packages/gcc/gcc-4.3.1/305-libmudflap-susv3-legacy.patch49
-rw-r--r--packages/gcc/gcc-4.3.1/306-libstdc++-namespace.patch36
-rw-r--r--packages/gcc/gcc-4.3.1/307-locale_facets.patch26
-rw-r--r--packages/gcc/gcc-4.3.1/402-libbackend_dep_gcov-iov.h.patch13
-rw-r--r--packages/gcc/gcc-4.3.1/602-sdk-libstdc++-includes.patch20
-rw-r--r--packages/gcc/gcc-4.3.1/740-sh-pr24836.patch25
-rw-r--r--packages/gcc/gcc-4.3.1/800-arm-bigendian.patch67
-rw-r--r--packages/gcc/gcc-4.3.1/801-arm-bigendian-eabi.patch14
-rw-r--r--packages/gcc/gcc-4.3.1/904-flatten-switch-stmt-00.patch153
-rw-r--r--packages/gcc/gcc-4.3.1/arm-nolibfloat.patch24
-rw-r--r--packages/gcc/gcc-4.3.1/arm-softfloat.patch16
-rw-r--r--packages/gcc/gcc-4.3.1/arm-thumb-cache.patch29
-rw-r--r--packages/gcc/gcc-4.3.1/arm-thumb.patch64
-rw-r--r--packages/gcc/gcc-4.3.1/cache-amnesia.patch13
-rw-r--r--packages/gcc/gcc-4.3.1/debian/.mtn2git_empty0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-acats.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-acats.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-alpha.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-alpha.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-default-project-path.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-driver-check.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-driver-check.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-driver.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-driver.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-gcc-name.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-gcc-name.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-gnatvsn.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-gnatvsn.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-libgnatprj.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-libgnatprj.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-libgnatvsn.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-libgnatvsn.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-link-lib.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-sjlj.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-sjlj.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ada-symbolic-tracebacks.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ada-symbolic-tracebacks.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/alpha-ieee-doc.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/alpha-ieee-doc.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/alpha-ieee.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/alpha-ieee.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/alpha-no-ev4-directive.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/alpha-no-ev4-directive.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/arm-unbreak-eabi-armv4t.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/arm-unbreak-eabi-armv4t.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/boehm-gc-getnprocs.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/boehm-gc-getnprocs.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/boehm-gc-nocheck.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/boehm-gc-nocheck.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/config-ml.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/config-ml.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/cpu-default-i486.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/cpu-default-i486.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/cross-fixes.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/cross-fixes.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/cross-include.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/cross-include.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/deb-protoize.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/deb-protoize.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-d-lang.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-d-lang.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-driver-extra-langs.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-driver-extra-langs.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-hash-style-both.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-hash-style-both.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-hash-style-gnu.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-hash-style-gnu.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-i386-emit-cld.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-i386-emit-cld.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-ice-apport.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-ice-hack.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-ice-hack.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-multilib64dir.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-multilib64dir.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-pascal-lang.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-pascal-lang.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-ssp-default.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-ssp-default.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gcc-textdomain.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gcc-textdomain.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gdc-fix-build-kbsd-gnu.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gdc-fix-build-kbsd-gnu.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gpc-4.1.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gpc-4.1.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gpc-gcc-4.x.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gpc-gcc-4.x.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/gpc-names.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/gpc-names.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/hurd-changes.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/hurd-changes.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ignore-comp-fail.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ignore-comp-fail.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/kbsd-gnu-ada.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/kbsd-gnu-ada.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/kbsd-gnu.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libffi-configure.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libffi-configure.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-armel-ldflags.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-armel-ldflags.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-debuginfo.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-debuginfo.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-disable-static.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-disable-static.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-jar.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-jar.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-jnipath.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-jnipath.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-loading-constraints.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-loading-constraints.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-nobiarch-check.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-nobiarch-check.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-realloc-leak.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-realloc-leak.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-rpath.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-rpath.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-sjlj.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-sjlj.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-soname.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-soname.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-stacktrace.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-stacktrace.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-subdir.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-subdir.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libjava-xulrunner1.9.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libjava-xulrunner1.9.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libobjc-gc-link.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libobjc-gc-link.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libssp-gnu.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libssp-gnu.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libstdc++-doclink.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libstdc++-doclink.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libstdc++-pic.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libstdc++-pic.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/libstdc++-symbols-hppa.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/libstdc++-symbols-hppa.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/link-libs.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/link-libs.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/mips-triarch.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/mips-triarch.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/mudflap-nocheck.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/mudflap-nocheck.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/multiarch-include.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/multiarch-include.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/multiarch-lib.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/multiarch-lib.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/note-gnu-stack.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/note-gnu-stack.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/powerpc-biarch.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/powerpc-biarch.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/ppc64-ada.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/ppc64-ada.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/pr24170.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/pr24170.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/pr27880.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/pr27880.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/pr28102.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/pr28102.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/pr28322.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/pr28322.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/pr30961.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/pr30961.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/pr33148.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/pr33148.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/pr34571.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/pr34571.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/rename-info-files.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/rename-info-files.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/s390-biarch.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/s390-biarch.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/sparc-biarch.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/svn-class-updates.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/svn-class-updates.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/svn-doc-updates.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/svn-doc-updates.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/svn-gdc-updates.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/svn-gdc-updates.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/svn-updates.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/svn-updates.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/debian/template.dpatch (renamed from packages/gcc/gcc-4.3.0/debian/template.dpatch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/.mtn2git_empty0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-c++-builtin-redecl.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-c++-builtin-redecl.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-cpp-pragma.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-cpp-pragma.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-i386-libgomp.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-i386-libgomp.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-ia64-libunwind.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-ia64-libunwind.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-java-debug-iface-type.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-java-debug-iface-type.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-java-nomulti.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-java-nomulti.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-libgomp-speedup.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-libgomp-speedup.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-ppc32-retaddr.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-ppc32-retaddr.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-pr27898.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-pr27898.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-pr32139.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-pr32139.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-pr33763.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-pr33763.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-pr35440.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-pr35751.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-pr35751.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-rh251682.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-rh251682.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-rh330771.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-rh330771.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fedora/gcc43-rh341221.patch (renamed from packages/gcc/gcc-4.3.0/fedora/gcc43-rh341221.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/fix-ICE-in-arm_unwind_emit_set.diff (renamed from packages/gcc/gcc-4.3.0/fix-ICE-in-arm_unwind_emit_set.diff)0
-rw-r--r--packages/gcc/gcc-4.3.1/fortran-cross-compile-hack.patch30
-rw-r--r--packages/gcc/gcc-4.3.1/fortran-static-linking.patch48
-rw-r--r--packages/gcc/gcc-4.3.1/gcc-4.0.2-e300c2c3.patch311
-rw-r--r--packages/gcc/gcc-4.3.1/gcc-arm-frename-registers.patch25
-rw-r--r--packages/gcc/gcc-4.3.1/gcc-release-branch/.mtn2git_empty0
-rw-r--r--packages/gcc/gcc-4.3.1/gcc-release-branch/PR-36500-fix-neon.patch265
-rw-r--r--packages/gcc/gcc-4.3.1/gcc41-configure.in.patch22
-rw-r--r--packages/gcc/gcc-4.3.1/gcc43-build-id.patch (renamed from packages/gcc/gcc-4.3.0/gcc43-build-id.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/gcc43-ppc64-ia64-GNU-stack.patch (renamed from packages/gcc/gcc-4.3.0/gcc43-ppc64-ia64-GNU-stack.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/intermask-bigendian.patch24
-rw-r--r--packages/gcc/gcc-4.3.1/ldflags.patch22
-rw-r--r--packages/gcc/gcc-4.3.1/pr34130.patch (renamed from packages/gcc/gcc-4.3.0/pr34130.patch)0
-rw-r--r--packages/gcc/gcc-4.3.1/sdk-libstdc++-includes.patch22
-rw-r--r--packages/gcc/gcc-4.3.1/sh3-installfix-fixheaders.patch11
-rw-r--r--packages/gcc/gcc-4.3.1/unbreak-armv4t.patch12
-rw-r--r--packages/gcc/gcc-4.3.1/zecke-no-host-includes.patch31
-rw-r--r--packages/gcc/gcc-4.3.1/zecke-xgcc-cpp.patch16
-rw-r--r--packages/gcc/gcc-cross-initial_4.2.4.bb5
-rw-r--r--packages/gcc/gcc-cross-initial_4.3.1.bb (renamed from packages/gcc/gcc-cross-initial_4.3.0.bb)7
-rw-r--r--packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb2
-rw-r--r--packages/gcc/gcc-cross-kernel-4.2.1_csl-arm-2007q3.bb2
-rw-r--r--packages/gcc/gcc-cross-kernel-4.2.4_4.2.4.bb2
-rw-r--r--packages/gcc/gcc-cross-kernel.inc2
-rw-r--r--packages/gcc/gcc-cross-sdk_3.4.3.bb2
-rw-r--r--packages/gcc/gcc-cross-sdk_4.1.1.bb4
-rw-r--r--packages/gcc/gcc-cross-sdk_4.1.2.bb2
-rw-r--r--packages/gcc/gcc-cross-sdk_4.2.2.bb2
-rw-r--r--packages/gcc/gcc-cross-sdk_4.2.3.bb2
-rw-r--r--packages/gcc/gcc-cross-sdk_4.2.4.bb (renamed from packages/gcc/gcc-cross-sdk_4.3.0.bb)2
-rw-r--r--packages/gcc/gcc-cross-sdk_4.3.1.bb14
-rw-r--r--packages/gcc/gcc-cross_3.4.3.bb2
-rw-r--r--packages/gcc/gcc-cross_3.4.4.bb2
-rw-r--r--packages/gcc/gcc-cross_4.0.0.bb2
-rw-r--r--packages/gcc/gcc-cross_4.0.2.bb2
-rw-r--r--packages/gcc/gcc-cross_4.1.1.bb2
-rw-r--r--packages/gcc/gcc-cross_4.1.2.bb2
-rw-r--r--packages/gcc/gcc-cross_4.2.1.bb2
-rw-r--r--packages/gcc/gcc-cross_4.2.2.bb2
-rw-r--r--packages/gcc/gcc-cross_4.2.3.bb2
-rw-r--r--packages/gcc/gcc-cross_4.2.4.bb (renamed from packages/gcc/gcc-cross_4.3.0.bb)2
-rw-r--r--packages/gcc/gcc-cross_4.3.1.bb18
-rw-r--r--packages/gcc/gcc-cross_csl-arm-2005q3.bb2
-rw-r--r--packages/gcc/gcc-cross_csl-arm-2006q1.bb2
-rw-r--r--packages/gcc/gcc-cross_csl-arm-2007q3.bb2
-rw-r--r--packages/gcc/gcc-cross_csl-arm-2008q1.bb2
-rw-r--r--packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch2
-rw-r--r--packages/gcc/gcc-native_3.4.6.bb2
-rw-r--r--packages/gcc/gcc_3.4.3.bb2
-rw-r--r--packages/gcc/gcc_3.4.4.bb2
-rw-r--r--packages/gcc/gcc_4.0.0.bb2
-rw-r--r--packages/gcc/gcc_4.0.2.bb2
-rw-r--r--packages/gcc/gcc_4.1.1.bb2
-rw-r--r--packages/gcc/gcc_4.1.2.bb2
-rw-r--r--packages/gcc/gcc_4.2.1.bb2
-rw-r--r--packages/gcc/gcc_4.2.2.bb2
-rw-r--r--packages/gcc/gcc_4.2.3.bb2
-rw-r--r--packages/gcc/gcc_4.2.4.bb (renamed from packages/gcc/gcc_4.3.0.bb)2
-rw-r--r--packages/gcc/gcc_4.3.1.bb10
-rw-r--r--packages/gcc/gcc_csl-arm-2005q3.bb2
-rw-r--r--packages/gcc/gcc_csl-arm-2006q1.bb2
-rw-r--r--packages/gcc/gcc_csl-arm-2007q3.bb2
-rw-r--r--packages/gcc/gcc_csl-arm-2008q1.bb2
-rw-r--r--packages/gdb/files/sim-install-6.6.patch12
-rw-r--r--packages/gdb/gdb-6.8/early_debug_in_nptl.patch306
-rw-r--r--packages/gdb/gdb-cross-sdk_6.6.bb6
-rw-r--r--packages/gdb/gdb-cross-sdk_6.8.bb16
-rw-r--r--packages/gdb/gdb-cross_6.6.bb7
-rw-r--r--packages/gdb/gdb-cross_6.8.bb6
-rw-r--r--packages/gimp/gimp.inc2
-rw-r--r--packages/glib-2.0/glib-2.0-2.16.1/gcc-4.2-inline-fix.patch30
-rw-r--r--packages/glib-2.0/glib-2.0-2.16.3/.mtn2git_empty0
-rw-r--r--packages/glib-2.0/glib-2.0-2.16.3/configure-libtool.patch34
-rw-r--r--packages/glib-2.0/glib-2.0-native_2.16.1.bb39
-rw-r--r--packages/glib-2.0/glib-2.0_2.16.1.bb6
-rw-r--r--packages/glib-2.0/glib-2.0_2.16.3.bb11
-rw-r--r--packages/glibc/glibc-stage.inc6
-rw-r--r--packages/glibc/glibc_2.3.2+cvs20040726.bb2
-rw-r--r--packages/glibc/glibc_2.3.2.bb2
-rw-r--r--packages/glibc/glibc_2.3.3+cvs20041128.bb2
-rw-r--r--packages/glibc/glibc_2.3.3+cvs20050221.bb2
-rw-r--r--packages/glibc/glibc_2.3.3+cvs20050420.bb2
-rw-r--r--packages/glibc/glibc_2.3.3.bb2
-rw-r--r--packages/glibc/glibc_2.3.5+cvs20050627.bb2
-rw-r--r--packages/glibc/glibc_2.3.6.bb2
-rw-r--r--packages/glibc/glibc_2.4.bb2
-rw-r--r--packages/glibc/glibc_2.5.bb2
-rw-r--r--packages/glibc/glibc_2.6.1.bb2
-rw-r--r--packages/glibc/glibc_2.7.bb2
-rw-r--r--packages/gnome/goffice_0.6.3.bb22
-rw-r--r--packages/gnome/libart-lgpl/mipsel/.mtn2git_empty0
-rw-r--r--packages/gnome/libart-lgpl/mipsel/art_config.h10
-rw-r--r--packages/gnuchess/files/.mtn2git_empty0
-rw-r--r--packages/gnuchess/files/fix_cast_error_and_gnuchess_exec.patch23
-rw-r--r--packages/gnuchess/files/fltk-chess.desktop7
-rw-r--r--packages/gnuchess/fltk-chess_0.5.bb33
-rw-r--r--packages/gnumeric/gnumeric_1.8.3.bb29
-rw-r--r--packages/gnuradio/gnuradio.inc2
-rw-r--r--packages/gnuradio/gnuradio_3.0.4.bb2
-rw-r--r--packages/gnuradio/gnuradio_3.1.2.bb2
-rw-r--r--packages/gnuradio/gnuradio_svn.bb2
-rw-r--r--packages/gpe-conf/gpe-conf-0.2.7/.mtn2git_empty0
-rw-r--r--packages/gpe-conf/gpe-conf-0.2.7/poweroff.patch11
-rw-r--r--packages/gpe-conf/gpe-conf_0.2.7.bb4
-rw-r--r--packages/gpe-login/gpe-login_0.93.bb24
-rw-r--r--packages/gpsbabel/gpsbabel_1.3.3.bb4
-rw-r--r--packages/gstreamer/gst-plugin-pulse_0.9.4.bb28
-rw-r--r--packages/gstreamer/gst-plugins-base_0.10.17.bb4
-rw-r--r--packages/gstreamer/gst-plugins-good_0.10.7.bb3
-rw-r--r--packages/gstreamer/gst-plugins.inc2
-rw-r--r--packages/gtk+/gtk+-2.12.3/hardcoded_libtool.patch6
-rw-r--r--packages/gtk+/gtk+_2.12.3.bb2
-rw-r--r--packages/gtk-webcore/midori-0.0.18/.mtn2git_empty0
-rw-r--r--packages/gtk-webcore/midori-0.0.18/desktop.patch7
-rw-r--r--packages/gtk-webcore/midori_0.0.18.bb7
-rw-r--r--packages/gtkmm/gtkmm_2.12.7.bb (renamed from packages/gtkmm/gtkmm_2.10.11.bb)0
-rw-r--r--packages/guile/files/configure-fix.patch10
-rw-r--r--packages/guile/guile-native_1.8.5.bb130
-rw-r--r--packages/hal/files/20hal2
-rw-r--r--packages/hal/files/autoconf.diff11
-rw-r--r--packages/hal/files/sg-inhibit.patch24
-rw-r--r--packages/hal/hal-info_20070831.bb16
-rw-r--r--packages/hal/hal-info_git.bb9
-rw-r--r--packages/hal/hal/.mtn2git_empty0
-rw-r--r--packages/hal/hal/configure_fix.patch60
-rw-r--r--packages/hal/hal_0.5.9.1.bb93
-rw-r--r--packages/hal/hal_0.5.9.bb4
-rw-r--r--packages/hal/hal_git.bb89
-rw-r--r--packages/handsfree/.mtn2git_empty0
-rw-r--r--packages/handsfree/files/.mtn2git_empty0
-rw-r--r--packages/handsfree/files/Makefile.patch19
-rw-r--r--packages/handsfree/handsfree_0.1.bb32
-rw-r--r--packages/i2c-tools/read-edid_1.4.1.bb19
-rw-r--r--packages/icewm/icewm-1.2.20/configure.patch68
-rw-r--r--packages/icewm/icewm-1.2.20/makefile.patch26
-rw-r--r--packages/icewm/icewm-1.2.30/makefile.patch13
-rw-r--r--packages/icewm/icewm_1.2.20.bb26
-rw-r--r--packages/icewm/icewm_1.2.30.bb12
-rw-r--r--packages/icu/icu-3.6.inc1
-rw-r--r--packages/imagemagick/imagemagick_6.3.5-10.bb3
-rw-r--r--packages/images/beagleboard-demo-image.bb37
-rw-r--r--packages/images/fso-image-light.bb32
-rw-r--r--packages/images/fso-image.bb117
-rw-r--r--packages/images/moko-underground-image.bb6
-rw-r--r--packages/images/neuros-osd-base-image.bb18
-rw-r--r--packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb2
-rw-r--r--packages/ipkg-utils/ipkg-utils/arfile_even_alignment.patch11
-rw-r--r--packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch40
-rw-r--r--packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb3
-rw-r--r--packages/jamvm/jamvm.inc2
-rw-r--r--packages/jamvm/jamvm_1.4.5.bb2
-rw-r--r--packages/jamvm/jamvm_1.5.0.bb2
-rw-r--r--packages/jamvm/jamvm_1.5.1.bb2
-rw-r--r--packages/kerneloops/.mtn2git_empty0
-rw-r--r--packages/kerneloops/kerneloops_0.11.bb28
-rw-r--r--packages/keymaps/files/tosa/keymap-2.6.map408
-rw-r--r--packages/keymaps/keymaps_1.0.bb2
-rw-r--r--packages/lame/lame_3.96.1.bb1
-rw-r--r--packages/lasertraq/.mtn2git_empty0
-rw-r--r--packages/lasertraq/lasertraq.inc10
-rw-r--r--packages/lasertraq/traqconfig_0.8.bb6
-rw-r--r--packages/lcd4linux/.mtn2git_empty0
-rw-r--r--packages/lcd4linux/files/.mtn2git_empty0
-rw-r--r--packages/lcd4linux/files/lcd4linux.init56
-rw-r--r--packages/lcd4linux/files/libusb-compat.diff95
-rw-r--r--packages/lcd4linux/lcd4linux_0.10.0.bb27
-rw-r--r--packages/lcms/lcms_1.13.bb2
-rw-r--r--packages/lcms/lcms_1.17.bb (renamed from packages/lcms/lcms_1.15.bb)2
-rw-r--r--packages/libexosip2/libexosip2_3.1.0.bb18
-rw-r--r--packages/libfakekey/files/.mtn2git_empty0
-rw-r--r--packages/libfakekey/files/configure-fix.patch10
-rw-r--r--packages/libfakekey/libfakekey_svn.bb4
-rw-r--r--packages/libgpewidget/libgpewidget_0.115.bb4
-rw-r--r--packages/libiconv/libiconv-1.12/.mtn2git_empty0
-rw-r--r--packages/libiconv/libiconv-1.12/autotools.patch24948
-rw-r--r--packages/libiconv/libiconv-1.12/preload.patch379
-rw-r--r--packages/libiconv/libiconv_1.12.bb32
-rw-r--r--packages/libmatthew/files/.mtn2git_empty0
-rw-r--r--packages/libmatthew/files/Makefile-0.7.patch15
-rw-r--r--packages/libmatthew/libmatthew_0.7.bb50
-rw-r--r--packages/libmikmod/libmikmod/m4.patch16
-rw-r--r--packages/libmikmod/libmikmod_3.1.12.bb (renamed from packages/libmikmod/libmikmod_3.1.11.bb)25
-rw-r--r--packages/libmikmod/libmikmod_3.2.0-beta2.bb29
-rw-r--r--packages/libmodplug/libmodplug_0.8.bb (renamed from packages/libmodplug/libmodplug_0.7.bb)1
-rw-r--r--packages/libnids/libnids_1.18.bb18
-rw-r--r--packages/liboil/liboil_0.3.14.bb17
-rw-r--r--packages/libopie/libopie2/ipaq_rotate_fix.patch23
-rw-r--r--packages/libopie/libopie2/remove_h2200_rotate_fix.patch15
-rw-r--r--packages/libopie/libopie2_1.2.3.bb4
-rw-r--r--packages/libosip2/libosip2_3.1.0.bb12
-rw-r--r--packages/libpcap/libpcap-0.9.8/aclocal.patch156
-rw-r--r--packages/libpcap/libpcap_0.9.8.bb4
-rw-r--r--packages/libpcre/libpcre_7.6.bb9
-rw-r--r--packages/libpng/libpng-1.2.20/.mtn2git_empty0
-rw-r--r--packages/libpng/libpng-1.2.20/makefile_fix.patch18
-rw-r--r--packages/libpng/libpng_1.2.20.bb5
-rw-r--r--packages/libqpe/libqpe-opie/citytime-path.patch11
-rw-r--r--packages/libqpe/libqpe-opie/fix-sd-card-path.patch17
-rw-r--r--packages/libqpe/libqpe-opie_1.2.3.bb3
-rw-r--r--packages/libqpe/libqpe-opie_cvs.bb4
-rw-r--r--packages/libsdl/files/configure_tweak.patch1167
-rw-r--r--packages/libsdl/libsdl-mixer_1.2.8.bb21
-rw-r--r--packages/libsdl/libsdl-x11_1.2.11.bb22
-rw-r--r--packages/libsdl/libsdl.inc13
-rw-r--r--packages/libsndfile/files/.mtn2git_empty0
-rw-r--r--packages/libsndfile/files/configure-fix.patch10
-rw-r--r--packages/libsndfile/libsndfile1_1.0.17.bb6
-rw-r--r--packages/libtiff/tiff_3.8.2.bb28
-rw-r--r--packages/libtool/libtool-2.2.4/.mtn2git_empty0
-rw-r--r--packages/libtool/libtool-2.2.4/cross_compile.patch55
-rw-r--r--packages/libtool/libtool-2.2.4/prefix.patch103
-rw-r--r--packages/libtool/libtool-cross_2.2.4.bb45
-rw-r--r--packages/libtool/libtool-native_2.2.4.bb41
-rw-r--r--packages/libtool/libtool-sdk_2.2.4.bb57
-rw-r--r--packages/libtool/libtool_2.2.4.bb25
-rw-r--r--packages/liburiparser/files/autofoo.patch23
-rw-r--r--packages/libusb/files/.mtn2git_empty0
-rw-r--r--packages/libusb/files/configure_fix.patch17
-rw-r--r--packages/libusb/libusb-compat_0.0.9+0.1.0-beta1.bb37
-rw-r--r--packages/libusb/libusb1_0.9.0.bb27
-rw-r--r--packages/libusb/libusb_0.1.12.bb7
-rw-r--r--packages/lighttpd/lighttpd/lighttpd11
-rw-r--r--packages/lighttpd/lighttpd/mod_redirect.c.patch56
-rw-r--r--packages/lighttpd/lighttpd_1.4.18.bb3
-rw-r--r--packages/linux/linux-davinci_2.6.x+git-davinci.bb2
-rw-r--r--packages/linux/linux-kaiser_2.6.24+git.bb7
-rw-r--r--packages/linux/linux-ml403-slab-2.6.x_git.bb80
-rw-r--r--packages/linux/linux-neuros/binutils-buildid-arm.patch16
-rw-r--r--packages/linux/linux-neuros/mtune-gcc4-fix.patch11
-rw-r--r--packages/linux/linux-neuros/neuros-osd/.mtn2git_empty0
-rw-r--r--packages/linux/linux-neuros/neuros-osd/defconfig1373
-rw-r--r--packages/linux/linux-neuros/neuros-osd2/.mtn2git_empty0
-rw-r--r--packages/linux/linux-neuros/neuros-osd2/defconfig1377
-rw-r--r--packages/linux/linux-neuros_2.6.15.bb3
-rw-r--r--packages/linux/linux-neuros_git.bb16
-rw-r--r--packages/linux/linux-omap1-2.6.24-omap1/timespec_add_ns_avoid_udivdi3.patch20
-rw-r--r--packages/linux/linux-omap1-2.6.25-omap1/.mtn2git_empty0
-rw-r--r--packages/linux/linux-omap1-2.6.25-omap1/defconfig1175
-rw-r--r--packages/linux/linux-omap1_2.6.24-omap1.bb1
-rw-r--r--packages/linux/linux-omap1_2.6.25-omap1.bb9
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/00001-mcbsp-transform.patch1160
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/00002-mcbsp-omap1.patch204
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/00003-mcbsp-omap3-clock.patch123
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/00004-omap2-mcbsp.patch144
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/0001-omap3-cpuidle.patch450
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch69
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/0002-omap3-cpuidle.patch88
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/16bpp.patch13
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/defconfig415
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/fix-dispc-clocks.patch147
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/flash.patch558
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/omap3-dppl-divider.patch114
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/omap3-jitter.patch95
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/soc.patch1173
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/timer-suppression.patch43
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/.mtn2git_empty0
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/0001-ARM-OMAP-SmartReflex-driver.patch1002
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/0001-ASoC-OMAP-Add-basic-support-for-OMAP34xx-in-McBSP.patch55
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/0001-omap3-cpuidle.patch450
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch69
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/0002-ARM-OMAP-SmartReflex-driver.patch278
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/0002-omap3-cpuidle.patch88
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/0003-ARM-OMAP-SmartReflex-driver.patch1001
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/defconfig1567
-rw-r--r--packages/linux/linux-omap2-git/omap3evm/no-harry-potter.diff11
-rw-r--r--packages/linux/linux-omap2_git.bb27
-rw-r--r--packages/linux/linux-openezx-devel_svn.bb63
-rw-r--r--packages/linux/linux-openmoko-devel/.mtn2git_empty0
-rw-r--r--packages/linux/linux-openmoko-devel/defconfig-om-gta011767
-rw-r--r--packages/linux/linux-openmoko-devel/defconfig-om-gta021766
-rw-r--r--packages/linux/linux-openmoko-devel/del-hardcoded-led-behaviour.patch16
-rw-r--r--packages/linux/linux-openmoko-devel/fix-defconfig-gta01.patch30
-rw-r--r--packages/linux/linux-openmoko-devel_git.bb12
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-akita9
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-bootcdx86489
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-c7x02
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-collie2
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-htcuniversal2
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-hx20002
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-poodle2
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-qemuarm2
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-qemux862
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-spitz2
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-tosa2
-rw-r--r--packages/linux/linux-rp-2.6.23/defconfig-zylonite27
-rw-r--r--packages/linux/linux-rp-2.6.23/zylonite_keypad-r0.patch1187
-rw-r--r--packages/linux/linux-rp-2.6.23/zylonite_mtd-r0.patch4093
-rw-r--r--packages/linux/linux-rp-2.6.23/zylonite_touch-r0.patch1548
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-akita12
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-bootcdx862
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-c7x010
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-collie10
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-htcuniversal2
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-hx20002
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-poodle13
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-qemuarm2
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-qemux862
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-spitz10
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-tosa23
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-zylonite2
-rw-r--r--packages/linux/linux-rp-2.6.24/hrw-hostapcard.patch34
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/.mtn2git_empty0
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/binutils-buildid-arm.patch16
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/connectplus-prevent-oops-HACK.patch17
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/connectplus-remove-ide-HACK.patch12
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-akita1741
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-bootcdx861994
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-c7x01747
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-collie1437
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-htcuniversal1308
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-hx20001733
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-poodle1757
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-qemuarm1582
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-qemux861993
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-spitz1834
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-zylonite1740
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/hostap-monitor-mode.patch209
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/hrw-hostapcard.patch34
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/htcuni-acx.patch33527
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/htcuni.patch7899
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/pxa-serial-hack.patch90
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/pxa_fb_overlay.patch26
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch155
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/sharpsl-rc-r1.patch555
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/spitz_h_rewrite.patch497
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/versatile-armv6.patch17
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite-boot.patch45
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_keypad-r0.patch1187
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_mtd-r0.patch4093
-rw-r--r--packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_touch-r0.patch1548
-rw-r--r--packages/linux/linux-rp.inc7
-rw-r--r--packages/linux/linux-rp_2.6.23.bb11
-rw-r--r--packages/linux/linux-rp_2.6.24.bb32
-rw-r--r--packages/linux/linux-rp_2.6.25+2.6.26-rc4.bb189
-rw-r--r--packages/linux/linux-rt-2.6.24/sysctl_missing_include.patch12
-rw-r--r--packages/linux/linux-rt-2.6.25/.mtn2git_empty0
-rw-r--r--packages/linux/linux-rt-2.6.25/efika/.mtn2git_empty0
-rw-r--r--packages/linux/linux-rt-2.6.25/efika/defconfig1769
-rw-r--r--packages/linux/linux-rt-2.6.25/mpc8315e-rdb/.mtn2git_empty0
-rw-r--r--packages/linux/linux-rt-2.6.25/mpc8315e-rdb/defconfig1833
-rw-r--r--packages/linux/linux-rt_2.6.24.bb12
-rw-r--r--packages/linux/linux-rt_2.6.25.bb21
-rw-r--r--packages/linux/linux-xilinx-slab/.mtn2git_empty0
-rw-r--r--packages/linux/linux-xilinx-slab/xilinx-ml403_defconfig (renamed from packages/linux/linux-ml403-slab-2.6.x/xilinx-ml403_defconfig)0
-rw-r--r--packages/linux/linux-xilinx-slab_git.bb48
-rw-r--r--packages/linux/linux.inc32
-rw-r--r--packages/linux/unslung-kernel_2.4.22.l2.3r63.bb6
-rw-r--r--packages/m4/m4-native_1.4.11.bb19
-rw-r--r--packages/m4/m4_1.4.11.bb13
-rw-r--r--packages/makedevs/makedevs_1.0.0.bb2
-rw-r--r--packages/meta/meta-toolchain-slugos.bb10
-rw-r--r--packages/meta/meta-toolchain.bb2
-rw-r--r--packages/meta/slugos-packages.bb16
-rw-r--r--packages/midpath/files/0.2+0.3rc1-fix-crlf.patch87
-rw-r--r--packages/midpath/files/configuration_maemo.cfg123
-rw-r--r--packages/midpath/files/configuration_openmoko.cfg124
-rw-r--r--packages/midpath/files/midpath-launcher-j2se50
-rw-r--r--packages/midpath/files/midpath-suitemanager2
-rw-r--r--packages/midpath/files/midpath-suitemanager.desktop11
-rw-r--r--packages/midpath/files/midpath.pngbin0 -> 9937 bytes
-rw-r--r--packages/midpath/files/shellscript.patch27
-rw-r--r--packages/midpath/midpath-alsa_0.1.bb38
-rw-r--r--packages/midpath/midpath-backend-alsa_0.2+0.3rc1.bb43
-rw-r--r--packages/midpath/midpath-backend-escher_0.2+0.3rc1.bb42
-rw-r--r--packages/midpath/midpath-backend-esd_0.2+0.3rc1.bb44
-rw-r--r--packages/midpath/midpath-backend-fb_0.2+0.3rc1.bb43
-rw-r--r--packages/midpath/midpath-backend-gtk-hildon_0.2+0.3rc1.bb34
-rw-r--r--packages/midpath/midpath-backend-gtk_0.2+0.3rc1.bb44
-rw-r--r--packages/midpath/midpath-backend-pulseaudio_0.2+0.3rc1.bb44
-rw-r--r--packages/midpath/midpath-backend-qt3x11_0.2+0.3rc1.bb47
-rw-r--r--packages/midpath/midpath-backend-qt4x11_0.2+0.3rc1.bb46
-rw-r--r--packages/midpath/midpath-backend-qte_0.2+0.3rc1.bb47
-rw-r--r--packages/midpath/midpath-backend-sdl_0.2+0.3rc1.bb59
-rw-r--r--packages/midpath/midpath-cldc-native_0.1.bb11
-rw-r--r--packages/midpath/midpath-cldc-sdl_0.1.bb40
-rw-r--r--packages/midpath/midpath-cldc-x11_0.1.bb37
-rw-r--r--packages/midpath/midpath-cldc_0.1.bb34
-rw-r--r--packages/midpath/midpath-cldc_0.2+0.3rc1.bb45
-rw-r--r--packages/midpath/midpath-common.inc33
-rw-r--r--packages/midpath/midpath-core_0.2+0.3rc1.bb90
-rw-r--r--packages/midpath/midpath-demos_0.2+0.3rc1.bb53
-rw-r--r--packages/midpath/midpath-gtk_0.1.bb39
-rw-r--r--packages/midpath/midpath-jgl_0.2+0.3rc1.bb46
-rw-r--r--packages/midpath/midpath-location_0.2+0.3rc1.bb45
-rw-r--r--packages/midpath/midpath-m3g_0.2+0.3rc1.bb48
-rw-r--r--packages/midpath/midpath-maemo_0.2+0.3rc1.bb19
-rw-r--r--packages/midpath/midpath-messaging_0.2+0.3rc1.bb46
-rw-r--r--packages/midpath/midpath-opengles_0.2+0.3rc1.bb56
-rw-r--r--packages/midpath/midpath-openmoko_0.2+0.3rc1.bb19
-rw-r--r--packages/midpath/midpath-pulseaudio_0.1.bb38
-rw-r--r--packages/midpath/midpath-qt3x11_0.1.bb45
-rw-r--r--packages/midpath/midpath-qte_0.1.bb43
-rw-r--r--packages/midpath/midpath-svg_0.2+0.3rc1.bb60
-rw-r--r--packages/midpath/midpath-test_0.1.bb45
-rw-r--r--packages/midpath/midpath-webservices_0.2+0.3rc1.bb51
-rw-r--r--packages/midpath/midpath.inc55
-rw-r--r--packages/midpath/midpath_0.1.bb60
-rw-r--r--packages/modplugplay/modplugplay_1.0.bb12
-rw-r--r--packages/module-init-tools/module-init-tools_3.2.1.bb2
-rw-r--r--packages/module-init-tools/module-init-tools_3.2.2.bb2
-rw-r--r--packages/mozilla/firefox-3.0/.mtn2git_empty0
-rw-r--r--packages/mozilla/firefox-3.0/010_FPU_IS_ARM_FPA_xslt.diff56
-rw-r--r--packages/mozilla/firefox-3.0/Bug339782.additional.fix.diff39
-rw-r--r--packages/mozilla/firefox-3.0/Bug385583.nspr.jmp_buf.eabi.diff33
-rw-r--r--packages/mozilla/firefox-3.0/Bug405992.atomic.nspr.diff48
-rw-r--r--packages/mozilla/firefox-3.0/jemalloc-tls.patch28
-rw-r--r--packages/mozilla/firefox-3.0/jsautocfg-dontoverwrite.patch23
-rw-r--r--packages/mozilla/firefox-3.0/linkage-problem.patch14
-rw-r--r--packages/mozilla/firefox-3.0/mozconfig61
-rw-r--r--packages/mozilla/firefox-3.0/random_to_urandom.diff26
-rw-r--r--packages/mozilla/firefox-3.0/security-cross.patch93
-rw-r--r--packages/mozilla/firefox_3.0.bb46
-rw-r--r--packages/mplayer/files/Makefile-codec-cfg.patch10
-rw-r--r--packages/mplayer/files/makefile-nostrip-svn.patch29
-rw-r--r--packages/mplayer/mplayer-maemo_svn.bb1
-rw-r--r--packages/mplayer/mplayer_0.0+1.0rc2.bb1
-rw-r--r--packages/navit/navit.inc1
-rw-r--r--packages/navit/navit_0.0.4.bb2
-rw-r--r--packages/navit/navit_cvs.bb13
-rw-r--r--packages/navit/navit_svn.bb12
-rw-r--r--packages/ncurses/ncurses-native_5.4.bb12
-rw-r--r--packages/ncurses/ncurses-sdk_5.4.bb3
-rw-r--r--packages/ncurses/ncurses.inc66
-rw-r--r--packages/ncurses/ncurses/makefile_tweak.patch89
-rw-r--r--packages/ncurses/ncurses/visibility.patch6
-rw-r--r--packages/ncurses/ncurses_5.4.bb3
-rw-r--r--packages/netbase/netbase/mpc8313e-rdb/interfaces16
-rw-r--r--packages/nonworking/opie-dasher/.mtn2git_empty0
-rw-r--r--packages/nonworking/opie-dasher/opie-dasher.inc (renamed from packages/opie-dasher/opie-dasher.inc)0
-rw-r--r--packages/nonworking/opie-dasher/opie-dasher_1.2.2.bb (renamed from packages/opie-dasher/opie-dasher_1.2.2.bb)0
-rw-r--r--packages/nonworking/opie-dasher/opie-dasher_1.2.3.bb (renamed from packages/opie-dasher/opie-dasher_1.2.3.bb)0
-rw-r--r--packages/nonworking/opie-dasher/opie-dasher_cvs.bb (renamed from packages/opie-dasher/opie-dasher_cvs.bb)0
-rw-r--r--packages/obexftp/obexftp_0.20.bb8
-rw-r--r--packages/obexftp/obexftp_0.22.bb30
-rw-r--r--packages/obsolete/classpath/classpath-gtk_0.93.bb9
-rw-r--r--packages/obsolete/classpath/classpath-gtk_cvs.bb30
-rw-r--r--packages/obsolete/classpath/classpath-minimal-native_0.93.bb23
-rw-r--r--packages/obsolete/classpath/classpath-minimal-native_0.95.bb7
-rw-r--r--packages/obsolete/classpath/classpath-minimal_0.90.bb9
-rw-r--r--packages/obsolete/classpath/classpath-minimal_0.95.bb40
-rw-r--r--packages/obsolete/classpath/classpath.inc30
-rw-r--r--packages/obsolete/classpath/classpath_0.14.bb10
-rw-r--r--packages/obsolete/classpath/classpath_0.15.bb10
-rw-r--r--packages/obsolete/classpath/classpath_0.17.bb10
-rw-r--r--packages/obsolete/classpath/classpath_0.18.bb10
-rw-r--r--packages/obsolete/classpath/classpath_0.19.bb10
-rw-r--r--packages/obsolete/classpath/classpath_0.20.bb10
-rw-r--r--packages/obsolete/classpath/classpath_cvs.bb35
-rw-r--r--packages/obsolete/classpath/files/disable-automake-checks-v2.patch11
-rw-r--r--packages/obsolete/classpath/files/disable-automake-checks.patch11
-rw-r--r--packages/obsolete/classpath/files/fix-endian-arm-floats.patch11
-rw-r--r--packages/obsolete/classpath/files/gconf_version.patch11
-rw-r--r--packages/obsolete/jamvm/files/jamvm-1.3.1-size-defaults.patch12
-rw-r--r--packages/obsolete/jamvm/jamvm-1.3.0/heap-size.patch22
-rw-r--r--packages/obsolete/jamvm/jamvm_1.3.0.bb21
-rw-r--r--packages/obsolete/jamvm/jamvm_1.3.1.bb21
-rw-r--r--packages/obsolete/jamvm/jamvm_1.3.2.bb24
-rw-r--r--packages/obsolete/jamvm/jamvm_1.4.1.bb24
-rw-r--r--packages/obsolete/olsr/.mtn2git_empty0
-rw-r--r--packages/obsolete/olsr/files/.mtn2git_empty0
-rw-r--r--packages/obsolete/olsr/files/0.4.9-httpinfo-makefile.diff (renamed from packages/olsrd/files/0.4.9-httpinfo-makefile.diff)0
-rw-r--r--packages/obsolete/olsr/files/lib.diff (renamed from packages/olsrd/files/lib.diff)0
-rw-r--r--packages/obsolete/olsr/olsr_0.3-1.bb (renamed from packages/olsr/olsr_0.3-1.bb)0
-rw-r--r--packages/obsolete/olsr/olsrd_0.4.10.bb (renamed from packages/olsrd/olsrd_0.4.10.bb)0
-rw-r--r--packages/obsolete/olsr/olsrd_0.4.8.bb (renamed from packages/olsrd/olsrd_0.4.8.bb)3
-rw-r--r--packages/obsolete/olsr/olsrd_0.4.9.bb (renamed from packages/olsrd/olsrd_0.4.9.bb)0
-rw-r--r--packages/obsolete/olsr/olsrd_cvs.bb (renamed from packages/olsrd/olsrd_cvs.bb)0
-rw-r--r--packages/olsrd/files/olsrd-0.5.5-unbreak-makefile.patch47
-rw-r--r--packages/olsrd/olsrd.inc46
-rw-r--r--packages/olsrd/olsrd_0.5.3.bb14
-rw-r--r--packages/olsrd/olsrd_0.5.5.bb7
-rw-r--r--packages/openocd/openocd-native_svn.bb4
-rw-r--r--packages/openocd/openocd_svn.bb6
-rw-r--r--packages/opensync/libopensync-0.36/.mtn2git_empty0
-rw-r--r--packages/opensync/libopensync-plugin-evolution2_0.36.bb3
-rw-r--r--packages/opensync/libopensync-plugin-file_0.36.bb1
-rw-r--r--packages/opensync/libopensync-plugin-google-calendar_0.36.bb1
-rw-r--r--packages/opensync/libopensync-plugin-irmc_0.36.bb3
-rw-r--r--packages/opensync/libopensync-plugin-syncml_0.36.bb3
-rw-r--r--packages/opensync/libopensync-plugin-vformat_0.36.bb3
-rw-r--r--packages/opensync/libopensync-plugin_0.36.inc9
-rw-r--r--packages/opensync/libopensync/.mtn2git_empty0
-rw-r--r--packages/opensync/libopensync_0.36.bb26
-rw-r--r--packages/opensync/libsyncml/.mtn2git_empty0
-rw-r--r--packages/opensync/libsyncml_0.4.6.bb18
-rw-r--r--packages/opensync/msynctool_0.36.bb7
-rw-r--r--packages/opie-help-en/opie-help-en_cvs.bb4
-rw-r--r--packages/opie-i18n/opie-i18n_cvs.bb4
-rw-r--r--packages/opie-i18n/opie-lrelease-native_cvs.bb5
-rw-r--r--packages/opie-i18n/opie-lupdate-native_cvs.bb5
-rw-r--r--packages/opie-keytabs/opie-keytabs_cvs.bb4
-rw-r--r--packages/opie-mediaplayer2/opie-mediaplayer2-skin-default-landscape_cvs.bb9
-rw-r--r--packages/opie-mediaplayer2/opie-mediaplayer2-skin-default_cvs.bb8
-rw-r--r--packages/opie-mediaplayer2/opie-mediaplayer2-skin-pod_cvs.bb8
-rw-r--r--packages/opie-mediaplayer2/opie-mediaplayer2-skin-techno_cvs.bb8
-rw-r--r--packages/opie-pics/opie-pics_cvs.bb4
-rw-r--r--packages/opie-sh-snes/opie-sh-snes_cvs.bb5
-rw-r--r--packages/opie-sounds/opie-sounds_cvs.bb4
-rw-r--r--packages/opie-taskbar/opie-taskbar-images.inc20
-rw-r--r--packages/opie-taskbar/opie-taskbar-images_1.2.3+cvs20070922.bb4
-rw-r--r--packages/opie-taskbar/opie-taskbar-images_1.2.3.bb6
-rw-r--r--packages/opie-taskbar/opie-taskbar-images_cvs.bb4
-rw-r--r--packages/opkg/opkg-native_svn.bb6
-rw-r--r--packages/opkg/opkg-nogpg_svn.bb5
-rw-r--r--packages/opkg/opkg.inc2
-rw-r--r--packages/oprofile/oprofile/armv6_fix.patch54
-rw-r--r--packages/oprofile/oprofile/fix-arith.patch52
-rw-r--r--packages/oprofile/oprofile/oparchive_fix.patch22
-rw-r--r--packages/oprofile/oprofile/opstart.patch235
-rw-r--r--packages/oprofile/oprofile/root_option.patch1051
-rw-r--r--packages/oprofile/oprofile/xml_callgraph_details.patch232
-rw-r--r--packages/oprofile/oprofile_0.9.3.bb22
-rw-r--r--packages/oprofile/oprofile_cvs.bb8
-rw-r--r--packages/oprofile/oprofileui-svn.inc8
-rw-r--r--packages/oprofile/oprofileui.inc16
-rw-r--r--packages/oprofile/oprofileui_svn.bb2
-rw-r--r--packages/packagekit/files/d1e096c3267c1c9492041382b954e9327bc8bbec.patch2938
-rw-r--r--packages/packagekit/files/pk-nodocs.patch10
-rw-r--r--packages/packagekit/packagekit_git.bb5
-rw-r--r--packages/pciutils/pciutils-2.2.4/configure.patch16
-rw-r--r--packages/pciutils/pciutils_2.2.4.bb2
-rw-r--r--packages/pidgin/pidgin.inc2
-rw-r--r--packages/pidgin/pidgin_2.4.2.bb17
-rw-r--r--packages/pkgconfig/pkgconfig-0.22/sysrootfix.patch (renamed from packages/pkgconfig/pkgconfig-0.22/sysroot-support.patch)0
-rw-r--r--packages/pkgconfig/pkgconfig-0.23/.mtn2git_empty0
-rw-r--r--packages/pkgconfig/pkgconfig-0.23/autofoo.patch526
-rw-r--r--packages/pkgconfig/pkgconfig-0.23/glibconfig-sysdefs.h6
-rw-r--r--packages/pkgconfig/pkgconfig-0.23/sysrootfix.patch31
-rw-r--r--packages/pkgconfig/pkgconfig-native_0.23.bb8
-rw-r--r--packages/pkgconfig/pkgconfig-sdk_0.23.bb6
-rw-r--r--packages/pkgconfig/pkgconfig.inc7
-rw-r--r--packages/pkgconfig/pkgconfig_0.22.bb1
-rw-r--r--packages/pkgconfig/pkgconfig_0.23.bb6
-rw-r--r--packages/powertop/powertop_1.10.bb (renamed from packages/powertop/powertop_1.9.bb)2
-rw-r--r--packages/pulseaudio/files/asound.conf.pulseaudio7
-rw-r--r--packages/pulseaudio/padevchooser_0.9.3.bb9
-rw-r--r--packages/pulseaudio/pulseaudio-0.9.10/2113.diff19
-rw-r--r--packages/pulseaudio/pulseaudio-0.9.10/2114.diff15
-rw-r--r--packages/pulseaudio/pulseaudio-0.9.10/libtool2.patch48
-rw-r--r--packages/pulseaudio/pulseaudio-alsa-wrapper.bb43
-rw-r--r--packages/pulseaudio/pulseaudio-esd-wrapper.bb42
-rw-r--r--packages/pulseaudio/pulseaudio-meta/.mtn2git_empty0
-rw-r--r--packages/pulseaudio/pulseaudio-meta/asound.conf8
-rwxr-xr-xpackages/pulseaudio/pulseaudio-meta/pulseaudio50
-rw-r--r--packages/pulseaudio/pulseaudio-meta/session36
-rw-r--r--packages/pulseaudio/pulseaudio-meta_0.9.10.bb44
-rw-r--r--packages/pulseaudio/pulseaudio.inc (renamed from packages/pulseaudio/pulse.inc)0
-rw-r--r--packages/pulseaudio/pulseaudio_0.9.10.bb16
-rw-r--r--packages/pulseaudio/pulseaudio_0.9.6.bb4
-rw-r--r--packages/pulseaudio/pulseaudio_0.9.9.bb4
-rw-r--r--packages/python/python-etk_git.bb11
-rw-r--r--packages/python/python-flup_1.0.bb10
-rw-r--r--packages/python/python-gst/import-gobject-instead-of-pygtk.patch19
-rw-r--r--packages/python/python-gst_0.10.10.bb10
-rw-r--r--packages/python/python-pyalsa_1.0.16.bb12
-rw-r--r--packages/python/python-pyalsaaudio_0.3.bb12
-rw-r--r--packages/python/python-pygobject-native_2.12.3.bb8
-rw-r--r--packages/python/python-pygobject-native_2.14.2.bb16
-rw-r--r--packages/python/python-pygobject/generate-constants.patch18
-rw-r--r--packages/python/python-pygobject/python-path.patch37
-rw-r--r--packages/python/python-pygobject_2.14.2.bb (renamed from packages/python/python-pygobject_2.12.3.bb)14
-rw-r--r--packages/python/python-pyyaml_3.05.bb10
-rw-r--r--packages/qemu/qemu_0.9.1.bb2
-rw-r--r--packages/qpe-games/crossword_0.0.3.bb2
-rw-r--r--packages/qte/qte-2.3.10/disable-dup-rotation.patch14
-rw-r--r--packages/qte/qte-mt_2.3.10.bb2
-rw-r--r--packages/readline/readline_4.3.bb2
-rw-r--r--packages/rt-tests/rt-tests_0.21.bb23
-rw-r--r--packages/rt2x00/rt73-k2wrlz_3.0.0.bb19
-rw-r--r--packages/s3c24xx-utils/s3c2410-boot-usb-native_svn.bb10
-rw-r--r--packages/s3c24xx-utils/s3c24xx-gpio_svn.bb5
-rw-r--r--packages/s3c24xx-utils/sjf2410-linux-native_svn.bb8
-rw-r--r--packages/sablevm/sablevm-classpath_1.12.bb2
-rw-r--r--packages/sablevm/sablevm_1.12.bb2
-rw-r--r--packages/setserial/files/.mtn2git_empty0
-rw-r--r--packages/setserial/files/addflags.patch21
-rw-r--r--packages/setserial/setserial_2.17.bb12
-rw-r--r--packages/sphinx/pocketsphinx_0.4.1.bb13
-rw-r--r--packages/sphinx/sphinx-fpu.inc6
-rw-r--r--packages/sphinx/sphinxbase_0.1.bb5
-rw-r--r--packages/sphinx/sphinxbase_0.3.bb14
-rwxr-xr-xpackages/stage-manager/files/stage-manager-ipkg12
-rw-r--r--packages/stage-manager/stagemanager-native_0.0.1.bb2
-rw-r--r--packages/sysfsutils/sysfsutils-2.1.0/.mtn2git_empty0
-rw-r--r--packages/sysfsutils/sysfsutils-2.1.0/get_mnt_path_check.patch56
-rw-r--r--packages/sysfsutils/sysfsutils_2.1.0.bb22
-rw-r--r--packages/syslog-ng/syslog-ng_2.0.5.bb4
-rw-r--r--packages/sysvinit/sysvinit_2.86.bb2
-rw-r--r--packages/tasks/task-python-efl-examples.bb3
-rw-r--r--packages/tasks/task-python-efl.bb4
-rw-r--r--packages/tasks/task-python-everything.bb9
-rw-r--r--packages/tasks/task-sdk-host.bb10
-rw-r--r--packages/tasks/task-slugos-toolchain-host.bb10
-rw-r--r--packages/u-boot/u-boot-git/.mtn2git_empty0
-rw-r--r--packages/u-boot/u-boot-git/beagleboard/.mtn2git_empty0
-rw-r--r--packages/u-boot/u-boot-git/beagleboard/armv7-a.patch11
-rw-r--r--packages/u-boot/u-boot-git/beagleboard/base.patch6672
-rw-r--r--packages/u-boot/u-boot-git/beagleboard/name.patch14
-rw-r--r--packages/u-boot/u-boot-omap3beagleboard-1.1.4/.mtn2git_empty0
-rw-r--r--packages/u-boot/u-boot-omap3beagleboard-1.1.4/500mhz-l2enable.patch42
-rw-r--r--packages/u-boot/u-boot-omap3beagleboard-1.1.4/armv7-a.patch11
-rw-r--r--packages/u-boot/u-boot-omap3beagleboard-1.1.4/disable-tone-logo.patch46
-rw-r--r--packages/u-boot/u-boot-omap3beagleboard-1.1.4/env.patch13
-rw-r--r--packages/u-boot/u-boot-omap3beagleboard-1.1.4/name.patch13
-rw-r--r--packages/u-boot/u-boot-omap3beagleboard_1.1.4.bb16
-rw-r--r--packages/u-boot/u-boot_git.bb9
-rw-r--r--packages/uclibc/uclibc_0.9.29.bb1
-rw-r--r--packages/update-modules/update-modules_1.0.bb2
-rw-r--r--packages/usbutils/usbutils_0.70.bb4
-rw-r--r--packages/usbutils/usbutils_cvs.bb4
-rw-r--r--packages/usrp/usrp_0.12.bb4
-rw-r--r--packages/util-linux/util-linux_2.12.bb2
-rw-r--r--packages/util-linux/util-linux_2.12o.bb2
-rw-r--r--packages/util-linux/util-linux_2.12q.bb2
-rw-r--r--packages/util-linux/util-linux_2.12r.bb2
-rw-r--r--packages/v86d/v86d_0.1.5.bb (renamed from packages/v86d/v86d_0.1.3.bb)2
-rw-r--r--packages/vlc/vlc-davinci_0.8.6h.bb59
-rw-r--r--packages/vnc/libvncserver/clientlogger.patch398
-rw-r--r--packages/vnc/libvncserver_0.9.1.bb8
-rw-r--r--packages/webkit/files/Makefile4
-rw-r--r--packages/webkit/files/Makefile.shared3
-rw-r--r--packages/webkit/files/acinclude.m4177
-rw-r--r--packages/webkit/files/update-webkit.sh8
-rw-r--r--packages/webkit/webkit-gtk_svn.bb2
-rw-r--r--packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/.mtn2git_empty0
-rw-r--r--packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/config.in (renamed from packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/config.in)0
-rw-r--r--packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/only-the-modules.patch (renamed from packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/only-the-modules.patch)0
-rw-r--r--packages/wlan-ng/wlan-ng-modules_svn.bb (renamed from packages/wlan-ng/wlan-ng-modules_0.2.8+svn20080315.bb)5
-rw-r--r--packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/.mtn2git_empty0
-rw-r--r--packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/config.in (renamed from packages/wlan-ng/wlan-ng-utils-0.2.8/config.in)0
-rw-r--r--packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/only-the-utils.patch22
-rw-r--r--packages/wlan-ng/wlan-ng-utils.inc4
-rw-r--r--packages/wlan-ng/wlan-ng-utils_0.2.7.bb7
-rw-r--r--packages/wlan-ng/wlan-ng-utils_0.2.8.bb7
-rw-r--r--packages/wlan-ng/wlan-ng-utils_svn.bb12
-rw-r--r--packages/xfce/xfce4-panel.inc3
-rw-r--r--packages/xfce/xfdesktop.inc4
-rw-r--r--packages/xfce/xfwm4.inc4
-rw-r--r--packages/xkeyboard-config/.mtn2git_empty0
-rw-r--r--packages/xkeyboard-config/xkeyboard-config_1.3.bb16
-rw-r--r--packages/xorg-app/constype_1.0.1.bb5
-rw-r--r--packages/xorg-app/editres_1.0.3.bb5
-rw-r--r--packages/xorg-app/fonttosfnt_1.0.4.bb7
-rw-r--r--packages/xorg-app/fslsfonts_1.0.2.bb5
-rw-r--r--packages/xorg-app/fstobdf_1.0.3.bb5
-rw-r--r--packages/xorg-app/mkfontscale-native_1.0.5.bb7
-rw-r--r--packages/xorg-app/mkfontscale_1.0.5.bb5
-rw-r--r--packages/xorg-app/rendercheck_1.3.bb4
-rw-r--r--packages/xorg-app/rgb_1.0.3.bb8
-rw-r--r--packages/xorg-app/sessreg_1.0.4.bb7
-rw-r--r--packages/xorg-app/showfont_1.0.2.bb5
-rw-r--r--packages/xorg-app/xdm_1.1.8.bb10
-rw-r--r--packages/xorg-app/xdpyinfo_1.0.3.bb10
-rw-r--r--packages/xorg-app/xfs_1.0.8.bb5
-rw-r--r--packages/xorg-app/xfsinfo_1.0.2.bb5
-rw-r--r--packages/xorg-app/xinit_1.0.9.bb6
-rw-r--r--packages/xorg-app/xinit_1.1.0.bb6
-rw-r--r--packages/xorg-app/xkbcomp-native_1.0.5.bb11
-rw-r--r--packages/xorg-app/xkbcomp_1.0.5.bb5
-rw-r--r--packages/xorg-doc/xorg-docs_1.4.bb12
-rw-r--r--packages/xorg-driver/xf86-input-calcomp_1.1.2.bb4
-rw-r--r--packages/xorg-driver/xf86-input-digitaledge_1.1.1.bb3
-rw-r--r--packages/xorg-driver/xf86-input-dmc_1.1.2.bb5
-rw-r--r--packages/xorg-driver/xf86-input-dynapro_1.1.2.bb5
-rw-r--r--packages/xorg-driver/xf86-input-elo2300_1.1.2.bb5
-rw-r--r--packages/xorg-driver/xf86-input-elographics_1.2.2.bb4
-rw-r--r--packages/xorg-driver/xf86-input-evdev_1.99.4.bb4
-rw-r--r--packages/xorg-driver/xf86-input-fpit_1.2.0.bb3
-rw-r--r--packages/xorg-driver/xf86-input-hyperpen_1.2.0.bb3
-rw-r--r--packages/xorg-driver/xf86-input-jamstudio_1.2.0.bb2
-rw-r--r--packages/xorg-driver/xf86-input-keyboard_1.3.1.bb6
-rw-r--r--packages/xorg-driver/xf86-input-magellan_1.2.0.bb4
-rw-r--r--packages/xorg-driver/xf86-input-microtouch_1.2.0.bb4
-rw-r--r--packages/xorg-driver/xf86-input-mouse_1.3.0.bb4
-rw-r--r--packages/xorg-driver/xf86-input-mutouch_1.2.0.bb4
-rw-r--r--packages/xorg-driver/xf86-input-palmax_1.2.0.bb4
-rw-r--r--packages/xorg-driver/xf86-input-penmount_1.3.0.bb4
-rw-r--r--packages/xorg-driver/xf86-input-summa_1.2.0.bb4
-rw-r--r--packages/xorg-driver/xf86-input-tek4957_1.2.0.bb4
-rw-r--r--packages/xorg-driver/xf86-input-vmmouse_12.5.1.bb6
-rw-r--r--packages/xorg-driver/xf86-video-apm/.mtn2git_empty0
-rw-r--r--packages/xorg-driver/xf86-video-apm/get-rid-of-host-includes.patch13
-rw-r--r--packages/xorg-driver/xf86-video-apm_1.2.0.bb8
-rw-r--r--packages/xorg-driver/xf86-video-ark/.mtn2git_empty0
-rw-r--r--packages/xorg-driver/xf86-video-ark/get-rid-of-host-includes.patch13
-rw-r--r--packages/xorg-driver/xf86-video-ark_0.7.0.bb6
-rw-r--r--packages/xorg-driver/xf86-video-ast_0.85.0.bb2
-rw-r--r--packages/xorg-driver/xf86-video-chips_1.2.0.bb4
-rw-r--r--packages/xorg-driver/xf86-video-cirrus_1.2.1.bb4
-rw-r--r--packages/xorg-driver/xf86-video-dummy/.mtn2git_empty0
-rw-r--r--packages/xorg-driver/xf86-video-dummy/get-rid-of-host-includes.patch13
-rw-r--r--packages/xorg-driver/xf86-video-dummy_0.3.0.bb6
-rw-r--r--packages/xorg-driver/xf86-video-fbdev_0.4.0.bb6
-rw-r--r--packages/xorg-driver/xf86-video-geode_2.9.0.bb5
-rw-r--r--packages/xorg-driver/xf86-video-glint_1.2.0.bb11
-rw-r--r--packages/xorg-driver/xf86-video-i128_1.3.0.bb4
-rw-r--r--packages/xorg-driver/xf86-video-i740_1.2.0.bb5
-rw-r--r--packages/xorg-driver/xf86-video-neomagic_1.2.1.bb8
-rw-r--r--packages/xorg-driver/xf86-video-nv_2.1.9.bb4
-rw-r--r--packages/xorg-driver/xf86-video-radeonhd_1.2.0.bb9
-rw-r--r--packages/xorg-driver/xf86-video-rendition_4.2.0.bb6
-rw-r--r--packages/xorg-driver/xf86-video-s3_0.6.0.bb4
-rw-r--r--packages/xorg-driver/xf86-video-s3virge_1.10.1.bb4
-rw-r--r--packages/xorg-driver/xf86-video-savage_2.2.1.bb12
-rw-r--r--packages/xorg-driver/xf86-video-siliconmotion_1.6.0.bb4
-rw-r--r--packages/xorg-driver/xf86-video-sis_0.10.0.bb11
-rw-r--r--packages/xorg-driver/xf86-video-sisusb_0.9.0.bb6
-rw-r--r--packages/xorg-driver/xf86-video-tdfx_1.4.0.bb12
-rw-r--r--packages/xorg-driver/xf86-video-trident_1.3.0.bb5
-rw-r--r--packages/xorg-driver/xf86-video-tseng_1.2.0.bb6
-rw-r--r--packages/xorg-driver/xf86-video-v4l_0.2.0.bb5
-rw-r--r--packages/xorg-driver/xf86-video-vmware_10.16.1.bb6
-rw-r--r--packages/xorg-driver/xf86-video-voodoo_1.2.0.bb6
-rw-r--r--packages/xorg-lib/libfs_1.0.1.bb7
-rw-r--r--packages/xorg-lib/libxau-native_1.0.3.bb1
-rw-r--r--packages/xorg-lib/pixman_0.10.0.bb1
-rw-r--r--packages/xorg-lib/pixman_0.11.4.bb15
-rw-r--r--packages/xorg-lib/xtrans_1.2.bb7
-rw-r--r--packages/xorg-proto/xextproto_7.0.3.bb3
-rw-r--r--packages/xorg-util/util-macros-native_1.1.6.bb7
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.4.2/.mtn2git_empty0
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.4.2/disable-xf86-dga-xorgcfg.patch39
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.4.2/enable-tslib.patch24
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.4.2/enable-xcalibrate.patch77
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.4.2/keyboard-resume-workaround.patch16
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.4.2/linux-keyboard-mediumraw.patch44
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.4.2/no_xkb.patch12
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch54
-rw-r--r--packages/xorg-xserver/xserver-kdrive_1.4.2.bb33
-rw-r--r--packages/xorg-xserver/xserver-xorg-1.4.2/.mtn2git_empty0
-rw-r--r--packages/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch13
-rw-r--r--packages/xorg-xserver/xserver-xorg_1.4.2.bb15
-rw-r--r--packages/xserver-common/files/kdrive-1.4-fixes-fix.patch22
-rw-r--r--packages/xserver-common/xserver-common_1.22.bb6
-rw-r--r--packages/zeroconf/files/zeroconf-limits.h.patch21
-rw-r--r--packages/zeroconf/zeroconf_0.9.bb3
-rw-r--r--packages/zlib/files/autotools.patch27
-rw-r--r--packages/zlib/zlib-sdk.inc9
-rw-r--r--packages/zlib/zlib-sdk_1.2.3.bb2
-rw-r--r--packages/zlib/zlib_1.2.3.bb4
1191 files changed, 152773 insertions, 5557 deletions
diff --git a/packages/abiword/abiword_2.6.3.bb b/packages/abiword/abiword_2.6.3.bb
new file mode 100644
index 0000000000..fe6399226f
--- /dev/null
+++ b/packages/abiword/abiword_2.6.3.bb
@@ -0,0 +1,10 @@
+require abiword-2.5.inc
+
+PR = "r1"
+
+RCONFLICTS = "abiword-embedded"
+
+FILES_${PN} += "${datadir}/mime-info"
+FILES_abiword-strings += "${datadir}/abiword-${SHRT_VER}/strings"
+FILES_abiword-systemprofiles += "${datadir}/abiword-${SHRT_VER}/system.profile*"
+
diff --git a/packages/acpid/acpid/gcc40.patch b/packages/acpid/acpid/gcc40.patch
index 5320cee0bb..8e3b31da60 100644
--- a/packages/acpid/acpid/gcc40.patch
+++ b/packages/acpid/acpid/gcc40.patch
@@ -1,4 +1,5 @@
upstream: https://sourceforge.net/tracker/index.php?func=detail&aid=1895615&group_id=33140&atid=407341
+status: not necessary anymore at least from version 1.0.6 onwards where this patch reverse-applies cleanly
Index: acpid-1.0.3/ud_socket.c
===================================================================
diff --git a/packages/acpid/acpid_1.0.6.bb b/packages/acpid/acpid_1.0.6.bb
index f48c262254..e096796fbd 100644
--- a/packages/acpid/acpid_1.0.6.bb
+++ b/packages/acpid/acpid_1.0.6.bb
@@ -1,4 +1,3 @@
require acpid.inc
-SRC_URI += "file://gcc40.patch;patch=1"
-PR = "r3"
+PR = "r4"
diff --git a/packages/alsa/alsa-plugins_1.0.14.bb b/packages/alsa/alsa-plugins_1.0.15.bb
index b17a3265e8..b17a3265e8 100644
--- a/packages/alsa/alsa-plugins_1.0.14.bb
+++ b/packages/alsa/alsa-plugins_1.0.15.bb
diff --git a/packages/alsa/alsa-scenario_git.bb b/packages/alsa/alsa-scenario_git.bb
new file mode 100644
index 0000000000..02edd31619
--- /dev/null
+++ b/packages/alsa/alsa-scenario_git.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "ALSA Scenario Library"
+HOMEPAGE = "http://opensource.wolfsonmicro.com/node/22"
+SECTION = "console/utils"
+LICENSE = "GPL"
+DEPENDS = "alsa-lib ncurses"
+PV = "0.1+git${SRCREV}"
+PR = "r0"
+
+SRC_URI = "git://opensource.wolfsonmicro.com/alsa-scenario;branch=master;protocol=git"
+S = "${WORKDIR}/git"
+
+inherit autotools
diff --git a/packages/alsa/alsa-state.bb b/packages/alsa/alsa-state.bb
index ce7c97f0cc..58c724f79c 100644
--- a/packages/alsa/alsa-state.bb
+++ b/packages/alsa/alsa-state.bb
@@ -6,17 +6,14 @@
DESCRIPTION = "Default ALSA configuration"
LICENSE = "GPL"
-RRECOMMENDS_alsa-state = "alsa-states"
-RRECOMMENDS_${PN}_om-gta01 = "openmoko-alsa-scenarios"
-RRECOMMENDS_${PN}_om-gta02 = "openmoko-alsa-scenarios"
PV = "0.1.0"
-PR = "r16"
+PR = "r18"
-SRC_URI = " \
- file://asoundrc \
+SRC_URI = "\
+ file://asound.conf \
file://asound.state \
- file://alsa-state "
-
+ file://alsa-state \
+"
inherit update-rc.d
@@ -27,13 +24,21 @@ do_install() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/alsa-state ${D}${sysconfdir}/init.d
- install -m 0644 ${WORKDIR}/asoundrc ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/*.state ${D}${sysconfdir}
}
PACKAGES += "alsa-states"
-FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asoundrc"
+
+RRECOMMENDS_alsa-state = "alsa-states"
+RRECOMMENDS_${PN}_om-gta01 = "openmoko-alsa-scenarios"
+RRECOMMENDS_${PN}_om-gta02 = "openmoko-alsa-scenarios"
+
+FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf"
+CONFFILES_${PN} = "${sysconfdir}/asound.conf"
+
FILES_alsa-states = "${sysconfdir}/*.state"
+
PACKAGE_ARCH_${PN} = "all"
PACKAGE_ARCH_alsa-states = "${MACHINE_ARCH}"
@@ -46,4 +51,3 @@ pkg_postinst_${PN}() {
fi
fi
}
-
diff --git a/packages/alsa/alsa-state/asoundrc b/packages/alsa/alsa-state/asound.conf
index bc038e3e73..6be024201c 100644
--- a/packages/alsa/alsa-state/asoundrc
+++ b/packages/alsa/alsa-state/asound.conf
@@ -1,7 +1,6 @@
-#
-# simple dmix configuration
-#
-pcm.dsp0 {
+# default dmix configuration
+
+pcm.!default {
type plug
slave.pcm "dmix"
}
@@ -10,3 +9,4 @@ ctl.mixer0 {
type hw
card 0
}
+
diff --git a/packages/angstrom/angstrom-led-config.bb b/packages/angstrom/angstrom-led-config.bb
new file mode 100644
index 0000000000..a0a29cbb3c
--- /dev/null
+++ b/packages/angstrom/angstrom-led-config.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Configuration files for runtime LED configuration"
+
+#PV = "${DISTRO_VERSION}"
+PR = "r0"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit update-rc.d
+INITSCRIPT_NAME = "led-config"
+
+SRC_URI = "file://led-config \
+ file://leds \
+ "
+
+do_compile() {
+ :
+}
+
+
+do_install () {
+ install -d ${D}/${sysconfdir}/default
+ install -d ${D}/${INIT_D_DIR}
+
+ install -m 0644 ${WORKDIR}/leds ${D}/${sysconfdir}/default/
+ install -m 0755 ${WORKDIR}/led-config ${D}/${INIT_D_DIR}
+}
+
+CONFFILES_${PN} += "${sysconfdir}/default/leds \
+ ${INIT_D_DIR}/led-config \
+ "
+
diff --git a/packages/apex/apex-nslu2-1.5.13/.mtn2git_empty b/packages/angstrom/angstrom-led-config/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/apex/apex-nslu2-1.5.13/.mtn2git_empty
+++ b/packages/angstrom/angstrom-led-config/.mtn2git_empty
diff --git a/packages/apex/apex-nslu2-1.5.8/.mtn2git_empty b/packages/angstrom/angstrom-led-config/beagleboard/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/apex/apex-nslu2-1.5.8/.mtn2git_empty
+++ b/packages/angstrom/angstrom-led-config/beagleboard/.mtn2git_empty
diff --git a/packages/angstrom/angstrom-led-config/beagleboard/leds b/packages/angstrom/angstrom-led-config/beagleboard/leds
new file mode 100644
index 0000000000..19c73ebcf3
--- /dev/null
+++ b/packages/angstrom/angstrom-led-config/beagleboard/leds
@@ -0,0 +1,3 @@
+#file format: name trigger
+beagleboard::led0 mmc0
+beagleboard::led1 nand-disk
diff --git a/packages/angstrom/angstrom-led-config/led-config b/packages/angstrom/angstrom-led-config/led-config
new file mode 100755
index 0000000000..63d52d6cd0
--- /dev/null
+++ b/packages/angstrom/angstrom-led-config/led-config
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+if [ -e /sys/class/leds/ ] ; then
+
+case "$1" in
+ start)
+ echo "Configuring leds:"
+ for led in /sys/class/leds/* ; do
+ trigger=$(grep "$(basename $led)" /etc/default/leds | awk '{print $2}')
+ if [ "x$trigger" = "x" ] ; then trigger="none" ; fi
+ echo " $(basename $led): $trigger"
+ echo "$trigger" > "$led/trigger"
+ done
+;;
+ stop)
+ echo "Deconfiguring leds:"
+ for led in /sys/class/leds/* ; do
+ echo " $(basename $led): no trigger"
+ echo "none" > "$led/trigger"
+ done
+ ;;
+ *)
+ echo "Usage: /etc/init.d/led-config {start|stop}"
+ exit 1
+esac
+
+else
+ echo "No LEDs detected"
+fi
+
+exit 0
diff --git a/packages/angstrom/angstrom-led-config/leds b/packages/angstrom/angstrom-led-config/leds
new file mode 100644
index 0000000000..7de8a2e3ae
--- /dev/null
+++ b/packages/angstrom/angstrom-led-config/leds
@@ -0,0 +1 @@
+#file format: name trigger
diff --git a/packages/angstrom/angstrom-zeroconf-audio.bb b/packages/angstrom/angstrom-zeroconf-audio.bb
index 9cbbba4053..2256b6ac4f 100644
--- a/packages/angstrom/angstrom-zeroconf-audio.bb
+++ b/packages/angstrom/angstrom-zeroconf-audio.bb
@@ -1,9 +1,24 @@
DESCRIPTION = "Meta package to enable zeroconf audio with pulseaudio"
DEPENDS = "avahi pulseaudio"
-RDEPENDS = "pulseaudio-module-zeroconf-publish avahi-daemon"
+RDEPENDS = " \
+ avahi-daemon \
+ pulseaudio-server \
+ pulseaudio-module-alsa-sink \
+ pulseaudio-module-alsa-source \
+ pulseaudio-module-cli \
+ pulseaudio-module-esound-protocol-unix \
+ pulseaudio-module-simple-protocol-tcp \
+ pulseaudio-module-native-protocol-unix \
+ pulseaudio-module-cli-protocol-unix \
+ pulseaudio-module-zeroconf-publish \
+"
+
+PR = "r3"
+
+S = "${WORKDIR}"
do_compile() {
- :
+ :
}
PACKAGE_ARCH = "all"
diff --git a/packages/angstrom/epiphany-firefox-replacement.bb b/packages/angstrom/epiphany-firefox-replacement.bb
new file mode 100644
index 0000000000..2ced2c9c06
--- /dev/null
+++ b/packages/angstrom/epiphany-firefox-replacement.bb
@@ -0,0 +1,10 @@
+# This is a hack because $*#($*($# e17 doesn't check if firefox is present and puts it in the menu blindly
+
+RDEPENDS = "epiphany"
+RCONFLICTS = "firefox"
+
+do_install() {
+ install -d ${D}/${bindir}
+ ln -sf ${bindir}/epiphany ${D}/${bindir}/firefox
+}
+
diff --git a/packages/apex/apex-env_1.5.13.bb b/packages/apex/apex-env_1.5.14.bb
index aad0b12af9..e97522e5e9 100644
--- a/packages/apex/apex-env_1.5.13.bb
+++ b/packages/apex/apex-env_1.5.14.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "APEX Boot Loader Environment User Modification Tool"
-SECTION = "util"
+SECTION = "misc"
PRIORITY = "optional"
HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader"
LICENSE = "GPL"
diff --git a/packages/apex/apex-nslu2-16mb-1.5.13/.mtn2git_empty b/packages/apex/apex-nslu2-1.5.14/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/apex/apex-nslu2-16mb-1.5.13/.mtn2git_empty
+++ b/packages/apex/apex-nslu2-1.5.14/.mtn2git_empty
diff --git a/packages/apex/apex-nslu2-1.5.13/defconfig b/packages/apex/apex-nslu2-1.5.14/defconfig
index 264f8539fc..264f8539fc 100644
--- a/packages/apex/apex-nslu2-1.5.13/defconfig
+++ b/packages/apex/apex-nslu2-1.5.14/defconfig
diff --git a/packages/apex/apex-nslu2-1.5.8/defconfig b/packages/apex/apex-nslu2-1.5.8/defconfig
deleted file mode 100644
index 3c8522e2e8..0000000000
--- a/packages/apex/apex-nslu2-1.5.8/defconfig
+++ /dev/null
@@ -1,156 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version:
-# Fri Jun 1 17:35:34 2007
-#
-CONFIG_ARM=y
-CONFIG_CPU_ARMV5=y
-CONFIG_CPU_XSCALE=y
-# CONFIG_ARCH_LH7952X is not set
-# CONFIG_ARCH_LH7A40X is not set
-CONFIG_ARCH_IXP42X=y
-# CONFIG_ARCH_S3C2410 is not set
-# CONFIG_ARCH_MX3 is not set
-CONFIG_EXPERIMENTAL=y
-# CONFIG_SMALL is not set
-
-#
-# General Setup
-#
-CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2/BE (8MiB Flash)"
-CONFIG_CROSS_COMPILE=""
-CONFIG_AEABI=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_CC_OPTIMIZE_FOR_SPEED is not set
-# CONFIG_CC_NO_OPTIMIZATION is not set
-CONFIG_STARTUP_UART=y
-# CONFIG_DEBUG_LL is not set
-CONFIG_SPINNER=y
-CONFIG_ATAG=y
-CONFIG_MMU=y
-# CONFIG_FORCE_WRITETHROUGH_DCACHE is not set
-CONFIG_DISABLE_MMU_AT_BOOT=y
-# CONFIG_INTERRUPTS is not set
-CONFIG_SDRAMBOOT_REPORT=y
-CONFIG_STACK_SIZE=0x1000
-CONFIG_STACKLIMIT=y
-# CONFIG_BOOTSTRAP_MEMTEST is not set
-CONFIG_ATAG_PHYS=0x00000100
-CONFIG_ARCH_NUMBER=597
-CONFIG_APEX_VMA=0x00200000
-CONFIG_KERNEL_LMA=0x00008000
-# CONFIG_USE_RAMDISK is not set
-CONFIG_SDRAM_BANK0=y
-# CONFIG_SDRAM_BANK1 is not set
-CONFIG_NOR_BUSWIDTH=16
-CONFIG_NOR_BANK0=y
-CONFIG_NOR_BANK0_START=0x50000000
-CONFIG_NOR_BANK0_LENGTH=0x00800000
-CONFIG_MACH="ixp42x"
-CONFIG_MACH_NSLU2=y
-# CONFIG_MACH_NAS100D is not set
-# CONFIG_MACH_DSMG600 is not set
-# CONFIG_MACH_AVILA2347 is not set
-# CONFIG_USER_DEFAULTENDIAN is not set
-# CONFIG_USER_BIGENDIAN is not set
-# CONFIG_USER_LITTLEENDIAN is not set
-
-#
-# Platform Setup
-#
-CONFIG_SDRAM_BANK_LENGTH=0x02000000
-# CONFIG_DISABLE_SECOND_UART_INIT is not set
-CONFIG_ARCH_IXP420=y
-
-#
-# Commands
-#
-CONFIG_ALLHELP=y
-CONFIG_ALPHABETIZE_COMMANDS=y
-CONFIG_DEL_IS_BS=y
-CONFIG_ANSI_KEYS=y
-CONFIG_COMMAND_HISTORY=y
-CONFIG_COMMAND_EDITING=y
-# CONFIG_TIME_COMMANDS is not set
-CONFIG_CMD_ALIAS=y
-CONFIG_CMD_CHECKSUM=y
-CONFIG_CMD_COPY=y
-CONFIG_CMD_COMPARE=y
-CONFIG_CMD_DRVINFO=y
-CONFIG_CMD_DUMP=y
-CONFIG_CMD_ENV=y
-CONFIG_CMD_SETENV=y
-CONFIG_CMD_ERASE=y
-CONFIG_CMD_FILL=y
-CONFIG_CMD_GO=y
-CONFIG_CMD_INFO=y
-# CONFIG_CMD_PAUSE is not set
-CONFIG_CMD_WAIT=y
-CONFIG_CMD_XRECEIVE=y
-CONFIG_CMD_MEMLIMIT=y
-CONFIG_CMD_MEMSCAN=y
-
-#
-# Generic Drivers
-#
-# CONFIG_DRIVER_FAT is not set
-# CONFIG_DRIVER_EXT2 is not set
-# CONFIG_DRIVER_JFFS2 is not set
-CONFIG_DRIVER_FIS=y
-CONFIG_DRIVER_FIS_BLOCKDEVICE="nor:0x7e0000+4k"
-CONFIG_DRIVER_NOR_CFI=y
-# CONFIG_DRIVER_NOR_CFI_NO_BUFFERED is not set
-# CONFIG_DRIVER_NOR_CFI_USE_CACHE is not set
-CONFIG_DRIVER_NOR_CFI_TYPE_INTEL=y
-# CONFIG_DRIVER_NOR_CFI_TYPE_SPANSION is not set
-# CONFIG_DRIVER_ONENAND is not set
-# CONFIG_DRIVER_IXP4XX_NPE_ETH is not set
-CONFIG_USES_NOR_CFI=y
-CONFIG_USES_PATHNAME_PARSER=y
-CONFIG_USES_IXP4XX_NPE_ETH=y
-
-#
-# Environment
-#
-CONFIG_ENV=y
-CONFIG_ENV_LINK=y
-CONFIG_ENV_MUTABLE=y
-CONFIG_ENV_REGION="nor:0x7c000+16k"
-# CONFIG_ENV_SAVEATONCE is not set
-CONFIG_ENV_CHECK_LEN=1024
-# CONFIG_VARIATIONS is not set
-# CONFIG_NO_BOOTSTRAP is not set
-CONFIG_NOR_BOOT=y
-# CONFIG_NAND_BOOT is not set
-# CONFIG_ONENAND_BOOT is not set
-# CONFIG_COMPANION_EVT1_BOOT is not set
-# CONFIG_COMPANION_EVT2_BOOT is not set
-
-#
-# Default Startup
-#
-CONFIG_AUTOBOOT=y
-CONFIG_AUTOBOOT_DELAY=10
-CONFIG_ENV_STARTUP_KERNEL_COPY=y
-# CONFIG_ENV_REGION_KERNEL_SWAP is not set
-# CONFIG_ENV_STARTUP_PREFIX_P is not set
-
-#
-# Regions
-#
-CONFIG_ENV_REGION_KERNEL="fis://kernel"
-
-#
-# Overrides
-#
-CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200"
-# CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
-CONFIG_USES_NOR_BOOTFLASH=y
-CONFIG_RELOCATE_SIMPLE=y
-CONFIG_INLINE_PLATFORM_INITIALIZATION=y
-CONFIG_INLINE_PLATFORM_INITIALIZATION_SDRAM_PRE_OVERRIDE=y
-# CONFIG_BIGENDIAN is not set
-# CONFIG_LITTLEENDIAN is not set
-CONFIG_CLEAR_STACKS=y
-CONFIG_ALIASES=y
diff --git a/packages/apex/apex-nslu2-16mb-1.5.8/.mtn2git_empty b/packages/apex/apex-nslu2-16mb-1.5.14/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/apex/apex-nslu2-16mb-1.5.8/.mtn2git_empty
+++ b/packages/apex/apex-nslu2-16mb-1.5.14/.mtn2git_empty
diff --git a/packages/apex/apex-nslu2-16mb-1.5.13/defconfig b/packages/apex/apex-nslu2-16mb-1.5.14/defconfig
index 11658813d5..11658813d5 100644
--- a/packages/apex/apex-nslu2-16mb-1.5.13/defconfig
+++ b/packages/apex/apex-nslu2-16mb-1.5.14/defconfig
diff --git a/packages/apex/apex-nslu2-16mb-1.5.8/defconfig b/packages/apex/apex-nslu2-16mb-1.5.8/defconfig
deleted file mode 100644
index c9688e3d75..0000000000
--- a/packages/apex/apex-nslu2-16mb-1.5.8/defconfig
+++ /dev/null
@@ -1,156 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version:
-# Fri Jun 1 17:35:34 2007
-#
-CONFIG_ARM=y
-CONFIG_CPU_ARMV5=y
-CONFIG_CPU_XSCALE=y
-# CONFIG_ARCH_LH7952X is not set
-# CONFIG_ARCH_LH7A40X is not set
-CONFIG_ARCH_IXP42X=y
-# CONFIG_ARCH_S3C2410 is not set
-# CONFIG_ARCH_MX3 is not set
-CONFIG_EXPERIMENTAL=y
-# CONFIG_SMALL is not set
-
-#
-# General Setup
-#
-CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2/BE (16MiB Flash)"
-CONFIG_CROSS_COMPILE=""
-CONFIG_AEABI=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_CC_OPTIMIZE_FOR_SPEED is not set
-# CONFIG_CC_NO_OPTIMIZATION is not set
-CONFIG_STARTUP_UART=y
-# CONFIG_DEBUG_LL is not set
-CONFIG_SPINNER=y
-CONFIG_ATAG=y
-CONFIG_MMU=y
-# CONFIG_FORCE_WRITETHROUGH_DCACHE is not set
-CONFIG_DISABLE_MMU_AT_BOOT=y
-# CONFIG_INTERRUPTS is not set
-CONFIG_SDRAMBOOT_REPORT=y
-CONFIG_STACK_SIZE=0x1000
-CONFIG_STACKLIMIT=y
-# CONFIG_BOOTSTRAP_MEMTEST is not set
-CONFIG_ATAG_PHYS=0x00000100
-CONFIG_ARCH_NUMBER=597
-CONFIG_APEX_VMA=0x00200000
-CONFIG_KERNEL_LMA=0x00008000
-# CONFIG_USE_RAMDISK is not set
-CONFIG_SDRAM_BANK0=y
-# CONFIG_SDRAM_BANK1 is not set
-CONFIG_NOR_BUSWIDTH=16
-CONFIG_NOR_BANK0=y
-CONFIG_NOR_BANK0_START=0x50000000
-CONFIG_NOR_BANK0_LENGTH=0x01000000
-CONFIG_MACH="ixp42x"
-CONFIG_MACH_NSLU2=y
-# CONFIG_MACH_NAS100D is not set
-# CONFIG_MACH_DSMG600 is not set
-# CONFIG_MACH_AVILA2347 is not set
-# CONFIG_USER_DEFAULTENDIAN is not set
-# CONFIG_USER_BIGENDIAN is not set
-# CONFIG_USER_LITTLEENDIAN is not set
-
-#
-# Platform Setup
-#
-CONFIG_SDRAM_BANK_LENGTH=0x02000000
-# CONFIG_DISABLE_SECOND_UART_INIT is not set
-CONFIG_ARCH_IXP420=y
-
-#
-# Commands
-#
-CONFIG_ALLHELP=y
-CONFIG_ALPHABETIZE_COMMANDS=y
-CONFIG_DEL_IS_BS=y
-CONFIG_ANSI_KEYS=y
-CONFIG_COMMAND_HISTORY=y
-CONFIG_COMMAND_EDITING=y
-# CONFIG_TIME_COMMANDS is not set
-CONFIG_CMD_ALIAS=y
-CONFIG_CMD_CHECKSUM=y
-CONFIG_CMD_COPY=y
-CONFIG_CMD_COMPARE=y
-CONFIG_CMD_DRVINFO=y
-CONFIG_CMD_DUMP=y
-CONFIG_CMD_ENV=y
-CONFIG_CMD_SETENV=y
-CONFIG_CMD_ERASE=y
-CONFIG_CMD_FILL=y
-CONFIG_CMD_GO=y
-CONFIG_CMD_INFO=y
-# CONFIG_CMD_PAUSE is not set
-CONFIG_CMD_WAIT=y
-CONFIG_CMD_XRECEIVE=y
-CONFIG_CMD_MEMLIMIT=y
-CONFIG_CMD_MEMSCAN=y
-
-#
-# Generic Drivers
-#
-# CONFIG_DRIVER_FAT is not set
-# CONFIG_DRIVER_EXT2 is not set
-# CONFIG_DRIVER_JFFS2 is not set
-CONFIG_DRIVER_FIS=y
-CONFIG_DRIVER_FIS_BLOCKDEVICE="nor:0xfe0000+4k"
-CONFIG_DRIVER_NOR_CFI=y
-# CONFIG_DRIVER_NOR_CFI_NO_BUFFERED is not set
-# CONFIG_DRIVER_NOR_CFI_USE_CACHE is not set
-CONFIG_DRIVER_NOR_CFI_TYPE_INTEL=y
-# CONFIG_DRIVER_NOR_CFI_TYPE_SPANSION is not set
-# CONFIG_DRIVER_ONENAND is not set
-# CONFIG_DRIVER_IXP4XX_NPE_ETH is not set
-CONFIG_USES_NOR_CFI=y
-CONFIG_USES_PATHNAME_PARSER=y
-CONFIG_USES_IXP4XX_NPE_ETH=y
-
-#
-# Environment
-#
-CONFIG_ENV=y
-CONFIG_ENV_LINK=y
-CONFIG_ENV_MUTABLE=y
-CONFIG_ENV_REGION="nor:0x7c000+16k"
-# CONFIG_ENV_SAVEATONCE is not set
-CONFIG_ENV_CHECK_LEN=1024
-# CONFIG_VARIATIONS is not set
-# CONFIG_NO_BOOTSTRAP is not set
-CONFIG_NOR_BOOT=y
-# CONFIG_NAND_BOOT is not set
-# CONFIG_ONENAND_BOOT is not set
-# CONFIG_COMPANION_EVT1_BOOT is not set
-# CONFIG_COMPANION_EVT2_BOOT is not set
-
-#
-# Default Startup
-#
-CONFIG_AUTOBOOT=y
-CONFIG_AUTOBOOT_DELAY=10
-CONFIG_ENV_STARTUP_KERNEL_COPY=y
-# CONFIG_ENV_REGION_KERNEL_SWAP is not set
-# CONFIG_ENV_STARTUP_PREFIX_P is not set
-
-#
-# Regions
-#
-CONFIG_ENV_REGION_KERNEL="fis://kernel"
-
-#
-# Overrides
-#
-CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200"
-# CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
-CONFIG_USES_NOR_BOOTFLASH=y
-CONFIG_RELOCATE_SIMPLE=y
-CONFIG_INLINE_PLATFORM_INITIALIZATION=y
-CONFIG_INLINE_PLATFORM_INITIALIZATION_SDRAM_PRE_OVERRIDE=y
-# CONFIG_BIGENDIAN is not set
-# CONFIG_LITTLEENDIAN is not set
-CONFIG_CLEAR_STACKS=y
-CONFIG_ALIASES=y
diff --git a/packages/apex/apex-nslu2-16mb_1.5.13.bb b/packages/apex/apex-nslu2-16mb_1.5.14.bb
index 84199ed053..0ccf2eb5da 100644
--- a/packages/apex/apex-nslu2-16mb_1.5.13.bb
+++ b/packages/apex/apex-nslu2-16mb_1.5.14.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "APEX Boot Loader"
-SECTION = ""
+SECTION = "misc"
PRIORITY = "optional"
HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader"
LICENSE = "GPL"
diff --git a/packages/apex/apex-nslu2-16mb_1.5.8.bb b/packages/apex/apex-nslu2-16mb_1.5.8.bb
deleted file mode 100644
index 52e13d2073..0000000000
--- a/packages/apex/apex-nslu2-16mb_1.5.8.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-DESCRIPTION = "APEX Boot Loader"
-SECTION = ""
-PRIORITY = "optional"
-HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader"
-LICENSE = "GPL"
-PR = "r3"
-
-SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \
- file://defconfig"
-S = ${WORKDIR}/apex-${PV}
-
-CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}"
-
-CMDLINE_ROOT ?= "root=/dev/mtdblock4 rootfstype=jffs2 rw"
-
-CMDLINE_DEBUG ?= ""
-
-EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
-
-oe_runmake() {
- oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
- make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
-}
-
-# Set the correct CONFIG_USER_xxx_ENDIAN and CONFIG_CMDLINE at the head
-# of the .config file and remove any settings in defconfig then append
-# defconfig to .config
-do_configure() {
- rm -f ${S}/.config
- . ${CONFIG_SITE}
- if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
- sed -e 's/.*CONFIG_USER_BIGENDIAN.*/CONFIG_USER_BIGENDIAN=y/' \
- -e 's/.*CONFIG_BIGENDIAN.*/CONFIG_BIGENDIAN=y/' \
- -e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/BE (16MiB Flash)\"/' \
- -e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \
- ${WORKDIR}/defconfig > ${S}/.config
- elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then
- sed -e 's/.*CONFIG_USER_LITTLEENDIAN.*/CONFIG_USER_LITTLEENDIAN=y/' \
- -e 's/.*CONFIG_LITTLEENDIAN.*/CONFIG_LITTLEENDIAN=y/' \
- -e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/LE (16MiB Flash)\"/' \
- -e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \
- ${WORKDIR}/defconfig > ${S}/.config
- else
- oefatal do_configure cannot determine endianess
- fi
- oe_runmake oldconfig
-}
-
-DEPENDS += "devio-native"
-
-do_stage() {
- install -d ${STAGING_LOADER_DIR}
- . ${CONFIG_SITE}
- if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
- cp src/arch-arm/rom/apex.bin ${STAGING_LOADER_DIR}/apex-nslu2-16mb.bin
- elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then
- devio '<<'src/arch-arm/rom/apex.bin >${STAGING_LOADER_DIR}/apex-nslu2-16mb.bin 'xp $,4'
- else
- oefatal do_populate_staging cannot determine endianess
- fi
-}
diff --git a/packages/apex/apex-nslu2_1.5.13.bb b/packages/apex/apex-nslu2_1.5.14.bb
index a3ce223e92..5fae4553a0 100644
--- a/packages/apex/apex-nslu2_1.5.13.bb
+++ b/packages/apex/apex-nslu2_1.5.14.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "APEX Boot Loader"
-SECTION = ""
+SECTION = "misc"
PRIORITY = "optional"
HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader"
LICENSE = "GPL"
diff --git a/packages/apex/apex-nslu2_1.5.8.bb b/packages/apex/apex-nslu2_1.5.8.bb
deleted file mode 100644
index ada148e2b4..0000000000
--- a/packages/apex/apex-nslu2_1.5.8.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-DESCRIPTION = "APEX Boot Loader"
-SECTION = ""
-PRIORITY = "optional"
-HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader"
-LICENSE = "GPL"
-PR = "r2"
-
-SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \
- file://defconfig"
-S = ${WORKDIR}/apex-${PV}
-
-CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}"
-
-CMDLINE_ROOT ?= "root=/dev/mtdblock4 rootfstype=jffs2 rw"
-
-CMDLINE_DEBUG ?= ""
-
-EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
-
-oe_runmake() {
- oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
- make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
-}
-
-# Set the correct CONFIG_USER_xxx_ENDIAN and CONFIG_CMDLINE at the head
-# of the .config file and remove any settings in defconfig then append
-# defconfig to .config
-do_configure() {
- rm -f ${S}/.config
- . ${CONFIG_SITE}
- if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
- sed -e 's/.*CONFIG_USER_BIGENDIAN.*/CONFIG_USER_BIGENDIAN=y/' \
- -e 's/.*CONFIG_BIGENDIAN.*/CONFIG_BIGENDIAN=y/' \
- -e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/BE (8MiB Flash)\"/' \
- -e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \
- ${WORKDIR}/defconfig > ${S}/.config
- elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then
- sed -e 's/.*CONFIG_USER_LITTLEENDIAN.*/CONFIG_USER_LITTLEENDIAN=y/' \
- -e 's/.*CONFIG_LITTLEENDIAN.*/CONFIG_LITTLEENDIAN=y/' \
- -e 's/.*CONFIG_TARGET_DESCRIPTION.*/CONFIG_TARGET_DESCRIPTION=\"OpenEmbedded NSLU2\/LE (8MiB Flash)\"/' \
- -e 's|CONFIG_ENV_DEFAULT_CMDLINE=|CONFIG_ENV_DEFAULT_CMDLINE=\"${CMDLINE_CONSOLE} ${CMDLINE_ROOT} ${CMDLINE_DEBUG}\"|' \
- ${WORKDIR}/defconfig > ${S}/.config
- else
- oefatal do_configure cannot determine endianess
- fi
- oe_runmake oldconfig
-}
-
-DEPENDS += "devio-native"
-
-do_stage() {
- install -d ${STAGING_LOADER_DIR}
- . ${CONFIG_SITE}
- if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
- cp src/arch-arm/rom/apex.bin ${STAGING_LOADER_DIR}/apex-nslu2.bin
- elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then
- devio '<<'src/arch-arm/rom/apex.bin >${STAGING_LOADER_DIR}/apex-nslu2.bin 'xp $,4'
- else
- oefatal do_populate_staging cannot determine endianess
- fi
-}
diff --git a/packages/apmd/apmd-3.2.2/libtool.patch b/packages/apmd/apmd-3.2.2/libtool.patch
new file mode 100644
index 0000000000..bf8a373b63
--- /dev/null
+++ b/packages/apmd/apmd-3.2.2/libtool.patch
@@ -0,0 +1,16 @@
+Index: apmd-3.2.2.orig/Makefile
+===================================================================
+--- apmd-3.2.2.orig.orig/Makefile 2004-01-04 08:13:18.000000000 +0000
++++ apmd-3.2.2.orig/Makefile 2008-04-21 17:10:03.000000000 +0100
+@@ -58,9 +57,8 @@
+ #CFLAGS=-O3 -m486 -fomit-frame-pointer
+ #LDFLAGS=-s
+
+-LIBTOOL=libtool --quiet
+-LT_COMPILE = $(LIBTOOL) --mode=compile $(CC)
+-LT_LINK = $(LIBTOOL) --mode=link $(CC)
++LT_COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC)
++LT_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC)
+ LT_INSTALL = $(LIBTOOL) --mode=install install
+ LT_CLEAN = $(LIBTOOL) --mode=clean rm
+
diff --git a/packages/apmd/apmd_3.2.2.bb b/packages/apmd/apmd_3.2.2.bb
index 6e4d2b3bd1..503f830bd9 100644
--- a/packages/apmd/apmd_3.2.2.bb
+++ b/packages/apmd/apmd_3.2.2.bb
@@ -3,13 +3,14 @@ SECTION = "base"
PRIORITY = "required"
DEPENDS = "libtool-cross"
LICENSE = "GPL"
-PR = "r10"
+PR = "r11"
SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.orig.tar.gz \
file://debian.patch;patch=1 \
file://workaround.patch;patch=1 \
file://zaurus24.patch;patch=1 \
file://unlinux.patch;patch=1 \
+ file://libtool.patch;patch=1 \
file://init \
file://default \
file://apmd_proxy \
diff --git a/packages/aspell/aspell_0.60.6.bb b/packages/aspell/aspell_0.60.6.bb
new file mode 100644
index 0000000000..66b21f9e52
--- /dev/null
+++ b/packages/aspell/aspell_0.60.6.bb
@@ -0,0 +1,19 @@
+SRC_URI = "ftp://ftp.gnu.org/gnu/aspell/aspell-${PV}.tar.gz"
+DESCRIPTION = "GNU Aspell spell-checker"
+SECTION = "console/utils"
+LICENSE="LGPL"
+
+PACKAGES += "libaspell libpspell libpspell-dev aspell-utils"
+
+FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
+FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
+FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
+FILES_${PN} = "${bindir}/aspell"
+FILES_libpspell = "${libdir}/libpspell.so.*"
+FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell"
+
+inherit autotools
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/packages/asterisk/asterisk-addons_1.6.0-beta2.bb b/packages/asterisk/asterisk-addons_1.6.0-beta2.bb
index 9f767ebbff..06d2dc2dc0 100644
--- a/packages/asterisk/asterisk-addons_1.6.0-beta2.bb
+++ b/packages/asterisk/asterisk-addons_1.6.0-beta2.bb
@@ -7,7 +7,7 @@ LICENSE = "GPLv2"
PRIORITY = "optional"
SECTION = "console/telephony"
DEPENDS = "asterisk openssl curl"
-PR = "r0"
+PR = "r1"
DEFAULT_PREFERENCE = "-1"
diff --git a/packages/asterisk/asterisk-core-sounds-en-alaw_1.4.8.bb b/packages/asterisk/asterisk-core-sounds-en-alaw_1.4.8.bb
index f1b3d12cd7..85fe634f8c 100644
--- a/packages/asterisk/asterisk-core-sounds-en-alaw_1.4.8.bb
+++ b/packages/asterisk/asterisk-core-sounds-en-alaw_1.4.8.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-alaw-${PV}.tar.gz"
diff --git a/packages/asterisk/asterisk-core-sounds-en-g729_1.4.8.bb b/packages/asterisk/asterisk-core-sounds-en-g729_1.4.8.bb
index 205c8ff067..74512018e3 100644
--- a/packages/asterisk/asterisk-core-sounds-en-g729_1.4.8.bb
+++ b/packages/asterisk/asterisk-core-sounds-en-g729_1.4.8.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-g729-${PV}.tar.gz"
diff --git a/packages/asterisk/asterisk-core-sounds-en-gsm_1.4.8.bb b/packages/asterisk/asterisk-core-sounds-en-gsm_1.4.8.bb
index 2a46c74f84..0cf23240e7 100644
--- a/packages/asterisk/asterisk-core-sounds-en-gsm_1.4.8.bb
+++ b/packages/asterisk/asterisk-core-sounds-en-gsm_1.4.8.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-${PV}.tar.gz"
diff --git a/packages/asterisk/asterisk-core-sounds-en-ulaw_1.4.8.bb b/packages/asterisk/asterisk-core-sounds-en-ulaw_1.4.8.bb
index c29ae60f99..c10bf786a5 100644
--- a/packages/asterisk/asterisk-core-sounds-en-ulaw_1.4.8.bb
+++ b/packages/asterisk/asterisk-core-sounds-en-ulaw_1.4.8.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-ulaw-${PV}.tar.gz"
diff --git a/packages/asterisk/asterisk-extra-sounds-en-alaw_1.4.7.bb b/packages/asterisk/asterisk-extra-sounds-en-alaw_1.4.7.bb
index 2bea38c99b..ad895b45a0 100644
--- a/packages/asterisk/asterisk-extra-sounds-en-alaw_1.4.7.bb
+++ b/packages/asterisk/asterisk-extra-sounds-en-alaw_1.4.7.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-alaw-${PV}.tar.gz"
diff --git a/packages/asterisk/asterisk-extra-sounds-en-g729_1.4.7.bb b/packages/asterisk/asterisk-extra-sounds-en-g729_1.4.7.bb
index 0656ff1a95..7573043c44 100644
--- a/packages/asterisk/asterisk-extra-sounds-en-g729_1.4.7.bb
+++ b/packages/asterisk/asterisk-extra-sounds-en-g729_1.4.7.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-g729-${PV}.tar.gz"
diff --git a/packages/asterisk/asterisk-extra-sounds-en-gsm_1.4.7.bb b/packages/asterisk/asterisk-extra-sounds-en-gsm_1.4.7.bb
index 2d74d27996..bf59d9c4aa 100644
--- a/packages/asterisk/asterisk-extra-sounds-en-gsm_1.4.7.bb
+++ b/packages/asterisk/asterisk-extra-sounds-en-gsm_1.4.7.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-gsm-${PV}.tar.gz"
diff --git a/packages/asterisk/asterisk-extra-sounds-en-ulaw_1.4.7.bb b/packages/asterisk/asterisk-extra-sounds-en-ulaw_1.4.7.bb
index 6d35c65177..6305d99eb3 100644
--- a/packages/asterisk/asterisk-extra-sounds-en-ulaw_1.4.7.bb
+++ b/packages/asterisk/asterisk-extra-sounds-en-ulaw_1.4.7.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-ulaw-${PV}.tar.gz"
diff --git a/packages/asterisk/asterisk-moh-freeplay-alaw_0.0.0.bb b/packages/asterisk/asterisk-moh-freeplay-alaw_0.0.0.bb
index 96c662444e..4bd5e52c3f 100644
--- a/packages/asterisk/asterisk-moh-freeplay-alaw_0.0.0.bb
+++ b/packages/asterisk/asterisk-moh-freeplay-alaw_0.0.0.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-alaw.tar.gz"
diff --git a/packages/asterisk/asterisk-moh-freeplay-g729_0.0.0.bb b/packages/asterisk/asterisk-moh-freeplay-g729_0.0.0.bb
index 581e6bf84f..70595800b9 100644
--- a/packages/asterisk/asterisk-moh-freeplay-g729_0.0.0.bb
+++ b/packages/asterisk/asterisk-moh-freeplay-g729_0.0.0.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-g729.tar.gz"
diff --git a/packages/asterisk/asterisk-moh-freeplay-gsm_0.0.0.bb b/packages/asterisk/asterisk-moh-freeplay-gsm_0.0.0.bb
index e45c3eec4e..0de5cb65e3 100644
--- a/packages/asterisk/asterisk-moh-freeplay-gsm_0.0.0.bb
+++ b/packages/asterisk/asterisk-moh-freeplay-gsm_0.0.0.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-gsm.tar.gz"
diff --git a/packages/asterisk/asterisk-moh-freeplay-ulaw_0.0.0.bb b/packages/asterisk/asterisk-moh-freeplay-ulaw_0.0.0.bb
index e0e0293c34..375f49b38f 100644
--- a/packages/asterisk/asterisk-moh-freeplay-ulaw_0.0.0.bb
+++ b/packages/asterisk/asterisk-moh-freeplay-ulaw_0.0.0.bb
@@ -3,7 +3,7 @@ HOMEPAGE="http://www.asterisk.org"
SECTION = "voip"
LICENSE="GPL"
#DEPENDS="asterisk"
-#PR = "r1"
+PR = "r1"
SRC_URI="http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-ulaw.tar.gz"
diff --git a/packages/asterisk/asterisk_1.2.24.bb b/packages/asterisk/asterisk_1.2.24.bb
index c57707eb2a..497866f422 100644
--- a/packages/asterisk/asterisk_1.2.24.bb
+++ b/packages/asterisk/asterisk_1.2.24.bb
@@ -5,7 +5,7 @@ HOMEPAGE="www.asterisk.org"
LICENSE="GPL"
DEPENDS="ncurses zlib openssl curl alsa-lib libogg libvorbis speex"
SECTION = "console/telephony"
-PR = "r0"
+PR = "r1"
SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz \
file://uclibc-compat-getloadavg.patch;patch=1 \
diff --git a/packages/asterisk/asterisk_1.2.28.bb b/packages/asterisk/asterisk_1.2.28.bb
index 90e756bf66..a79d81b694 100644
--- a/packages/asterisk/asterisk_1.2.28.bb
+++ b/packages/asterisk/asterisk_1.2.28.bb
@@ -5,7 +5,7 @@ HOMEPAGE="www.asterisk.org"
LICENSE="GPL"
DEPENDS="ncurses zlib openssl curl alsa-lib libogg libvorbis speex"
SECTION = "console/telephony"
-PR = "r0"
+PR = "r1"
SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz \
file://uclibc-compat-getloadavg.patch;patch=1 \
diff --git a/packages/asterisk/asterisk_1.4.17.bb b/packages/asterisk/asterisk_1.4.17.bb
index 46bc90b25f..75a08ece60 100644
--- a/packages/asterisk/asterisk_1.4.17.bb
+++ b/packages/asterisk/asterisk_1.4.17.bb
@@ -8,7 +8,7 @@ PRIORITY = "optional"
SECTION = "console/telephony"
DEPENDS = "speex readline zlib openssl curl popt gnutls sqlite libogg libvorbis"
#RRECOMMENDS_${PN} = "logrotate"
-PR = "r0"
+PR = "r1"
SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz\
diff --git a/packages/asterisk/asterisk_1.4.19.1.bb b/packages/asterisk/asterisk_1.4.19.1.bb
index 2e05896cc6..31c8f541a4 100644
--- a/packages/asterisk/asterisk_1.4.19.1.bb
+++ b/packages/asterisk/asterisk_1.4.19.1.bb
@@ -7,7 +7,7 @@ PRIORITY = "optional"
SECTION = "console/telephony"
DEPENDS = "speex readline zlib openssl curl popt gnutls sqlite libogg libvorbis"
#RRECOMMENDS_${PN} = "logrotate"
-PR = "r0"
+PR = "r1"
SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz\
diff --git a/packages/asterisk/asterisk_1.6.0-beta8.bb b/packages/asterisk/asterisk_1.6.0-beta8.bb
index 202b689a68..79c1d359a1 100644
--- a/packages/asterisk/asterisk_1.6.0-beta8.bb
+++ b/packages/asterisk/asterisk_1.6.0-beta8.bb
@@ -8,7 +8,7 @@ PRIORITY = "optional"
SECTION = "console/telephony"
DEPENDS = "speex readline zlib openssl curl popt gnutls sqlite libogg libvorbis"
#RRECOMMENDS_${PN} = "logrotate"
-PR = "r0"
+PR = "r2"
DEFAULT_PREFERENCE = "-1"
diff --git a/packages/autoconf/autoconf-2.59/autoconf-sh.patch b/packages/autoconf/autoconf-2.59/autoconf-sh.patch
new file mode 100644
index 0000000000..361033ba3d
--- /dev/null
+++ b/packages/autoconf/autoconf-2.59/autoconf-sh.patch
@@ -0,0 +1,22 @@
+http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/Attic/autoconf-sh.patch?rev=1.1;content-type=text%2Fplain
+
+Index: tests/wrapper.in
+===================================================================
+RCS file: /cvsroot/autoconf/autoconf/tests/wrapper.in,v
+retrieving revision 1.4
+diff -u -u -r1.4 wrapper.in
+--- autoconf-2.59/tests/wrapper.in 25 Sep 2003 09:30:35 -0000 1.4
++++ autoconf-2.59/tests/wrapper.in 19 Nov 2003 13:17:11 -0000
+@@ -13,9 +13,10 @@
+ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+ fi
++DUALCASE=1; export DUALCASE # for MKS sh
+
+ # Support unset when possible.
+-if ((MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+ else
+ as_unset=false
+
diff --git a/packages/autoconf/autoconf_2.59.bb b/packages/autoconf/autoconf_2.59.bb
index 5891d1ec59..f59f8fa5c9 100644
--- a/packages/autoconf/autoconf_2.59.bb
+++ b/packages/autoconf/autoconf_2.59.bb
@@ -2,7 +2,7 @@ require autoconf.inc
DEPENDS += "m4-native"
RDEPENDS_${PN} = "m4 gnu-config"
-PR = "r5"
+PR = "r6"
SRC_URI += "file://autoreconf-include.patch;patch=1 \
file://autoreconf-exclude.patch;patch=1 \
@@ -12,4 +12,5 @@ SRC_URI += "file://autoreconf-include.patch;patch=1 \
file://autoheader-nonfatal-warnings.patch;patch=1 \
file://sizeof_types.patch;patch=1 \
file://autoconf-x.patch;patch=1 \
+ file://autoconf-sh.patch;patch=1 \
${@['file://path_prog_fixes.patch;patch=1', ''][bb.data.inherits_class('native', d)]}"
diff --git a/packages/automake/automake_1.10.bb b/packages/automake/automake_1.10.bb
index eef69f4e4a..e4e8f3385b 100644
--- a/packages/automake/automake_1.10.bb
+++ b/packages/automake/automake_1.10.bb
@@ -2,6 +2,8 @@ DESCRIPTION = "A tool for automatically generating Makefiles."
LICENSE = "GPL"
HOMEPAGE = "http://www.gnu.org/software/automake/"
SECTION = "devel"
+DEFAULT_PREFERENCE = "-1"
+PR = "r1"
SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2 \
${@['file://path_prog_fixes.patch;patch=1', ''][bb.data.inherits_class('native', d)]}"
@@ -21,11 +23,9 @@ do_install () {
oe_runmake 'DESTDIR=${D}' install
install -d ${D}${datadir}
if [ ! -e ${D}${datadir}/aclocal ]; then
- ln -sf aclocal-1.9 ${D}${datadir}/aclocal
+ ln -sf aclocal-1.10 ${D}${datadir}/aclocal
fi
if [ ! -e ${D}${datadir}/automake ]; then
- ln -sf automake-1.9 ${D}${datadir}/automake
+ ln -sf automake-1.10 ${D}${datadir}/automake
fi
}
-
-DEFAULT_PREFERENCE = "-1"
diff --git a/packages/avahi/avahi-python_0.6.21.bb b/packages/avahi/avahi-python_0.6.21.bb
index dbaf3d6416..25ca037c04 100644
--- a/packages/avahi/avahi-python_0.6.21.bb
+++ b/packages/avahi/avahi-python_0.6.21.bb
@@ -1,6 +1,6 @@
require avahi.inc
-PR = "r6"
+PR = "r7"
# FIXME: without --enable-gtk, avahi-discover (pygtk) won't be built
FILES_avahi-discover = ""
diff --git a/packages/avahi/avahi-ui_0.6.21.bb b/packages/avahi/avahi-ui_0.6.21.bb
index d693f5f0e0..28d4c07807 100644
--- a/packages/avahi/avahi-ui_0.6.21.bb
+++ b/packages/avahi/avahi-ui_0.6.21.bb
@@ -1,6 +1,6 @@
require avahi.inc
-PR = "r6"
+PR = "r7"
DEPENDS += "avahi gtk+"
diff --git a/packages/avahi/avahi_0.6.19.bb b/packages/avahi/avahi_0.6.19.bb
index 51786f6da7..e9be45a62e 100644
--- a/packages/avahi/avahi_0.6.19.bb
+++ b/packages/avahi/avahi_0.6.19.bb
@@ -1,3 +1,3 @@
require avahi.inc
-PR = "r7"
+PR = "r8"
diff --git a/packages/avahi/avahi_0.6.20.bb b/packages/avahi/avahi_0.6.20.bb
index 51786f6da7..e9be45a62e 100644
--- a/packages/avahi/avahi_0.6.20.bb
+++ b/packages/avahi/avahi_0.6.20.bb
@@ -1,3 +1,3 @@
require avahi.inc
-PR = "r7"
+PR = "r8"
diff --git a/packages/avahi/avahi_0.6.21.bb b/packages/avahi/avahi_0.6.21.bb
index 6e4fa306c3..b063b44df9 100644
--- a/packages/avahi/avahi_0.6.21.bb
+++ b/packages/avahi/avahi_0.6.21.bb
@@ -1,6 +1,6 @@
require avahi.inc
-PR = "r7"
+PR = "r8"
SRC_URI += "file://dbus-pre-1.1.1-support.patch;patch=1"
SRC_URI += "file://avr32-ipv6-fix.patch;patch=1"
diff --git a/packages/avahi/avahi_0.6.22.bb b/packages/avahi/avahi_0.6.22.bb
index b37cdfe18d..1877978977 100644
--- a/packages/avahi/avahi_0.6.22.bb
+++ b/packages/avahi/avahi_0.6.22.bb
@@ -1,6 +1,6 @@
require avahi.inc
DEPENDS += "intltool-native"
-PR = "r7"
+PR = "r8"
PACKAGES =+ "libavahi-gobject"
diff --git a/packages/bacula/bacula-client_1.38.11.bb b/packages/bacula/bacula-client_1.38.11.bb
index 2276b5bfff..8adde142b9 100644
--- a/packages/bacula/bacula-client_1.38.11.bb
+++ b/packages/bacula/bacula-client_1.38.11.bb
@@ -3,7 +3,7 @@ SECTION = "console/network"
PRIORITY = "optional"
HOMEPAGE = "http://www.bacula.org"
LICENSE = "GPL"
-PR="r0"
+PR="r1"
DEPENDS = "gmp openssl zlib readline"
SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/bacula/bacula-1.38.11.tar.gz \
diff --git a/packages/base-passwd/base-passwd_3.5.9.bb b/packages/base-passwd/base-passwd_3.5.9.bb
index 051b8d6a3f..4ea4e7f839 100644
--- a/packages/base-passwd/base-passwd_3.5.9.bb
+++ b/packages/base-passwd/base-passwd_3.5.9.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Base system password/group files."
SECTION = "base"
-PR = "r2"
+PR = "r3"
LICENSE = "GPL"
SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
diff --git a/packages/bash/bash.inc b/packages/bash/bash.inc
index b67e8bbe39..4eba6895ba 100644
--- a/packages/bash/bash.inc
+++ b/packages/bash/bash.inc
@@ -8,17 +8,26 @@ inherit autotools gettext
PARALLEL_MAKE = ""
+SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz"
+S = "${WORKDIR}/bash-${PV}"
+
bindir = "/bin"
sbindir = "/sbin"
EXTRA_OECONF = "--with-ncurses"
-export CC_FOR_BUILD = "${BUILD_CC}"
do_configure () {
gnu-configize
oe_runconf
}
+do_compile_prepend() {
+ cd builtins
+ touch mkbuiltins.o
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} -I${S}/include -I${S} -o mkbuiltins mkbuiltins.c
+ cd ${S}
+}
+
pkg_postinst () {
touch $D${sysconfdir}/shells
grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
diff --git a/packages/bash/bash_3.0.bb b/packages/bash/bash_3.0.bb
index babb70493e..a3aa25dee5 100644
--- a/packages/bash/bash_3.0.bb
+++ b/packages/bash/bash_3.0.bb
@@ -1,6 +1,7 @@
require bash.inc
-PR = "r9"
+PR = "r10"
-SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz \
- file://bash-3.0-fixes.patch;patch=1 \
- file://signames-mipsel.diff;patch=1"
+SRC_URI += "\
+ file://bash-3.0-fixes.patch;patch=1 \
+ file://signames-mipsel.diff;patch=1 \
+"
diff --git a/packages/bash/bash_3.2.bb b/packages/bash/bash_3.2.bb
index 883df50194..568f8206f5 100644
--- a/packages/bash/bash_3.2.bb
+++ b/packages/bash/bash_3.2.bb
@@ -1,7 +1,9 @@
require bash.inc
-PR = "r4"
-SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz \
+PR = "r5"
+
+SRC_URI += "\
+ file://builtins.patch;patch=1 \
http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-001;patch=1;pnum=0 \
http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-002;patch=1;pnum=0 \
http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-003;patch=1;pnum=0 \
diff --git a/packages/dropbear/dropbear-0.50/.mtn2git_empty b/packages/bash/files/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/dropbear/dropbear-0.50/.mtn2git_empty
+++ b/packages/bash/files/.mtn2git_empty
diff --git a/packages/bash/files/builtins.patch b/packages/bash/files/builtins.patch
new file mode 100644
index 0000000000..d6881ac8a3
--- /dev/null
+++ b/packages/bash/files/builtins.patch
@@ -0,0 +1,13 @@
+Index: bash-3.2/builtins/Makefile.in
+===================================================================
+--- bash-3.2.orig/builtins/Makefile.in
++++ bash-3.2/builtins/Makefile.in
+@@ -189,7 +189,7 @@ install: @HELPINSTALL@
+
+ mkbuiltins.o: ../config.h
+ mkbuiltins.o: mkbuiltins.c
+- $(RM) $@
++ echo $(RM) $@
+ $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $<
+
+ mkbuiltins$(EXEEXT): mkbuiltins.o
diff --git a/packages/gcc/gcc-4.3.0/.mtn2git_empty b/packages/binutils/binutils-2.18.50.0.7/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/gcc/gcc-4.3.0/.mtn2git_empty
+++ b/packages/binutils/binutils-2.18.50.0.7/.mtn2git_empty
diff --git a/packages/binutils/binutils-2.18.50.0.7/110-arm-eabi-conf.patch b/packages/binutils/binutils-2.18.50.0.7/110-arm-eabi-conf.patch
new file mode 100644
index 0000000000..2623301da0
--- /dev/null
+++ b/packages/binutils/binutils-2.18.50.0.7/110-arm-eabi-conf.patch
@@ -0,0 +1,22 @@
+--- /tmp/configure.ac 2008-06-22 14:14:59.000000000 +0200
++++ binutils-2.18.50.0.7/configure.ac 2008-06-22 14:15:30.000000000 +0200
+@@ -561,7 +561,7 @@
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ libgloss_dir=arm
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-qthreads"
+ noconfigdirs="$noconfigdirs target-libobjc"
+ case ${with_newlib} in
+--- /tmp/configure 2008-06-22 14:17:11.000000000 +0200
++++ binutils-2.18.50.0.7/configure 2008-06-22 14:17:56.000000000 +0200
+@@ -2307,7 +2307,7 @@
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ libgloss_dir=arm
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-qthreads"
+ noconfigdirs="$noconfigdirs target-libobjc"
+ case ${with_newlib} in
diff --git a/packages/binutils/binutils-2.18.50.0.7/binutils-2.16.1-e300c2c3.patch b/packages/binutils/binutils-2.18.50.0.7/binutils-2.16.1-e300c2c3.patch
new file mode 100644
index 0000000000..c5e4234f22
--- /dev/null
+++ b/packages/binutils/binutils-2.18.50.0.7/binutils-2.16.1-e300c2c3.patch
@@ -0,0 +1,19 @@
+Adds support for Freescale Power architecture e300c2 and e300c3 cores.
+http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
+
+Leon Woestenberg <leonw@mailcan.com>
+
+diff -uNr binutils-2.16.1.orig/gas/config/tc-ppc.c binutils-2.16.1/gas/config/tc-ppc.c
+--- binutils-2.16.1.orig/gas/config/tc-ppc.c 2005-03-02 13:24:01.000000000 +0000
++++ binutils-2.16.1/gas/config/tc-ppc.c 2006-07-04 11:45:24.000000000 +0100
+@@ -879,6 +879,10 @@
+ else
+ ppc_cpu |= PPC_OPCODE_SPE;
+ }
++ else if (strcmp (arg, "pmr") == 0)
++ {
++ ppc_cpu |= PPC_OPCODE_PMR;
++ }
+ /* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC
+ 620. */
+ else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)
diff --git a/packages/binutils/binutils-2.18.50.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/packages/binutils/binutils-2.18.50.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
new file mode 100644
index 0000000000..8df5b1fea0
--- /dev/null
+++ b/packages/binutils/binutils-2.18.50.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
@@ -0,0 +1,39 @@
+# strip (and objcopy) fail to set the error code if there is no
+# output file name and the rename of the stripped (or copied) file
+# fails, yet the command fails to do anything. This fixes both
+# objcopy and strip.
+#
+# modification by bero: Ported to 2.16.91.0.6
+#
+#Signed-off-by: John Bowler <jbowler@acm.org>
+#Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
+---
+# binutils/objcopy.c | 8 +++++---
+# 1 file changed, 5 insertions(+), 3 deletions(-)
+#
+Index: src/binutils/objcopy.c
+===================================================================
+--- src.orig/binutils/objcopy.c 2007-08-09 13:26:03.000000000 +0100
++++ src/binutils/objcopy.c 2007-08-09 16:36:12.000000000 +0100
+@@ -2787,8 +2787,9 @@ strip_main (int argc, char *argv[])
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+ if (output_file != tmpname)
+- smart_rename (tmpname, output_file ? output_file : argv[i],
+- preserve_dates);
++ if (smart_rename (tmpname, output_file ? output_file : argv[i],
++ preserve_dates))
++ hold_status = 1;
+ status = hold_status;
+ }
+ else
+@@ -3411,7 +3412,8 @@ copy_main (int argc, char *argv[])
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+ if (tmpname != output_filename)
+- smart_rename (tmpname, input_filename, preserve_dates);
++ if (smart_rename (tmpname, input_filename, preserve_dates))
++ status = 1;
+ }
+ else
+ unlink_if_ordinary (tmpname);
diff --git a/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-100-uclibc-conf.patch b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 0000000000..8de04e0fe0
--- /dev/null
+++ b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-100-uclibc-conf.patch
@@ -0,0 +1,34 @@
+--- binutils-2.18.orig/configure
++++ binutils-2.18/configure
+@@ -2206,7 +2206,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -2504,7 +2504,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[3456789]86-*-vsta) ;; # don't add gprof back in
+ i[3456789]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.18.orig/gprof/configure
++++ binutils-2.18/gprof/configure
+@@ -4124,6 +4124,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
diff --git a/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000000..04a7e61e25
--- /dev/null
+++ b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-006_better_file_error.patch b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 0000000000..f337611edf
--- /dev/null
+++ b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000000..498651a90c
--- /dev/null
+++ b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-gas-needs-libm.patch b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-gas-needs-libm.patch
new file mode 100644
index 0000000000..db838cf20c
--- /dev/null
+++ b/packages/binutils/binutils-2.18.50.0.7/binutils-uclibc-gas-needs-libm.patch
@@ -0,0 +1,38 @@
+Source: Khem Raj <raj.khem@gmail.com>
+Disposition: submit upstream.
+
+Description:
+
+We do not need to have the libtool patch anymore for binutils after
+libtool has been updated upstream it include support for it. However
+for building gas natively on uclibc systems we have to link it with
+-lm so that it picks up missing symbols.
+
+/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double':
+floatformat.c:(.text+0x1ec): undefined reference to `frexp'
+floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
+/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
+floatformat.c:(.text+0x38a): undefined reference to `ldexp'
+floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
+floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
+collect2: ld returned 1 exit status
+make[4]: *** [as-new] Error 1
+
+Index: binutils-2.17.50/gas/configure.tgt
+===================================================================
+--- binutils-2.17.50.orig/gas/configure.tgt
++++ binutils-2.17.50/gas/configure.tgt
+@@ -408,6 +408,12 @@ case ${generic_target} in
+ *-*-netware) fmt=elf em=netware ;;
+ esac
+
++case ${generic_target} in
++ arm-*-*uclibc*)
++ need_libm=yes
++ ;;
++esac
++
+ case ${cpu_type} in
+ alpha | arm | i386 | ia64 | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k)
+ bfd_gas=yes
+
diff --git a/packages/binutils/binutils-cross-sdk_2.18.50.0.7.bb b/packages/binutils/binutils-cross-sdk_2.18.50.0.7.bb
new file mode 100644
index 0000000000..4695c61cd5
--- /dev/null
+++ b/packages/binutils/binutils-cross-sdk_2.18.50.0.7.bb
@@ -0,0 +1,3 @@
+require binutils_${PV}.bb
+require binutils-cross-sdk.inc
+PR = "r3"
diff --git a/packages/binutils/binutils-cross_2.18.50.0.7.bb b/packages/binutils/binutils-cross_2.18.50.0.7.bb
new file mode 100644
index 0000000000..b78a30ac47
--- /dev/null
+++ b/packages/binutils/binutils-cross_2.18.50.0.7.bb
@@ -0,0 +1,4 @@
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
+require binutils_${PV}.bb
+require binutils-cross.inc
+
diff --git a/packages/binutils/binutils_2.14.90.0.6.bb b/packages/binutils/binutils_2.14.90.0.6.bb
index 4ab8b979dd..eb7208215b 100644
--- a/packages/binutils/binutils_2.14.90.0.6.bb
+++ b/packages/binutils/binutils_2.14.90.0.6.bb
@@ -1,7 +1,7 @@
SECTION = "devel"
inherit autotools gettext
-PR = "r4"
+PR = "r5"
DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
diff --git a/packages/binutils/binutils_2.14.90.0.7.bb b/packages/binutils/binutils_2.14.90.0.7.bb
index 4acc2da55c..f940c873e5 100644
--- a/packages/binutils/binutils_2.14.90.0.7.bb
+++ b/packages/binutils/binutils_2.14.90.0.7.bb
@@ -4,7 +4,7 @@ inherit autotools gettext
DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
LICENSE = "GPL"
-PR = "r5"
+PR = "r6"
PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
diff --git a/packages/binutils/binutils_2.15.94.0.1.bb b/packages/binutils/binutils_2.15.94.0.1.bb
index 151d722265..74a902b5e6 100644
--- a/packages/binutils/binutils_2.15.94.0.1.bb
+++ b/packages/binutils/binutils_2.15.94.0.1.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
-PR = "r4"
+PR = "r5"
inherit autotools gettext
diff --git a/packages/binutils/binutils_2.16.1.bb b/packages/binutils/binutils_2.16.1.bb
index cc92da3e35..82353006dc 100644
--- a/packages/binutils/binutils_2.16.1.bb
+++ b/packages/binutils/binutils_2.16.1.bb
@@ -1,3 +1,4 @@
+PR = "r1"
CROSSTOOL_PATCH_URL = "http://www.kegel.com/crosstool/crosstool-0.43/patches/binutils-2.16.1/"
SRC_URI = \
diff --git a/packages/binutils/binutils_2.16.91.0.6.bb b/packages/binutils/binutils_2.16.91.0.6.bb
index 64f76a6e97..b2511492b3 100644
--- a/packages/binutils/binutils_2.16.91.0.6.bb
+++ b/packages/binutils/binutils_2.16.91.0.6.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
-PR = "r2"
+PR = "r3"
# glibc 2.3 has issues with this version
# of binutils.
diff --git a/packages/binutils/binutils_2.16.91.0.7.bb b/packages/binutils/binutils_2.16.91.0.7.bb
index e8d709c33e..76c128583d 100644
--- a/packages/binutils/binutils_2.16.91.0.7.bb
+++ b/packages/binutils/binutils_2.16.91.0.7.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
DEFAULT_PREFERENCE = "-1"
-PR = "r1"
+PR = "r2"
inherit autotools gettext
diff --git a/packages/binutils/binutils_2.16.bb b/packages/binutils/binutils_2.16.bb
index 8d871622a8..9035b44ada 100644
--- a/packages/binutils/binutils_2.16.bb
+++ b/packages/binutils/binutils_2.16.bb
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "r10"
SRC_URI = \
"${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.17.50.0.1.bb b/packages/binutils/binutils_2.17.50.0.1.bb
index e8d709c33e..76c128583d 100644
--- a/packages/binutils/binutils_2.17.50.0.1.bb
+++ b/packages/binutils/binutils_2.17.50.0.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
DEFAULT_PREFERENCE = "-1"
-PR = "r1"
+PR = "r2"
inherit autotools gettext
diff --git a/packages/binutils/binutils_2.17.50.0.12.bb b/packages/binutils/binutils_2.17.50.0.12.bb
index d28b39a38e..d24d24e1bc 100644
--- a/packages/binutils/binutils_2.17.50.0.12.bb
+++ b/packages/binutils/binutils_2.17.50.0.12.bb
@@ -1,5 +1,5 @@
require binutils.inc
-PR = "r1"
+PR = "r2"
SRC_URI = \
"${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.17.50.0.5.bb b/packages/binutils/binutils_2.17.50.0.5.bb
index f659b3b8b3..1d1c3fb6c8 100644
--- a/packages/binutils/binutils_2.17.50.0.5.bb
+++ b/packages/binutils/binutils_2.17.50.0.5.bb
@@ -1,6 +1,6 @@
require binutils.inc
-PR = "r2"
+PR = "r3"
SRC_URI = \
"${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.17.50.0.8.bb b/packages/binutils/binutils_2.17.50.0.8.bb
index fa601c18a7..f659b3b8b3 100644
--- a/packages/binutils/binutils_2.17.50.0.8.bb
+++ b/packages/binutils/binutils_2.17.50.0.8.bb
@@ -1,6 +1,6 @@
require binutils.inc
-PR = "r1"
+PR = "r2"
SRC_URI = \
"${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.17.bb b/packages/binutils/binutils_2.17.bb
index e721cb41f3..0f0b5d654d 100644
--- a/packages/binutils/binutils_2.17.bb
+++ b/packages/binutils/binutils_2.17.bb
@@ -1,7 +1,7 @@
require binutils.inc
require binutils-avr32.inc
-PR = "r5"
+PR = "r6"
SRC_URI = \
"http://ftp.gnu.org/gnu/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.18.50.0.7.bb b/packages/binutils/binutils_2.18.50.0.7.bb
new file mode 100644
index 0000000000..d0656f6300
--- /dev/null
+++ b/packages/binutils/binutils_2.18.50.0.7.bb
@@ -0,0 +1,18 @@
+PR = "r4"
+
+require binutils.inc
+
+SRC_URI = "\
+ ${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
+ file://binutils-2.16.91.0.6-objcopy-rename-errorcode.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 \
+ file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
+ file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
+ file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
+ "
+
+# powerpc patches
+SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
+
diff --git a/packages/binutils/binutils_2.18.bb b/packages/binutils/binutils_2.18.bb
index ada367fe70..9367196240 100644
--- a/packages/binutils/binutils_2.18.bb
+++ b/packages/binutils/binutils_2.18.bb
@@ -1,4 +1,4 @@
-PR = "r3"
+PR = "r4"
require binutils.inc
diff --git a/packages/binutils/binutils_csl-arm-20050416.bb b/packages/binutils/binutils_csl-arm-20050416.bb
index efb8b91a8a..2c7c2076c3 100644
--- a/packages/binutils/binutils_csl-arm-20050416.bb
+++ b/packages/binutils/binutils_csl-arm-20050416.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
LICENSE = "GPL"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "2.15.99+csl-arm+cvs20050416"
-PR = "r2"
+PR = "r3"
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_arm-linux = "-1"
diff --git a/packages/binutils/binutils_csl-arm-20050603.bb b/packages/binutils/binutils_csl-arm-20050603.bb
index 0c3cd5c0fe..13759b47ad 100644
--- a/packages/binutils/binutils_csl-arm-20050603.bb
+++ b/packages/binutils/binutils_csl-arm-20050603.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
LICENSE = "GPL"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "2.15.99+csl-arm+cvs20050603"
-PR = "r2"
+PR = "r3"
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
DEFAULT_PREFERENCE = "-1"
#DEFAULT_PREFERENCE_arm-linux = "1"
diff --git a/packages/binutils/binutils_cvs.bb b/packages/binutils/binutils_cvs.bb
index 7baafc8baf..288450cf58 100644
--- a/packages/binutils/binutils_cvs.bb
+++ b/packages/binutils/binutils_cvs.bb
@@ -1,6 +1,6 @@
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "0.0+cvs${SRCDATE}"
-PR = "r1"
+PR = "r3"
require binutils.inc
@@ -24,4 +24,4 @@ do_configure_prepend () {
rm ${S}/gdb -Rf
rm ${S}/rda -Rf
rm ${S}/libgloss -Rf
-} \ No newline at end of file
+}
diff --git a/packages/bluesnarfer/bluesnarfer.bb b/packages/bluesnarfer/bluesnarfer.bb
index 8ba346e526..b737968e79 100644
--- a/packages/bluesnarfer/bluesnarfer.bb
+++ b/packages/bluesnarfer/bluesnarfer.bb
@@ -1,17 +1,14 @@
-SECTION = "network/misc"
DESCRIPTION = "Bluetooth cellphone information gatherer"
+LICENSE = "GPL"
+SECTION = "network/misc"
+DEPENDS = "bluez-libs"
PV = "0.1"
-SRC_URI = "http://www.remote-exploit.org/images/a/a0/Bluesnarfer.tar.gz"
-
-DEFAULT_PREFERENCE="-1"
-
-CFLAGS_prepend = "-I${STAGING_INCDIR}/bluetooth "
+SRC_URI = "http://www.alighieri.org/tools/bluesnarfer.tar.gz"
+S = "${WORKDIR}/bluesnarfer"
-LDFLAGS_prepend = "-lbluetooth -L${STAGING_LIBDIR} "
+LDFLAGS =+ "-lbluetooth"
-S = "${WORKDIR}/bluesnarfer"
-LICENSE = "GPL"
do_compile() {
oe_runmake bluesnarfer
}
@@ -20,4 +17,3 @@ do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/bluesnarfer ${D}${bindir}
}
-
diff --git a/packages/bluez/bluez-hcidump_1.42.bb b/packages/bluez/bluez-hcidump_1.42.bb
new file mode 100644
index 0000000000..877c8db33c
--- /dev/null
+++ b/packages/bluez/bluez-hcidump_1.42.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Linux Bluetooth Stack HCI Debugger Tool."
+SECTION = "console"
+PRIORITY = "optional"
+DEPENDS = "bluez-libs"
+LICENSE = "GPL"
+PR = "r0"
+
+SRC_URI = "http://bluez.sourceforge.net/download/bluez-hcidump-${PV}.tar.gz"
+S = "${WORKDIR}/bluez-hcidump-${PV}"
+
+EXTRA_OECONF = "--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_INCDIR}"
+
+inherit autotools
diff --git a/packages/bluez/bluez-libs_3.33.bb b/packages/bluez/bluez-libs_3.33.bb
new file mode 100644
index 0000000000..6ddf62a4fb
--- /dev/null
+++ b/packages/bluez/bluez-libs_3.33.bb
@@ -0,0 +1 @@
+require bluez-libs.inc
diff --git a/packages/gcc/gcc-4.3.0/debian/.mtn2git_empty b/packages/bluez/bluez-utils-3.33/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/gcc/gcc-4.3.0/debian/.mtn2git_empty
+++ b/packages/bluez/bluez-utils-3.33/.mtn2git_empty
diff --git a/packages/bluez/bluez-utils-3.33/hciattach-ti-bts.patch b/packages/bluez/bluez-utils-3.33/hciattach-ti-bts.patch
new file mode 100644
index 0000000000..1b208f7979
--- /dev/null
+++ b/packages/bluez/bluez-utils-3.33/hciattach-ti-bts.patch
@@ -0,0 +1,477 @@
+--- bluez-utils-3.1/tools/hciattach.c.orig 2006-07-23 14:02:14.000000000 +0200
++++ bluez-utils-3.1/tools/hciattach.c 2006-07-23 14:06:29.000000000 +0200
+@@ -60,6 +60,8 @@
+ #define HCI_UART_3WIRE 2
+ #define HCI_UART_H4DS 3
+
++#include "ti_bts.h"
++
+ struct uart_t {
+ char *type;
+ int m_id;
+@@ -70,6 +72,7 @@
+ int flags;
+ char *bdaddr;
+ int (*init) (int fd, struct uart_t *u, struct termios *ti);
++ char *bts; /* bluetooth script */
+ };
+
+ #define FLOW_CTL 0x0001
+@@ -279,6 +282,114 @@
+ return 0;
+ }
+
++static int brf6150(int fd, struct uart_t *u, struct termios *ti)
++{
++ bts_t *bfp;
++ int i;
++ unsigned long vers;
++ unsigned char actionbuf[256];
++ unsigned char resp[128]; /* Response */
++ unsigned long count;
++ unsigned short atype;
++
++ if (u->bts == NULL) /* no script, ignore */
++ return 0;
++
++ bfp = bts_load_script( u->bts, &vers );
++ if (bfp == NULL)
++ return -1;
++
++ fprintf( stderr, "Loading BTS script version %lu\n", vers );
++
++ while ((count = bts_next_action( bfp, actionbuf,
++ sizeof actionbuf - 1, &atype )) != 0) {
++ if (atype == ACTION_REMARKS) {
++ if (actionbuf[0] != 0)
++ fprintf( stderr, "%s\n", actionbuf );
++ }
++ else if (atype == ACTION_SEND_COMMAND) {
++#if 0
++ fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype );
++ for (i=0; i<count; i++) {
++ fprintf( stderr, "0x%02x ", actionbuf[i] );
++ }
++ fprintf( stderr, "\n" );
++#endif
++ int n;
++ n = write(fd, actionbuf, count);
++ if (n < 0 || n < count) {
++ perror("Failed to write TI action command");
++ return -1;
++ }
++ }
++ else if (atype == ACTION_WAIT_EVENT) {
++ action_wait_t *wait = (action_wait_t *)actionbuf;
++#if 0
++ fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size );
++ for (i=0; i<wait->size; i++) {
++ fprintf( stderr, "0x%02x ", wait->data[i] );
++ }
++ fprintf( stderr, "\n" );
++#endif
++ usleep(wait->msec); /* seems they give usec, not msec */
++ /* Read reply. */
++ if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) {
++ perror("Failed to read TI command response");
++ return -1;
++ }
++ if (count < wait->size) {
++ fprintf( stderr, "TI command response is short.");
++ }
++ for (i=0; i<wait->size; i++) {
++ if (i == 3) continue; /* ignore */
++ if (resp[i] != wait->data[i]) {
++ fprintf( stderr, "TI command response does not match expected result.\n" );
++ }
++ }
++ }
++ else if (atype == ACTION_SERIAL_PORT_PARAMETERS) {
++ action_serial_t *sercmd = (action_serial_t *)actionbuf;
++
++ /* Set actual baudrate */
++ fprintf( stderr,
++ "BTS changing baud rate to %u, flow control to %u\n",
++ sercmd->baud, sercmd->flow_control );
++
++ tcflush(fd, TCIOFLUSH);
++
++ if (sercmd->flow_control)
++ ti->c_cflag |= CRTSCTS;
++ else
++ ti->c_cflag &= ~CRTSCTS;
++ if (tcsetattr(fd, TCSANOW, ti) < 0) {
++ perror("Can't set port settings");
++ return -1;
++ }
++
++ u->speed = sercmd->baud;
++
++ tcflush(fd, TCIOFLUSH);
++ if (set_speed(fd, ti, sercmd->baud) < 0) {
++ perror("Can't set baud rate");
++ return -1;
++ }
++ }
++ else if (atype == ACTION_DELAY) {
++ action_delay_t *delay = (action_delay_t *)actionbuf;
++ usleep(delay->msec); /* seems they give usec, not msec */
++ }
++ else {
++ fprintf( stderr, "BTS action type = %d: ", (int)atype );
++ for (i=0; i<count; i++) {
++ fprintf( stderr, "0x%02x ", actionbuf[i] );
++ }
++ fprintf( stderr, "\n" );
++ }
++ }
++ bts_unload_script( bfp );
++ return 0;
++}
++
+ static int texas(int fd, struct uart_t *u, struct termios *ti)
+ {
+ struct timespec tm = {0, 50000};
+@@ -328,6 +439,17 @@
+ /* Print LMP subversion */
+ fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF);
+
++ if ((resp[14] >> 2) == 3) {
++ /* BRF6150 */
++ int err;
++
++ nanosleep(&tm, NULL);
++ if ((err = brf6150(fd, u, ti)) != 0) {
++ fprintf(stderr, "Texas module script failed (err=%d)\n", err);
++ return -1;
++ }
++ }
++
+ nanosleep(&tm, NULL);
+ return 0;
+ }
+@@ -1204,7 +1326,7 @@
+ {
+ printf("hciattach - HCI UART driver initialization utility\n");
+ printf("Usage:\n");
+- printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
++ printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
+ printf("\thciattach -l\n");
+ }
+
+@@ -1219,11 +1341,12 @@
+ struct sigaction sa;
+ struct pollfd p;
+ char dev[PATH_MAX];
++ char *bts = NULL;
+
+ detach = 1;
+ printpid = 0;
+
+- while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) {
++ while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) {
+ switch(opt) {
+ case 'b':
+ send_break = 1;
+@@ -1245,6 +1368,10 @@
+ init_speed = atoi(optarg);
+ break;
+
++ case 'S':
++ bts = optarg;
++ break;
++
+ case 'l':
+ for (i = 0; uart[i].type; i++) {
+ printf("%-10s0x%04x,0x%04x\n", uart[i].type,
+@@ -1320,6 +1447,8 @@
+ if (init_speed)
+ u->init_speed = init_speed;
+
++ u->bts = bts;
++
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_flags = SA_NOCLDSTOP;
+ sa.sa_handler = sig_alarm;
+--- bluez-utils-3.1/tools/ti_bts.h.orig 2006-07-23 14:07:26.000000000 +0200
++++ bluez-utils-3.1/tools/ti_bts.h 2006-07-23 14:07:46.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * Copyright (c) 2005 Texas Instruments, Inc.
++ * Ported by SDG Systems, LLC
++ *
++ * 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;
++ *
++ * 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 OF THIRD PARTY RIGHTS.
++ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
++ * CLAIM, OR 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.
++ *
++ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
++ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
++ * SOFTWARE IS DISCLAIMED.
++ *
++ */
++
++#ifndef BT_SCRIPT_H
++#define BT_SCRIPT_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++ * Define the interface of Bluetooth Script
++ */
++
++typedef void bts_t;
++
++
++#define ACTION_SEND_COMMAND 1 /* Send out raw data (as is) */
++#define ACTION_WAIT_EVENT 2 /* Wait for data */
++#define ACTION_SERIAL_PORT_PARAMETERS 3
++#define ACTION_DELAY 4
++#define ACTION_RUN_SCRIPT 5
++#define ACTION_REMARKS 6
++
++/*
++ * Structure for ACTION_SEND_COMMAND
++ */
++typedef struct tagCActionCommand
++{
++ unsigned char data[1]; /* Data to send */
++} action_command_t;
++
++/*
++ * Structure for ACTION_WAIT_EVENT
++ */
++typedef struct tagCActionWaitEvent
++{
++ unsigned long msec; /* in milliseconds */
++ unsigned long size;
++ unsigned char data[1]; /* Data to wait for */
++} action_wait_t;
++
++
++/*
++ * Structure for ACTION_SERIAL_PORT_PARAMETERS
++ */
++typedef struct tagCActionSerialPortParameters
++{
++ unsigned long baud;
++ unsigned long flow_control;
++} action_serial_t;
++
++/* Flow Control Type */
++#define FCT_NONE 0
++#define FCT_HARDWARE 1
++
++#define DONT_CHANGE 0xFFFFFFFF /* For both baud rate and flow control */
++
++
++/*
++ * Structure for ACTION_DELAY
++ */
++typedef struct tagCActionDelay
++{
++ unsigned long msec; /* in milliseconds */
++} action_delay_t;
++
++/*
++ * Structure for ACTION_RUN_SCRIPT
++ */
++typedef struct tagCActionRunScript
++{
++ char filename[1];
++} action_run_t;
++
++/*
++ * Structure for ACTION_REMARKS
++ */
++typedef struct tagCActionRemarks
++{
++ char m_szRemarks[1];
++} action_remarks_t;
++
++
++const char *cis_create_filename(const unsigned char* cmdparms);
++bts_t * bts_load_script(const char* fname, unsigned long* version);
++unsigned long bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
++ unsigned long nMaxSize, unsigned short* ptype);
++void bts_unload_script(bts_t* bts_fp);
++
++#ifdef __cplusplus
++};
++#endif
++
++#endif /* BT_SCRIPT_H */
++
+--- bluez-utils-3.1/tools/ti_bts.c.orig 2006-07-23 14:07:28.000000000 +0200
++++ bluez-utils-3.1/tools/ti_bts.c 2006-07-23 14:07:46.000000000 +0200
+@@ -0,0 +1,149 @@
++/*
++ * Copyright (c) 2005 Texas Instruments, Inc.
++ * Ported by SDG Systems, LLC
++ *
++ * 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;
++ *
++ * 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 OF THIRD PARTY RIGHTS.
++ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
++ * CLAIM, OR 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.
++ *
++ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
++ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
++ * SOFTWARE IS DISCLAIMED.
++ *
++ */
++
++
++#include <stdio.h>
++#include <stdlib.h>
++#include "ti_bts.h"
++
++#ifndef MAKEWORD
++#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) | ((unsigned short)((unsigned char)(b))) << 8))
++#endif
++
++#define TI_MANUFACTURER_ID 13
++
++/*
++ * Common Init Script specific
++ */
++const char *
++cis_create_filename(const unsigned char* cmdparms)
++{
++ static char bts_file[50];
++
++ /* Check for TI's id */
++ unsigned short manfid = MAKEWORD(cmdparms[8], cmdparms[9]);
++
++ if (TI_MANUFACTURER_ID == manfid) {
++ unsigned short version = MAKEWORD(cmdparms[10], cmdparms[11]);
++
++ unsigned short chip = (version & 0x7C00) >> 10;
++ unsigned short min_ver = (version & 0x007F);
++ unsigned short maj_ver = (version & 0x0380) >> 7;
++
++ if (0 != (version & 0x8000)) {
++ maj_ver |= 0x0008;
++ }
++
++ sprintf( bts_file, "TIInit_%d.%d.%d.bts",
++ (int)chip, (int)maj_ver, (int)min_ver);
++
++ return &bts_file[0];
++ }
++ return NULL;
++}
++
++typedef struct tagCHeader
++{
++ unsigned long magic;
++ unsigned long version;
++ unsigned char future[24];
++} cheader_t;
++
++
++/* The value 0x42535442 stands for (in ASCII) BTSB */
++/* which is Bluetooth Script Binary */
++#define FILE_HEADER_MAGIC 0x42535442
++
++
++bts_t *
++bts_load_script(const char* fname, unsigned long* version)
++{
++ bts_t* bts = NULL;
++ FILE* fp = fopen(fname, "rb");
++
++ if (NULL != fp) {
++ /* Read header */
++ cheader_t header;
++
++ /* Read header */
++ if (1 == fread(&header, sizeof(header), 1, fp)) {
++ /* Check magic number for correctness */
++ if (header.magic == FILE_HEADER_MAGIC) {
++ /* If user wants the version number */
++ if (NULL != version) {
++ *version = header.version;
++ }
++ bts = (bts_t*)fp;
++ }
++ }
++ /* If failed reading the file, close it */
++ if (NULL == bts) {
++ fclose(fp);
++ }
++ }
++ return bts;
++}
++
++unsigned long
++bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
++ unsigned long nMaxSize, unsigned short* ptype)
++{
++ unsigned long bytes = 0;
++ FILE* fp = (FILE*)bts_fp;
++ unsigned char action_hdr[4];
++
++ if (bts_fp == NULL)
++ return 0;
++
++ /* Each Action has the following: */
++ /* UINT16 type of this action */
++ /* UINT16 size of rest */
++ /* BYTE[] action buffer (for HCI, includes the type byte e.g. 1 for hci command) */
++
++ if (1 == fread(&action_hdr[0], sizeof(action_hdr), 1, fp)) {
++ unsigned short type = *(unsigned short*)&action_hdr[0];
++ unsigned short size = *(unsigned short*)&action_hdr[2];
++
++ if (size <= nMaxSize) {
++ int nread = fread(action_buf, sizeof(action_buf[0]), size, fp);
++
++ if (nread == size) {
++ *ptype = type;
++ bytes = (unsigned long)size;
++ }
++ }
++ }
++
++ return bytes;
++}
++
++void
++bts_unload_script(bts_t* bts_fp)
++{
++ FILE* fp = (FILE*)bts_fp;
++
++ if (NULL != fp) {
++ fclose(fp);
++ }
++}
++
+--- bluez-utils-3.1/tools/Makefile.am.orig 2006-07-23 14:06:59.000000000 +0200
++++ bluez-utils-3.1/tools/Makefile.am 2006-07-23 14:07:18.000000000 +0200
+@@ -45,7 +45,7 @@
+
+ noinst_PROGRAMS = hcisecfilter ppporc
+
+-hciattach_SOURCES = hciattach.c hciattach_st.c
++hciattach_SOURCES = hciattach.c hciattach_st.c ti_bts.h ti_bts.c
+ hciattach_LDADD = @BLUEZ_LIBS@
+
+ hciconfig_SOURCES = hciconfig.c csr.h csr.c
diff --git a/packages/bluez/bluez-utils.inc b/packages/bluez/bluez-utils.inc
index 4d2ce6505e..298650a080 100644
--- a/packages/bluez/bluez-utils.inc
+++ b/packages/bluez/bluez-utils.inc
@@ -1,7 +1,7 @@
DESCRIPTION = "Linux Bluetooth Stack Userland Utilities."
SECTION = "console"
PRIORITY = "optional"
-DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb dbus cups"
+DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb-compat dbus cups"
PROVIDES = "bluez-utils-dbus"
RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
RREPLACES = "bluez-utils-dbus"
diff --git a/packages/bluez/bluez-utils3.inc b/packages/bluez/bluez-utils3.inc
index e9edfe1b95..0bbba2cd14 100644
--- a/packages/bluez/bluez-utils3.inc
+++ b/packages/bluez/bluez-utils3.inc
@@ -1,7 +1,7 @@
DESCRIPTION = "Linux Bluetooth Stack Userland Utilities."
SECTION = "console"
PRIORITY = "optional"
-DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb dbus glib-2.0"
+DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb-compat dbus glib-2.0"
PROVIDES = "bluez-utils-dbus"
RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
RREPLACES = "bluez-utils-dbus"
@@ -82,7 +82,8 @@ do_install_append() {
chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/
install -m 0644 ${S}/rfcomm/rfcomm.conf ${D}${sysconfdir}/bluetooth/
- install -m 0755 ${S}/daemon/.libs/passkey-agent ${D}${base_bindir}/
+ install -m 0755 ${S}/daemon/.libs/passkey-agent ${D}${base_bindir}/ ||true
+ install -m 0755 ${S}/test/.libs/passkey-agent ${D}${base_bindir}/ ||true
}
diff --git a/packages/bluez/bluez-utils_3.33.bb b/packages/bluez/bluez-utils_3.33.bb
new file mode 100644
index 0000000000..e4b5f21a84
--- /dev/null
+++ b/packages/bluez/bluez-utils_3.33.bb
@@ -0,0 +1,55 @@
+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 \
+ "
+
+PACKAGES =+ "bluez-audio"
+
+FILES_${PN} = " \
+ ${base_sbindir}/hcid \
+ ${libdir}/bluetooth/plugins/*.so \
+ ${sysconfdir}/init.d/bluetooth \
+ ${sysconfdir}/bluetooth/hcid.conf \
+ ${sysconfdir}/default \
+ ${sysconfdir}/dbus-1 \
+ ${base_sbindir}/hciattach \
+ "
+
+FILES_bluez-audio = " \
+ ${libdir}/bluetooth/plugins/libaudio.so \
+ ${libdir}/gstreamer-0.10/*.so \
+ "
+
+FILES_${PN}-dbg += " \
+ ${libdir}/bluetooth/plugins/.debug \
+ ${libdir}/gstreamer-0.10/.debug \
+ "
+
+FILES_${PN}-dev += " \
+ ${libdir}/bluetooth/plugins/*.la \
+ ${libdir}/gstreamer-0.10/*.la \
+ "
diff --git a/packages/bwmon/bwmon_1.3.bb b/packages/bwmon/bwmon_1.3.bb
index bc08aa7568..11b67f4522 100644
--- a/packages/bwmon/bwmon_1.3.bb
+++ b/packages/bwmon/bwmon_1.3.bb
@@ -1,15 +1,13 @@
DESCRIPTION = "The Linux bandwidth monitor"
LICENSE = "GPL"
DEPENDS = "ncurses"
-PR = "r1"
+PR = "r2"
SRC_URI = "${SOURCEFORGE_MIRROR}/bwmon/${P}.tar.gz \
file://makefile.patch;patch=1"
inherit autotools
-EXTRA_OEMAKE = "LDFLAGS=-L${STAGING_LIBDIR}"
-
do_install () {
install -d ${D}${bindir}
install ${S}/bwmon ${D}${bindir}/bwmon
diff --git a/packages/cacao/cacao.inc b/packages/cacao/cacao.inc
index 0d2b4c7ae1..e08cd5ec80 100644
--- a/packages/cacao/cacao.inc
+++ b/packages/cacao/cacao.inc
@@ -15,17 +15,33 @@ RPROVIDES_cacao = "java2-runtime"
inherit java autotools update-alternatives
+# Old and new options do not interfere.
EXTRA_OECONF = "\
${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
--enable-debug \
+ --with-vm-zip=${datadir}/cacao/vm.zip \
--with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-${PV} \
+ ${OLD_CACAO_OECONF} \
+ ${NEW_CACAO_OECONF} \
+ "
+
+# Options needed for Cacao < 0.99 (including hg snapshots)
+OLD_CACAO_OECONF = "\
--with-classpath-includedir=${STAGING_INCDIR}/classpath \
--with-classpath-classes=${STAGING_DATADIR}/classpath/glibj.zip \
--with-target-classpath-classes=${datadir}/classpath/glibj.zip \
- --with-vm-zip=${datadir}/cacao/vm.zip \
- --with-classpath-libdir=${libdir} \
+ --with-classpath-libdir=${libdir_jni}:${libdir} \
"
+# Options needed for Cacao >= 0.99
+NEW_CACAO_OECONF = "\
+ --with-build-java-runtime-library-classes=${STAGING_DATADIR}/classpath/glibj.zip \
+ --with-java-runtime-library-classes=${datadir}/classpath/glibj.zip \
+ --with-java-runtime-library-libdir=${libdir_jni}:${libdir} \
+ --with-jni_md_h=${STAGING_INCDIR}/classpath \
+ --with-jni_h=${STAGING_INCDIR}/classpath \
+ "
+
PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
FILES_${PN} = "${bindir}/${PN} ${libdir}/lib*.so* ${datadir}/${PN}"
@@ -36,16 +52,3 @@ ALTERNATIVE_NAME = "java"
ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
ALTERNATIVE_PATH = "${bindir}/cacao"
ALTERNATIVE_PRIORITY = "10"
-
-do_configure_prepend() {
- # Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
- # configured in OE.
- if [ -e src/vm/properties.c ]; then
- sed -i -e "s|OE_LIBDIR_JNI|${libdir_jni}|" src/vm/properties.c
- fi
-
- if [ -e src/vm/properties.c ]; then
- sed -i -e "s|OE_LIBDIR_JNI|${libdir_jni}|" src/vm/vm.c
- fi
-}
-
diff --git a/packages/cacao/cacao_0.98+hg20071001.bb b/packages/cacao/cacao_0.98+hg20071001.bb
index 878827c28e..e897cfad41 100644
--- a/packages/cacao/cacao_0.98+hg20071001.bb
+++ b/packages/cacao/cacao_0.98+hg20071001.bb
@@ -1,10 +1,9 @@
require cacao.inc
-PR = "r8"
+PR = "r9"
SRC_URI = "\
http://jalimo.evolvis.org/repository/sources/cacao-${PV}.tar.bz2;md5sum=9ff10c929bd0cbf15909107c1aff7518 \
- file://cacao-0.98+svn-libdir.diff;patch=1 \
file://cacao-0.98+svn-classpath_var.patch;patch=1 \
file://cacao-0.98+hg-arm-cacheflush-fix.patch;patch=1 \
file://cacao-0.98+hg-attachthread.patch;patch=1 \
diff --git a/packages/cacao/cacao_0.98+hg20080519.bb b/packages/cacao/cacao_0.98+hg20080519.bb
index efe0fbb898..0cd5132ef7 100644
--- a/packages/cacao/cacao_0.98+hg20080519.bb
+++ b/packages/cacao/cacao_0.98+hg20080519.bb
@@ -1,24 +1,12 @@
require cacao.inc
-PR = "r0"
+PR = "r1"
-SRC_URI = "http://downloads.openmoko.org/sources/cacao-0.98+hg20080519.tar.gz;md5sum=1c6e0530be63ec8a4c0ab2935c2fdc8f \
- file://cacao-hg20080519-classpath_var.patch;patch=1 \
- file://cacao-hg20080519-libdir.patch;patch=1 \
- "
+SRC_URI = "\
+ http://downloads.openmoko.org/sources/cacao-0.98+hg20080519.tar.gz;md5sum=1c6e0530be63ec8a4c0ab2935c2fdc8f \
+ file://cacao-${PV}-build-java-runtime-library-classes.patch;patch=1 \
+ "
S = "${WORKDIR}/cacao"
-EXTRA_OECONF = "\
- ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
- --enable-debug \
- --with-vm-zip=${datadir}/cacao/vm.zip \
- --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-${PV} \
- --with-java-runtime-library-classes=${STAGING_DATADIR}/classpath/glibj.zip \
- --with-target-java-runtime-library-classes=${datadir}/classpath/glibj.zip \
- --with-java-runtime-library-libdir=${libdir} \
- --with-jni_md_h=${STAGING_INCDIR}/classpath \
- --with-jni_h=${STAGING_INCDIR}/classpath \
- "
-
DEFAULT_PREFERENCE = "-1"
diff --git a/packages/cacao/cacao_0.99.1.bb b/packages/cacao/cacao_0.99.1.bb
new file mode 100644
index 0000000000..a503c7d3d4
--- /dev/null
+++ b/packages/cacao/cacao_0.99.1.bb
@@ -0,0 +1,14 @@
+require cacao.inc
+
+PR = "r0"
+
+SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2;md5sum=a5641452c7ba173060c99ed700950b3d \
+ file://cacao-${PV}-build-java-runtime-library-classes.patch;patch=1 \
+ "
+
+# Quirks for Nokia N800:
+# - with mfloat-abi=softfp the runtime fails to run anything
+# - without --enable-softfloat it cannot find files within Jars
+TARGET_CC_ARCH_nokia800 = "-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=soft"
+
+EXTRA_OECONF_append_nokia800 = "--enable-softfloat"
diff --git a/packages/cacao/cacaoh-native.inc b/packages/cacao/cacaoh-native.inc
index 3e7fdd60c6..3dfc7b1b98 100644
--- a/packages/cacao/cacaoh-native.inc
+++ b/packages/cacao/cacaoh-native.inc
@@ -6,14 +6,16 @@ DEPENDS = "libtool-native zlib-native virtual/javac-native classpath-native"
S = "${WORKDIR}/cacao-${PV}"
-PR = "r1"
-
inherit autotools native
EXTRA_OECONF = " \
- --with-classpath-includedir=${STAGING_INCDIR}/classpath \
- --with-classpath-classes=${STAGING_DATADIR}/classpath/glibj.zip \
- "
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --with-classpath-classes=${STAGING_DATADIR}/classpath/glibj.zip \
+ \
+ --with-java-runtime-library-classes=${STAGING_DATADIR}/classpath/glibj.zip \
+ --with-jni_md_h=${STAGING_INCDIR}/classpath \
+ --with-jni_h=${STAGING_INCDIR}/classpath \
+ "
do_compile() {
# Compile the header generator only (and what is needed for it).
diff --git a/packages/cacao/cacaoh-native_0.98+hg20071001.bb b/packages/cacao/cacaoh-native_0.98+hg20071001.bb
index cb552df827..75f5a306f4 100644
--- a/packages/cacao/cacaoh-native_0.98+hg20071001.bb
+++ b/packages/cacao/cacaoh-native_0.98+hg20071001.bb
@@ -1,5 +1,7 @@
require cacaoh-native.inc
+PR = "r1"
+
SRC_URI = "http://jalimo.evolvis.org/repository/sources/cacao-${PV}.tar.bz2;md5sum=9ff10c929bd0cbf15909107c1aff7518"
diff --git a/packages/cacao/cacaoh-native_0.98+hg20080519.bb b/packages/cacao/cacaoh-native_0.98+hg20080519.bb
index 91880b20f9..7b930c4640 100644
--- a/packages/cacao/cacaoh-native_0.98+hg20080519.bb
+++ b/packages/cacao/cacaoh-native_0.98+hg20080519.bb
@@ -1,15 +1,9 @@
require cacaoh-native.inc
-PR = "r0"
+PR = "r1"
SRC_URI = "http://downloads.openmoko.org/sources/cacao-0.98+hg20080519.tar.gz;md5sum=1c6e0530be63ec8a4c0ab2935c2fdc8f"
S = "${WORKDIR}/cacao"
-EXTRA_OECONF = " \
- --with-java-runtime-library-classes=${STAGING_DATADIR}/classpath/glibj.zip \
- --with-jni_md_h=${STAGING_INCDIR}/classpath \
- --with-jni_h=${STAGING_INCDIR}/classpath \
- "
-
DEFAULT_PREFERENCE = "-1"
diff --git a/packages/cacao/cacaoh-native_0.99.1.bb b/packages/cacao/cacaoh-native_0.99.1.bb
new file mode 100644
index 0000000000..11735d4f31
--- /dev/null
+++ b/packages/cacao/cacaoh-native_0.99.1.bb
@@ -0,0 +1,5 @@
+require cacaoh-native.inc
+
+PR = "r0"
+
+SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2;md5sum=a5641452c7ba173060c99ed700950b3d"
diff --git a/packages/cacao/files/cacao-0.98+hg20080519-build-java-runtime-library-classes.patch b/packages/cacao/files/cacao-0.98+hg20080519-build-java-runtime-library-classes.patch
new file mode 100644
index 0000000000..7df1c480ea
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+hg20080519-build-java-runtime-library-classes.patch
@@ -0,0 +1,53 @@
+Index: cacao/configure.ac
+===================================================================
+--- cacao.orig/configure.ac 2008-06-27 01:23:44.000000000 +0200
++++ cacao/configure.ac 2008-06-27 01:24:02.000000000 +0200
+@@ -772,6 +772,7 @@
+
+ AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_PREFIX
+ AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_CLASSES
++AC_CHECK_WITH_BUILD_JAVA_RUNTIME_LIBRARY_CLASSES
+
+ if test x"${ENABLE_JRE_LAYOUT}" = "xno"; then
+ AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR
+Index: cacao/m4/java-runtime-library.m4
+===================================================================
+--- cacao.orig/m4/java-runtime-library.m4 2008-06-27 01:23:44.000000000 +0200
++++ cacao/m4/java-runtime-library.m4 2008-06-27 01:24:02.000000000 +0200
+@@ -93,20 +93,32 @@
+ AC_DEFINE_UNQUOTED([JAVA_RUNTIME_LIBRARY_CLASSES], "${JAVA_RUNTIME_LIBRARY_CLASSES}", [Java runtime library classes])
+ AC_SUBST(JAVA_RUNTIME_LIBRARY_CLASSES)
+
++dnl where are Java core library classes located at compilation time
++
++AC_DEFUN([AC_CHECK_WITH_BUILD_JAVA_RUNTIME_LIBRARY_CLASSES],[
++AC_MSG_CHECKING(where Java core library classes are located at compile time)
++AC_ARG_WITH([build-java-runtime-library-classes],
++ [AS_HELP_STRING(--with-build-java-runtime-library-classes=<path>,path to Java core library classes (includes the name of the file and may be flat) [[default=${JAVA_RUNTIME_LIBRARY_PREFIX}/share/classpath/glibj.zip]])],
++ [BUILD_JAVA_RUNTIME_LIBRARY_CLASSES=${withval}],
++ [BUILD_JAVA_RUNTIME_LIBRARY_CLASSES=${JAVA_RUNTIME_LIBRARY_PREFIX}/share/classpath/glibj.zip])
++AC_MSG_RESULT(${BUILD_JAVA_RUNTIME_LIBRARY_CLASSES})
++AC_DEFINE_UNQUOTED([BUILD_JAVA_RUNTIME_LIBRARY_CLASSES], "${BUILD_JAVA_RUNTIME_LIBRARY_CLASSES}", [Java core library classes at compile time])
++AC_SUBST(BUILD_JAVA_RUNTIME_LIBRARY_CLASSES)
++])
++
+ dnl define BOOTCLASSPATH for Makefiles
+ case "${WITH_JAVA_RUNTIME_LIBRARY}" in
+ cldc1.1 | gnuclasspath)
+- BOOTCLASSPATH="\$(top_builddir)/src/classes/classes:\$(JAVA_RUNTIME_LIBRARY_CLASSES)"
++ BOOTCLASSPATH="\$(top_builddir)/src/classes/classes:\$(BUILD_JAVA_RUNTIME_LIBRARY_CLASSES)"
+ ;;
+ *)
+- BOOTCLASSPATH="\$(JAVA_RUNTIME_LIBRARY_CLASSES)"
++ BOOTCLASSPATH="\$(BUILD_JAVA_RUNTIME_LIBRARY_CLASSES)"
+ ;;
+ esac
+ AC_SUBST(BOOTCLASSPATH)
+ ])
+
+-
+-dnl where are Java runtime library native libraries installed
++dnl where are Java runtime library native libraries installed (at compilation time)
+
+ AC_DEFUN([AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR],[
+ AC_MSG_CHECKING(where Java runtime library native libraries are installed)
diff --git a/packages/cacao/files/cacao-0.98+svn-libdir.diff b/packages/cacao/files/cacao-0.98+svn-libdir.diff
deleted file mode 100644
index f5cf9ba5a1..0000000000
--- a/packages/cacao/files/cacao-0.98+svn-libdir.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: cacao-trunk/src/vm/properties.c
-===================================================================
---- cacao-trunk.orig/src/vm/properties.c 2007-08-31 13:20:41.000000000 +0200
-+++ cacao-trunk/src/vm/properties.c 2007-09-04 14:54:19.000000000 +0200
-@@ -210,15 +210,22 @@
-
- # if defined(WITH_CLASSPATH_GNU)
-
-- boot_library_path = CLASSPATH_LIBDIR"/classpath";
-+ boot_library_path = CLASSPATH_LIBDIR"/classpath:OE_LIBDIR_JNI";
-
- # elif defined(WITH_CLASSPATH_SUN)
-
-- boot_library_path = CLASSPATH_LIBDIR;
-+ boot_library_path = CLASSPATH_LIBDIR":OE_LIBDIR_JNI";
-
- # elif defined(WITH_CLASSPATH_CLDC1_1)
-
-- /* No boot_library_path required. */
-+ /* No boot_library_path required.
-+ Well, don't be that strict on Debian-like
-+ environments. Setting this to /usr/lib/jni
-+ makes it unneccessary to fumble with
-+ LD_LIBRARY_PATH to get things like MIDPath
-+ running.
-+ */
-+ boot_library_path = "OE_LIBDIR_JNI";
-
- # else
- # error unknown classpath configuration
diff --git a/packages/cacao/files/cacao-0.99.1-build-java-runtime-library-classes.patch b/packages/cacao/files/cacao-0.99.1-build-java-runtime-library-classes.patch
new file mode 100644
index 0000000000..dffc37b343
--- /dev/null
+++ b/packages/cacao/files/cacao-0.99.1-build-java-runtime-library-classes.patch
@@ -0,0 +1,51 @@
+diff -r 8484332b813c configure.ac
+--- a/configure.ac Sun Jun 22 18:19:54 2008 +0200
++++ b/configure.ac Mon Jun 23 08:53:17 2008 +0200
+@@ -550,6 +550,7 @@
+
+ AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_PREFIX
+ AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_CLASSES
++AC_CHECK_WITH_BUILD_JAVA_RUNTIME_LIBRARY_CLASSES
+
+ if test x"${ENABLE_JRE_LAYOUT}" = "xno"; then
+ AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR
+diff -r 8484332b813c m4/java-runtime-library.m4
+--- a/m4/java-runtime-library.m4 Sun Jun 22 18:19:54 2008 +0200
++++ b/m4/java-runtime-library.m4 Mon Jun 23 08:53:17 2008 +0200
+@@ -93,20 +93,32 @@
+ AC_DEFINE_UNQUOTED([JAVA_RUNTIME_LIBRARY_CLASSES], "${JAVA_RUNTIME_LIBRARY_CLASSES}", [Java runtime library classes])
+ AC_SUBST(JAVA_RUNTIME_LIBRARY_CLASSES)
+
++dnl where are Java core library classes located at compilation time
++
++AC_DEFUN([AC_CHECK_WITH_BUILD_JAVA_RUNTIME_LIBRARY_CLASSES],[
++AC_MSG_CHECKING(where Java core library classes are located at compile time)
++AC_ARG_WITH([build-java-runtime-library-classes],
++ [AS_HELP_STRING(--with-build-java-runtime-library-classes=<path>,path to Java core library classes (includes the name of the file and may be flat) [[default=${JAVA_RUNTIME_LIBRARY_PREFIX}/share/classpath/glibj.zip]])],
++ [BUILD_JAVA_RUNTIME_LIBRARY_CLASSES=${withval}],
++ [BUILD_JAVA_RUNTIME_LIBRARY_CLASSES=${JAVA_RUNTIME_LIBRARY_PREFIX}/share/classpath/glibj.zip])
++AC_MSG_RESULT(${BUILD_JAVA_RUNTIME_LIBRARY_CLASSES})
++AC_DEFINE_UNQUOTED([BUILD_JAVA_RUNTIME_LIBRARY_CLASSES], "${BUILD_JAVA_RUNTIME_LIBRARY_CLASSES}", [Java core library classes at compile time])
++AC_SUBST(BUILD_JAVA_RUNTIME_LIBRARY_CLASSES)
++])
++
+ dnl define BOOTCLASSPATH for Makefiles
+ case "${WITH_JAVA_RUNTIME_LIBRARY}" in
+ cldc1.1 | gnuclasspath)
+- BOOTCLASSPATH="\$(top_builddir)/src/classes/classes:\$(JAVA_RUNTIME_LIBRARY_CLASSES)"
++ BOOTCLASSPATH="\$(top_builddir)/src/classes/classes:\$(BUILD_JAVA_RUNTIME_LIBRARY_CLASSES)"
+ ;;
+ *)
+- BOOTCLASSPATH="\$(JAVA_RUNTIME_LIBRARY_CLASSES)"
++ BOOTCLASSPATH="\$(BUILD_JAVA_RUNTIME_LIBRARY_CLASSES)"
+ ;;
+ esac
+ AC_SUBST(BOOTCLASSPATH)
+ ])
+
+-
+-dnl where are Java runtime library native libraries installed
++dnl where are Java runtime library native libraries installed (at compilation time)
+
+ AC_DEFUN([AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR],[
+ AC_MSG_CHECKING(where Java runtime library native libraries are installed)
diff --git a/packages/cacao/files/cacao-hg20080519-classpath_var.patch b/packages/cacao/files/cacao-hg20080519-classpath_var.patch
deleted file mode 100644
index a3e39e0062..0000000000
--- a/packages/cacao/files/cacao-hg20080519-classpath_var.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-Index: cacao/configure.ac
-===================================================================
---- cacao.orig/configure.ac 2008-05-21 14:16:33.000000000 +0800
-+++ cacao/configure.ac 2008-05-21 15:57:42.000000000 +0800
-@@ -772,6 +772,7 @@
-
- AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_PREFIX
- AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_CLASSES
-+AC_CHECK_WITH_TARGET_JAVA_RUNTIME_LIBRARY_CLASSES
-
- if test x"${ENABLE_JRE_LAYOUT}" = "xno"; then
- AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR
-Index: cacao/m4/java-runtime-library.m4
-===================================================================
---- cacao.orig/m4/java-runtime-library.m4 2008-05-21 14:16:34.000000000 +0800
-+++ cacao/m4/java-runtime-library.m4 2008-05-21 16:18:23.000000000 +0800
-@@ -106,6 +106,29 @@
- ])
-
-
-+dnl where are Java runtime library classes installed on the target
-+
-+AC_DEFUN([AC_CHECK_WITH_TARGET_JAVA_RUNTIME_LIBRARY_CLASSES],[
-+AC_MSG_CHECKING(where Java runtime library classes are installed on the target)
-+AC_ARG_WITH([target-java-runtime-library-classes],
-+ [AS_HELP_STRING(--with-target-java-runtime-library-classes=<path>,path to Java runtime library classes (includes the name of the file and may be flat) [[default=(gnuclasspath:${JAVA_RUNTIME_LIBRARY_PREFIX}/share/classpath/glibj.zip,openjdk:${JAVA_RUNTIME_LIBRARY_PREFIX}/control/build/${OS_DIR}-${JAVA_ARCH}/classes,*:${JAVA_RUNTIME_LIBRARY_PREFIX})]])],
-+ [TARGET_JAVA_RUNTIME_LIBRARY_CLASSES=${withval}],
-+ [case "${WITH_JAVA_RUNTIME_LIBRARY}" in
-+ gnuclasspath)
-+ TARGET_JAVA_RUNTIME_LIBRARY_CLASSES=${JAVA_RUNTIME_LIBRARY_PREFIX}/share/classpath/glibj.zip
-+ ;;
-+ openjdk)
-+ TARGET_JAVA_RUNTIME_LIBRARY_CLASSES=${JAVA_RUNTIME_LIBRARY_PREFIX}/control/build/${OS_DIR}-${JAVA_ARCH}/classes
-+ ;;
-+ *)
-+ TARGET_JAVA_RUNTIME_LIBRARY_CLASSES=${JAVA_RUNTIME_LIBRARY_PREFIX}
-+ ;;
-+ esac])
-+AC_MSG_RESULT(${TARGET_JAVA_RUNTIME_LIBRARY_CLASSES})
-+AC_DEFINE_UNQUOTED([TARGET_JAVA_RUNTIME_LIBRARY_CLASSES], "${TARGET_JAVA_RUNTIME_LIBRARY_CLASSES}", [Java runtime library classes on the target])
-+AC_SUBST(TARGET_JAVA_RUNTIME_LIBRARY_CLASSES)
-+])
-+
- dnl where are Java runtime library native libraries installed
-
- AC_DEFUN([AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR],[
-Index: cacao/src/vm/properties.c
-===================================================================
---- cacao.orig/src/vm/properties.c 2008-05-21 14:16:34.000000000 +0800
-+++ cacao/src/vm/properties.c 2008-05-21 16:16:24.000000000 +0800
-@@ -295,14 +295,14 @@
- len =
- strlen(CACAO_VM_ZIP) +
- strlen(":") +
-- strlen(JAVA_RUNTIME_LIBRARY_CLASSES) +
-+ strlen(TARGET_JAVA_RUNTIME_LIBRARY_CLASSES) +
- strlen("0");
-
- boot_class_path = MNEW(char, len);
-
- strcpy(boot_class_path, CACAO_VM_ZIP);
- strcat(boot_class_path, ":");
-- strcat(boot_class_path, JAVA_RUNTIME_LIBRARY_CLASSES);
-+ strcat(boot_class_path, TARGET_JAVA_RUNTIME_LIBRARY_CLASSES);
-
- # elif defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
-
diff --git a/packages/cacao/files/cacao-hg20080519-libdir.patch b/packages/cacao/files/cacao-hg20080519-libdir.patch
deleted file mode 100644
index 1be13b3cfd..0000000000
--- a/packages/cacao/files/cacao-hg20080519-libdir.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: cacao/src/vm/properties.c
-===================================================================
---- cacao.orig/src/vm/properties.c 2008-05-21 15:26:21.000000000 +0800
-+++ cacao/src/vm/properties.c 2008-05-21 15:28:59.000000000 +0800
-@@ -211,15 +211,22 @@
-
- # if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
-
-- boot_library_path = JAVA_RUNTIME_LIBRARY_LIBDIR"/classpath";
-+ boot_library_path = JAVA_RUNTIME_LIBRARY_LIBDIR"/classpath:OE_LIBDIR_JNI";
-
- # elif defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
-
-- boot_library_path = JAVA_RUNTIME_LIBRARY_LIBDIR;
-+ boot_library_path = JAVA_RUNTIME_LIBRARY_LIBDIR":OE_LIBDIR_JNI";
-
- # elif defined(WITH_JAVA_RUNTIME_LIBRARY_CLDC1_1)
-
-- /* No boot_library_path required. */
-+ /* No boot_library_path required.
-+ Well, don't be that strict on Debian-like
-+ environments. Setting this to /usr/lib/jni
-+ makes it unneccessary to fumble with
-+ LD_LIBRARY_PATH to get things like MIDPath
-+ running.
-+ */
-+ boot_library_path = "OE_LIBDIR_JNI";
-
- # else
- # error unknown classpath configuration
diff --git a/packages/gcc/gcc-4.3.0/fedora/.mtn2git_empty b/packages/cairo/cairo-1.6.4/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/gcc/gcc-4.3.0/fedora/.mtn2git_empty
+++ b/packages/cairo/cairo-1.6.4/.mtn2git_empty
diff --git a/packages/cairo/cairo-1.6.4/configure_fix.patch b/packages/cairo/cairo-1.6.4/configure_fix.patch
new file mode 100644
index 0000000000..44b59867f1
--- /dev/null
+++ b/packages/cairo/cairo-1.6.4/configure_fix.patch
@@ -0,0 +1,70 @@
+Libtool 2.2.2 can't cope unless the LT_ variables are marked as AC_SUBST
+as otherwise autofoo tries to expand them, fails and gets upset.
+
+You can't conditionally add AC_PROG_CXX to a configure.ac file since the
+mere mention of it triggers some internals which then get upset it if
+wasn't really called at configure time.
+
+Referring to a .cpp file in Makefiles without calling AC_PROG_CXX is
+now also a fatal error. Easiest fix is to drop the CXX stuff entirely.
+
+RP - 14/4/08
+
+---
+ boilerplate/Makefile.am | 1 -
+ configure.in | 6 +++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+--- cairo-1.6.4.orig/boilerplate/Makefile.am
++++ cairo-1.6.4/boilerplate/Makefile.am
+@@ -11,11 +11,10 @@ libcairoboilerplate_la_SOURCES = \
+ xmalloc.c \
+ xmalloc.h
+ libcairoboilerplate_la_LIBADD = $(top_builddir)/src/libcairo.la $(CAIRO_LDADD)
+
+ if CAIRO_HAS_BEOS_SURFACE
+-libcairoboilerplate_la_SOURCES += cairo-boilerplate-beos.cpp
+ libcairoboilerplate_la_SOURCES += cairo-boilerplate-beos-private.h
+ # BeOS system headers trigger this warning
+ libcairoboilerplate_la_CXXFLAGS = -Wno-multichar
+ endif
+
+--- cairo-1.6.4.orig/configure.in
++++ cairo-1.6.4/configure.in
+@@ -25,19 +25,22 @@ dnl ====================================
+
+ # libtool shared library version
+
+ # Increment if the interface has additions, changes, removals.
+ LT_CURRENT=19
++AC_SUBST(LT_CURRENT)
+
+ # Increment any time the source changes; set to
+ # 0 if you increment CURRENT
+ LT_REVISION=5
++AC_SUBST(LT_REVISION)
+
+ # Increment if any interfaces have been added; set to 0
+ # if any interfaces have been removed. removal has
+ # precedence over adding, so set to 0 if both happened.
+ LT_AGE=17
++AC_SUBST(LT_AGE)
+
+ dnl ===========================================================================
+
+ VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
+ AC_SUBST(VERSION_INFO)
+@@ -442,13 +445,10 @@ CAIRO_BACKEND_ENABLE(beos, BeOS/Zeta, be
+ use_beos="no (requires a BeOS platform)"
+ ;;
+ esac
+ ])
+
+-if test "x$use_beos" = "xyes"; then
+- AC_PROG_CXX
+-fi
+
+ dnl ===========================================================================
+
+ CAIRO_BACKEND_ENABLE(png, PNG, png, PNG_FUNCTIONS, yes, [
+ use_png=no
diff --git a/packages/gdb/gdb-6.8/.mtn2git_empty b/packages/cairo/cairo-directfb-1.6.4/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/gdb/gdb-6.8/.mtn2git_empty
+++ b/packages/cairo/cairo-directfb-1.6.4/.mtn2git_empty
diff --git a/packages/cairo/cairo-directfb-1.6.4/configure_fix.patch b/packages/cairo/cairo-directfb-1.6.4/configure_fix.patch
new file mode 100644
index 0000000000..44b59867f1
--- /dev/null
+++ b/packages/cairo/cairo-directfb-1.6.4/configure_fix.patch
@@ -0,0 +1,70 @@
+Libtool 2.2.2 can't cope unless the LT_ variables are marked as AC_SUBST
+as otherwise autofoo tries to expand them, fails and gets upset.
+
+You can't conditionally add AC_PROG_CXX to a configure.ac file since the
+mere mention of it triggers some internals which then get upset it if
+wasn't really called at configure time.
+
+Referring to a .cpp file in Makefiles without calling AC_PROG_CXX is
+now also a fatal error. Easiest fix is to drop the CXX stuff entirely.
+
+RP - 14/4/08
+
+---
+ boilerplate/Makefile.am | 1 -
+ configure.in | 6 +++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+--- cairo-1.6.4.orig/boilerplate/Makefile.am
++++ cairo-1.6.4/boilerplate/Makefile.am
+@@ -11,11 +11,10 @@ libcairoboilerplate_la_SOURCES = \
+ xmalloc.c \
+ xmalloc.h
+ libcairoboilerplate_la_LIBADD = $(top_builddir)/src/libcairo.la $(CAIRO_LDADD)
+
+ if CAIRO_HAS_BEOS_SURFACE
+-libcairoboilerplate_la_SOURCES += cairo-boilerplate-beos.cpp
+ libcairoboilerplate_la_SOURCES += cairo-boilerplate-beos-private.h
+ # BeOS system headers trigger this warning
+ libcairoboilerplate_la_CXXFLAGS = -Wno-multichar
+ endif
+
+--- cairo-1.6.4.orig/configure.in
++++ cairo-1.6.4/configure.in
+@@ -25,19 +25,22 @@ dnl ====================================
+
+ # libtool shared library version
+
+ # Increment if the interface has additions, changes, removals.
+ LT_CURRENT=19
++AC_SUBST(LT_CURRENT)
+
+ # Increment any time the source changes; set to
+ # 0 if you increment CURRENT
+ LT_REVISION=5
++AC_SUBST(LT_REVISION)
+
+ # Increment if any interfaces have been added; set to 0
+ # if any interfaces have been removed. removal has
+ # precedence over adding, so set to 0 if both happened.
+ LT_AGE=17
++AC_SUBST(LT_AGE)
+
+ dnl ===========================================================================
+
+ VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
+ AC_SUBST(VERSION_INFO)
+@@ -442,13 +445,10 @@ CAIRO_BACKEND_ENABLE(beos, BeOS/Zeta, be
+ use_beos="no (requires a BeOS platform)"
+ ;;
+ esac
+ ])
+
+-if test "x$use_beos" = "xyes"; then
+- AC_PROG_CXX
+-fi
+
+ dnl ===========================================================================
+
+ CAIRO_BACKEND_ENABLE(png, PNG, png, PNG_FUNCTIONS, yes, [
+ use_png=no
diff --git a/packages/cairo/cairo-directfb_1.6.4.bb b/packages/cairo/cairo-directfb_1.6.4.bb
new file mode 100644
index 0000000000..a8b3f0fc78
--- /dev/null
+++ b/packages/cairo/cairo-directfb_1.6.4.bb
@@ -0,0 +1,17 @@
+require cairo.inc
+RCONFLICTS = "cairo"
+RPROVIDES = "cairo-directfb"
+DEPENDS = "directfb pixman libsm libpng fontconfig"
+SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz \
+ file://configure_fix.patch;patch=1 "
+
+EXTRA_OECONF += " --enable-directfb \
+ --disable-xlib \
+ --disable-win32"
+
+LDFLAGS_append += " -ldirectfb"
+CFLAGS_append += " -I${STAGING_INCDIR}/directfb"
+
+PR = "r0"
+
+S = "${WORKDIR}/cairo-${PV}"
diff --git a/packages/cairo/cairo_1.6.4.bb b/packages/cairo/cairo_1.6.4.bb
index 263dd79ad7..bbed315452 100644
--- a/packages/cairo/cairo_1.6.4.bb
+++ b/packages/cairo/cairo_1.6.4.bb
@@ -2,7 +2,8 @@ require cairo.inc
DEFAULT_PREFERENCE = "-1"
-SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz"
+SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz \
+ file://configure_fix.patch;patch=1 "
-PR = "r0"
+PR = "r1"
diff --git a/packages/cairo/libsvg-0.1.4/configure_fix.patch b/packages/cairo/libsvg-0.1.4/configure_fix.patch
new file mode 100644
index 0000000000..db20d5f05a
--- /dev/null
+++ b/packages/cairo/libsvg-0.1.4/configure_fix.patch
@@ -0,0 +1,22 @@
+diff -urN libsvg-0.1.4.orig/configure.in libsvg-0.1.4/configure.in
+--- libsvg-0.1.4.orig/configure.in 2005-06-15 22:27:49.000000000 +0200
++++ libsvg-0.1.4/configure.in 2008-06-07 03:06:30.000000000 +0200
+@@ -9,15 +9,18 @@
+
+ # Increment if the interface has additions, changes, removals.
+ LT_CURRENT=1
++AC_SUBST(LT_CURRENT)
+
+ # Increment any time the source changes; set to
+ # 0 if you increment CURRENT
+ LT_REVISION=0
++AC_SUBST(LT_REVISION)
+
+ # Increment if any interfaces have been added; set to 0
+ # if any interfaces have been removed. removal has
+ # precedence over adding, so set to 0 if both happened.
+ LT_AGE=0
++AC_SUBST(LT_AGE)
+
+ VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
+ AC_SUBST(VERSION_INFO)
diff --git a/packages/cairo/libsvg_0.1.4.bb b/packages/cairo/libsvg_0.1.4.bb
index 21127b77ff..2c5578aea6 100644
--- a/packages/cairo/libsvg_0.1.4.bb
+++ b/packages/cairo/libsvg_0.1.4.bb
@@ -3,9 +3,10 @@ LICENSE = "LGPL"
PRIORITY = "optional"
DEPENDS = "expat jpeg zlib libpng"
DESCRIPTION = "SVG parser library"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://cairographics.org/snapshots/libsvg-${PV}.tar.gz \
+ file://configure_fix.patch;patch=1 \
file://gcc4_and_expat.patch;patch=1"
EXTRA_OECONF = "--with-expat"
diff --git a/packages/callweaver/callweaver_1.2.0-rc5.bb b/packages/callweaver/callweaver_1.2.0-rc5.bb
index 32869936b6..f0f572de50 100644
--- a/packages/callweaver/callweaver_1.2.0-rc5.bb
+++ b/packages/callweaver/callweaver_1.2.0-rc5.bb
@@ -11,7 +11,7 @@ DEPENDS = "openssl zlib tiff libcap spandsp (>= 0.0.3+0.0.4pre10) speex readline
sox-native findutils-native"
RRECOMMENDS = "logrotate"
RRECOMMENDS_${PN}-ogi = "perl perl-module-strict callweaver-perl"
-PR = "r0"
+PR = "r1"
S = "${WORKDIR}/callweaver-1.2-rc5"
CWRCV = "rc5"
diff --git a/packages/changedfiles/changedfiles-modules_1.0-rc1.bb b/packages/changedfiles/changedfiles-modules_1.0-rc1.bb
index 082dc0023b..c24a473beb 100644
--- a/packages/changedfiles/changedfiles-modules_1.0-rc1.bb
+++ b/packages/changedfiles/changedfiles-modules_1.0-rc1.bb
@@ -1,6 +1,6 @@
require changedfiles.inc
-PR = "r1"
+PR = "r2"
B = "${WORKDIR}/changedfiles-${PV}/module"
inherit module
diff --git a/packages/clamav/clamav_0.90.2.bb b/packages/clamav/clamav_0.90.2.bb
index e721558efe..9592adf914 100644
--- a/packages/clamav/clamav_0.90.2.bb
+++ b/packages/clamav/clamav_0.90.2.bb
@@ -1,3 +1,3 @@
require clamav.inc
-PR = "r1"
+PR = "r2"
diff --git a/packages/clamav/clamav_0.90.3.bb b/packages/clamav/clamav_0.90.3.bb
index fec4ae59d8..e721558efe 100644
--- a/packages/clamav/clamav_0.90.3.bb
+++ b/packages/clamav/clamav_0.90.3.bb
@@ -1,3 +1,3 @@
require clamav.inc
-PR = "r0"
+PR = "r1"
diff --git a/packages/clamav/clamav_0.91.1.bb b/packages/clamav/clamav_0.91.1.bb
index fec4ae59d8..e721558efe 100644
--- a/packages/clamav/clamav_0.91.1.bb
+++ b/packages/clamav/clamav_0.91.1.bb
@@ -1,3 +1,3 @@
require clamav.inc
-PR = "r0"
+PR = "r1"
diff --git a/packages/classpath/classpath-minimal_0.97.1.bb b/packages/classpath/classpath-minimal_0.97.2.bb
index 131dc3fac5..ccebf0a5d4 100644
--- a/packages/classpath/classpath-minimal_0.97.1.bb
+++ b/packages/classpath/classpath-minimal_0.97.2.bb
@@ -5,7 +5,7 @@ SRC_URI += "\
file://SimpleName.diff;patch=1;pnum=0 \
"
-PR = "r1"
+PR = "r0"
PROVIDES = "${PN} classpath"
diff --git a/packages/classpath/classpath-native_0.96.1.bb b/packages/classpath/classpath-native_0.96.1.bb
index b9c3b3a4f1..a354b6b7f9 100644
--- a/packages/classpath/classpath-native_0.96.1.bb
+++ b/packages/classpath/classpath-native_0.96.1.bb
@@ -1,9 +1,11 @@
require classpath-native.inc
-PR = "r2"
+PR = "r3"
SRC_URI += "\
file://gjar-prefix-patch.diff;patch=1;pnum=0 \
file://xmlstream-fix.patch;patch=1;pnum=0 \
+ file://getopt-filelist.patch;patch=1;pnum=0 \
+ file://sun-security-getproperty_0.96.1.patch;patch=1;pnum=0 \
"
diff --git a/packages/classpath/classpath_0.97.1.bb b/packages/classpath/classpath_0.97.2.bb
index 1d677687d7..338ebcf0d4 100644
--- a/packages/classpath/classpath_0.97.1.bb
+++ b/packages/classpath/classpath_0.97.2.bb
@@ -5,7 +5,7 @@ SRC_URI += "\
file://SimpleName.diff;patch=1;pnum=0 \
"
-PR = "r1"
+PR = "r0"
DEPENDS += "gtk+ gconf libxtst"
diff --git a/packages/classpath/files/getopt-filelist.patch b/packages/classpath/files/getopt-filelist.patch
new file mode 100644
index 0000000000..7b5e2740bf
--- /dev/null
+++ b/packages/classpath/files/getopt-filelist.patch
@@ -0,0 +1,271 @@
+? tools/generated
+Index: tools/gnu/classpath/tools/common/ClasspathToolParser.java
+===================================================================
+RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/common/ClasspathToolParser.java,v
+retrieving revision 1.1
+diff -u -r1.1 ClasspathToolParser.java
+--- tools/gnu/classpath/tools/common/ClasspathToolParser.java 22 Sep 2006 01:01:26 -0000 1.1
++++ tools/gnu/classpath/tools/common/ClasspathToolParser.java 3 Jun 2008 16:34:45 -0000
+@@ -38,9 +38,16 @@
+
+ package gnu.classpath.tools.common;
+
++import java.io.BufferedReader;
++import java.io.IOException;
++import java.io.FileNotFoundException;
++import java.io.FileReader;
++import java.io.Reader;
+ import java.text.MessageFormat;
++import java.util.ArrayList;
+
+ import gnu.classpath.Configuration;
++import gnu.classpath.tools.getopt.FileArgumentCallback;
+ import gnu.classpath.tools.getopt.Option;
+ import gnu.classpath.tools.getopt.OptionException;
+ import gnu.classpath.tools.getopt.Parser;
+@@ -84,4 +91,137 @@
+ }
+ });
+ }
++
++ public void parse(String[] inArgs, FileArgumentCallback files,
++ boolean handleFileLists)
++ {
++ FileArgumentCallback cb;
++
++ if (handleFileLists)
++ cb = new AtFileArgumentCallback(files);
++ else
++ cb = files;
++
++ parse(inArgs, cb);
++ }
++
++ public String[] parse(String[] inArgs, boolean handleFileLists)
++ {
++ final ArrayList fileResult = new ArrayList();
++
++ final FileArgumentCallback cb = new FileArgumentCallback()
++ {
++ public void notifyFile(String fileArgument)
++ {
++ fileResult.add(fileArgument);
++ }
++ };
++
++ if (handleFileLists)
++ parse(inArgs, new AtFileArgumentCallback(cb));
++ else
++ parse(inArgs, cb);
++
++ return (String[]) fileResult.toArray(new String[0]);
++ }
++
++
++ /** Simple function that takes the given {@link Reader}, treats it like
++ * a textfile and reads all the whitespace separated entries from it
++ * and adds them to the @{link FileArgumentCallback} instance.
++ */
++ public void parseFileList(Reader reader, FileArgumentCallback cb)
++ throws OptionException
++ {
++ BufferedReader breader = new BufferedReader(reader);
++ String line = null;
++
++ try
++ {
++ while ((line = breader.readLine()) != null)
++ parseLine(line, cb);
++
++ reader.close();
++ }
++ catch (IOException ioe)
++ {
++ System.err.println(programName + ": IO error while reading from inputstream");
++ System.exit(1);
++ }
++
++ }
++
++ /** Parses whitespace separated file entries.
++ *
++ * Note: This is not coping with whitespace in files or quoting.
++ */
++ private void parseLine(String line, FileArgumentCallback cb)
++ throws IOException, OptionException
++ {
++ final int length = line.length();
++ int start = 0;
++ int end = 0;
++
++ // While not reached end of line ...
++ while (start < length)
++ {
++ // Search for first non-whitespace character for the start of a word.
++ while (Character.isWhitespace(line.codePointAt(start)))
++ {
++ start++;
++
++ if (start == length)
++ return;
++ }
++
++ end = start + 1;
++
++ // Search for first whitespace character for the end of a word.
++ while (end < length && !Character.isWhitespace(line.codePointAt(end)))
++ end++;
++
++ cb.notifyFile(line.substring(start, end));
++
++ start = end + 1;
++ }
++ }
++
++ /** Implementation of {@link FileArgumentCallback} that handles
++ * file arguments in {@link #notifyFile} starting with a <code>@</code>
++ * through {@link ClasspathToolParser#parseFileList}.
++ */
++ class AtFileArgumentCallback extends FileArgumentCallback
++ {
++ FileArgumentCallback cb;
++
++ AtFileArgumentCallback(FileArgumentCallback cb)
++ {
++ this.cb = cb;
++ }
++
++ public void notifyFile(String fileArgument)
++ throws OptionException
++ {
++ if (fileArgument.codePointAt(0) == '@')
++ {
++ FileReader fr = null;
++
++ try
++ {
++ fr = new FileReader(fileArgument.substring(1));
++ }
++ catch (FileNotFoundException fnfe)
++ {
++ System.err.println(programName + ": file not found " + fileArgument.substring(1));
++ System.exit(1);
++ }
++
++ ClasspathToolParser.this.parseFileList(fr, cb);
++ }
++ else
++ cb.notifyFile(fileArgument);
++ }
++
++ }
++
+ }
+Index: tools/gnu/classpath/tools/getopt/Parser.java
+===================================================================
+RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/getopt/Parser.java,v
+retrieving revision 1.10
+diff -u -r1.10 Parser.java
+--- tools/gnu/classpath/tools/getopt/Parser.java 20 Mar 2008 18:04:44 -0000 1.10
++++ tools/gnu/classpath/tools/getopt/Parser.java 3 Jun 2008 16:34:45 -0000
+@@ -58,7 +58,7 @@
+ /** The maximum right column position. */
+ public static final int MAX_LINE_LENGTH = 80;
+
+- private String programName;
++ protected String programName;
+
+ private String headerText;
+
+Index: tools/gnu/classpath/tools/jar/Main.java
+===================================================================
+RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/jar/Main.java,v
+retrieving revision 1.11
+diff -u -r1.11 Main.java
+--- tools/gnu/classpath/tools/jar/Main.java 3 Jun 2008 14:02:13 -0000 1.11
++++ tools/gnu/classpath/tools/jar/Main.java 3 Jun 2008 16:34:45 -0000
+@@ -172,9 +172,9 @@
+ }
+ }
+
+- private Parser initializeParser()
++ private ClasspathToolParser initializeParser()
+ {
+- Parser p = new JarParser("jar"); //$NON-NLS-1$
++ ClasspathToolParser p = new JarParser("jar"); //$NON-NLS-1$
+ p.setHeader(Messages.getString("Main.Usage")); //$NON-NLS-1$
+
+ OptionGroup grp = new OptionGroup(Messages.getString("Main.OpMode")); //$NON-NLS-1$
+@@ -265,11 +265,11 @@
+ private void run(String[] args)
+ throws InstantiationException, IllegalAccessException, IOException
+ {
+- Parser p = initializeParser();
++ ClasspathToolParser p = initializeParser();
+ // Special hack to emulate old tar-style commands.
+ if (args.length > 0 && args[0].charAt(0) != '-')
+ args[0] = '-' + args[0];
+- p.parse(args, new HandleFile());
++ p.parse(args, new HandleFile(), true);
+ if (readNamesFromStdin)
+ readNames();
+ Action t = (Action) operationMode.newInstance();
+Index: tools/gnu/classpath/tools/javah/GcjhMain.java
+===================================================================
+RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/javah/GcjhMain.java,v
+retrieving revision 1.1
+diff -u -r1.1 GcjhMain.java
+--- tools/gnu/classpath/tools/javah/GcjhMain.java 6 Mar 2007 18:52:34 -0000 1.1
++++ tools/gnu/classpath/tools/javah/GcjhMain.java 3 Jun 2008 16:34:46 -0000
+@@ -38,10 +38,11 @@
+
+ package gnu.classpath.tools.javah;
+
++import gnu.classpath.tools.common.ClasspathToolParser;
++
+ import gnu.classpath.tools.getopt.Option;
+ import gnu.classpath.tools.getopt.OptionException;
+ import gnu.classpath.tools.getopt.OptionGroup;
+-import gnu.classpath.tools.getopt.Parser;
+
+ import java.io.IOException;
+ import java.util.ArrayList;
+@@ -60,9 +61,9 @@
+ return "gcjh";
+ }
+
+- protected Parser getParser()
++ protected ClasspathToolParser getParser()
+ {
+- Parser result = super.getParser();
++ ClasspathToolParser result = super.getParser();
+
+ result.setHeader("usage: gcjh [OPTION]... CLASS...");
+
+Index: tools/gnu/classpath/tools/javah/Main.java
+===================================================================
+RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/javah/Main.java,v
+retrieving revision 1.10
+diff -u -r1.10 Main.java
+--- tools/gnu/classpath/tools/javah/Main.java 31 Jul 2007 16:15:53 -0000 1.10
++++ tools/gnu/classpath/tools/javah/Main.java 3 Jun 2008 16:34:46 -0000
+@@ -188,7 +188,7 @@
+ return "javah";
+ }
+
+- protected Parser getParser()
++ protected ClasspathToolParser getParser()
+ {
+ ClasspathToolParser result = new ClasspathToolParser(getName(), true);
+ result.setHeader("usage: javah [OPTIONS] CLASS...");
+@@ -339,8 +339,8 @@
+
+ protected void run(String[] args) throws IOException
+ {
+- Parser p = getParser();
+- String[] classNames = p.parse(args);
++ ClasspathToolParser p = getParser();
++ String[] classNames = p.parse(args, true);
+ postParse(classNames);
+ loader = classpath.getLoader();
+
diff --git a/packages/classpath/files/netif_16.patch b/packages/classpath/files/netif_16.patch
index 9b5e425ee9..f9dbe6c4cd 100644
--- a/packages/classpath/files/netif_16.patch
+++ b/packages/classpath/files/netif_16.patch
@@ -1,10 +1,7 @@
Index: java/net/NetworkInterface.java
===================================================================
-RCS file: /sources/classpath/classpath/java/net/NetworkInterface.java,v
-retrieving revision 1.23
-diff -u -r1.23 NetworkInterface.java
---- java/net/NetworkInterface.java 18 Dec 2006 21:37:39 -0000 1.23
-+++ java/net/NetworkInterface.java 21 Apr 2008 10:38:25 -0000
+--- java/net/NetworkInterface.java.orig 2006-12-18 22:37:39.000000000 +0100
++++ java/net/NetworkInterface.java 2008-06-06 14:00:44.000000000 +0200
@@ -1,5 +1,5 @@
/* NetworkInterface.java --
- Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -65,11 +62,8 @@ diff -u -r1.23 NetworkInterface.java
}
Index: vm/reference/java/net/VMNetworkInterface.java
===================================================================
-RCS file: /sources/classpath/classpath/vm/reference/java/net/VMNetworkInterface.java,v
-retrieving revision 1.7
-diff -u -r1.7 VMNetworkInterface.java
---- vm/reference/java/net/VMNetworkInterface.java 18 Dec 2006 21:37:39 -0000 1.7
-+++ vm/reference/java/net/VMNetworkInterface.java 21 Apr 2008 10:38:25 -0000
+--- vm/reference/java/net/VMNetworkInterface.java.orig 2006-12-18 22:37:39.000000000 +0100
++++ vm/reference/java/net/VMNetworkInterface.java 2008-06-06 14:00:44.000000000 +0200
@@ -1,5 +1,5 @@
/* VMNetworkInterface.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
@@ -93,11 +87,8 @@ diff -u -r1.7 VMNetworkInterface.java
}
Index: native/jni/java-net/java_net_VMNetworkInterface.c
===================================================================
-RCS file: /sources/classpath/classpath/native/jni/java-net/java_net_VMNetworkInterface.c,v
-retrieving revision 1.6
-diff -u -r1.6 java_net_VMNetworkInterface.c
---- native/jni/java-net/java_net_VMNetworkInterface.c 5 Apr 2007 12:34:19 -0000 1.6
-+++ native/jni/java-net/java_net_VMNetworkInterface.c 21 Apr 2008 10:38:25 -0000
+--- native/jni/java-net/java_net_VMNetworkInterface.c.orig 2007-04-05 14:34:19.000000000 +0200
++++ native/jni/java-net/java_net_VMNetworkInterface.c 2008-06-06 14:00:44.000000000 +0200
@@ -1,5 +1,5 @@
/* VMNetworkInterface.c - Native methods for NetworkInterface class
- Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
@@ -261,3 +252,18 @@ diff -u -r1.6 java_net_VMNetworkInterface.c
+}
+
/* end of file */
+Index: include/java_net_VMNetworkInterface.h
+===================================================================
+--- include/java_net_VMNetworkInterface.h.orig 2008-06-06 14:21:27.000000000 +0200
++++ include/java_net_VMNetworkInterface.h 2008-06-06 14:22:12.000000000 +0200
+@@ -12,6 +12,10 @@
+
+ JNIEXPORT void JNICALL Java_java_net_VMNetworkInterface_initIds (JNIEnv *env, jclass);
+ JNIEXPORT jobjectArray JNICALL Java_java_net_VMNetworkInterface_getVMInterfaces (JNIEnv *env, jclass);
++JNIEXPORT jboolean JNICALL Java_java_net_VMNetworkInterface_isUp (JNIEnv *env, jclass, jstring);
++JNIEXPORT jboolean JNICALL Java_java_net_VMNetworkInterface_isLoopback (JNIEnv *env, jclass, jstring);
++JNIEXPORT jboolean JNICALL Java_java_net_VMNetworkInterface_isPointToPoint (JNIEnv *env, jclass, jstring);
++JNIEXPORT jboolean JNICALL Java_java_net_VMNetworkInterface_supportsMulticast (JNIEnv *env, jclass, jstring);
+
+ #ifdef __cplusplus
+ }
diff --git a/packages/classpath/files/sun-security-getproperty_0.96.1.patch b/packages/classpath/files/sun-security-getproperty_0.96.1.patch
new file mode 100644
index 0000000000..6af03e75ea
--- /dev/null
+++ b/packages/classpath/files/sun-security-getproperty_0.96.1.patch
@@ -0,0 +1,503 @@
+Index: gnu/classpath/debug/Simple1LineFormatter.java
+===================================================================
+--- gnu/classpath/debug/Simple1LineFormatter.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/classpath/debug/Simple1LineFormatter.java 2008-06-04 11:14:14.000000000 +0200
+@@ -38,8 +38,6 @@
+
+ package gnu.classpath.debug;
+
+-import gnu.java.security.action.GetPropertyAction;
+-
+ import java.io.PrintWriter;
+ import java.io.StringWriter;
+ import java.security.AccessController;
+@@ -51,6 +49,8 @@
+ import java.util.logging.Formatter;
+ import java.util.logging.LogRecord;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A simple 1-line formatter to use instead of the 2-line SimpleFormatter used
+ * by default in the JDK logging handlers.
+Index: gnu/classpath/debug/SystemLogger.java
+===================================================================
+--- gnu/classpath/debug/SystemLogger.java.orig 2006-12-10 21:25:41.000000000 +0100
++++ gnu/classpath/debug/SystemLogger.java 2008-06-04 11:14:14.000000000 +0200
+@@ -38,13 +38,13 @@
+
+ package gnu.classpath.debug;
+
+-import gnu.java.security.action.GetPropertyAction;
+-
+ import java.security.AccessController;
+ import java.util.StringTokenizer;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+
++import sun.security.action.GetPropertyAction;
++
+ public final class SystemLogger extends Logger
+ {
+ public static final SystemLogger SYSTEM = new SystemLogger();
+Index: gnu/java/security/PolicyFile.java
+===================================================================
+--- gnu/java/security/PolicyFile.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/java/security/PolicyFile.java 2008-06-04 11:14:50.000000000 +0200
+@@ -39,7 +39,6 @@
+
+ import gnu.classpath.debug.Component;
+ import gnu.classpath.debug.SystemLogger;
+-import gnu.java.security.action.GetPropertyAction;
+
+ import java.io.File;
+ import java.io.IOException;
+@@ -72,6 +71,8 @@
+ import java.util.StringTokenizer;
+ import java.util.logging.Logger;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An implementation of a {@link java.security.Policy} object whose
+ * permissions are specified by a <em>policy file</em>.
+Index: gnu/java/security/action/GetPropertyAction.java
+===================================================================
+--- gnu/java/security/action/GetPropertyAction.java 2006-12-10 21:25:42.000000000 +0100
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,89 +0,0 @@
+-/* GetPropertyAction.java
+- Copyright (C) 2004 Free Software Foundation, Inc.
+-
+-This file is part of GNU Classpath.
+-
+-GNU Classpath 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.
+-
+-GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
+-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-02110-1301 USA.
+-
+-Linking this library statically or dynamically with other modules is
+-making a combined work based on this library. Thus, the terms and
+-conditions of the GNU General Public License cover the whole
+-combination.
+-
+-As a special exception, the copyright holders of this library give you
+-permission to link this library with independent modules to produce an
+-executable, regardless of the license terms of these independent
+-modules, and to copy and distribute the resulting executable under
+-terms of your choice, provided that you also meet, for each linked
+-independent module, the terms and conditions of the license of that
+-module. An independent module is a module which is not derived from
+-or based on this library. If you modify this library, you may extend
+-this exception to your version of the library, but you are not
+-obligated to do so. If you do not wish to do so, delete this
+-exception statement from your version. */
+-
+-package gnu.java.security.action;
+-
+-import java.security.PrivilegedAction;
+-
+-/**
+- * PrivilegedAction implementation that calls System.getProperty() with
+- * the property name passed to its constructor.
+- *
+- * Example of use:
+- * <code>
+- * GetPropertyAction action = new GetPropertyAction("http.proxyPort");
+- * String port = AccessController.doPrivileged(action);
+- * </code>
+- */
+-public class GetPropertyAction implements PrivilegedAction<String>
+-{
+- String name;
+- String value = null;
+-
+- public GetPropertyAction()
+- {
+- }
+-
+- public GetPropertyAction(String propName)
+- {
+- setParameters(propName);
+- }
+-
+- public GetPropertyAction(String propName, String defaultValue)
+- {
+- setParameters(propName, defaultValue);
+- }
+-
+- public String run()
+- {
+- return System.getProperty(name, value);
+- }
+-
+- public GetPropertyAction setParameters(String propName)
+- {
+- this.name = propName;
+- this.value = null;
+- return this;
+- }
+-
+- public GetPropertyAction setParameters(String propName, String defaultValue)
+- {
+- this.name = propName;
+- this.value = defaultValue;
+- return this;
+- }
+-}
+Index: gnu/java/security/key/dss/DSSKey.java
+===================================================================
+--- gnu/java/security/key/dss/DSSKey.java.orig 2006-08-05 05:23:27.000000000 +0200
++++ gnu/java/security/key/dss/DSSKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -39,7 +39,6 @@
+ package gnu.java.security.key.dss;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.util.FormatUtil;
+
+ import java.math.BigInteger;
+@@ -49,6 +48,8 @@
+ import java.security.interfaces.DSAParams;
+ import java.security.spec.DSAParameterSpec;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A base asbtract class for both public and private DSS (Digital Signature
+ * Standard) keys. It encapsulates the three DSS numbers: <code>p</code>,
+Index: gnu/java/security/key/dss/DSSPrivateKey.java
+===================================================================
+--- gnu/java/security/key/dss/DSSPrivateKey.java.orig 2006-07-11 18:04:00.000000000 +0200
++++ gnu/java/security/key/dss/DSSPrivateKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -40,7 +40,6 @@
+
+ import gnu.java.security.Configuration;
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -48,6 +47,8 @@
+ import java.security.PrivateKey;
+ import java.security.interfaces.DSAPrivateKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An object that embodies a DSS (Digital Signature Standard) private key.
+ *
+Index: gnu/java/security/key/dss/DSSPublicKey.java
+===================================================================
+--- gnu/java/security/key/dss/DSSPublicKey.java.orig 2006-07-11 18:04:00.000000000 +0200
++++ gnu/java/security/key/dss/DSSPublicKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -39,7 +39,6 @@
+ package gnu.java.security.key.dss;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -47,6 +46,8 @@
+ import java.security.PublicKey;
+ import java.security.interfaces.DSAPublicKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An object that embodies a DSS (Digital Signature Standard) public key.
+ *
+Index: gnu/java/security/key/rsa/GnuRSAKey.java
+===================================================================
+--- gnu/java/security/key/rsa/GnuRSAKey.java.orig 2006-07-11 18:04:00.000000000 +0200
++++ gnu/java/security/key/rsa/GnuRSAKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -39,7 +39,6 @@
+ package gnu.java.security.key.rsa;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.util.FormatUtil;
+
+ import java.math.BigInteger;
+@@ -47,6 +46,8 @@
+ import java.security.Key;
+ import java.security.interfaces.RSAKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A base asbtract class for both public and private RSA keys.
+ */
+Index: gnu/java/security/key/rsa/GnuRSAPrivateKey.java
+===================================================================
+--- gnu/java/security/key/rsa/GnuRSAPrivateKey.java.orig 2006-07-11 18:04:00.000000000 +0200
++++ gnu/java/security/key/rsa/GnuRSAPrivateKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -39,7 +39,6 @@
+ package gnu.java.security.key.rsa;
+
+ import gnu.java.security.Configuration;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.Registry;
+ import gnu.java.security.key.IKeyPairCodec;
+
+@@ -49,6 +48,8 @@
+ import java.security.interfaces.RSAPrivateCrtKey;
+ import java.security.interfaces.RSAPrivateKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An object that embodies an RSA private key.
+ * <p>
+Index: gnu/java/security/key/rsa/GnuRSAPublicKey.java
+===================================================================
+--- gnu/java/security/key/rsa/GnuRSAPublicKey.java.orig 2006-07-11 18:04:00.000000000 +0200
++++ gnu/java/security/key/rsa/GnuRSAPublicKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -39,7 +39,6 @@
+ package gnu.java.security.key.rsa;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -47,6 +46,8 @@
+ import java.security.PublicKey;
+ import java.security.interfaces.RSAPublicKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An object that encapsulates an RSA public key.
+ * <p>
+Index: gnu/javax/crypto/key/dh/GnuDHKey.java
+===================================================================
+--- gnu/javax/crypto/key/dh/GnuDHKey.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/javax/crypto/key/dh/GnuDHKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -39,7 +39,6 @@
+ package gnu.javax.crypto.key.dh;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.util.FormatUtil;
+
+ import java.math.BigInteger;
+@@ -49,6 +48,8 @@
+ import javax.crypto.interfaces.DHKey;
+ import javax.crypto.spec.DHParameterSpec;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A base asbtract class for both public and private Diffie-Hellman keys. It
+ * encapsulates the two DH numbers: <code>p</code>, and <code>g</code>.
+Index: gnu/javax/crypto/key/dh/GnuDHPrivateKey.java
+===================================================================
+--- gnu/javax/crypto/key/dh/GnuDHPrivateKey.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/javax/crypto/key/dh/GnuDHPrivateKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -40,7 +40,6 @@
+
+ import gnu.java.security.Configuration;
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -48,6 +47,8 @@
+
+ import javax.crypto.interfaces.DHPrivateKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An implementation of the Diffie-Hellman private key.
+ * <p>
+Index: gnu/javax/crypto/key/dh/GnuDHPublicKey.java
+===================================================================
+--- gnu/javax/crypto/key/dh/GnuDHPublicKey.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/javax/crypto/key/dh/GnuDHPublicKey.java 2008-06-04 11:14:14.000000000 +0200
+@@ -39,7 +39,6 @@
+ package gnu.javax.crypto.key.dh;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -47,6 +46,8 @@
+
+ import javax.crypto.interfaces.DHPublicKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An implementation of the Diffie-Hellman public key.
+ * <p>
+Index: gnu/javax/crypto/sasl/plain/PasswordFile.java
+===================================================================
+--- gnu/javax/crypto/sasl/plain/PasswordFile.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/javax/crypto/sasl/plain/PasswordFile.java 2008-06-04 11:14:14.000000000 +0200
+@@ -38,7 +38,6 @@
+
+ package gnu.javax.crypto.sasl.plain;
+
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.javax.crypto.sasl.NoSuchUserException;
+ import gnu.javax.crypto.sasl.UserAlreadyExistsException;
+
+@@ -56,6 +55,8 @@
+ import java.util.NoSuchElementException;
+ import java.util.StringTokenizer;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A representation of a Plain password file.
+ */
+Index: gnu/javax/net/ssl/provider/X509TrustManagerFactory.java
+===================================================================
+--- gnu/javax/net/ssl/provider/X509TrustManagerFactory.java.orig 2006-12-10 21:25:43.000000000 +0100
++++ gnu/javax/net/ssl/provider/X509TrustManagerFactory.java 2008-06-04 11:14:14.000000000 +0200
+@@ -66,11 +66,12 @@
+ import javax.net.ssl.TrustManagerFactorySpi;
+ import javax.net.ssl.X509TrustManager;
+
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.x509.X509CertPath;
+ import gnu.javax.net.ssl.NullManagerParameters;
+ import gnu.javax.net.ssl.StaticTrustAnchors;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * This class implements a {@link javax.net.ssl.TrustManagerFactory} engine
+ * for the ``JessieX509'' algorithm.
+Index: gnu/xml/aelfred2/XmlParser.java
+===================================================================
+--- gnu/xml/aelfred2/XmlParser.java.orig 2007-09-21 20:05:21.000000000 +0200
++++ gnu/xml/aelfred2/XmlParser.java 2008-06-04 11:14:14.000000000 +0200
+@@ -53,8 +53,6 @@
+
+ package gnu.xml.aelfred2;
+
+-import gnu.java.security.action.GetPropertyAction;
+-
+ import java.io.BufferedInputStream;
+ import java.io.CharConversionException;
+ import java.io.EOFException;
+@@ -74,6 +72,7 @@
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+
++import sun.security.action.GetPropertyAction;
+
+ /**
+ * Parse XML documents and return parse events through call-backs.
+Index: sun/security/action/GetPropertyAction.java
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ sun/security/action/GetPropertyAction.java 2008-06-04 11:14:14.000000000 +0200
+@@ -0,0 +1,92 @@
++/* GetPropertyAction.java
++ Copyright (C) 2004, 2008 Free Software Foundation, Inc.
++
++This file is part of GNU Classpath.
++
++GNU Classpath 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.
++
++GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
++Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++02110-1301 USA.
++
++Linking this library statically or dynamically with other modules is
++making a combined work based on this library. Thus, the terms and
++conditions of the GNU General Public License cover the whole
++combination.
++
++As a special exception, the copyright holders of this library give you
++permission to link this library with independent modules to produce an
++executable, regardless of the license terms of these independent
++modules, and to copy and distribute the resulting executable under
++terms of your choice, provided that you also meet, for each linked
++independent module, the terms and conditions of the license of that
++module. An independent module is a module which is not derived from
++or based on this library. If you modify this library, you may extend
++this exception to your version of the library, but you are not
++obligated to do so. If you do not wish to do so, delete this
++exception statement from your version. */
++
++package sun.security.action;
++
++import java.security.PrivilegedAction;
++
++/**
++ * PrivilegedAction implementation that calls System.getProperty() with
++ * the property name passed to its constructor.
++ *
++ * Example of use:
++ * <code>
++ * GetPropertyAction action = new GetPropertyAction("http.proxyPort");
++ * String port = AccessController.doPrivileged(action);
++ * </code>
++ *
++ * Note: Usage of this class is discouraged as it is not a part of the
++ * J2SE API.
++ */
++public class GetPropertyAction implements PrivilegedAction<String>
++{
++ String name;
++ String value = null;
++
++ public GetPropertyAction()
++ {
++ }
++
++ public GetPropertyAction(String propName)
++ {
++ setParameters(propName);
++ }
++
++ public GetPropertyAction(String propName, String defaultValue)
++ {
++ setParameters(propName, defaultValue);
++ }
++
++ public String run()
++ {
++ return System.getProperty(name, value);
++ }
++
++ public GetPropertyAction setParameters(String propName)
++ {
++ this.name = propName;
++ this.value = null;
++ return this;
++ }
++
++ public GetPropertyAction setParameters(String propName, String defaultValue)
++ {
++ this.name = propName;
++ this.value = defaultValue;
++ return this;
++ }
++}
diff --git a/packages/cmake/cmake-native_2.4.8.bb b/packages/cmake/cmake-native_2.4.8.bb
index 1a56fa40e0..02bc3aed48 100644
--- a/packages/cmake/cmake-native_2.4.8.bb
+++ b/packages/cmake/cmake-native_2.4.8.bb
@@ -1,4 +1,3 @@
-CMAKE_MAJOR_VERSION="2.4"
require cmake.inc
inherit native
diff --git a/packages/cmake/cmake-native_2.6.0.bb b/packages/cmake/cmake-native_2.6.0.bb
new file mode 100644
index 0000000000..faf397614b
--- /dev/null
+++ b/packages/cmake/cmake-native_2.6.0.bb
@@ -0,0 +1,11 @@
+inherit native
+require cmake.inc
+
+do_stage() {
+ oe_runmake install
+ autotools_stage_all
+}
+
+do_install() {
+ :
+}
diff --git a/packages/cmake/cmake.inc b/packages/cmake/cmake.inc
index 5190b6233f..d046c84858 100644
--- a/packages/cmake/cmake.inc
+++ b/packages/cmake/cmake.inc
@@ -3,9 +3,10 @@
DESCRIPTION = "A cross-platform, open-source make system"
HOMEPAGE = "http://www.cmake.org/"
-LICENSE = "Berkely-style license"
+LICENSE = "Berkeley-style license"
SECTION = "console/utils"
+CMAKE_MAJOR_VERSION = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz"
inherit autotools
diff --git a/packages/cmake/cmake_2.4.8.bb b/packages/cmake/cmake_2.4.8.bb
index 619aea9701..68f03c17a9 100644
--- a/packages/cmake/cmake_2.4.8.bb
+++ b/packages/cmake/cmake_2.4.8.bb
@@ -1,2 +1 @@
-CMAKE_MAJOR_VERSION="2.4"
require cmake.inc
diff --git a/packages/console-tools/console-tools_0.3.2.bb b/packages/console-tools/console-tools_0.3.2.bb
index cd8021d9ef..1a02827021 100644
--- a/packages/console-tools/console-tools_0.3.2.bb
+++ b/packages/console-tools/console-tools_0.3.2.bb
@@ -1,7 +1,7 @@
SECTION = "base"
LICENSE = "GPL"
DESCRIPTION = "Allows you to set-up and manipulate the Linux console."
-PR = "r2"
+PR = "r3"
SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
file://codepage.patch;patch=1 \
diff --git a/packages/curl/curl-sdk_7.18.0.bb b/packages/curl/curl-sdk_7.18.0.bb
new file mode 100644
index 0000000000..816fe645bc
--- /dev/null
+++ b/packages/curl/curl-sdk_7.18.0.bb
@@ -0,0 +1,14 @@
+require curl_${PV}.bb
+inherit sdk
+DEPENDS = "zlib-sdk"
+
+do_stage () {
+ install -d ${STAGING_INCDIR}/curl
+ install -m 0644 ${S}/include/curl/*.h ${STAGING_INCDIR}/curl/
+ oe_libinstall -so -a -C lib libcurl ${STAGING_LIBDIR}
+}
+
+do_install() {
+ :
+}
+
diff --git a/packages/cyrus-imapd/cyrus-imapd_2.2.12.bb b/packages/cyrus-imapd/cyrus-imapd_2.2.12.bb
index 8167719aab..e80340f080 100644
--- a/packages/cyrus-imapd/cyrus-imapd_2.2.12.bb
+++ b/packages/cyrus-imapd/cyrus-imapd_2.2.12.bb
@@ -1,7 +1,7 @@
SECTION = "console/network"
DEPENDS = "cyrus-sasl virtual/db"
LICENSE = "BSD"
-PR = "r11"
+PR = "r12"
DEPENDS += "install-native"
SRC_URI = "ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-${PV}.tar.gz \
diff --git a/packages/cyrus-imapd/cyrus-imapd_2.2.5.bb b/packages/cyrus-imapd/cyrus-imapd_2.2.5.bb
index 422c36c808..6dc81c5e3f 100644
--- a/packages/cyrus-imapd/cyrus-imapd_2.2.5.bb
+++ b/packages/cyrus-imapd/cyrus-imapd_2.2.5.bb
@@ -1,6 +1,6 @@
SECTION = "console/network"
DEPENDS = "cyrus-sasl"
-PR = "r1"
+PR = "r2"
LICENSE = "BSD"
SRC_URI = "ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/imap/cyrus-imapd-${PV}.tar.gz \
diff --git a/packages/cyrus-sasl/cyrus-sasl_2.1.17.bb b/packages/cyrus-sasl/cyrus-sasl_2.1.17.bb
index 81bac22855..00cad2d6d6 100644
--- a/packages/cyrus-sasl/cyrus-sasl_2.1.17.bb
+++ b/packages/cyrus-sasl/cyrus-sasl_2.1.17.bb
@@ -3,6 +3,8 @@ DEPENDS = "virtual/db"
DESCRIPTION = "Generic client/server library for SASL authentication."
LICENSE = "BSD"
+PR = "r1"
+
SRC_URI = "ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/cyrus-sasl-${PV}.tar.gz \
file://configure.patch;patch=1"
diff --git a/packages/cyrus-sasl/cyrus-sasl_2.1.18.bb b/packages/cyrus-sasl/cyrus-sasl_2.1.18.bb
index e95dceee39..a863d3e5ad 100644
--- a/packages/cyrus-sasl/cyrus-sasl_2.1.18.bb
+++ b/packages/cyrus-sasl/cyrus-sasl_2.1.18.bb
@@ -3,6 +3,8 @@ DEPENDS = "virtual/db"
DESCRIPTION = "Generic client/server library for SASL authentication."
LICENSE = "BSD"
+PR = "r1"
+
SRC_URI = "ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/cyrus-sasl-${PV}.tar.gz"
inherit autotools
diff --git a/packages/cyrus-sasl/cyrus-sasl_2.1.19.bb b/packages/cyrus-sasl/cyrus-sasl_2.1.19.bb
index cf7ce75b99..b179298355 100644
--- a/packages/cyrus-sasl/cyrus-sasl_2.1.19.bb
+++ b/packages/cyrus-sasl/cyrus-sasl_2.1.19.bb
@@ -2,7 +2,7 @@ SECTION = "console/network"
DEPENDS = "openssl virtual/db"
DESCRIPTION = "Generic client/server library for SASL authentication."
LICENSE = "BSD"
-PR = "r9"
+PR = "r10"
SRC_URI = "ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-${PV}.tar.gz \
file://berkdb.m4.patch;patch=1 \
diff --git a/packages/dbus-java/dbus-java_2.4.bb b/packages/dbus-java/dbus-java_2.4.bb
new file mode 100644
index 0000000000..461bcb19eb
--- /dev/null
+++ b/packages/dbus-java/dbus-java_2.4.bb
@@ -0,0 +1,87 @@
+DESCRIPTION = "A pure Java D-Bus Implementation"
+DESCRIPTION_dbus-java-viewer = "${DESCRIPTION} (DBusViewer Binary)"
+DESCRIPTION_dbus-java-bin = "${DESCRIPTION} (Binaries)"
+AUTHOR = "Matthew Johnson <dbus@matthew.ath.cx>"
+HOMEPAGE = "http://dbus.freedesktop.org/doc/dbus-java"
+SECTION = "libs"
+LICENSE = "GPLv2 AFL"
+DEPENDS = "libmatthew docbook-utils-native docbook-sgml-dtd-4.1-native fastjar-native"
+RDEPENDS_dbus-java-viewer = "java2-runtime libmatthew-java ${JPN}"
+RDEPENDS_dbus-java-bin = "java2-runtime libmatthew-java ${JPN}"
+RSUGGESTS_libdbus-java = "libmatthew-java dbus"
+PR = "r0"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus-java/dbus-java-${PV}.tar.gz"
+
+S = "${WORKDIR}/dbus-java-${PV}"
+
+inherit java-library
+
+do_compile () {
+ # run target .binclasses first to fix a brokenness in the Makefile
+ oe_runmake \
+ JCFLAGS="-source 1.5" \
+ JAVAC="javac" \
+ JARPREFIX="${STAGING_DATADIR_JAVA}" \
+ JAVAUNIXJARDIR="${STAGING_DATADIR_JAVA}" \
+ CLASSPATH="${S}/classes" \
+ JAR="fastjar" \
+ .binclasses
+ oe_runmake \
+ JCFLAGS="-source 1.5" \
+ JAVAC="javac" \
+ JARPREFIX="${STAGING_DATADIR_JAVA}" \
+ JAVAUNIXJARDIR="${STAGING_DATADIR_JAVA}" \
+ CLASSPATH="${S}/classes" \
+ JAR="fastjar" \
+ all
+ # Generated shell scripts will have staging paths inside them.
+ rm bin/*
+ # Generate them again with target paths.
+ oe_runmake \
+ JAVAC="oefatal \"No Java compilation expected here.\"" \
+ JAR="oefatal \"No jar invocation expected here.\"" \
+ JARPREFIX=${datadir_java} \
+ JAVAUNIXPATH=${datadir_java} \
+ all
+ # Trigger generation of all documentation files to prevent this
+ # being happen at the target 'install-man' in do_install.
+ oe_runmake \
+ JAVAC="oefatal \"No Java compilation expected here.\"" \
+ JAR="oefatal \"No jar invocation expected here.\"" \
+ JARPREFIX=${datadir_java} \
+ JAVAUNIXPATH=${datadir_java} \
+ CreateInterface.1 ListDBus.1 DBusDaemon.1 DBusViewer.1 changelog AUTHORS COPYING README INSTALL DBusCall.1
+}
+
+do_install () {
+ oe_jarinstall ${JPN}-${PV}.jar ${JPN}.jar
+ oe_jarinstall dbus-java-viewer-${PV}.jar dbus-java-viewer.jar
+ oe_jarinstall dbus-java-bin-${PV}.jar dbus-java-bin.jar
+ install -d ${D}${bindir}
+ install bin/DBusViewer ${D}${bindir}
+ install bin/DBusCall ${D}${bindir}
+ install bin/CreateInterface ${D}${bindir}
+ install bin/ListDBus ${D}${bindir}
+ install bin/DBusDaemon ${D}${bindir}
+ oe_runmake \
+ JAVAC="oefatal \"No Java compilation expected here.\"" \
+ JAR="oefatal \"No jar invocation expected here.\"" \
+ MANPREFIX=${D}${mandir} \
+ DOCPREFIX=${D}${docdir}/${JPN} \
+ install-man
+}
+
+do_stage () {
+ oe_jarinstall -s ${JPN}-${PV}.jar ${JPN}.jar
+}
+
+PACKAGE_ARCH = "all"
+# ${JPN} must be last otherwise it would pick up dbus-viewer*.jar
+# and dbus-bin*.jar
+PACKAGES = "dbus-java-viewer dbus-java-viewer-doc dbus-java-bin dbus-java-bin-doc ${JPN}"
+
+FILES_dbus-java-viewer = "${datadir}/java/dbus-java-viewer*.jar ${bindir}/DBusViewer"
+FILES_dbus-java-viewer-doc = "${mandir}/DBusViewer*"
+FILES_dbus-java-bin = "${datadir}/java/dbus-java-bin*.jar ${bindir}"
+FILES_dbus-java-bin-doc = "${mandir} ${docdir}/${JPN}"
diff --git a/packages/dbus/dbus-1.2.1/dbus-1.init b/packages/dbus/dbus-1.2.1/dbus-1.init
index bf002748a1..a70e7a2373 100644
--- a/packages/dbus/dbus-1.2.1/dbus-1.init
+++ b/packages/dbus/dbus-1.2.1/dbus-1.init
@@ -10,7 +10,7 @@ DAEMON=/usr/bin/dbus-daemon
NAME=dbus
DAEMONUSER=messagebus
RUNDIR=/var/run/dbus
-PIDFILE=/var/run/messagebus.pid
+PIDFILE=/var/run/dbus/pid
UUIDDIR=/var/lib/dbus
DESC="system message bus"
EVENTDIR=/etc/dbus-1/event.d
diff --git a/packages/icewm/icewm-1.2.20/.mtn2git_empty b/packages/dbus/dbus-glib-0.76/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/icewm/icewm-1.2.20/.mtn2git_empty
+++ b/packages/dbus/dbus-glib-0.76/.mtn2git_empty
diff --git a/packages/dbus/dbus-glib-0.76/no-examples.patch b/packages/dbus/dbus-glib-0.76/no-examples.patch
new file mode 100644
index 0000000000..483153db74
--- /dev/null
+++ b/packages/dbus/dbus-glib-0.76/no-examples.patch
@@ -0,0 +1,8 @@
+--- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200
++++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200
+@@ -1,4 +1,4 @@
+-SUBDIRS = . examples
++SUBDIRS = .
+
+ INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
+
diff --git a/packages/dbus/dbus-glib-0.76/no-introspect.patch b/packages/dbus/dbus-glib-0.76/no-introspect.patch
new file mode 100644
index 0000000000..9115801f71
--- /dev/null
+++ b/packages/dbus/dbus-glib-0.76/no-introspect.patch
@@ -0,0 +1,14 @@
+Index: dbus-glib-0.73/tools/Makefile.am
+===================================================================
+--- 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
+
+-dbus-glib-bindings.h: dbus-bus-introspect.xml $(top_builddir)/dbus/dbus-binding-tool$(EXEEXT)
+- $(top_builddir)/dbus/dbus-binding-tool --mode=glib-client --prefix=dbus_bus --output=dbus-glib-bindings.h dbus-bus-introspect.xml
+-
+ BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
+
+ if USE_INTROSPECT_XML
diff --git a/packages/linux/linux-ml403-slab-2.6.x/.mtn2git_empty b/packages/dbus/dbus-glib-native-0.76/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/linux/linux-ml403-slab-2.6.x/.mtn2git_empty
+++ b/packages/dbus/dbus-glib-native-0.76/.mtn2git_empty
diff --git a/packages/dbus/dbus-glib-native-0.76/run-with-tmp-session-bus.patch b/packages/dbus/dbus-glib-native-0.76/run-with-tmp-session-bus.patch
new file mode 100644
index 0000000000..a04f404f75
--- /dev/null
+++ b/packages/dbus/dbus-glib-native-0.76/run-with-tmp-session-bus.patch
@@ -0,0 +1,24 @@
+Index: dbus-glib-0.76/tools/run-with-tmp-session-bus.sh
+===================================================================
+--- dbus-glib-0.76.orig/tools/run-with-tmp-session-bus.sh 2008-06-13 16:31:54.000000000 +0100
++++ dbus-glib-0.76/tools/run-with-tmp-session-bus.sh 2008-06-13 16:32:54.000000000 +0100
+@@ -30,17 +30,15 @@
+ echo "escaped service dir is: $ESCAPED_SERVICE_DIR" >&2
+
+ ## create a configuration file based on the standard session.conf
+-cat $DBUS_TOP_SRCDIR/tools/session.conf | \
++cat $datadir/tools/session.conf | \
+ sed -e 's/<servicedir>.*$/<servicedir>'$ESCAPED_SERVICE_DIR'<\/servicedir>/g' | \
+ sed -e 's/<include.*$//g' \
+ > $CONFIG_FILE
+
+ echo "Created configuration file $CONFIG_FILE" >&2
+
+-PATH=$DBUS_TOP_BUILDDIR/bus:$PATH
+-export PATH
+ ## the libtool script found by the path search should already do this, but
+-LD_LIBRARY_PATH=$DBUS_TOP_BUILDDIR/dbus/.libs:$LD_LIBRARY_PATH
++LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
+ export PATH
+ unset DBUS_SESSION_BUS_ADDRESS
+ unset DBUS_SESSION_BUS_PID
diff --git a/packages/dbus/dbus-glib-native_0.76.bb b/packages/dbus/dbus-glib-native_0.76.bb
new file mode 100644
index 0000000000..d76cc043d4
--- /dev/null
+++ b/packages/dbus/dbus-glib-native_0.76.bb
@@ -0,0 +1,21 @@
+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://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
+ 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-${PV}"
+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_0.76.bb b/packages/dbus/dbus-glib_0.76.bb
new file mode 100644
index 0000000000..0a34c738c3
--- /dev/null
+++ b/packages/dbus/dbus-glib_0.76.bb
@@ -0,0 +1,28 @@
+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://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
+ 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_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml ${S}/tools/
+ install -m 0644 ${STAGING_DATADIR_NATIVE}/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_1.0.3.bb b/packages/dbus/dbus_1.0.3.bb
index 6a54a62d9a..61379ee8b7 100644
--- a/packages/dbus/dbus_1.0.3.bb
+++ b/packages/dbus/dbus_1.0.3.bb
@@ -1,4 +1,4 @@
require dbus.inc
-PR = "r11"
+PR = "r12"
DEFAULT_PREFERENCE = "-1"
diff --git a/packages/dbus/dbus_1.2.1.bb b/packages/dbus/dbus_1.2.1.bb
index 8e3e329fde..da7cd43d7f 100644
--- a/packages/dbus/dbus_1.2.1.bb
+++ b/packages/dbus/dbus_1.2.1.bb
@@ -1,3 +1,3 @@
include dbus.inc
-PR = "r1"
+PR = "r3"
diff --git a/packages/devio/devio-sdk.inc b/packages/devio/devio-sdk.inc
new file mode 100644
index 0000000000..6ba6606f17
--- /dev/null
+++ b/packages/devio/devio-sdk.inc
@@ -0,0 +1,5 @@
+# Set the installation dir back to the default
+sbindir = "${exec_prefix}/sbin"
+bindir = "${exec_prefix}/bin"
+
+inherit sdk
diff --git a/packages/devio/devio-sdk_1.2.bb b/packages/devio/devio-sdk_1.2.bb
new file mode 100644
index 0000000000..caf741a2ff
--- /dev/null
+++ b/packages/devio/devio-sdk_1.2.bb
@@ -0,0 +1,3 @@
+# This package builds the devio program for the build architecture
+require devio.inc
+require devio-sdk.inc
diff --git a/packages/dfu-util/dfu-util-native_svn.bb b/packages/dfu-util/dfu-util-native_svn.bb
index 457094df9e..6304fad55b 100644
--- a/packages/dfu-util/dfu-util-native_svn.bb
+++ b/packages/dfu-util/dfu-util-native_svn.bb
@@ -6,12 +6,12 @@ DEPENDS = "libusb-native usbpath-native"
do_stage() {
install -d ${STAGING_BINDIR_NATIVE}
- install -m 0755 src/dfu-util ${STAGING_BINDIR_NATIVE}/
+ install -m 0755 src/dfu-util ${STAGING_BINDIR_NATIVE}/dfu-util-${PV}
}
do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0755 src/dfu-util_static ${DEPLOY_DIR_IMAGE}/dfu-util
+ install -d ${DEPLOY_DIR_TOOLS}
+ install -m 0755 src/dfu-util_static ${DEPLOY_DIR_TOOLS}/dfu-util-${PV}
}
addtask deploy before do_package after do_install
diff --git a/packages/dfu-util/dfu-util_svn.bb b/packages/dfu-util/dfu-util_svn.bb
index 1f34a5bc24..2e1afd55b1 100644
--- a/packages/dfu-util/dfu-util_svn.bb
+++ b/packages/dfu-util/dfu-util_svn.bb
@@ -1,9 +1,9 @@
DESCRIPTION = "USB Device Firmware Upgrade utility"
SECTION = "devel"
-AUTHOR = "Harald Welte"
+AUTHOR = "Harald Welte <laforge@openmoko.org>"
LICENSE = "GPL"
PV = "0.1+svnr${SRCREV}"
-PR = "r0"
+PR = "r1"
DEPENDS = "libusb usbpath"
diff --git a/packages/directfb/directfb.inc b/packages/directfb/directfb.inc
index 0843f36198..150cbe66b3 100644
--- a/packages/directfb/directfb.inc
+++ b/packages/directfb/directfb.inc
@@ -8,7 +8,7 @@ LICENSE = "LGPL"
HOMEPAGE = "http://directfb.org"
DEPENDS = "jpeg libpng freetype zlib tslib"
RV = "1.0-0"
-PR = "r4"
+PR = "r5"
SRC_URI = " \
http://www.directfb.org/download/DirectFB/DirectFB-${PV}.tar.gz \
@@ -17,6 +17,7 @@ SRC_URI = " \
file://getpagesize.patch;patch=1 \
file://fix-includes.patch;patch=1 \
file://mkdfiff.patch;patch=1 \
+ file://dont-use-linux-config.patch;patch=1 \
"
S = "${WORKDIR}/DirectFB-${PV}"
diff --git a/packages/directfb/directfb_1.0.0.bb b/packages/directfb/directfb_1.0.0.bb
index 5b4690fe93..fccb8dbfdd 100644
--- a/packages/directfb/directfb_1.0.0.bb
+++ b/packages/directfb/directfb_1.0.0.bb
@@ -1,4 +1,3 @@
require directfb.inc
RV = "1.0-0"
-PR = "r4"
diff --git a/packages/directfb/directfb_1.1.0.bb b/packages/directfb/directfb_1.1.0.bb
index 39002fdb5d..8aa8f43c08 100644
--- a/packages/directfb/directfb_1.1.0.bb
+++ b/packages/directfb/directfb_1.1.0.bb
@@ -1,4 +1,3 @@
require directfb.inc
RV = "1.1-0"
-PR = "r3"
diff --git a/packages/directfb/files/dont-use-linux-config.patch b/packages/directfb/files/dont-use-linux-config.patch
new file mode 100644
index 0000000000..f971660954
--- /dev/null
+++ b/packages/directfb/files/dont-use-linux-config.patch
@@ -0,0 +1,12 @@
+diff -urN DirectFB-1.1.0.orig/lib/direct/ppcasm_memcpy_cachable.S DirectFB-1.1.0/lib/direct/ppcasm_memcpy_cachable.S
+--- DirectFB-1.1.0.orig/lib/direct/ppcasm_memcpy_cachable.S 2007-08-07 21:43:00.000000000 +0200
++++ DirectFB-1.1.0/lib/direct/ppcasm_memcpy_cachable.S 2008-06-07 04:14:26.000000000 +0200
+@@ -34,8 +34,6 @@
+
+ #define __ASSEMBLY__
+
+-#include <linux/config.h>
+-
+ #if defined(CONFIG_8xx) || defined(CONFIG_403GCX)
+ #define L1_CACHE_LINE_SIZE 16
+ #define LG_L1_CACHE_LINE_SIZE 4
diff --git a/packages/distcc/distcc_2.18.3.bb b/packages/distcc/distcc_2.18.3.bb
index ebf02e17ee..959636fea9 100644
--- a/packages/distcc/distcc_2.18.3.bb
+++ b/packages/distcc/distcc_2.18.3.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "distcc is a parallel build system that distributes \
compilation of C/C++/ObjC code across machines on a network."
SECTION = "devel"
LICENSE = "GPLv2"
-PR = "r3"
+PR = "r4"
DEPENDS = "avahi gtk+"
RRECOMMENDS = "avahi-daemon"
@@ -11,6 +11,7 @@ SRC_URI = "http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2 \
file://distcc-avahi.patch;patch=1 \
file://no-man.patch;patch=1 \
file://default \
+ file://distccmon-gnome.desktop \
file://distcc"
inherit autotools pkgconfig update-rc.d
@@ -25,6 +26,7 @@ do_install_append() {
install -d ${D}${sysconfdir}/distcc
install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
+ install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
echo "+zeroconf" > ${D}${sysconfdir}/distcc/hosts
}
diff --git a/packages/distcc/files/distccmon-gnome.desktop b/packages/distcc/files/distccmon-gnome.desktop
new file mode 100644
index 0000000000..7b5d85ce4e
--- /dev/null
+++ b/packages/distcc/files/distccmon-gnome.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=0.9.4
+Exec=distccmon-gnome
+Name=distcc monitor
+GenericName=Distributed Compile Monitor
+Comment=Graphical view of distributed compile tasks
+Icon=distccmon-gnome-icon
+TryExec=distccmon-gnome
+Terminal=false
+Type=Application
+Categories=GNOME;Development;
+StartupNotify=true
diff --git a/packages/netbase/netbase/mpc8313e-rdb/.mtn2git_empty b/packages/dropbear/dropbear-0.51/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/netbase/netbase/mpc8313e-rdb/.mtn2git_empty
+++ b/packages/dropbear/dropbear-0.51/.mtn2git_empty
diff --git a/packages/dropbear/dropbear-0.51/allow-nopw.patch b/packages/dropbear/dropbear-0.51/allow-nopw.patch
new file mode 100644
index 0000000000..3f3e8b167f
--- /dev/null
+++ b/packages/dropbear/dropbear-0.51/allow-nopw.patch
@@ -0,0 +1,40 @@
+Index: dropbear-0.51/svr-auth.c
+===================================================================
+--- dropbear-0.51.orig/svr-auth.c
++++ dropbear-0.51/svr-auth.c
+@@ -270,7 +270,7 @@ static int checkusername(unsigned char *
+ send_msg_userauth_failure(0, 1);
+ return DROPBEAR_FAILURE;
+ }
+-
++#ifdef DISALLOW_EMPTY_PW
+ /* check for an empty password */
+ if (ses.authstate.pw_passwd[0] == '\0') {
+ TRACE(("leave checkusername: empty pword"))
+@@ -279,7 +279,7 @@ static int checkusername(unsigned char *
+ send_msg_userauth_failure(0, 1);
+ return DROPBEAR_FAILURE;
+ }
+-
++#endif
+ TRACE(("shell is %s", ses.authstate.pw_shell))
+
+ /* check that the shell is set */
+Index: dropbear-0.51/svr-authpasswd.c
+===================================================================
+--- dropbear-0.51.orig/svr-authpasswd.c
++++ dropbear-0.51/svr-authpasswd.c
+@@ -64,9 +64,13 @@ void svr_auth_password() {
+ * since the shadow password may differ to that tested
+ * in auth.c */
+ if (passwdcrypt[0] == '\0') {
++#ifdef DISALLOW_EMPTY_PW
+ dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected",
+ ses.authstate.pw_name);
+ send_msg_userauth_failure(0, 1);
++#else
++ send_msg_userauth_success();
++#endif
+ return;
+ }
+
diff --git a/packages/dropbear/dropbear-0.50/configure.patch b/packages/dropbear/dropbear-0.51/configure.patch
index fa24efc066..fa24efc066 100644
--- a/packages/dropbear/dropbear-0.50/configure.patch
+++ b/packages/dropbear/dropbear-0.51/configure.patch
diff --git a/packages/dropbear/dropbear-0.50/fix-2kb-keys.patch b/packages/dropbear/dropbear-0.51/fix-2kb-keys.patch
index bb7a4d32ac..bb7a4d32ac 100644
--- a/packages/dropbear/dropbear-0.50/fix-2kb-keys.patch
+++ b/packages/dropbear/dropbear-0.51/fix-2kb-keys.patch
diff --git a/packages/dropbear/dropbear-0.51/no-host-lookup.patch b/packages/dropbear/dropbear-0.51/no-host-lookup.patch
new file mode 100644
index 0000000000..d7c2ccdc62
--- /dev/null
+++ b/packages/dropbear/dropbear-0.51/no-host-lookup.patch
@@ -0,0 +1,12 @@
+diff -urN dropbear-0.51/options.h dropbear-0.51.new/options.h
+--- dropbear-0.51/options.h 2008-03-27 14:34:39.000000000 +0100
++++ dropbear-0.51.new/options.h 2008-06-22 00:22:09.000000000 +0200
+@@ -112,7 +112,7 @@
+ /* #define DSS_PROTOK */
+
+ /* Whether to do reverse DNS lookups. */
+-#define DO_HOST_LOOKUP
++/* #define DO_HOST_LOOKUP */
+
+ /* Whether to print the message of the day (MOTD). This doesn't add much code
+ * size */
diff --git a/packages/dropbear/dropbear-0.50/urandom-xauth-changes-to-options.h.patch b/packages/dropbear/dropbear-0.51/urandom-xauth-changes-to-options.h.patch
index 787b801643..787b801643 100644
--- a/packages/dropbear/dropbear-0.50/urandom-xauth-changes-to-options.h.patch
+++ b/packages/dropbear/dropbear-0.51/urandom-xauth-changes-to-options.h.patch
diff --git a/packages/dropbear/dropbear.inc b/packages/dropbear/dropbear.inc
index ebe0c1ea9c..31edd26cc8 100644
--- a/packages/dropbear/dropbear.inc
+++ b/packages/dropbear/dropbear.inc
@@ -6,19 +6,21 @@ DEPENDS = "zlib"
PROVIDES = "ssh sshd"
RPROVIDES = "ssh sshd"
-SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.gz \
- file://urandom-xauth-changes-to-options.h.patch;patch=1 \
- file://configure.patch;patch=1 \
- file://fix-2kb-keys.patch;patch=1 \
- file://allow-nopw.patch \
- file://init"
+SRC_URI = "\
+ http://matt.ucc.asn.au/dropbear/dropbear-${PV}.tar.bz2 \
+ file://urandom-xauth-changes-to-options.h.patch;patch=1 \
+ file://configure.patch;patch=1 \
+ file://fix-2kb-keys.patch;patch=1 \
+ file://allow-nopw.patch \
+ file://init \
+"
inherit autotools update-rc.d
INITSCRIPT_NAME = "dropbear"
INITSCRIPT_PARAMS = "defaults 10"
-CFLAGS_prepend = " -I. "
+CFLAGS =+ "-I."
LD = "${CC}"
SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
@@ -33,13 +35,13 @@ do_configure_prepend() {
}
do_install() {
- install -d ${D}${sysconfdir} \
- ${D}${sysconfdir}/init.d \
- ${D}${sysconfdir}/default \
- ${D}${sysconfdir}/dropbear \
- ${D}${bindir} \
- ${D}${sbindir} \
- ${D}${localstatedir}
+ install -d ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/default
+ install -d ${D}${sysconfdir}/dropbear
+ install -d ${D}${bindir}
+ install -d ${D}${sbindir}
+ install -d ${D}${localstatedir}
install -m 0755 dropbearmulti ${D}${sbindir}/
ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
@@ -62,12 +64,12 @@ pkg_postinst () {
}
pkg_postrm_append () {
- if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
- rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
- fi
- if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then
- rm ${sysconfdir}/dropbear/dropbear_dss_host_key
- fi
- update-alternatives --remove ssh ${bindir}/dropbearmulti
- update-alternatives --remove scp ${bindir}/dropbearmulti
+ if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
+ rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
+ fi
+ if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then
+ rm ${sysconfdir}/dropbear/dropbear_dss_host_key
+ fi
+ update-alternatives --remove ssh ${bindir}/dropbearmulti
+ update-alternatives --remove scp ${bindir}/dropbearmulti
}
diff --git a/packages/dropbear/dropbear_0.50.bb b/packages/dropbear/dropbear_0.50.bb
deleted file mode 100644
index bd8f31cff6..0000000000
--- a/packages/dropbear/dropbear_0.50.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require dropbear.inc
-
-PR = "r1"
-
-# testing
-DEFAULT_PREFERENCE = "-1"
diff --git a/packages/dropbear/dropbear_0.51.bb b/packages/dropbear/dropbear_0.51.bb
new file mode 100644
index 0000000000..888819c0e5
--- /dev/null
+++ b/packages/dropbear/dropbear_0.51.bb
@@ -0,0 +1,4 @@
+require dropbear.inc
+PR = "r1"
+
+SRC_URI += "file://no-host-lookup.patch;patch=1" \ No newline at end of file
diff --git a/packages/dsniff/dsniff_2.3.bb b/packages/dsniff/dsniff_2.3.bb
index 8da4ad82aa..14da908b57 100644
--- a/packages/dsniff/dsniff_2.3.bb
+++ b/packages/dsniff/dsniff_2.3.bb
@@ -1,22 +1,30 @@
-SECTION = "console/network"
DESCRIPTION = "dsniff is a collection of tools for network auditing and penetration testing."
+SECTION = "console/network"
+HOMEPAGE = "http://www.monkey.org/~dugsong/dsniff/"
+AUTHOR = "Dug Song <dugsong@monkey.org>"
LICENSE = "BSD"
-PR = "r1"
+PR = "r2"
# There is a significant API change beween 1.0.2a of libnet and
# 1.1.x, dsniff will only work with the older and there is no
# updated version of dnsniff.
DEPENDS = "virtual/db libpcap libnet-1.0 libnids openssl"
-SRC_URI = "http://www.monkey.org/~dugsong/dsniff/dsniff-${PV}.tar.gz \
- file://configure.patch;patch=1"
+SRC_URI = "\
+ http://www.monkey.org/~dugsong/dsniff/dsniff-${PV}.tar.gz \
+ file://configure.patch;patch=1 \
+"
inherit autotools
-EXTRA_OECONF = "--without-x --with-db=${STAGING_LIBDIR}/.. \
- --with-libpcap=${STAGING_LIBDIR}/.. \
- --with-libnet=${STAGING_LIBDIR}/.. \
- --with-libnids=${STAGING_LIBDIR}/.. \
- --with-openssl=${STAGING_LIBDIR}/.."
+EXTRA_OECONF = "\
+ --without-x --with-db=${STAGING_LIBDIR}/.. \
+ --with-libpcap=${STAGING_LIBDIR}/.. \
+ --with-libnet=${STAGING_LIBDIR}/.. \
+ --with-libnids=${STAGING_LIBDIR}/.. \
+ --with-openssl=${STAGING_LIBDIR}/.. \
+"
EXTRA_OEMAKE = "'install_prefix=${D}'"
-CFLAGS_prepend = " -I${S}/missing "
+
+CFLAGS =+ "-I${S}/missing"
+LDFLAGS += "-lresolv"
diff --git a/packages/dsplink/codec-engine_2.10.bb b/packages/dsplink/codec-engine_2.10.bb
new file mode 100644
index 0000000000..8968a0ce02
--- /dev/null
+++ b/packages/dsplink/codec-engine_2.10.bb
@@ -0,0 +1,77 @@
+DESCRIPTION = "Codec Engine for TI ARM/DSP processors"
+
+DEPENDS = "virtual/kernel perl-native"
+RDEPENDS = "update-modules"
+
+inherit module
+
+PR = "r1"
+PV = "2.10"
+
+# Get CE tarball from TI website, place in sources and calculate
+# md5sum
+# Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/CE/index.html
+
+SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_10_01.tar.gz \
+"
+
+S = "${WORKDIR}/codec_engine_2_10_01"
+
+do_compile() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
+ sed -i \
+ -e s:/db/toolsrc/library/vendors2005/mvl/arm/mvl4.0.1-root-new/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-:${TARGET_PREFIX}:g \
+ -e s:/db/toolsrc/library/vendors2005/opensource/buildroot/10122007/build_arm/staging_dir/usr/bin/arm-linux-:${TARGET_PREFIX}:g \
+ -e s:/db/toolsrc/library/vendors2005/mvl/arm/DaVinci-Linux-Rel_mvl401c/Linux:${STAGING_KERNEL_DIR}:g \
+ -e s:/opt/mv_pro_4.0/montavista/pro/devkit/arm/v5t_le/target/opt/dvevm:${D}:g \
+ Rules.make
+
+ oe_runmake clean
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ AR="${KERNEL_AR}" \
+ release
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ AR="${KERNEL_AR}" \
+ debug
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ AR="${KERNEL_AR}"
+}
+
+do_install() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
+ oe_runmake install
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ mv ${D}/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ install -d ${D}/${base_sbindir}
+ cd ${D} ; mv apitest apitestd multi_process multi_processd translate translated ${D}/${base_sbindir}
+}
+
+pkg_postinst_${PN}-module () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm_${PN}-module () {
+ update-modules || true
+}
+
+PACKAGES =+ "dsplink-cmemk-module"
+FILES_dsplink-cmemk-module = "${sysconfdir} /lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*ko"
+
+FILES_${PN} = "${base_sbindir}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/packages/obsolete/classpath/.mtn2git_empty b/packages/dsplink/dsplink-1.51/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/obsolete/classpath/.mtn2git_empty
+++ b/packages/dsplink/dsplink-1.51/.mtn2git_empty
diff --git a/packages/dsplink/dsplink-1.51/prcs-fix-include.patch b/packages/dsplink/dsplink-1.51/prcs-fix-include.patch
new file mode 100644
index 0000000000..6fa92cd50a
--- /dev/null
+++ b/packages/dsplink/dsplink-1.51/prcs-fix-include.patch
@@ -0,0 +1,49 @@
+--- /tmp/prcs.c 2008-05-15 20:35:49.946802023 +0200
++++ dsplink_1_50/dsplink/gpp/src/osal/Linux/prcs.c 2008-05-15 20:36:01.386858569 +0200
+@@ -17,6 +17,7 @@
+
+ /* ----------------------------------- OS Specific Headers */
+ #include <linux/autoconf.h>
++#include <linux/sched.h>
+ #include <linux/spinlock.h>
+ #include <linux/module.h>
+ #include <linux/mm.h>
+
+--- /tmp/mem.c 2008-06-22 16:05:16.000000000 +0200
++++ dsplink_1_50/dsplink/gpp/src/osal/Linux/2.6.18/mem.c 2008-06-22 16:05:43.000000000 +0200
+@@ -16,6 +16,7 @@
+
+
+ /* ----------------------------------- OS Specific Headers */
++
+ #include <linux/autoconf.h>
+ #include <linux/spinlock.h>
+ #if (defined(DM642_PCI) || defined (DM64LC_PCI))
+@@ -31,6 +32,7 @@
+ #endif /* if (defined(DM642_PCI) || defined (DM64LC_PCI)) */
+ #include <linux/vmalloc.h>
+ #include <asm/io.h>
++#include <linux/sched.h>
+
+ /* ----------------------------------- DSP/BIOS Link */
+ #include <dsplink.h>
+--- /tmp/hal_intgen.c 2008-06-29 23:42:05.000000000 +0200
++++ dsplink_1_51_00_08/dsplink/gpp/src/ldrv/HAL/OMAP/3530/hal_intgen.c 2008-06-29 23:42:18.000000000 +0200
+@@ -17,6 +17,7 @@
+
+
+ /* ----------------------------------- OS headers */
++#include <linux/autoconf.h>
+ #include <asm/io.h>
+
+ /* ----------------------------------- DSP/BIOS Link */
+--- /tmp/hal_prcm.c 2008-06-29 23:42:05.000000000 +0200
++++ dsplink_1_51_00_08/dsplink/gpp/src/ldrv/HAL/OMAP/3530/hal_prcm.c 2008-06-29 23:43:10.000000000 +0200
+@@ -18,6 +18,7 @@
+
+
+ /* ----------------------------------- OS headers */
++#include <linux/autoconf.h>
+ #include <asm/io.h>
+
+ /* ----------------------------------- DSP/BIOS Link */
diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc
new file mode 100644
index 0000000000..877697eb99
--- /dev/null
+++ b/packages/dsplink/dsplink.inc
@@ -0,0 +1,87 @@
+DESCRIPTION = "DSP Link for TI ARM/DSP processors"
+
+DEPENDS = "virtual/kernel perl-native"
+RDEPENDS = "update-modules"
+
+inherit module
+
+S = "${WORKDIR}/dsplink_1_50/dsplink"
+
+# Needed for buildscripts
+export DSPLINK = "${S}"
+
+DSPLINKPLATFORM ?= "Davinci"
+
+DSPLINKPLATFORM_omap5912osk = "OMAP"
+DSPLINKPLATFORM_beagleboard = "OMAP"
+DSPLINKPLATFORM_davinci-sffsdr = "Davinci"
+DSPLINKPLATFORM_davinci-dvevm = "Davinci"
+
+DSPLINKDSP ?= "C64XX"
+DSPLINKSOC ?= "DM6446"
+
+DSPLINKSOC_beagleboard = "3530"
+
+export DSPLINKPLATFORM
+export DSPLINKDSP
+
+do_configure () {
+ cp ${WORKDIR}/CURRENTCFG.MK ${S}/config
+ cp ${WORKDIR}/davinci_mvlpro5.0.mk ${S}/make/Linux
+ cp ${WORKDIR}/c64xx_5.xx_linux.mk ${S}/make/DspBios
+
+ sed -i -e s:SED_ME_SOURCEDIR:${S}:g \
+ -e s:SED_ME_GPPDISTRO:davinci_mvlpro5\.0:g \
+ -e s:SED_ME_KERNELVERSION:${KERNEL_VERSION}:g \
+ -e s:SED_ME_DSPDISTRO:davinci_mvlpro5\.0:g \
+ -e s:SED_ME_PLATFORM:${DSPLINKPLATFORM}:g \
+ -e s:SED_ME_DSP:${DSPLINKDSP}:g \
+ -e s:SED_ME_SOC:${DSPLINKSOC}:g \
+ ${S}/config/CURRENTCFG.MK
+
+ sed -i -e s:SED_ME_CROSS:${STAGING_INCDIR}:g \
+ -e s:SED_ME_STAGINGDIR:${STAGING_DIR_TARGET}:g \
+ -e s:SED_ME_TARGET_PREFIX:${TARGET_PREFIX}:g \
+ -e s:SED_ME_KERNELDIR:${STAGING_KERNEL_DIR}:g \
+ ${S}/make/Linux/davinci_mvlpro5.0.mk
+
+}
+
+PARALLEL_MAKE = ""
+
+do_compile () {
+ ln -sf ${S}/gpp/src/api/*h ${S}/gpp/inc/
+ ln -sf ${S}/gpp/src/pmgr/Linux/2.6.18 ${S}/gpp/src/pmgr/Linux/${KERNEL_VERSION}
+ ln -sf ${S}/gpp/src/api/Linux/2.6.18 ${S}/gpp/src/api/Linux/${KERNEL_VERSION}
+ ln -sf ${S}/gpp/src/osal/Linux/2.6.18 ${S}/gpp/src/osal/Linux/${KERNEL_VERSION}
+ ln -sf ${S}/gpp/src/pmgr/Linux/drv_pmgr.h ${S}/gpp/inc/drv_pmgr.h
+ ln -sf ${S}/gpp/src/pmgr/pmgr_proc.h ${S}/gpp/inc/pmgr_proc.h
+
+ unset DISPLAY
+
+ oe_runmake -C ${S}/gpp/src all targets
+ oe_runmake -C ${S}/gpp/src/samples
+}
+
+do_install () {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ cp ${S}/gpp/BUILD/EXPORT/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/
+}
+
+pkg_postinst_${PN}-module () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm_${PN}-module () {
+ update-modules || true
+}
+
+PACKAGES =+ "${PN}-module"
+FILES_${PN}-module = "${sysconfdir} /lib/modules"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
diff --git a/packages/dsplink/dsplink_1.50.bb b/packages/dsplink/dsplink_1.50.bb
index 307d1836e1..b9664e7e5b 100644
--- a/packages/dsplink/dsplink_1.50.bb
+++ b/packages/dsplink/dsplink_1.50.bb
@@ -1,10 +1,8 @@
-DESCRIPTION = "DSP Link for TI ARM/DSP processors"
+require dsplink.inc
-DEPENDS = "virtual/kernel perl-native"
-
-inherit module-base
-
-PR = "r0"
+PR = "r3"
+PE = "1"
+PV = "1.50"
# Get dsplink tarball from TI website, place in sources and calculate
# md5sum
@@ -19,41 +17,4 @@ SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_50.tar.gz \
S = "${WORKDIR}/dsplink_1_50/dsplink"
-# Needed for buildscripts
-export DSPLINK = "${S}"
-
-do_configure () {
- cp ${WORKDIR}/CURRENTCFG.MK ${S}/config
- cp ${WORKDIR}/davinci_mvlpro5.0.mk ${S}/make/Linux
- cp ${WORKDIR}/c64xx_5.xx_linux.mk ${S}/make/DspBios
-
- sed -i -e s:SED_ME_SOURCEDIR:${S}:g \
- -e s:SED_ME_GPPDISTRO:davinci_mvlpro5\.0:g \
- -e s:SED_ME_KERNELVERSION:${KERNEL_VERSION}:g \
- -e s:SED_ME_DSPDISTRO:davinci_mvlpro5\.0:g \
- -e s:SED_ME_PLATFORM:Davinci:g \
- ${S}/config/CURRENTCFG.MK
-
- sed -i -e s:SED_ME_CROSS:${STAGING_INCDIR}:g \
- -e s:SED_ME_STAGINGDIR:${STAGING_DIR_TARGET}:g \
- -e s:SED_ME_TARGET_PREFIX:${TARGET_PREFIX}:g \
- -e s:SED_ME_KERNELDIR:${STAGING_KERNEL_DIR}:g \
- ${S}/make/Linux/davinci_mvlpro5.0.mk
-
-}
-
-PARALLEL_MAKE = ""
-
-do_compile () {
- ln -sf ${S}/gpp/src/api/*h ${S}/gpp/inc/
- ln -sf ${S}/gpp/src/pmgr/Linux/2.6.18 ${S}/gpp/src/pmgr/Linux/2.6.26-rc2-omap1
- ln -sf ${S}/gpp/src/pmgr/Linux/drv_pmgr.h ${S}/gpp/inc/drv_pmgr.h
- ln -sf ${S}/gpp/src/pmgr/pmgr_proc.h ${S}/gpp/inc/pmgr_proc.h
-
- unset DISPLAY
-
- oe_runmake -C ${S}/gpp/src
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/packages/dsplink/dsplink_1.51.00.08.bb b/packages/dsplink/dsplink_1.51.00.08.bb
new file mode 100644
index 0000000000..d79b5e655c
--- /dev/null
+++ b/packages/dsplink/dsplink_1.51.00.08.bb
@@ -0,0 +1,19 @@
+require dsplink.inc
+
+PR = "r0"
+PE = "1"
+PV = "1.51"
+
+# Get dsplink tarball from TI website, place in sources and calculate
+# md5sum
+# Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/link/index.html
+
+SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_51_00_08.tar.gz \
+ file://CURRENTCFG.MK \
+ file://c64xx_5.xx_linux.mk \
+ file://davinci_mvlpro5.0.mk \
+ file://prcs-fix-include.patch;patch=1;pnum=2 \
+"
+
+S = "${WORKDIR}/dsplink_1_51_00_08/dsplink"
+
diff --git a/packages/dsplink/files/CURRENTCFG.MK b/packages/dsplink/files/CURRENTCFG.MK
index ff109de482..1f932f2b77 100644
--- a/packages/dsplink/files/CURRENTCFG.MK
+++ b/packages/dsplink/files/CURRENTCFG.MK
@@ -47,8 +47,8 @@ export DSPPLATFORM := SED_ME_PLATFORM
# =========================================================
# Target GPP and DSP devices
# =========================================================
-export GPPDEVICE := Davinci
-export DSPDEVICE := C64XX
+export GPPDEVICE := SED_ME_PLATFORM
+export DSPDEVICE := SED_ME_DSP
# =========================================================
@@ -94,6 +94,6 @@ export PROBE := 0
# =========================================================
# Platform Variant
# =========================================================
-export VARIANT := DM6446
+export VARIANT := SED_ME_SOC
diff --git a/packages/dsplink/files/prcs-fix-include.patch b/packages/dsplink/files/prcs-fix-include.patch
index 12fcd5ec5d..421bd706f7 100644
--- a/packages/dsplink/files/prcs-fix-include.patch
+++ b/packages/dsplink/files/prcs-fix-include.patch
@@ -8,3 +8,43 @@
#include <linux/spinlock.h>
#include <linux/module.h>
#include <linux/mm.h>
+
+--- dvevm_1_00_00_32.orig/dsplink_1_30_07ce/packages/dsplink_dm420/gpp/src/osal/Linux/2.6/isr.c
++++ dsplink_1_50/dsplink/gpp/src/osal/Linux/2.6.18/isr.c
+@@ -130,7 +130,7 @@ struct IsrObject_tag {
+ */
+ STATIC
+ irqreturn_t
+-ISR_Callback (int irq, void * arg, struct pt_regs * flags) ;
++ISR_Callback (int irq, void * arg) ;
+
+
+ /* ============================================================================
+@@ -664,7 +664,7 @@ ISR_Debug ()
+ */
+ STATIC
+ irqreturn_t
+-ISR_Callback (int irq, void * arg, struct pt_regs * flags)
++ISR_Callback (int irq, void * arg)
+ {
+ DSP_STATUS status = DSP_SOK ;
+ IsrObject * isrObj = (IsrObject *) (arg) ;
+
+--- /tmp/mem.c 2008-06-22 16:05:16.000000000 +0200
++++ dsplink_1_50/dsplink/gpp/src/osal/Linux/2.6.18/mem.c 2008-06-22 16:05:43.000000000 +0200
+@@ -16,6 +16,7 @@
+
+
+ /* ----------------------------------- OS Specific Headers */
++
+ #include <linux/autoconf.h>
+ #include <linux/spinlock.h>
+ #if (defined(DM642_PCI) || defined (DM64LC_PCI))
+@@ -31,6 +32,7 @@
+ #endif /* if (defined(DM642_PCI) || defined (DM64LC_PCI)) */
+ #include <linux/vmalloc.h>
+ #include <asm/io.h>
++#include <linux/sched.h>
+
+ /* ----------------------------------- DSP/BIOS Link */
+ #include <dsplink.h>
diff --git a/packages/e17/e-wm/applications.menu b/packages/e17/e-wm/applications.menu
index 9cd933a240..032c6b7d26 100644
--- a/packages/e17/e-wm/applications.menu
+++ b/packages/e17/e-wm/applications.menu
@@ -62,10 +62,15 @@
<Name>Settings</Name>
<Directory>Settings.directory</Directory>
<Include>
- <Or>
- <Category>SystemSettings</Category>
- <Category>Settings</Category>
- </Or>
+ <And>
+ <Or>
+ <Category>SystemSettings</Category>
+ <Category>Settings</Category>
+ </Or>
+ <Not>
+ <Category>System</Category>
+ </Not>
+ </And>
</Include>
</Menu>
diff --git a/packages/e17/e-wm_cvs.bb b/packages/e17/e-wm_cvs.bb
index 41e27da46a..87161526e0 100644
--- a/packages/e17/e-wm_cvs.bb
+++ b/packages/e17/e-wm_cvs.bb
@@ -2,10 +2,12 @@ DESCRIPTION = "The Enlightenment Window Mananger Version 17"
DEPENDS = "eet evas ecore edje efreet"
LICENSE = "MIT BSD"
PV = "0.16.999.042+cvs${SRCDATE}"
-PR = "r5"
+PR = "r8"
inherit e update-alternatives
+RDEPENDS += "shared-mime-info mime-support"
+
SRC_URI = "${E_CVS};module=e17/apps/e \
file://disable-e-cursor.patch;patch=1 \
file://pkgconfig-fix.patch;patch=1;pnum=0;mindate=20080328;maxdate=20080401 \
@@ -58,6 +60,8 @@ FILES_${PN}-dev += "\
${libdir}/enlightenment/preload/*.?a \
"
+CONFFILES_${PN} = "/etc/xdg/menus/applications.menu"
+
ALTERNATIVE_PATH = "${bindir}/enlightenment_start.oe"
ALTERNATIVE_NAME = "x-window-manager"
ALTERNATIVE_LINK = "${bindir}/x-window-manager"
diff --git a/packages/e2fsprogs/e2fsprogs_1.38.bb b/packages/e2fsprogs/e2fsprogs_1.38.bb
index a586c1ab10..5ffc4598ad 100644
--- a/packages/e2fsprogs/e2fsprogs_1.38.bb
+++ b/packages/e2fsprogs/e2fsprogs_1.38.bb
@@ -1,6 +1,6 @@
require e2fsprogs.inc
-PR = "r12"
+PR = "r13"
SRC_URI += "file://no-hardlinks.patch;patch=1"
diff --git a/packages/efl1/epsilon_cvs.bb b/packages/efl1/epsilon_cvs.bb
index 906a60c2a4..b8b3033b99 100644
--- a/packages/efl1/epsilon_cvs.bb
+++ b/packages/efl1/epsilon_cvs.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Epsilon is a flexible and powerful image thumbnailing library \
that is compliant with the freedesktop.org Thumbnail Managing Standard."
LICENSE = "MIT BSD"
# can also depend on xine for movie thumbnails
-DEPENDS = "imlib2 epeg libpng evas ecore edje perl-native"
+DEPENDS = "libpng evas ecore edje perl-native"
PV = "0.3.0.012+cvs${SRCDATE}"
PR = "r0"
diff --git a/packages/eglibc/eglibc-stage.inc b/packages/eglibc/eglibc-stage.inc
index d4ddecfa4d..2b7b303c14 100644
--- a/packages/eglibc/eglibc-stage.inc
+++ b/packages/eglibc/eglibc-stage.inc
@@ -3,7 +3,7 @@ do_stage() {
oe_runmake 'install_root=${STAGING_DIR_HOST}' \
'includedir=${layout_includedir}' 'libdir=${layout_libdir}' 'slibdir=${layout_base_libdir}' \
'${STAGING_DIR_HOST}${layout_base_libdir}/libc.so.6' \
- install-headers install-lib install
+ install
install -d ${STAGING_INCDIR}/gnu \
${STAGING_INCDIR}/bits \
@@ -15,7 +15,4 @@ do_stage() {
h=`echo $r|sed -e's,\.x$,.h,'`
install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
done
- for i in libc.a libc_pic.a libc_nonshared.a; do
- install -m 0644 ${B}/$i ${STAGING_DIR_HOST}/${layout_base_libdir}/ || die "failed to install $i"
- done
}
diff --git a/packages/esound/esound_0.2.36.bb b/packages/esound/esound_0.2.36.bb
index 4f068113d5..388b52c7e3 100644
--- a/packages/esound/esound_0.2.36.bb
+++ b/packages/esound/esound_0.2.36.bb
@@ -3,12 +3,14 @@ SECTION = "gpe/base"
LICENSE = "GPL"
DEPENDS = "audiofile"
PE = "1"
-PR = "r2"
+PR = "r3"
inherit gnome binconfig
SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/esound/0.2/esound-0.2.36.tar.bz2 \
- file://no-docs.patch;patch=1"
+ https://launchpad.net/ubuntu/breezy/+source/esound/0.2.36-1ubuntu5/+files/esound_0.2.36-1ubuntu5.diff.gz;patch=1 \
+ file://no-docs.patch;patch=1 \
+ file://configure-fix.patch;patch=1"
EXTRA_OECONF = " \
--disable-alsa \
diff --git a/packages/esound/files/configure-fix.patch b/packages/esound/files/configure-fix.patch
new file mode 100644
index 0000000000..8fdc35ad5e
--- /dev/null
+++ b/packages/esound/files/configure-fix.patch
@@ -0,0 +1,10 @@
+--- /tmp/configure.ac 2008-06-02 16:46:55.640793306 +0200
++++ esound-0.2.36/configure.ac 2008-06-02 16:47:26.030793494 +0200
+@@ -29,6 +29,7 @@
+ AC_SUBST(pkgdocdir)
+
+ AC_PROG_CC
++AC_PROG_CXX
+ AC_PROG_CPP
+ AC_LIBTOOL_WIN32_DLL
+ AM_PROG_LIBTOOL
diff --git a/packages/exmap-console/exmap-console_0.4.1.bb b/packages/exmap-console/exmap-console_0.4.1.bb
index 17703321e8..e1ddf7de1f 100644
--- a/packages/exmap-console/exmap-console_0.4.1.bb
+++ b/packages/exmap-console/exmap-console_0.4.1.bb
@@ -1,3 +1,3 @@
require exmap-console.inc
-PR = "r4"
+PR = "r5"
diff --git a/packages/exmap-console/exmap-console_svn.bb b/packages/exmap-console/exmap-console_svn.bb
index 3d809703a5..6e86214b1c 100644
--- a/packages/exmap-console/exmap-console_svn.bb
+++ b/packages/exmap-console/exmap-console_svn.bb
@@ -1,6 +1,7 @@
require exmap-console.inc
PV = "0.4+svnr${SRCREV}"
+PR = "r1"
SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=exmap-console;proto=http"
diff --git a/packages/ezx/ezx-boot-usb-native.inc b/packages/ezx/ezx-boot-usb-native.inc
new file mode 100644
index 0000000000..e2ebb52df4
--- /dev/null
+++ b/packages/ezx/ezx-boot-usb-native.inc
@@ -0,0 +1,32 @@
+DESCRIPTION = "Boots a Motorola EZX device with a user supplied kernel zImage"
+DEPENDS = "libusb-native"
+SECTION = "devel"
+AUTHOR = "Harald Welte <laforge@openezx.org>"
+LICENSE = "GPL"
+
+SRC_URI = "\
+ svn://svn.openezx.org/trunk/src/host;module=boot_usb;proto=http \
+ file://asm-arm \
+"
+S = "${WORKDIR}/boot_usb"
+
+inherit native
+
+do_compile() {
+ ${CC} -I${WORKDIR} ${CFLAGS} ${LDFLAGS} -lusb -o ezx-boot-usb boot_usb.c
+}
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_TOOLS}
+ install -m 0755 ezx-boot-usb ${DEPLOY_DIR_TOOLS}/ezx-boot-usb-${PV}
+}
+
+do_stage() {
+ :
+}
+
+do_install() {
+ :
+}
+
+addtask deploy before do_build after do_compile
diff --git a/packages/ezx/ezx-boot-usb-native_0.1.0.bb b/packages/ezx/ezx-boot-usb-native_0.1.0.bb
index 5919f28a11..b70aca3709 100644
--- a/packages/ezx/ezx-boot-usb-native_0.1.0.bb
+++ b/packages/ezx/ezx-boot-usb-native_0.1.0.bb
@@ -1,30 +1,7 @@
-DESCRIPTION = "Boots an EZX device with a user supplied kernel zImage"
-DEPENDS = "libusb-native"
-SECTION = "devel"
-AUTHOR = "Harald Welte"
-LICENSE = "GPL"
+require ezx-boot-usb-native.inc
PR = "r0"
SRC_URI = "http://www.openezx.org/download/boot_usb-${PV}.tar.bz2"
S = "${WORKDIR}/boot_usb-${PV}"
inherit native
-
-do_compile() {
- ${CC} ${CFLAGS} ${LDFLAGS} -lusb -o ezx-boot-usb boot_usb.c
-}
-
-do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0755 ezx-boot-usb ${DEPLOY_DIR_IMAGE}/ezx-boot-usb
-}
-
-do_stage() {
- :
-}
-
-do_install() {
- :
-}
-
-addtask deploy before do_build after do_compile
diff --git a/packages/ezx/ezx-boot-usb-native_0.2.0.bb b/packages/ezx/ezx-boot-usb-native_0.2.0.bb
index 6091e36d11..7c2883b5b7 100644
--- a/packages/ezx/ezx-boot-usb-native_0.2.0.bb
+++ b/packages/ezx/ezx-boot-usb-native_0.2.0.bb
@@ -1,31 +1,5 @@
-DESCRIPTION = "Boots a Motorola EZX device with a user supplied kernel zImage"
-DEPENDS = "libusb-native"
-SECTION = "devel"
-AUTHOR = "Team OpenEZX <openezx-devel@lists.openezx.org>"
-LICENSE = "GPL"
-PR = "r0"
+require ezx-boot-usb-native.inc
SRC_URI = "http://www.openezx.org/download/boot_usb-${PV}.tar.bz2 \
file://asm-arm"
S = "${WORKDIR}/boot_usb-${PV}"
-
-inherit native
-
-do_compile() {
- ${CC} ${CFLAGS} -I${WORKDIR} ${LDFLAGS} -lusb -o ezx-boot-usb boot_usb.c
-}
-
-do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0755 ezx-boot-usb ${DEPLOY_DIR_IMAGE}/ezx-boot-usb
-}
-
-do_stage() {
- :
-}
-
-do_install() {
- :
-}
-
-addtask deploy before do_build after do_compile
diff --git a/packages/ezx/ezx-boot-usb-native_svn.bb b/packages/ezx/ezx-boot-usb-native_svn.bb
index 64e8a486e0..6ab4263dba 100644
--- a/packages/ezx/ezx-boot-usb-native_svn.bb
+++ b/packages/ezx/ezx-boot-usb-native_svn.bb
@@ -1,35 +1,5 @@
-DESCRIPTION = "Boots an EZX device with a user supplied kernel zImage"
-DEPENDS = "libusb-native"
-SECTION = "devel"
-AUTHOR = "Harald Welte"
-LICENSE = "GPL"
-PR = "r1"
+require ezx-boot-usb-native.inc
DEFAULT_PREFERENCE = "-1"
-REV = "1922"
-PV = "0.1.0+r${REV}"
-
-SRC_URI = "svn://svn.openezx.org/trunk/src/host;module=boot_usb;proto=http;rev=${REV}"
-S = "${WORKDIR}/boot_usb"
-
-inherit native
-
-do_compile() {
- ${CC} ${CFLAGS} ${LDFLAGS} -lusb -o ezx-boot-usb boot_usb.c
-}
-
-do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0755 ezx-boot-usb ${DEPLOY_DIR_IMAGE}/ezx-boot-usb
-}
-
-do_stage() {
- :
-}
-
-do_install() {
- :
-}
-
-addtask deploy before do_build after do_compile
+PV = "0.2.0+r${SRCREV}"
diff --git a/packages/fakeroot/fakeroot-native_1.2.13.bb b/packages/fakeroot/fakeroot-native_1.2.13.bb
deleted file mode 100644
index 9d48d65229..0000000000
--- a/packages/fakeroot/fakeroot-native_1.2.13.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SECTION = "base"
-PR = "r0"
-require fakeroot_${PV}.bb
-inherit native
-RDEPENDS="util-linux-native"
-
-SRC_URI += "file://fix-prefix.patch;patch=1"
-S = "${WORKDIR}/fakeroot-${PV}"
-
-EXTRA_OECONF = " --program-prefix="
-
-# Compatability for the rare systems not using or having SYSV
-python () {
- if bb.data.getVar('HOST_NONSYSV', d, True) and bb.data.getVar('HOST_NONSYSV', d, True) != '0':
- bb.data.setVar('EXTRA_OECONF', ' --with-ipc=tcp --program-prefix= ', d)
-}
-
-do_stage_append () {
- oe_libinstall -so libfakeroot ${STAGING_LIBDIR}/libfakeroot/
-}
diff --git a/packages/fakeroot/fakeroot-native_1.7.1.bb b/packages/fakeroot/fakeroot-native_1.7.1.bb
index 8b3d2a1590..8a54d6497c 100644
--- a/packages/fakeroot/fakeroot-native_1.7.1.bb
+++ b/packages/fakeroot/fakeroot-native_1.7.1.bb
@@ -1,7 +1,6 @@
-SECTION = "base"
require fakeroot_${PV}.bb
inherit native
-RDEPENDS="util-linux-native"
+RDEPENDS = "util-linux-native"
SRC_URI += "file://fix-prefix.patch;patch=1 "
S = "${WORKDIR}/fakeroot-${PV}"
@@ -17,4 +16,3 @@ python () {
do_stage_append () {
oe_libinstall -so libfakeroot ${STAGING_LIBDIR}/libfakeroot/
}
-
diff --git a/packages/fakeroot/fakeroot-native_1.9.4.bb b/packages/fakeroot/fakeroot-native_1.9.5.bb
index 77d6f58651..77d6f58651 100644
--- a/packages/fakeroot/fakeroot-native_1.9.4.bb
+++ b/packages/fakeroot/fakeroot-native_1.9.5.bb
diff --git a/packages/fakeroot/fakeroot_1.2.13.bb b/packages/fakeroot/fakeroot_1.2.13.bb
deleted file mode 100644
index e29cf162b4..0000000000
--- a/packages/fakeroot/fakeroot_1.2.13.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-DESCRIPTION = "Gives a fake root environment"
-HOMEPAGE = "http://joostje.op.het.net/fakeroot/index.html"
-SECTION = "base"
-LICENSE = "GPL"
-# fakeroot needs getopt which is provided by the util-linux package
-RDEPENDS = "util-linux"
-PR = "r1"
-
-SRC_URI = "http://openzaurus.org/mirror/fakeroot_${PV}.tar.gz"
-
-inherit autotools
-
-do_stage() {
- install -d ${STAGING_INCDIR}/fakeroot
- install -m 644 *.h ${STAGING_INCDIR}/fakeroot
- autotools_stage_all
-}
diff --git a/packages/fakeroot/fakeroot_1.7.1.bb b/packages/fakeroot/fakeroot_1.7.1.bb
index 803b5f3ff4..ea3806d2f5 100644
--- a/packages/fakeroot/fakeroot_1.7.1.bb
+++ b/packages/fakeroot/fakeroot_1.7.1.bb
@@ -5,8 +5,10 @@ LICENSE = "GPL"
RDEPENDS = "util-linux"
PR = "r2"
-SRC_URI = "ftp://ftp.debian.org/debian/pool/main/f/fakeroot/fakeroot_${PV}.tar.gz \
- file://work-with-older-libtool.patch;patch=1"
+SRC_URI = "\
+ ftp://ftp.gentoo.mesh-solutions.com/mirrors/gentoo/distfiles/fakeroot_1.7.1.tar.gz \
+ file://work-with-older-libtool.patch;patch=1 \
+"
inherit autotools
diff --git a/packages/fakeroot/fakeroot_1.9.4.bb b/packages/fakeroot/fakeroot_1.9.5.bb
index aaf696d79d..aaf696d79d 100644
--- a/packages/fakeroot/fakeroot_1.9.4.bb
+++ b/packages/fakeroot/fakeroot_1.9.5.bb
diff --git a/packages/obsolete/classpath/files/.mtn2git_empty b/packages/fetchmail/fetchmail-6.3.8/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/obsolete/classpath/files/.mtn2git_empty
+++ b/packages/fetchmail/fetchmail-6.3.8/.mtn2git_empty
diff --git a/packages/fetchmail/fetchmail-6.3.8/CVE-2007-4565.patch b/packages/fetchmail/fetchmail-6.3.8/CVE-2007-4565.patch
new file mode 100644
index 0000000000..d0926848c2
--- /dev/null
+++ b/packages/fetchmail/fetchmail-6.3.8/CVE-2007-4565.patch
@@ -0,0 +1,11 @@
+--- fetchmail-6.3.8-orig/sink.c
++++ fetchmail-6.3.8/sink.c
+@@ -262,7 +262,7 @@
+ const char *md1 = "MAILER-DAEMON", *md2 = "MAILER-DAEMON@";
+
+ /* don't bounce in reply to undeliverable bounces */
+- if (!msg->return_path[0] ||
++ if (!msg || !msg->return_path[0] ||
+ strcmp(msg->return_path, "<>") == 0 ||
+ strcasecmp(msg->return_path, md1) == 0 ||
+ strncasecmp(msg->return_path, md2, strlen(md2)) == 0)
diff --git a/packages/fetchmail/fetchmail_6.3.8.bb b/packages/fetchmail/fetchmail_6.3.8.bb
new file mode 100644
index 0000000000..9b789aae25
--- /dev/null
+++ b/packages/fetchmail/fetchmail_6.3.8.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "Fetchmail is a free, full-featured, robust, \
+well-documented remote-mail retrieval and forwarding utility \
+intended to be used over on-demand TCP/IP links \
+(such as SLIP or PPP connections)."
+SECTION = "console/network"
+
+LICENSE = "GPL"
+
+PR = "r2"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/f/${PN}/${PN}_${PV}.orig.tar.gz \
+ file://CVE-2007-4565.patch;patch=1 \
+ "
+
+inherit autotools gettext
+
+FILES_${PN} = "${bindir}/fetchmail"
+PACKAGES += "${PN}conf"
+FILES_${PN}conf = "${libdir}/python2.5/site-packages/fetchmailconf.py* ${bindir}/fetchmailconf"
+rdepends_${PN}conf = "${PN}"
diff --git a/packages/fftw/fftw_3.2.bb b/packages/fftw/fftw_3.2.bb
new file mode 100644
index 0000000000..f3fd888ab7
--- /dev/null
+++ b/packages/fftw/fftw_3.2.bb
@@ -0,0 +1,11 @@
+require fftw.inc
+
+PV = "3.1.2+3.2alpha3"
+
+SRC_URI = "http://www.fftw.org/fftw-3.2alpha3.tar.gz"
+
+S = "${WORKDIR}/fftw-3.2alpha3"
+
+EXTRA_OECONF = "--disable-fortran --enable-shared"
+
+
diff --git a/packages/fftw/fftwf_3.2.bb b/packages/fftw/fftwf_3.2.bb
new file mode 100644
index 0000000000..5d84b31505
--- /dev/null
+++ b/packages/fftw/fftwf_3.2.bb
@@ -0,0 +1,11 @@
+require fftw.inc
+
+PV = "3.1.2+3.2alpha3"
+
+SRC_URI = "http://www.fftw.org/fftw-3.2alpha3.tar.gz"
+
+S = "${WORKDIR}/fftw-3.2alpha3"
+
+EXTRA_OECONF = "--disable-fortran --enable-single --enable-shared"
+
+
diff --git a/packages/fftw/fftwl_3.2.bb b/packages/fftw/fftwl_3.2.bb
new file mode 100644
index 0000000000..44f014687e
--- /dev/null
+++ b/packages/fftw/fftwl_3.2.bb
@@ -0,0 +1,11 @@
+require fftw.inc
+
+PV = "3.1.2+3.2alpha3"
+
+SRC_URI = "http://www.fftw.org/fftw-3.2alpha3.tar.gz"
+
+S = "${WORKDIR}/fftw-3.2alpha3"
+
+EXTRA_OECONF = "--disable-fortran --enable-long-double --enable-shared"
+
+
diff --git a/packages/obsolete/jamvm/.mtn2git_empty b/packages/fltk/files/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/obsolete/jamvm/.mtn2git_empty
+++ b/packages/fltk/files/.mtn2git_empty
diff --git a/packages/fltk/files/disable_test.patch b/packages/fltk/files/disable_test.patch
new file mode 100644
index 0000000000..8c01a1f806
--- /dev/null
+++ b/packages/fltk/files/disable_test.patch
@@ -0,0 +1,13 @@
+Index: fltk-1.1.9/Makefile
+===================================================================
+--- fltk-1.1.9.orig/Makefile 2008-06-06 16:14:11.936736201 +0200
++++ fltk-1.1.9/Makefile 2008-06-06 16:14:22.526357637 +0200
+@@ -27,7 +27,7 @@
+
+ include makeinclude
+
+-DIRS = $(IMAGEDIRS) src fluid test documentation
++DIRS = $(IMAGEDIRS) src fluid documentation
+
+ all: makeinclude fltk-config
+ for dir in $(DIRS); do\
diff --git a/packages/fltk/fltk_1.1.9.bb b/packages/fltk/fltk_1.1.9.bb
new file mode 100644
index 0000000000..a2c5dcb5ab
--- /dev/null
+++ b/packages/fltk/fltk_1.1.9.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "FLTK is a cross-platform C++ GUI toolkit"
+HOMEPAGE = "http://www.fltk.org"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
+PR = "r0"
+
+SRC_URI = "ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/fltk/${PV}/fltk-${PV}-source.tar.bz2 \
+ file://disable_test.patch;patch=1 \
+ "
+
+S = "${WORKDIR}/fltk-${PV}"
+
+inherit lib_package autotools binconfig
+
+EXTRA_OECONF = "--enable-shared \
+ --enable-threads \
+ --enable-xdbe --enable-xft --enable-gl \
+ --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}"
+
+do_configure() {
+ oe_runconf
+}
+
+do_stage() {
+ autotools_stage_all
+}
+
+python populate_packages_prepend () {
+ if (bb.data.getVar('DEBIAN_NAMES', d, 1)):
+ bb.data.setVar('PKG_${PN}', 'libfltk${PV}', d)
+}
+
+LEAD_SONAME = "libfltk.so"
diff --git a/packages/fluxbox/fluxbox_0.99+1.0rc.bb b/packages/fluxbox/fluxbox_0.99+1.0rc.bb
index 93c82025cf..d3bfda7595 100644
--- a/packages/fluxbox/fluxbox_0.99+1.0rc.bb
+++ b/packages/fluxbox/fluxbox_0.99+1.0rc.bb
@@ -7,7 +7,7 @@ LICENSE = "MIT"
REALPV = "1.0rc"
PV = "0.99+${REALPV}"
-PR = "r0"
+PR = "r1"
PE = "1"
diff --git a/packages/fluxbox/fluxbox_svn.bb b/packages/fluxbox/fluxbox_svn.bb
index bc791bf0e2..4bef6d82e2 100644
--- a/packages/fluxbox/fluxbox_svn.bb
+++ b/packages/fluxbox/fluxbox_svn.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://fluxbox.sourceforge.net"
LICENSE = "MIT"
PV = "0.99+svn${SRCDATE}"
-PR = "r0"
+PR = "r1"
PE = "1"
SRC_URI = "svn://svn.berlios.de/fluxbox;module=trunk \
diff --git a/packages/obsolete/jamvm/files/.mtn2git_empty b/packages/fontconfig/fontconfig-2.4.1/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/obsolete/jamvm/files/.mtn2git_empty
+++ b/packages/fontconfig/fontconfig-2.4.1/.mtn2git_empty
diff --git a/packages/fontconfig/fontconfig-2.4.1/configure_fix.patch b/packages/fontconfig/fontconfig-2.4.1/configure_fix.patch
new file mode 100644
index 0000000000..6d6fa25b5a
--- /dev/null
+++ b/packages/fontconfig/fontconfig-2.4.1/configure_fix.patch
@@ -0,0 +1,14 @@
+Libtool 2.2.2 requires this is used with AC_SUBST
+
+RP - 14/4/08
+
+--- /tmp/configure.in 2008-06-02 15:21:22.254641651 +0200
++++ fontconfig-2.4.1/configure.in 2008-06-02 15:21:48.485061892 +0200
+@@ -46,6 +46,7 @@
+ AC_SUBST(LT_CURRENT)
+ AC_SUBST(LT_REVISION)
+ LT_AGE=1
++AC_SUBST(LT_AGE)
+
+ LT_VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
+ AC_SUBST(LT_VERSION_INFO)
diff --git a/packages/fontconfig/fontconfig_2.4.1.bb b/packages/fontconfig/fontconfig_2.4.1.bb
index 0e6e008f42..c1d861cfb9 100644
--- a/packages/fontconfig/fontconfig_2.4.1.bb
+++ b/packages/fontconfig/fontconfig_2.4.1.bb
@@ -1,8 +1,9 @@
require fontconfig.inc
-PR = "r2"
+PR = "r3"
-SRC_URI += "https://stage.maemo.org/svn/maemo/projects/haf/trunk/fontconfig/device_symbols.h"
+SRC_URI += "https://stage.maemo.org/svn/maemo/projects/haf/trunk/fontconfig/device_symbols.h \
+ file://configure_fix.patch;patch=1 "
EXTRA_OECONF += " --with-arch=${HOST_ARCH}"
diff --git a/packages/obsolete/jamvm/jamvm-1.3.0/.mtn2git_empty b/packages/freesmartphone/frameworkd/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/obsolete/jamvm/jamvm-1.3.0/.mtn2git_empty
+++ b/packages/freesmartphone/frameworkd/.mtn2git_empty
diff --git a/packages/freesmartphone/frameworkd/frameworkd b/packages/freesmartphone/frameworkd/frameworkd
new file mode 100644
index 0000000000..08b782e402
--- /dev/null
+++ b/packages/freesmartphone/frameworkd/frameworkd
@@ -0,0 +1,40 @@
+#! /bin/sh
+#
+# frameworkd -- This shell script starts and stops the freemsmartphone.org framework daemon.
+#
+# chkconfig: 345 90 20
+# description: frameworkd is the freesmartphone.org framework daemon
+# processname: python
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=frameworkd
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+ start)
+ echo -n "Starting freesmartphone.org framework daemon: "
+ start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/bin/frameworkd
+ if [ $? = 0 ]; then
+ echo "(ok)"
+ else
+ echo "(failed)"
+ fi
+ ;;
+ stop)
+ echo -n "Stopping freesmartphone.org framework daemon: "
+ start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo
+ rm -f /var/run/${NAME}.pid
+ echo "(done)"
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/odeviced {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packages/freesmartphone/frameworkd/frameworkd.conf b/packages/freesmartphone/frameworkd/frameworkd.conf
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/packages/freesmartphone/frameworkd/frameworkd.conf
@@ -0,0 +1 @@
+
diff --git a/packages/olsr/.mtn2git_empty b/packages/freesmartphone/frameworkd/om-gta02/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/olsr/.mtn2git_empty
+++ b/packages/freesmartphone/frameworkd/om-gta02/.mtn2git_empty
diff --git a/packages/freesmartphone/frameworkd/om-gta02/frameworkd.conf b/packages/freesmartphone/frameworkd/om-gta02/frameworkd.conf
new file mode 100644
index 0000000000..b38425129f
--- /dev/null
+++ b/packages/freesmartphone/frameworkd/om-gta02/frameworkd.conf
@@ -0,0 +1,15 @@
+[idlenotifier]
+# don't read from accellerometers for GTA02
+ignoreinput=2,3
+
+[input]
+# don't read from accellerometers for GTA02
+ignoreinput=2,3
+
+[ophoned]
+# GTA02 has TI Calypso
+modemtype = ti_calypso
+
+[opreferencesd]
+rootdir =
+../etc/freesmartphone/opreferences:/etc/freesmartphone/opreferences:/usr/etc/freesmartphone/opreferences
diff --git a/packages/freesmartphone/frameworkd_git.bb b/packages/freesmartphone/frameworkd_git.bb
new file mode 100644
index 0000000000..ea3a4cb652
--- /dev/null
+++ b/packages/freesmartphone/frameworkd_git.bb
@@ -0,0 +1,38 @@
+DESCRIPTION = "The freesmartphon.org Framework Daemon"
+HOMEPAGE = "http://www.freesmartphone.org"
+AUTHOR = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
+SECTION = "console/network"
+DEPENDS = "python-cython-native python-pyrex-native"
+LICENSE = "GPL"
+PV = "0.8.0+gitr${SRCREV}"
+PR = "r2"
+
+inherit distutils update-rc.d
+
+INITSCRIPT_NAME = "frameworkd"
+INITSCRIPT_PARAMS = "defaults 29"
+
+SRC_URI = "${FREESMARTPHONE_GIT}/framework.git;protocol=git;branch=master \
+ file://frameworkd \
+ file://frameworkd.conf"
+S = "${WORKDIR}/git"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/frameworkd ${D}${sysconfdir}/init.d/
+ install -m 0644 ${WORKDIR}/frameworkd.conf ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}/dbus-1/system.d/
+ mv -f ${D}${datadir}/etc/dbus-1/system.d/frameworkd.conf ${D}${sysconfdir}/dbus-1/system.d/
+}
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-pygobject \
+ python-pyrtc \
+ python-pyserial \
+ python-shell \
+ python-syslog \
+"
+
+FILES_${PN} += "${sysconfdir}"
+FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/framework/subsystems/*/.debug"
diff --git a/packages/freesmartphone/fso-sounds.bb b/packages/freesmartphone/fso-sounds.bb
new file mode 100644
index 0000000000..9c42ada539
--- /dev/null
+++ b/packages/freesmartphone/fso-sounds.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "A set of notification sounds"
+LICENSE = "PD"
+SECTION = "multimedia"
+PV = "0.0.0"
+PR = "r0"
+
+SRC_URI = "http://gallium.prg.dtu.dk/HVSC/C64Music/MUSICIANS/G/Galway_Martin/Arkanoid_PSID.sid"
+
+do_install() {
+ install -d ${D}${datadir}/sounds/
+ install ${WORKDIR}/*.sid ${D}${datadir}/sounds/
+}
+
+FILES_${PN} = "${datadir}"
+PACKAGE_ARCH = "all"
diff --git a/packages/freesmartphone/gsmd2_git.bb b/packages/freesmartphone/gsmd2_git.bb
new file mode 100644
index 0000000000..6c327ede30
--- /dev/null
+++ b/packages/freesmartphone/gsmd2_git.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "GSM 07.07 phone server"
+HOMEPAGE = "http://www.freesmartphone.org/mediawiki/index.php/Implementations/gsm0710muxd"
+AUTHOR = "Ixonos Team"
+SECTION = "console/network"
+DEPENDS = "dbus dbus-glib"
+RDEPENDS = "gsm0710muxd"
+LICENSE = "GPL"
+PV = "0.1.0+gitr${SRCREV}"
+PR = "r0"
+
+SRC_URI = "${FREESMARTPHONE_GIT}/gsmd2.git;protocol=git;branch=master"
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-tests"
+
diff --git a/packages/freesmartphone/python-odeviced/om-gta02/odeviced.conf b/packages/freesmartphone/python-odeviced/om-gta02/odeviced.conf
index b2f979a784..0076639f98 100644
--- a/packages/freesmartphone/python-odeviced/om-gta02/odeviced.conf
+++ b/packages/freesmartphone/python-odeviced/om-gta02/odeviced.conf
@@ -2,3 +2,7 @@
# don't read from accellerometers for now
ignoreinput=2,3
+[input]
+# don't read from accellerometers for now
+ignoreinput=2,3
+
diff --git a/packages/freesmartphone/python-odeviced_git.bb b/packages/freesmartphone/python-odeviced_git.bb
index d380473878..121a434585 100644
--- a/packages/freesmartphone/python-odeviced_git.bb
+++ b/packages/freesmartphone/python-odeviced_git.bb
@@ -5,12 +5,12 @@ SECTION = "console/network"
DEPENDS = "python-cython-native python-pyrex-native"
LICENSE = "GPLv2"
PV = "0.7.9+gitr${SRCREV}"
-PR = "r0"
+PR = "r2"
inherit distutils update-rc.d
INITSCRIPT_NAME = "odeviced"
-INITSCRIPT_PARAMS = "defaults 20"
+INITSCRIPT_PARAMS = "defaults 21"
SRC_URI = "${FREESMARTPHONE_GIT}/python-odeviced.git;protocol=git;branch=master \
file://odeviced \
diff --git a/packages/opie-dasher/.mtn2git_empty b/packages/freesmartphone/python-oeventd/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/opie-dasher/.mtn2git_empty
+++ b/packages/freesmartphone/python-oeventd/.mtn2git_empty
diff --git a/packages/freesmartphone/python-oeventd/oeventd b/packages/freesmartphone/python-oeventd/oeventd
new file mode 100644
index 0000000000..8ed467b079
--- /dev/null
+++ b/packages/freesmartphone/python-oeventd/oeventd
@@ -0,0 +1,40 @@
+#! /bin/sh
+#
+# odeviced This shell script starts and stops the open event daemon.
+#
+# chkconfig: 345 90 20
+# description: py-oeventd is the open evend daemon
+# processname: python
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=oeventd
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+ start)
+ echo -n "Starting open event daemon: "
+ start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/bin/oeventd
+ if [ $? = 0 ]; then
+ echo "(ok)"
+ else
+ echo "(failed)"
+ fi
+ ;;
+ stop)
+ echo -n "Stopping open event daemon: "
+ start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo
+ rm -f /var/run/${NAME}.pid
+ echo "(done)"
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/oeventd {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packages/freesmartphone/python-oeventd_git.bb b/packages/freesmartphone/python-oeventd_git.bb
new file mode 100644
index 0000000000..c08e1af3b7
--- /dev/null
+++ b/packages/freesmartphone/python-oeventd_git.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "The Open Event Daemon Prototype in Python"
+HOMEPAGE = "http://www.freesmartphone.org/mediawiki/index.php/Implementations/OpenEventDaemon"
+AUTHOR = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
+SECTION = "console/network"
+DEPENDS = "python-cython-native python-pyrex-native"
+LICENSE = "GPLv2"
+PV = "0.0.0+gitr${SRCREV}"
+PR = "r1"
+
+inherit distutils update-rc.d
+
+INITSCRIPT_NAME = "oeventd"
+INITSCRIPT_PARAMS = "defaults 21"
+
+SRC_URI = "\
+ ${FREESMARTPHONE_GIT}/eventd.git;protocol=git;branch=master \
+ file://oeventd \
+"
+S = "${WORKDIR}/git"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/oeventd ${D}${sysconfdir}/init.d/
+ install -d ${D}${sysconfdir}/dbus-1/system.d/
+ mv -f ${D}${datadir}/etc/dbus-1/system.d/oeventd.conf ${D}${sysconfdir}/dbus-1/system.d/
+}
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-pygobject \
+ python-syslog \
+"
+
+FILES_${PN} += "${sysconfdir}"
diff --git a/packages/freesmartphone/python-ophoned_git.bb b/packages/freesmartphone/python-ophoned_git.bb
index 0a1c802041..7f30f4c24a 100644
--- a/packages/freesmartphone/python-ophoned_git.bb
+++ b/packages/freesmartphone/python-ophoned_git.bb
@@ -5,12 +5,12 @@ SECTION = "console/network"
DEPENDS = "python-cython-native python-pyrex-native"
LICENSE = "GPLv2"
PV = "0.0.0+gitr${SRCREV}"
-PR = "r0"
+PR = "r1"
inherit distutils update-rc.d
INITSCRIPT_NAME = "ophoned"
-INITSCRIPT_PARAMS = "defaults 20"
+INITSCRIPT_PARAMS = "defaults 21"
SRC_URI = "${FREESMARTPHONE_GIT}/python-ophoned.git;protocol=git;branch=master \
file://ophoned"
diff --git a/packages/freesmartphone/python-ousaged_git.bb b/packages/freesmartphone/python-ousaged_git.bb
index f9ba2856eb..1188da34a3 100644
--- a/packages/freesmartphone/python-ousaged_git.bb
+++ b/packages/freesmartphone/python-ousaged_git.bb
@@ -5,12 +5,12 @@ SECTION = "console/network"
DEPENDS = "python-cython-native python-pyrex-native"
LICENSE = "GPLv2"
PV = "0.7.9+gitr${SRCREV}"
-PR = "r0"
+PR = "r1"
inherit distutils update-rc.d
INITSCRIPT_NAME = "ousaged"
-INITSCRIPT_PARAMS = "defaults 20"
+INITSCRIPT_PARAMS = "defaults 21"
SRC_URI = "\
${FREESMARTPHONE_GIT}/usaged.git;protocol=git;branch=master \
diff --git a/packages/freesmartphone/zhone/80zhone b/packages/freesmartphone/zhone/80zhone
index 4a698007b8..90a1e95b39 100644
--- a/packages/freesmartphone/zhone/80zhone
+++ b/packages/freesmartphone/zhone/80zhone
@@ -1,4 +1,4 @@
#!/bin/sh -e
-zhone --fullscreen > /dev/null 2>&1 &
+zhone --fullscreen > /tmp/zhone.log 2>&1 &
renice -3 $!
exit 0
diff --git a/packages/freesmartphone/zhone_git.bb b/packages/freesmartphone/zhone_git.bb
index 513b06f35a..c9411a58c3 100644
--- a/packages/freesmartphone/zhone_git.bb
+++ b/packages/freesmartphone/zhone_git.bb
@@ -4,7 +4,7 @@ SECTION = "x11"
DEPENDS = "edje-native"
RDEPENDS = "task-python-efl python-textutils python-dbus"
PV = "0.0.0+gitr${SRCREV}"
-PR = "r4"
+PR = "r5"
SRC_URI = "${FREESMARTPHONE_GIT}/zhone.git;protocol=git;branch=master \
file://80zhone"
@@ -19,5 +19,5 @@ do_install_append() {
FILES_${PN} += "${datadir} ${sysconfdir}"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
+PACKAGE_ARCH = "all"
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/.mtn2git_empty b/packages/freetype/freetype-2.3.6/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/.mtn2git_empty
+++ b/packages/freetype/freetype-2.3.6/.mtn2git_empty
diff --git a/packages/freetype/freetype-2.3.6/fix-configure.patch b/packages/freetype/freetype-2.3.6/fix-configure.patch
new file mode 100644
index 0000000000..ecd96738d4
--- /dev/null
+++ b/packages/freetype/freetype-2.3.6/fix-configure.patch
@@ -0,0 +1,13 @@
+Index: freetype-2.3.6/builds/unix/configure.ac
+===================================================================
+--- freetype-2.3.6.orig/builds/unix/configure.ac
++++ freetype-2.3.6/builds/unix/configure.ac
+@@ -506,8 +506,6 @@ AC_SUBST([FT2_EXTRA_LIBS])
+ AC_SUBST([SYSTEM_ZLIB])
+
+
+-LT_INIT(win32-dll)
+-
+ AC_SUBST([hardcode_libdir_flag_spec])
+ AC_SUBST([wl])
+ AC_SUBST([build_libtool_libs])
diff --git a/packages/freetype/freetype-native_2.3.6.bb b/packages/freetype/freetype-native_2.3.6.bb
new file mode 100644
index 0000000000..b5e8b307cd
--- /dev/null
+++ b/packages/freetype/freetype-native_2.3.6.bb
@@ -0,0 +1,21 @@
+require freetype_${PV}.bb
+inherit native
+DEPENDS = ""
+FILESPATH = "${FILE_DIRNAME}/freetype-${PV}:${FILE_DIRNAME}/freetype:${FILE_DIRNAME}/files"
+
+EXTRA_OEMAKE=
+
+do_configure() {
+ (cd builds/unix && gnu-configize) || die "failure running gnu-configize"
+ oe_runconf
+}
+
+do_stage() {
+ autotools_stage_includes
+ oe_libinstall -so -a -C objs libfreetype ${STAGING_LIBDIR}
+}
+
+do_install() {
+ :
+}
+
diff --git a/packages/freetype/freetype_2.3.5.bb b/packages/freetype/freetype_2.3.5.bb
index 33ca61d15a..80fb2b9ae4 100644
--- a/packages/freetype/freetype_2.3.5.bb
+++ b/packages/freetype/freetype_2.3.5.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Freetype font rendering library"
SECTION = "libs"
LICENSE = "freetype"
-PR = "r2"
+PR = "r3"
SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
file://fix-x86_64-build.patch;patch=1 \
@@ -18,7 +18,8 @@ EXTRA_OECONF = "--without-zlib"
do_configure() {
cd builds/unix
- gnu-configize
+ libtoolize --force --copy
+ gnu-configize --force
aclocal -I .
autoconf
cd ${S}
diff --git a/packages/freetype/freetype_2.3.6.bb b/packages/freetype/freetype_2.3.6.bb
new file mode 100644
index 0000000000..516354ad23
--- /dev/null
+++ b/packages/freetype/freetype_2.3.6.bb
@@ -0,0 +1,40 @@
+DESCRIPTION = "Freetype font rendering library"
+SECTION = "libs"
+LICENSE = "freetype"
+PR = "r0"
+
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
+ file://no-hardcode.patch;patch=1 \
+ file://fix-configure.patch;patch=1 \
+"
+S = "${WORKDIR}/freetype-${PV}"
+
+inherit autotools pkgconfig binconfig
+
+LIBTOOL = "${HOST_SYS}-libtool"
+EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'"
+EXTRA_OECONF = "--without-zlib"
+
+do_configure() {
+ cd builds/unix
+ libtoolize --force --copy
+ gnu-configize --force
+ aclocal -I .
+ autoconf
+ cd ${S}
+ oe_runconf
+}
+
+do_compile_prepend() {
+ ${BUILD_CC} -o objs/apinames src/tools/apinames.c
+}
+
+do_stage() {
+ export LIBTOOL='${LIBTOOL}'
+ autotools_stage_all
+ oe_libinstall -so -a -C objs libfreetype ${STAGING_LIBDIR}
+}
+
+FILES_${PN} = "${libdir}/lib*.so.*"
+FILES_${PN}-dev += "${bindir}"
diff --git a/packages/gcc/gcc-3.4.3/zecke-xgcc-cpp.patch b/packages/gcc/gcc-3.4.3/zecke-xgcc-cpp.patch
index 08e7a3124d..030bdfec96 100644
--- a/packages/gcc/gcc-3.4.3/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-3.4.3/zecke-xgcc-cpp.patch
@@ -9,7 +9,7 @@ Index: gcc-3.4.3/Makefile.in
AS="$(AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
-+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
+ CPPFLAGS=""; export CPPFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
diff --git a/packages/gcc/gcc-3.4.4/zecke-xgcc-cpp.patch b/packages/gcc/gcc-3.4.4/zecke-xgcc-cpp.patch
index ab6a3fd771..ea3dc5f4a0 100644
--- a/packages/gcc/gcc-3.4.4/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-3.4.4/zecke-xgcc-cpp.patch
@@ -6,7 +6,7 @@ Index: gcc-3.4.4/Makefile.in
AS="$(AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
-+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
+ CPPFLAGS=""; export CPPFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
diff --git a/packages/gcc/gcc-3.4.6/zecke-xgcc-cpp.patch b/packages/gcc/gcc-3.4.6/zecke-xgcc-cpp.patch
index ab6a3fd771..ea3dc5f4a0 100644
--- a/packages/gcc/gcc-3.4.6/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-3.4.6/zecke-xgcc-cpp.patch
@@ -6,7 +6,7 @@ Index: gcc-3.4.4/Makefile.in
AS="$(AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
-+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
+ CPPFLAGS=""; export CPPFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
diff --git a/packages/gcc/gcc-4.0.0/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.0.0/zecke-xgcc-cpp.patch
index 436eff02ae..c6ee1577ec 100644
--- a/packages/gcc/gcc-4.0.0/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-4.0.0/zecke-xgcc-cpp.patch
@@ -6,7 +6,7 @@ Index: gcc-4.0.0/Makefile.in
AS="$(AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
-+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch
index ba7d7257d9..4ab5f43ddd 100644
--- a/packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-4.0.2/zecke-xgcc-cpp.patch
@@ -6,7 +6,7 @@ Index: gcc-4.0.2/Makefile.in
AS="$(AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
-+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch
index 921cab6e18..3ccd124764 100644
--- a/packages/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch
@@ -10,7 +10,7 @@ Index: gcc-4.1.1/Makefile.in
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; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-4.1.2/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.1.2/zecke-xgcc-cpp.patch
index 921cab6e18..3ccd124764 100644
--- a/packages/gcc/gcc-4.1.2/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-4.1.2/zecke-xgcc-cpp.patch
@@ -10,7 +10,7 @@ Index: gcc-4.1.1/Makefile.in
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; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch
index 921cab6e18..3ccd124764 100644
--- a/packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-4.2.1/zecke-xgcc-cpp.patch
@@ -10,7 +10,7 @@ Index: gcc-4.1.1/Makefile.in
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; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch
index 921cab6e18..3ccd124764 100644
--- a/packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch
@@ -10,7 +10,7 @@ Index: gcc-4.1.1/Makefile.in
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; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-4.2.3/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.2.3/zecke-xgcc-cpp.patch
index 921cab6e18..3ccd124764 100644
--- a/packages/gcc/gcc-4.2.3/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-4.2.3/zecke-xgcc-cpp.patch
@@ -10,7 +10,7 @@ Index: gcc-4.1.1/Makefile.in
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; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-4.2.4.inc b/packages/gcc/gcc-4.2.4.inc
new file mode 100644
index 0000000000..87eb532b21
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4.inc
@@ -0,0 +1,73 @@
+require gcc-common.inc
+
+DEPENDS = "mpfr gmp"
+
+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://801-arm-bigendian-eabi.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 \
+ file://gcc-4.0.2-e300c2c3.patch;patch=1 \
+ file://fortran-static-linking.patch;patch=1 \
+ file://intermask-bigendian.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 "
+
+# Language Overrides
+FORTRAN = ""
+FORTRAN_linux-gnueabi = ",fortran"
+JAVA = ""
+
+EXTRA_OECONF_BASE = "--enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
+
+ARM_INSTRUCTION_SET = "arm"
diff --git a/packages/gcc/gcc-4.2.4/.mtn2git_empty b/packages/gcc/gcc-4.2.4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/.mtn2git_empty
diff --git a/packages/gcc/gcc-4.3.0/100-uclibc-conf.patch b/packages/gcc/gcc-4.2.4/100-uclibc-conf.patch
index 4243ff7b91..4243ff7b91 100644
--- a/packages/gcc/gcc-4.3.0/100-uclibc-conf.patch
+++ b/packages/gcc/gcc-4.2.4/100-uclibc-conf.patch
diff --git a/packages/gcc/gcc-4.3.0/103-uclibc-conf-noupstream.patch b/packages/gcc/gcc-4.2.4/103-uclibc-conf-noupstream.patch
index 09c9bbecfb..09c9bbecfb 100644
--- a/packages/gcc/gcc-4.3.0/103-uclibc-conf-noupstream.patch
+++ b/packages/gcc/gcc-4.2.4/103-uclibc-conf-noupstream.patch
diff --git a/packages/gcc/gcc-4.3.0/110-arm-eabi.patch b/packages/gcc/gcc-4.2.4/110-arm-eabi.patch
index acebe5308f..acebe5308f 100644
--- a/packages/gcc/gcc-4.3.0/110-arm-eabi.patch
+++ b/packages/gcc/gcc-4.2.4/110-arm-eabi.patch
diff --git a/packages/gcc/gcc-4.3.0/200-uclibc-locale.patch b/packages/gcc/gcc-4.2.4/200-uclibc-locale.patch
index ea21388b75..ea21388b75 100644
--- a/packages/gcc/gcc-4.3.0/200-uclibc-locale.patch
+++ b/packages/gcc/gcc-4.2.4/200-uclibc-locale.patch
diff --git a/packages/gcc/gcc-4.3.0/203-uclibc-locale-no__x.patch b/packages/gcc/gcc-4.2.4/203-uclibc-locale-no__x.patch
index 6ba47003b3..6ba47003b3 100644
--- a/packages/gcc/gcc-4.3.0/203-uclibc-locale-no__x.patch
+++ b/packages/gcc/gcc-4.2.4/203-uclibc-locale-no__x.patch
diff --git a/packages/gcc/gcc-4.3.0/204-uclibc-locale-wchar_fix.patch b/packages/gcc/gcc-4.2.4/204-uclibc-locale-wchar_fix.patch
index 160ab35bb3..160ab35bb3 100644
--- a/packages/gcc/gcc-4.3.0/204-uclibc-locale-wchar_fix.patch
+++ b/packages/gcc/gcc-4.2.4/204-uclibc-locale-wchar_fix.patch
diff --git a/packages/gcc/gcc-4.3.0/205-uclibc-locale-update.patch b/packages/gcc/gcc-4.2.4/205-uclibc-locale-update.patch
index 86b2844554..86b2844554 100644
--- a/packages/gcc/gcc-4.3.0/205-uclibc-locale-update.patch
+++ b/packages/gcc/gcc-4.2.4/205-uclibc-locale-update.patch
diff --git a/packages/gcc/gcc-4.3.0/300-libstdc++-pic.patch b/packages/gcc/gcc-4.2.4/300-libstdc++-pic.patch
index 89d03a85e5..89d03a85e5 100644
--- a/packages/gcc/gcc-4.3.0/300-libstdc++-pic.patch
+++ b/packages/gcc/gcc-4.2.4/300-libstdc++-pic.patch
diff --git a/packages/gcc/gcc-4.3.0/301-missing-execinfo_h.patch b/packages/gcc/gcc-4.2.4/301-missing-execinfo_h.patch
index 0e2092f3fb..0e2092f3fb 100644
--- a/packages/gcc/gcc-4.3.0/301-missing-execinfo_h.patch
+++ b/packages/gcc/gcc-4.2.4/301-missing-execinfo_h.patch
diff --git a/packages/gcc/gcc-4.3.0/302-c99-snprintf.patch b/packages/gcc/gcc-4.2.4/302-c99-snprintf.patch
index dfb22d681b..dfb22d681b 100644
--- a/packages/gcc/gcc-4.3.0/302-c99-snprintf.patch
+++ b/packages/gcc/gcc-4.2.4/302-c99-snprintf.patch
diff --git a/packages/gcc/gcc-4.3.0/303-c99-complex-ugly-hack.patch b/packages/gcc/gcc-4.2.4/303-c99-complex-ugly-hack.patch
index 2ccc80d9bb..2ccc80d9bb 100644
--- a/packages/gcc/gcc-4.3.0/303-c99-complex-ugly-hack.patch
+++ b/packages/gcc/gcc-4.2.4/303-c99-complex-ugly-hack.patch
diff --git a/packages/gcc/gcc-4.3.0/304-index_macro.patch b/packages/gcc/gcc-4.2.4/304-index_macro.patch
index d8e476555d..d8e476555d 100644
--- a/packages/gcc/gcc-4.3.0/304-index_macro.patch
+++ b/packages/gcc/gcc-4.2.4/304-index_macro.patch
diff --git a/packages/gcc/gcc-4.3.0/305-libmudflap-susv3-legacy.patch b/packages/gcc/gcc-4.2.4/305-libmudflap-susv3-legacy.patch
index 374b1f8659..374b1f8659 100644
--- a/packages/gcc/gcc-4.3.0/305-libmudflap-susv3-legacy.patch
+++ b/packages/gcc/gcc-4.2.4/305-libmudflap-susv3-legacy.patch
diff --git a/packages/gcc/gcc-4.3.0/306-libstdc++-namespace.patch b/packages/gcc/gcc-4.2.4/306-libstdc++-namespace.patch
index 69587ca63a..69587ca63a 100644
--- a/packages/gcc/gcc-4.3.0/306-libstdc++-namespace.patch
+++ b/packages/gcc/gcc-4.2.4/306-libstdc++-namespace.patch
diff --git a/packages/gcc/gcc-4.3.0/307-locale_facets.patch b/packages/gcc/gcc-4.2.4/307-locale_facets.patch
index 412f8657dc..412f8657dc 100644
--- a/packages/gcc/gcc-4.3.0/307-locale_facets.patch
+++ b/packages/gcc/gcc-4.2.4/307-locale_facets.patch
diff --git a/packages/gcc/gcc-4.3.0/402-libbackend_dep_gcov-iov.h.patch b/packages/gcc/gcc-4.2.4/402-libbackend_dep_gcov-iov.h.patch
index 0bf115c45d..0bf115c45d 100644
--- a/packages/gcc/gcc-4.3.0/402-libbackend_dep_gcov-iov.h.patch
+++ b/packages/gcc/gcc-4.2.4/402-libbackend_dep_gcov-iov.h.patch
diff --git a/packages/gcc/gcc-4.3.0/602-sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.2.4/602-sdk-libstdc++-includes.patch
index 23fce7544d..23fce7544d 100644
--- a/packages/gcc/gcc-4.3.0/602-sdk-libstdc++-includes.patch
+++ b/packages/gcc/gcc-4.2.4/602-sdk-libstdc++-includes.patch
diff --git a/packages/gcc/gcc-4.3.0/740-sh-pr24836.patch b/packages/gcc/gcc-4.2.4/740-sh-pr24836.patch
index 7992282cff..7992282cff 100644
--- a/packages/gcc/gcc-4.3.0/740-sh-pr24836.patch
+++ b/packages/gcc/gcc-4.2.4/740-sh-pr24836.patch
diff --git a/packages/gcc/gcc-4.3.0/800-arm-bigendian.patch b/packages/gcc/gcc-4.2.4/800-arm-bigendian.patch
index 07c6093379..07c6093379 100644
--- a/packages/gcc/gcc-4.3.0/800-arm-bigendian.patch
+++ b/packages/gcc/gcc-4.2.4/800-arm-bigendian.patch
diff --git a/packages/gcc/gcc-4.3.0/801-arm-bigendian-eabi.patch b/packages/gcc/gcc-4.2.4/801-arm-bigendian-eabi.patch
index 54490fc24f..54490fc24f 100644
--- a/packages/gcc/gcc-4.3.0/801-arm-bigendian-eabi.patch
+++ b/packages/gcc/gcc-4.2.4/801-arm-bigendian-eabi.patch
diff --git a/packages/gcc/gcc-4.3.0/904-flatten-switch-stmt-00.patch b/packages/gcc/gcc-4.2.4/904-flatten-switch-stmt-00.patch
index 8fac37c4df..8fac37c4df 100644
--- a/packages/gcc/gcc-4.3.0/904-flatten-switch-stmt-00.patch
+++ b/packages/gcc/gcc-4.2.4/904-flatten-switch-stmt-00.patch
diff --git a/packages/gcc/gcc-4.2.4/README b/packages/gcc/gcc-4.2.4/README
new file mode 100644
index 0000000000..b85840dc20
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-20000320.patch b/packages/gcc/gcc-4.2.4/arm-crunch-20000320.patch
new file mode 100644
index 0000000000..3fb0da7670
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-32bit-disable.patch b/packages/gcc/gcc-4.2.4/arm-crunch-32bit-disable.patch
new file mode 100644
index 0000000000..88eaee322d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-64bit-disable-4.2.0.patch b/packages/gcc/gcc-4.2.4/arm-crunch-64bit-disable-4.2.0.patch
new file mode 100644
index 0000000000..60b17852bd
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-64bit-disable0.patch b/packages/gcc/gcc-4.2.4/arm-crunch-64bit-disable0.patch
new file mode 100644
index 0000000000..95abf68a60
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-and-or.patch b/packages/gcc/gcc-4.2.4/arm-crunch-and-or.patch
new file mode 100644
index 0000000000..24357d316e
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-cfcvt64-disable.patch b/packages/gcc/gcc-4.2.4/arm-crunch-cfcvt64-disable.patch
new file mode 100644
index 0000000000..f9280b18b5
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-cfcvtds-disable.patch b/packages/gcc/gcc-4.2.4/arm-crunch-cfcvtds-disable.patch
new file mode 100644
index 0000000000..ec09ea16a1
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-cirrus-bugfixes.patch b/packages/gcc/gcc-4.2.4/arm-crunch-cirrus-bugfixes.patch
new file mode 100644
index 0000000000..cb0af8546d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-compare-geu.patch b/packages/gcc/gcc-4.2.4/arm-crunch-compare-geu.patch
new file mode 100644
index 0000000000..3d27cc1d9d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-compare-unordered.patch b/packages/gcc/gcc-4.2.4/arm-crunch-compare-unordered.patch
new file mode 100644
index 0000000000..c4fcdb3746
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-compare-unordered.patch-z-eq b/packages/gcc/gcc-4.2.4/arm-crunch-compare-unordered.patch-z-eq
new file mode 100644
index 0000000000..715fb95086
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-compare.patch b/packages/gcc/gcc-4.2.4/arm-crunch-compare.patch
new file mode 100644
index 0000000000..ccbb4854c3
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-compare.patch-z-eq b/packages/gcc/gcc-4.2.4/arm-crunch-compare.patch-z-eq
new file mode 100644
index 0000000000..bc40411be4
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-dominance.patch b/packages/gcc/gcc-4.2.4/arm-crunch-dominance.patch
new file mode 100644
index 0000000000..517ca8d80e
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-eabi-ieee754-div.patch b/packages/gcc/gcc-4.2.4/arm-crunch-eabi-ieee754-div.patch
new file mode 100644
index 0000000000..940f4a65ae
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-eabi-ieee754.patch b/packages/gcc/gcc-4.2.4/arm-crunch-eabi-ieee754.patch
new file mode 100644
index 0000000000..e4929fa20e
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-eabi.patch b/packages/gcc/gcc-4.2.4/arm-crunch-eabi.patch
new file mode 100644
index 0000000000..f8992ed499
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-floatsi-disable-single.patch b/packages/gcc/gcc-4.2.4/arm-crunch-floatsi-disable-single.patch
new file mode 100644
index 0000000000..cdd52244a6
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-floatsi-disable.patch b/packages/gcc/gcc-4.2.4/arm-crunch-floatsi-disable.patch
new file mode 100644
index 0000000000..aa54ec3e04
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-floatunsidf.patch b/packages/gcc/gcc-4.2.4/arm-crunch-floatunsidf.patch
new file mode 100644
index 0000000000..2fe2254db9
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-fp_consts.patch b/packages/gcc/gcc-4.2.4/arm-crunch-fp_consts.patch
new file mode 100644
index 0000000000..5f289bbebe
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-neg.patch b/packages/gcc/gcc-4.2.4/arm-crunch-neg.patch
new file mode 100644
index 0000000000..f14ae0190e
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-neg2.patch b/packages/gcc/gcc-4.2.4/arm-crunch-neg2.patch
new file mode 100644
index 0000000000..4fd91f3215
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-offset.patch b/packages/gcc/gcc-4.2.4/arm-crunch-offset.patch
new file mode 100644
index 0000000000..3a40f0d224
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-predicates.patch b/packages/gcc/gcc-4.2.4/arm-crunch-predicates.patch
new file mode 100644
index 0000000000..4841ff8178
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-predicates2.patch b/packages/gcc/gcc-4.2.4/arm-crunch-predicates2.patch
new file mode 100644
index 0000000000..3e01158fe1
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-predicates3.patch b/packages/gcc/gcc-4.2.4/arm-crunch-predicates3.patch
new file mode 100644
index 0000000000..99e1e6c88c
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-saveregs.patch b/packages/gcc/gcc-4.2.4/arm-crunch-saveregs.patch
new file mode 100644
index 0000000000..531ae86610
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-scc.patch b/packages/gcc/gcc-4.2.4/arm-crunch-scc.patch
new file mode 100644
index 0000000000..d1330f2543
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-truncsi-disable-new.patch b/packages/gcc/gcc-4.2.4/arm-crunch-truncsi-disable-new.patch
new file mode 100644
index 0000000000..6dea43fa7c
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.4/arm-crunch-truncsi-disable.patch b/packages/gcc/gcc-4.2.4/arm-crunch-truncsi-disable.patch
new file mode 100644
index 0000000000..a5d791a0a4
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.3.0/arm-nolibfloat.patch b/packages/gcc/gcc-4.2.4/arm-nolibfloat.patch
index c4897c0330..c4897c0330 100644
--- a/packages/gcc/gcc-4.3.0/arm-nolibfloat.patch
+++ b/packages/gcc/gcc-4.2.4/arm-nolibfloat.patch
diff --git a/packages/gcc/gcc-4.3.0/arm-softfloat.patch b/packages/gcc/gcc-4.2.4/arm-softfloat.patch
index 5e1edd9208..5e1edd9208 100644
--- a/packages/gcc/gcc-4.3.0/arm-softfloat.patch
+++ b/packages/gcc/gcc-4.2.4/arm-softfloat.patch
diff --git a/packages/gcc/gcc-4.3.0/arm-thumb-cache.patch b/packages/gcc/gcc-4.2.4/arm-thumb-cache.patch
index fa63846c8c..fa63846c8c 100644
--- a/packages/gcc/gcc-4.3.0/arm-thumb-cache.patch
+++ b/packages/gcc/gcc-4.2.4/arm-thumb-cache.patch
diff --git a/packages/gcc/gcc-4.3.0/arm-thumb.patch b/packages/gcc/gcc-4.2.4/arm-thumb.patch
index 016a7a550b..016a7a550b 100644
--- a/packages/gcc/gcc-4.3.0/arm-thumb.patch
+++ b/packages/gcc/gcc-4.2.4/arm-thumb.patch
diff --git a/packages/gcc/gcc-4.3.0/cache-amnesia.patch b/packages/gcc/gcc-4.2.4/cache-amnesia.patch
index ef7cd111c5..ef7cd111c5 100644
--- a/packages/gcc/gcc-4.3.0/cache-amnesia.patch
+++ b/packages/gcc/gcc-4.2.4/cache-amnesia.patch
diff --git a/packages/gcc/gcc-4.2.4/fix-ICE-in-arm_unwind_emit_set.diff b/packages/gcc/gcc-4.2.4/fix-ICE-in-arm_unwind_emit_set.diff
new file mode 100644
index 0000000000..568e15abff
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/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.3.0/fortran-cross-compile-hack.patch b/packages/gcc/gcc-4.2.4/fortran-cross-compile-hack.patch
index b3d38ad983..b3d38ad983 100644
--- a/packages/gcc/gcc-4.3.0/fortran-cross-compile-hack.patch
+++ b/packages/gcc/gcc-4.2.4/fortran-cross-compile-hack.patch
diff --git a/packages/gcc/gcc-4.3.0/fortran-static-linking.patch b/packages/gcc/gcc-4.2.4/fortran-static-linking.patch
index 3dd6321dc3..3dd6321dc3 100644
--- a/packages/gcc/gcc-4.3.0/fortran-static-linking.patch
+++ b/packages/gcc/gcc-4.2.4/fortran-static-linking.patch
diff --git a/packages/gcc/gcc-4.3.0/gcc-4.0.2-e300c2c3.patch b/packages/gcc/gcc-4.2.4/gcc-4.0.2-e300c2c3.patch
index 736ac4b6b6..736ac4b6b6 100644
--- a/packages/gcc/gcc-4.3.0/gcc-4.0.2-e300c2c3.patch
+++ b/packages/gcc/gcc-4.2.4/gcc-4.0.2-e300c2c3.patch
diff --git a/packages/gcc/gcc-4.3.0/gcc41-configure.in.patch b/packages/gcc/gcc-4.2.4/gcc41-configure.in.patch
index 3d33bcb978..3d33bcb978 100644
--- a/packages/gcc/gcc-4.3.0/gcc41-configure.in.patch
+++ b/packages/gcc/gcc-4.2.4/gcc41-configure.in.patch
diff --git a/packages/gcc/gcc-4.2.4/gfortran.patch b/packages/gcc/gcc-4.2.4/gfortran.patch
new file mode 100644
index 0000000000..96905e5d7d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.4/gfortran.patch
@@ -0,0 +1,40 @@
+The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
+
+This target doesn't really have a 128-bit integer type, however it does use
+TImode to represent the return value of certain special ABI defined library
+functions. This results in type_for_size(TImode) being called.
+
+Because TImode deosn't correspond to any gfortran integer kind
+gfc_type_for_size returns NULL and we segfault shortly after.
+
+The patch below fixes this by making gfc_type_for_size handle TImode in the
+same way as the C frontend.
+
+Tested on x86_64-linux and arm-linux-gnueabi.
+Applied to trunk.
+
+Paul
+
+2007-05-15 Paul Brook <paul@codesourcery.com>
+
+ gcc/fortran/
+ * trans-types.c (gfc_type_for_size): Handle signed TImode.
+
+Index: gcc-4.2.1/gcc/fortran/trans-types.c
+===================================================================
+--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
++++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
+@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
+ if (type && bits == TYPE_PRECISION (type))
+ return type;
+ }
++
++ /* Handle TImode as a special case because it is used by some backends
++ (eg. ARM) even though it is not available for normal use. */
++#if HOST_BITS_PER_WIDE_INT >= 64
++ if (bits == TYPE_PRECISION (intTI_type_node))
++ return intTI_type_node;
++#endif
+ }
+ else
+ {
diff --git a/packages/gcc/gcc-4.3.0/intermask-bigendian.patch b/packages/gcc/gcc-4.2.4/intermask-bigendian.patch
index fdff3d3d86..fdff3d3d86 100644
--- a/packages/gcc/gcc-4.3.0/intermask-bigendian.patch
+++ b/packages/gcc/gcc-4.2.4/intermask-bigendian.patch
diff --git a/packages/gcc/gcc-4.3.0/ldflags.patch b/packages/gcc/gcc-4.2.4/ldflags.patch
index 9576f60778..9576f60778 100644
--- a/packages/gcc/gcc-4.3.0/ldflags.patch
+++ b/packages/gcc/gcc-4.2.4/ldflags.patch
diff --git a/packages/gcc/gcc-4.3.0/sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.2.4/sdk-libstdc++-includes.patch
index 4377c2143b..4377c2143b 100644
--- a/packages/gcc/gcc-4.3.0/sdk-libstdc++-includes.patch
+++ b/packages/gcc/gcc-4.2.4/sdk-libstdc++-includes.patch
diff --git a/packages/gcc/gcc-4.3.0/sh3-installfix-fixheaders.patch b/packages/gcc/gcc-4.2.4/sh3-installfix-fixheaders.patch
index a06cd2e075..a06cd2e075 100644
--- a/packages/gcc/gcc-4.3.0/sh3-installfix-fixheaders.patch
+++ b/packages/gcc/gcc-4.2.4/sh3-installfix-fixheaders.patch
diff --git a/packages/gcc/gcc-4.3.0/unbreak-armv4t.patch b/packages/gcc/gcc-4.2.4/unbreak-armv4t.patch
index b3399abfdb..b3399abfdb 100644
--- a/packages/gcc/gcc-4.3.0/unbreak-armv4t.patch
+++ b/packages/gcc/gcc-4.2.4/unbreak-armv4t.patch
diff --git a/packages/gcc/gcc-4.3.0/zecke-no-host-includes.patch b/packages/gcc/gcc-4.2.4/zecke-no-host-includes.patch
index 6afb10d6ef..6afb10d6ef 100644
--- a/packages/gcc/gcc-4.3.0/zecke-no-host-includes.patch
+++ b/packages/gcc/gcc-4.2.4/zecke-no-host-includes.patch
diff --git a/packages/gcc/gcc-4.3.0/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.2.4/zecke-xgcc-cpp.patch
index 921cab6e18..3ccd124764 100644
--- a/packages/gcc/gcc-4.3.0/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-4.2.4/zecke-xgcc-cpp.patch
@@ -10,7 +10,7 @@ Index: gcc-4.1.1/Makefile.in
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; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-4.3.0.inc b/packages/gcc/gcc-4.3.1.inc
index 96b7d02501..3784727d9b 100644
--- a/packages/gcc/gcc-4.3.0.inc
+++ b/packages/gcc/gcc-4.3.1.inc
@@ -18,9 +18,7 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://fedora/gcc43-cpp-pragma.patch;patch=1;pnum=0 \
file://fedora/gcc43-java-debug-iface-type.patch;patch=1;pnum=0 \
file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \
- file://fedora/gcc43-pr35440.patch;patch=1;pnum=0 \
file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \
- file://fedora/gcc43-pr35751.patch;patch=1;pnum=0 \
file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \
file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \
file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \
@@ -59,6 +57,8 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
# file://pr34130.patch;patch=1 \
# file://fortran-static-linking.patch;patch=1 \
# file://intermask-bigendian.patch;patch=1 \
+ file://gcc-arm-frename-registers.patch;patch=1 \
+ file://gcc-release-branch/PR-36500-fix-neon.patch;patch=1 \
"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
@@ -67,5 +67,5 @@ SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
FORTRAN = ""
JAVA = ""
-EXTRA_OECONF_BASE = " --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
+EXTRA_OECONF_BASE = " --enable-cheaders=c_std --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
diff --git a/packages/gcc/gcc-4.3.1/.mtn2git_empty b/packages/gcc/gcc-4.3.1/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/.mtn2git_empty
diff --git a/packages/gcc/gcc-4.3.1/100-uclibc-conf.patch b/packages/gcc/gcc-4.3.1/100-uclibc-conf.patch
new file mode 100644
index 0000000000..4243ff7b91
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/103-uclibc-conf-noupstream.patch b/packages/gcc/gcc-4.3.1/103-uclibc-conf-noupstream.patch
new file mode 100644
index 0000000000..09c9bbecfb
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/110-arm-eabi.patch b/packages/gcc/gcc-4.3.1/110-arm-eabi.patch
new file mode 100644
index 0000000000..acebe5308f
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/200-uclibc-locale.patch b/packages/gcc/gcc-4.3.1/200-uclibc-locale.patch
new file mode 100644
index 0000000000..ea21388b75
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/203-uclibc-locale-no__x.patch b/packages/gcc/gcc-4.3.1/203-uclibc-locale-no__x.patch
new file mode 100644
index 0000000000..6ba47003b3
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/204-uclibc-locale-wchar_fix.patch b/packages/gcc/gcc-4.3.1/204-uclibc-locale-wchar_fix.patch
new file mode 100644
index 0000000000..160ab35bb3
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/205-uclibc-locale-update.patch b/packages/gcc/gcc-4.3.1/205-uclibc-locale-update.patch
new file mode 100644
index 0000000000..86b2844554
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/300-libstdc++-pic.patch b/packages/gcc/gcc-4.3.1/300-libstdc++-pic.patch
new file mode 100644
index 0000000000..89d03a85e5
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/301-missing-execinfo_h.patch b/packages/gcc/gcc-4.3.1/301-missing-execinfo_h.patch
new file mode 100644
index 0000000000..0e2092f3fb
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/302-c99-snprintf.patch b/packages/gcc/gcc-4.3.1/302-c99-snprintf.patch
new file mode 100644
index 0000000000..dfb22d681b
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/303-c99-complex-ugly-hack.patch b/packages/gcc/gcc-4.3.1/303-c99-complex-ugly-hack.patch
new file mode 100644
index 0000000000..2ccc80d9bb
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/304-index_macro.patch b/packages/gcc/gcc-4.3.1/304-index_macro.patch
new file mode 100644
index 0000000000..d8e476555d
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/305-libmudflap-susv3-legacy.patch b/packages/gcc/gcc-4.3.1/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 0000000000..374b1f8659
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/306-libstdc++-namespace.patch b/packages/gcc/gcc-4.3.1/306-libstdc++-namespace.patch
new file mode 100644
index 0000000000..69587ca63a
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/307-locale_facets.patch b/packages/gcc/gcc-4.3.1/307-locale_facets.patch
new file mode 100644
index 0000000000..412f8657dc
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/402-libbackend_dep_gcov-iov.h.patch b/packages/gcc/gcc-4.3.1/402-libbackend_dep_gcov-iov.h.patch
new file mode 100644
index 0000000000..0bf115c45d
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/602-sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.3.1/602-sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..23fce7544d
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/740-sh-pr24836.patch b/packages/gcc/gcc-4.3.1/740-sh-pr24836.patch
new file mode 100644
index 0000000000..7992282cff
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/800-arm-bigendian.patch b/packages/gcc/gcc-4.3.1/800-arm-bigendian.patch
new file mode 100644
index 0000000000..07c6093379
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/801-arm-bigendian-eabi.patch b/packages/gcc/gcc-4.3.1/801-arm-bigendian-eabi.patch
new file mode 100644
index 0000000000..54490fc24f
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/904-flatten-switch-stmt-00.patch b/packages/gcc/gcc-4.3.1/904-flatten-switch-stmt-00.patch
new file mode 100644
index 0000000000..8fac37c4df
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/arm-nolibfloat.patch b/packages/gcc/gcc-4.3.1/arm-nolibfloat.patch
new file mode 100644
index 0000000000..c4897c0330
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/arm-softfloat.patch b/packages/gcc/gcc-4.3.1/arm-softfloat.patch
new file mode 100644
index 0000000000..5e1edd9208
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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 _floatundisf _floatundidf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/packages/gcc/gcc-4.3.1/arm-thumb-cache.patch b/packages/gcc/gcc-4.3.1/arm-thumb-cache.patch
new file mode 100644
index 0000000000..fa63846c8c
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/arm-thumb.patch b/packages/gcc/gcc-4.3.1/arm-thumb.patch
new file mode 100644
index 0000000000..016a7a550b
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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 _floatundisf _floatundidf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
diff --git a/packages/gcc/gcc-4.3.1/cache-amnesia.patch b/packages/gcc/gcc-4.3.1/cache-amnesia.patch
new file mode 100644
index 0000000000..ef7cd111c5
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/debian/.mtn2git_empty b/packages/gcc/gcc-4.3.1/debian/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/debian/.mtn2git_empty
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-acats.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-acats.dpatch
index fc25bf901f..fc25bf901f 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-acats.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-acats.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-alpha.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-alpha.dpatch
index 1e2c47d670..1e2c47d670 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-alpha.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-alpha.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-default-project-path.dpatch
index b3283d75f3..b3283d75f3 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-default-project-path.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-default-project-path.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-driver-check.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-driver-check.dpatch
index 9ac1148329..9ac1148329 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-driver-check.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-driver-check.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-driver.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-driver.dpatch
index 74ee94d1b6..74ee94d1b6 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-driver.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-driver.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-gcc-name.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-gcc-name.dpatch
index 681d634480..681d634480 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-gcc-name.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-gcc-name.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-gnatvsn.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-gnatvsn.dpatch
index 365bd60bb4..365bd60bb4 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-gnatvsn.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-gnatvsn.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-libgnatprj.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-libgnatprj.dpatch
index dcbf30aef7..dcbf30aef7 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-libgnatprj.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-libgnatprj.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-libgnatvsn.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-libgnatvsn.dpatch
index e7de16dce9..e7de16dce9 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-libgnatvsn.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-libgnatvsn.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-link-lib.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch
index 2645fe034e..2645fe034e 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-link-lib.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-sjlj.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-sjlj.dpatch
index 8d480302d5..8d480302d5 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-sjlj.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-sjlj.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ada-symbolic-tracebacks.dpatch b/packages/gcc/gcc-4.3.1/debian/ada-symbolic-tracebacks.dpatch
index d39accfdb5..d39accfdb5 100644
--- a/packages/gcc/gcc-4.3.0/debian/ada-symbolic-tracebacks.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ada-symbolic-tracebacks.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/alpha-ieee-doc.dpatch b/packages/gcc/gcc-4.3.1/debian/alpha-ieee-doc.dpatch
index b4976bf847..b4976bf847 100644
--- a/packages/gcc/gcc-4.3.0/debian/alpha-ieee-doc.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/alpha-ieee-doc.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/alpha-ieee.dpatch b/packages/gcc/gcc-4.3.1/debian/alpha-ieee.dpatch
index 4070b1a39e..4070b1a39e 100644
--- a/packages/gcc/gcc-4.3.0/debian/alpha-ieee.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/alpha-ieee.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/alpha-no-ev4-directive.dpatch b/packages/gcc/gcc-4.3.1/debian/alpha-no-ev4-directive.dpatch
index e3f84244d2..e3f84244d2 100644
--- a/packages/gcc/gcc-4.3.0/debian/alpha-no-ev4-directive.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/alpha-no-ev4-directive.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/arm-unbreak-eabi-armv4t.dpatch b/packages/gcc/gcc-4.3.1/debian/arm-unbreak-eabi-armv4t.dpatch
index 7bb8887068..7bb8887068 100644
--- a/packages/gcc/gcc-4.3.0/debian/arm-unbreak-eabi-armv4t.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/arm-unbreak-eabi-armv4t.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/boehm-gc-getnprocs.dpatch b/packages/gcc/gcc-4.3.1/debian/boehm-gc-getnprocs.dpatch
index 8d85cdcbb0..8d85cdcbb0 100644
--- a/packages/gcc/gcc-4.3.0/debian/boehm-gc-getnprocs.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/boehm-gc-getnprocs.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/boehm-gc-nocheck.dpatch b/packages/gcc/gcc-4.3.1/debian/boehm-gc-nocheck.dpatch
index f9910dc041..f9910dc041 100644
--- a/packages/gcc/gcc-4.3.0/debian/boehm-gc-nocheck.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/boehm-gc-nocheck.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/config-ml.dpatch b/packages/gcc/gcc-4.3.1/debian/config-ml.dpatch
index 12ef7b495a..12ef7b495a 100644
--- a/packages/gcc/gcc-4.3.0/debian/config-ml.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/config-ml.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/cpu-default-i486.dpatch b/packages/gcc/gcc-4.3.1/debian/cpu-default-i486.dpatch
index 1afa60faf2..1afa60faf2 100644
--- a/packages/gcc/gcc-4.3.0/debian/cpu-default-i486.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/cpu-default-i486.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/cross-fixes.dpatch b/packages/gcc/gcc-4.3.1/debian/cross-fixes.dpatch
index 84d50bfd4a..84d50bfd4a 100644
--- a/packages/gcc/gcc-4.3.0/debian/cross-fixes.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/cross-fixes.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/cross-include.dpatch b/packages/gcc/gcc-4.3.1/debian/cross-include.dpatch
index c2622903ec..c2622903ec 100644
--- a/packages/gcc/gcc-4.3.0/debian/cross-include.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/cross-include.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/deb-protoize.dpatch b/packages/gcc/gcc-4.3.1/debian/deb-protoize.dpatch
index f86ee09942..f86ee09942 100644
--- a/packages/gcc/gcc-4.3.0/debian/deb-protoize.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/deb-protoize.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-d-lang.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-d-lang.dpatch
index 24267ddbb3..24267ddbb3 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-d-lang.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-d-lang.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-driver-extra-langs.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-driver-extra-langs.dpatch
index 2a206f7edc..2a206f7edc 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-driver-extra-langs.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-driver-extra-langs.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-hash-style-both.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-hash-style-both.dpatch
index 8fea7586d0..8fea7586d0 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-hash-style-both.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-hash-style-both.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-hash-style-gnu.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-hash-style-gnu.dpatch
index 8c6e2691b1..8c6e2691b1 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-hash-style-gnu.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-hash-style-gnu.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-i386-emit-cld.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-i386-emit-cld.dpatch
index 1267b00e18..1267b00e18 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-i386-emit-cld.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-i386-emit-cld.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-ice-apport.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch
index 87b8f06ea8..87b8f06ea8 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-ice-apport.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-ice-hack.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-ice-hack.dpatch
index 84c5ef2ebd..84c5ef2ebd 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-ice-hack.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-ice-hack.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-multilib64dir.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-multilib64dir.dpatch
index fe8f5a1a41..fe8f5a1a41 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-multilib64dir.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-multilib64dir.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-pascal-lang.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-pascal-lang.dpatch
index eab416ad63..eab416ad63 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-pascal-lang.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-pascal-lang.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-ssp-default.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-ssp-default.dpatch
index 6ba9893680..6ba9893680 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-ssp-default.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-ssp-default.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gcc-textdomain.dpatch b/packages/gcc/gcc-4.3.1/debian/gcc-textdomain.dpatch
index 6315a19de5..6315a19de5 100644
--- a/packages/gcc/gcc-4.3.0/debian/gcc-textdomain.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gcc-textdomain.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gdc-fix-build-kbsd-gnu.dpatch b/packages/gcc/gcc-4.3.1/debian/gdc-fix-build-kbsd-gnu.dpatch
index 9878d8abfb..9878d8abfb 100644
--- a/packages/gcc/gcc-4.3.0/debian/gdc-fix-build-kbsd-gnu.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gdc-fix-build-kbsd-gnu.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gpc-4.1.dpatch b/packages/gcc/gcc-4.3.1/debian/gpc-4.1.dpatch
index fcd499115f..fcd499115f 100644
--- a/packages/gcc/gcc-4.3.0/debian/gpc-4.1.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gpc-4.1.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gpc-gcc-4.x.dpatch b/packages/gcc/gcc-4.3.1/debian/gpc-gcc-4.x.dpatch
index 9ddfced70d..9ddfced70d 100644
--- a/packages/gcc/gcc-4.3.0/debian/gpc-gcc-4.x.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gpc-gcc-4.x.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/gpc-names.dpatch b/packages/gcc/gcc-4.3.1/debian/gpc-names.dpatch
index f494383ca3..f494383ca3 100644
--- a/packages/gcc/gcc-4.3.0/debian/gpc-names.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/gpc-names.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/hurd-changes.dpatch b/packages/gcc/gcc-4.3.1/debian/hurd-changes.dpatch
index 1ccb5ca269..1ccb5ca269 100644
--- a/packages/gcc/gcc-4.3.0/debian/hurd-changes.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/hurd-changes.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ignore-comp-fail.dpatch b/packages/gcc/gcc-4.3.1/debian/ignore-comp-fail.dpatch
index 4609a82120..4609a82120 100644
--- a/packages/gcc/gcc-4.3.0/debian/ignore-comp-fail.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ignore-comp-fail.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/kbsd-gnu-ada.dpatch b/packages/gcc/gcc-4.3.1/debian/kbsd-gnu-ada.dpatch
index e159ec3fd0..e159ec3fd0 100644
--- a/packages/gcc/gcc-4.3.0/debian/kbsd-gnu-ada.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/kbsd-gnu-ada.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/kbsd-gnu.dpatch b/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch
index 5c9bb0e708..5c9bb0e708 100644
--- a/packages/gcc/gcc-4.3.0/debian/kbsd-gnu.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/kbsd-gnu.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libffi-configure.dpatch b/packages/gcc/gcc-4.3.1/debian/libffi-configure.dpatch
index 8cc9d23550..8cc9d23550 100644
--- a/packages/gcc/gcc-4.3.0/debian/libffi-configure.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libffi-configure.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-armel-ldflags.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-armel-ldflags.dpatch
index ecaddb61e0..ecaddb61e0 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-armel-ldflags.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-armel-ldflags.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-debuginfo.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-debuginfo.dpatch
index 942bbe1f91..942bbe1f91 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-debuginfo.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-debuginfo.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-disable-static.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-disable-static.dpatch
index 23f6846c3f..23f6846c3f 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-disable-static.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-disable-static.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-jar.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-jar.dpatch
index 38177b2495..38177b2495 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-jar.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-jar.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-jnipath.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-jnipath.dpatch
index a33888bf14..a33888bf14 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-jnipath.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-jnipath.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-loading-constraints.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-loading-constraints.dpatch
index 85f13ebe41..85f13ebe41 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-loading-constraints.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-loading-constraints.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-nobiarch-check.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-nobiarch-check.dpatch
index b32e1050a2..b32e1050a2 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-nobiarch-check.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-nobiarch-check.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-realloc-leak.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-realloc-leak.dpatch
index 6bf7a7310f..6bf7a7310f 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-realloc-leak.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-realloc-leak.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-rpath.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-rpath.dpatch
index e9b7f03f5b..e9b7f03f5b 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-rpath.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-rpath.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-sjlj.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-sjlj.dpatch
index 95b4673b3f..95b4673b3f 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-sjlj.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-sjlj.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-soname.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-soname.dpatch
index ccac8a40db..ccac8a40db 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-soname.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-soname.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-stacktrace.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-stacktrace.dpatch
index 9ace9dfb28..9ace9dfb28 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-stacktrace.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-stacktrace.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-subdir.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-subdir.dpatch
index ec707b8b5e..ec707b8b5e 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-subdir.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-subdir.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libjava-xulrunner1.9.dpatch b/packages/gcc/gcc-4.3.1/debian/libjava-xulrunner1.9.dpatch
index 19d67d88ba..19d67d88ba 100644
--- a/packages/gcc/gcc-4.3.0/debian/libjava-xulrunner1.9.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libjava-xulrunner1.9.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libobjc-gc-link.dpatch b/packages/gcc/gcc-4.3.1/debian/libobjc-gc-link.dpatch
index 87cb742c77..87cb742c77 100644
--- a/packages/gcc/gcc-4.3.0/debian/libobjc-gc-link.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libobjc-gc-link.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libssp-gnu.dpatch b/packages/gcc/gcc-4.3.1/debian/libssp-gnu.dpatch
index a0c6acd9fc..a0c6acd9fc 100644
--- a/packages/gcc/gcc-4.3.0/debian/libssp-gnu.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libssp-gnu.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libstdc++-doclink.dpatch b/packages/gcc/gcc-4.3.1/debian/libstdc++-doclink.dpatch
index 9393296712..9393296712 100644
--- a/packages/gcc/gcc-4.3.0/debian/libstdc++-doclink.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libstdc++-doclink.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libstdc++-pic.dpatch b/packages/gcc/gcc-4.3.1/debian/libstdc++-pic.dpatch
index 70c9e81542..70c9e81542 100644
--- a/packages/gcc/gcc-4.3.0/debian/libstdc++-pic.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libstdc++-pic.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/libstdc++-symbols-hppa.dpatch b/packages/gcc/gcc-4.3.1/debian/libstdc++-symbols-hppa.dpatch
index 250ec3aae5..250ec3aae5 100644
--- a/packages/gcc/gcc-4.3.0/debian/libstdc++-symbols-hppa.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/libstdc++-symbols-hppa.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/link-libs.dpatch b/packages/gcc/gcc-4.3.1/debian/link-libs.dpatch
index 340d5a51be..340d5a51be 100644
--- a/packages/gcc/gcc-4.3.0/debian/link-libs.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/link-libs.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/mips-triarch.dpatch b/packages/gcc/gcc-4.3.1/debian/mips-triarch.dpatch
index 5738bb4791..5738bb4791 100644
--- a/packages/gcc/gcc-4.3.0/debian/mips-triarch.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/mips-triarch.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/mudflap-nocheck.dpatch b/packages/gcc/gcc-4.3.1/debian/mudflap-nocheck.dpatch
index 9f8f025d82..9f8f025d82 100644
--- a/packages/gcc/gcc-4.3.0/debian/mudflap-nocheck.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/mudflap-nocheck.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/multiarch-include.dpatch b/packages/gcc/gcc-4.3.1/debian/multiarch-include.dpatch
index 2580444e7d..2580444e7d 100644
--- a/packages/gcc/gcc-4.3.0/debian/multiarch-include.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/multiarch-include.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/multiarch-lib.dpatch b/packages/gcc/gcc-4.3.1/debian/multiarch-lib.dpatch
index 93ba09fa39..93ba09fa39 100644
--- a/packages/gcc/gcc-4.3.0/debian/multiarch-lib.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/multiarch-lib.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/note-gnu-stack.dpatch b/packages/gcc/gcc-4.3.1/debian/note-gnu-stack.dpatch
index 3ffc3925d4..3ffc3925d4 100644
--- a/packages/gcc/gcc-4.3.0/debian/note-gnu-stack.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/note-gnu-stack.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/powerpc-biarch.dpatch b/packages/gcc/gcc-4.3.1/debian/powerpc-biarch.dpatch
index a1d2a727a9..a1d2a727a9 100644
--- a/packages/gcc/gcc-4.3.0/debian/powerpc-biarch.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/powerpc-biarch.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/ppc64-ada.dpatch b/packages/gcc/gcc-4.3.1/debian/ppc64-ada.dpatch
index db9a229c40..db9a229c40 100644
--- a/packages/gcc/gcc-4.3.0/debian/ppc64-ada.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/ppc64-ada.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/pr24170.dpatch b/packages/gcc/gcc-4.3.1/debian/pr24170.dpatch
index 028291ed6f..028291ed6f 100644
--- a/packages/gcc/gcc-4.3.0/debian/pr24170.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/pr24170.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/pr27880.dpatch b/packages/gcc/gcc-4.3.1/debian/pr27880.dpatch
index f8f08b0695..f8f08b0695 100644
--- a/packages/gcc/gcc-4.3.0/debian/pr27880.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/pr27880.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/pr28102.dpatch b/packages/gcc/gcc-4.3.1/debian/pr28102.dpatch
index bdb546546a..bdb546546a 100644
--- a/packages/gcc/gcc-4.3.0/debian/pr28102.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/pr28102.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/pr28322.dpatch b/packages/gcc/gcc-4.3.1/debian/pr28322.dpatch
index ea2ea2abcc..ea2ea2abcc 100644
--- a/packages/gcc/gcc-4.3.0/debian/pr28322.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/pr28322.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/pr30961.dpatch b/packages/gcc/gcc-4.3.1/debian/pr30961.dpatch
index b20fdf5bf5..b20fdf5bf5 100644
--- a/packages/gcc/gcc-4.3.0/debian/pr30961.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/pr30961.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/pr33148.dpatch b/packages/gcc/gcc-4.3.1/debian/pr33148.dpatch
index bcf30ffb56..bcf30ffb56 100644
--- a/packages/gcc/gcc-4.3.0/debian/pr33148.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/pr33148.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/pr34571.dpatch b/packages/gcc/gcc-4.3.1/debian/pr34571.dpatch
index d0a654a3cc..d0a654a3cc 100644
--- a/packages/gcc/gcc-4.3.0/debian/pr34571.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/pr34571.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/rename-info-files.dpatch b/packages/gcc/gcc-4.3.1/debian/rename-info-files.dpatch
index 665d3e5f33..665d3e5f33 100644
--- a/packages/gcc/gcc-4.3.0/debian/rename-info-files.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/rename-info-files.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/s390-biarch.dpatch b/packages/gcc/gcc-4.3.1/debian/s390-biarch.dpatch
index 392185f9bf..392185f9bf 100644
--- a/packages/gcc/gcc-4.3.0/debian/s390-biarch.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/s390-biarch.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/sparc-biarch.dpatch b/packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch
index bf7a1370c2..bf7a1370c2 100644
--- a/packages/gcc/gcc-4.3.0/debian/sparc-biarch.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/sparc-biarch.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/svn-class-updates.dpatch b/packages/gcc/gcc-4.3.1/debian/svn-class-updates.dpatch
index 14274d86cf..14274d86cf 100644
--- a/packages/gcc/gcc-4.3.0/debian/svn-class-updates.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/svn-class-updates.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/svn-doc-updates.dpatch b/packages/gcc/gcc-4.3.1/debian/svn-doc-updates.dpatch
index d4fa85a556..d4fa85a556 100644
--- a/packages/gcc/gcc-4.3.0/debian/svn-doc-updates.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/svn-doc-updates.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/svn-gdc-updates.dpatch b/packages/gcc/gcc-4.3.1/debian/svn-gdc-updates.dpatch
index 728209e51d..728209e51d 100644
--- a/packages/gcc/gcc-4.3.0/debian/svn-gdc-updates.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/svn-gdc-updates.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/svn-updates.dpatch b/packages/gcc/gcc-4.3.1/debian/svn-updates.dpatch
index 480eeaeba4..480eeaeba4 100644
--- a/packages/gcc/gcc-4.3.0/debian/svn-updates.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/svn-updates.dpatch
diff --git a/packages/gcc/gcc-4.3.0/debian/template.dpatch b/packages/gcc/gcc-4.3.1/debian/template.dpatch
index 71ffc51cbd..71ffc51cbd 100644
--- a/packages/gcc/gcc-4.3.0/debian/template.dpatch
+++ b/packages/gcc/gcc-4.3.1/debian/template.dpatch
diff --git a/packages/gcc/gcc-4.3.1/fedora/.mtn2git_empty b/packages/gcc/gcc-4.3.1/fedora/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/fedora/.mtn2git_empty
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-c++-builtin-redecl.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-c++-builtin-redecl.patch
index 77655ad792..77655ad792 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-c++-builtin-redecl.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-c++-builtin-redecl.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-cpp-pragma.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-cpp-pragma.patch
index 00d37bd7ce..00d37bd7ce 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-cpp-pragma.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-cpp-pragma.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-i386-libgomp.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-i386-libgomp.patch
index 2ad3b24d89..2ad3b24d89 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-i386-libgomp.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-i386-libgomp.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-ia64-libunwind.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-ia64-libunwind.patch
index 8e10979ce8..8e10979ce8 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-ia64-libunwind.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-ia64-libunwind.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-java-debug-iface-type.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-java-debug-iface-type.patch
index 63a1b50a76..63a1b50a76 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-java-debug-iface-type.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-java-debug-iface-type.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-java-nomulti.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-java-nomulti.patch
index f07ead8f2b..f07ead8f2b 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-java-nomulti.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-java-nomulti.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-libgomp-speedup.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-libgomp-speedup.patch
index da85e556ec..da85e556ec 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-libgomp-speedup.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-libgomp-speedup.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-ppc32-retaddr.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-ppc32-retaddr.patch
index e9ae1bc303..e9ae1bc303 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-ppc32-retaddr.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-ppc32-retaddr.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr27898.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr27898.patch
index 172bb81171..172bb81171 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr27898.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr27898.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr32139.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr32139.patch
index f35696703d..f35696703d 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr32139.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr32139.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr33763.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr33763.patch
index 9e9c90d271..9e9c90d271 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr33763.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr33763.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr35440.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch
index 6bf3f0d9d8..6bf3f0d9d8 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr35440.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr35440.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr35751.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr35751.patch
index 37b84275e2..37b84275e2 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-pr35751.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-pr35751.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-rh251682.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-rh251682.patch
index e96ae6f134..e96ae6f134 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-rh251682.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-rh251682.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-rh330771.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-rh330771.patch
index c894f83b43..c894f83b43 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-rh330771.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-rh330771.patch
diff --git a/packages/gcc/gcc-4.3.0/fedora/gcc43-rh341221.patch b/packages/gcc/gcc-4.3.1/fedora/gcc43-rh341221.patch
index 28e73b07c3..28e73b07c3 100644
--- a/packages/gcc/gcc-4.3.0/fedora/gcc43-rh341221.patch
+++ b/packages/gcc/gcc-4.3.1/fedora/gcc43-rh341221.patch
diff --git a/packages/gcc/gcc-4.3.0/fix-ICE-in-arm_unwind_emit_set.diff b/packages/gcc/gcc-4.3.1/fix-ICE-in-arm_unwind_emit_set.diff
index b8a147d3d9..b8a147d3d9 100644
--- a/packages/gcc/gcc-4.3.0/fix-ICE-in-arm_unwind_emit_set.diff
+++ b/packages/gcc/gcc-4.3.1/fix-ICE-in-arm_unwind_emit_set.diff
diff --git a/packages/gcc/gcc-4.3.1/fortran-cross-compile-hack.patch b/packages/gcc/gcc-4.3.1/fortran-cross-compile-hack.patch
new file mode 100644
index 0000000000..b3d38ad983
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/fortran-cross-compile-hack.patch
@@ -0,0 +1,30 @@
+* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
+ used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
+ directory.
+
+diff --git a/libgfortran/configure b/libgfortran/configure
+index f7d86fb..d0966ec 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -4475,6 +4475,6 @@ exec 5>>./config.log
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ ac_ext=${FC_SRCEXT-f}
+ ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
+\ No newline at end of file
+diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
+index 4661306..9f83e55 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -140,7 +140,7 @@ AC_SUBST(enable_static)
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+
+ # extra LD Flags which are required for targets
diff --git a/packages/gcc/gcc-4.3.1/fortran-static-linking.patch b/packages/gcc/gcc-4.3.1/fortran-static-linking.patch
new file mode 100644
index 0000000000..3dd6321dc3
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/fortran-static-linking.patch
@@ -0,0 +1,48 @@
+f951 (fortran) links to MPFR and GMP of our staging area but when executing
+the command the libs can not be found. Use rpath like all the other apps in
+our staging bin/ directory.
+
+Patch the configure to avoid the regeneration...
+
+Index: gcc-4.2.2/configure
+===================================================================
+--- gcc-4.2.2.orig/configure 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure 2008-01-15 23:25:20.000000000 +0100
+@@ -2278,14 +2278,14 @@
+
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # Specify a location for gmp
+Index: gcc-4.2.2/configure.in
+===================================================================
+--- gcc-4.2.2.orig/configure.in 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure.in 2008-01-15 23:24:36.000000000 +0100
+@@ -1066,14 +1066,14 @@
+ AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # Specify a location for gmp
diff --git a/packages/gcc/gcc-4.3.1/gcc-4.0.2-e300c2c3.patch b/packages/gcc/gcc-4.3.1/gcc-4.0.2-e300c2c3.patch
new file mode 100644
index 0000000000..736ac4b6b6
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/gcc-4.0.2-e300c2c3.patch
@@ -0,0 +1,311 @@
+Adds support for Freescale Power architecture e300c2 and e300c3 cores.
+http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
+
+Leon Woestenberg <leonw@mailcan.com>
+
+Index: gcc-4.1.2/gcc/config/rs6000/e300c2c3.md
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.1.2/gcc/config/rs6000/e300c2c3.md 2007-10-18 15:32:51.000000000 +0200
+@@ -0,0 +1,189 @@
++;; Pipeline description for Motorola PowerPC e300c3 core.
++;; Copyright (C) 2003 Free Software Foundation, Inc.
++;;
++;; This file is part of GCC.
++
++;; GCC 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.
++
++;; GCC 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 GCC; see the file COPYING. If not, write to the
++;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
++;; MA 02111-1307, USA.
++
++(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
++(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
++
++;; We don't simulate general issue queue (GIC). If we have SU insn
++;; and then SU1 insn, they can not be issued on the same cycle
++;; (although SU1 insn and then SU insn can be issued) because the SU
++;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
++;; multipass insn scheduling will find the situation and issue the SU1
++;; insn and then the SU insn.
++(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
++
++;; We could describe completion buffers slots in combination with the
++;; retirement units and the order of completion but the result
++;; automaton would behave in the same way because we can not describe
++;; real latency time with taking in order completion into account.
++;; Actually we could define the real latency time by querying reserved
++;; automaton units but the current scheduler uses latency time before
++;; issuing insns and making any reservations.
++;;
++;; So our description is aimed to achieve a insn schedule in which the
++;; insns would not wait in the completion buffer.
++(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
++
++;; Branch unit:
++(define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
++
++;; IU:
++(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
++
++;; IU: This used to describe non-pipelined division.
++(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
++
++;; SRU:
++(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
++
++;; Here we simplified LSU unit description not describing the stages.
++(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
++
++;; FPU:
++(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
++
++;; The following units are used to make automata deterministic
++(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
++(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
++(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
++(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
++
++;; The following sets to make automata deterministic when option ndfa is used.
++(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
++(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
++(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
++(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
++
++;; Some useful abbreviations.
++(define_reservation "ppce300c3_decode"
++ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
++(define_reservation "ppce300c3_issue"
++ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
++(define_reservation "ppce300c3_retire"
++ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
++(define_reservation "ppce300c3_iu_stage0"
++ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
++
++;; Compares can be executed either one of the IU or SRU
++(define_insn_reservation "ppce300c3_cmp" 1
++ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
++ +ppce300c3_retire")
++
++;; Other one cycle IU insns
++(define_insn_reservation "ppce300c3_iu" 1
++ (and (eq_attr "type" "integer,insert_word")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
++
++;; Branch. Actually this latency time is not used by the scheduler.
++(define_insn_reservation "ppce300c3_branch" 1
++ (and (eq_attr "type" "jmpreg,branch")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
++
++;; Multiply is non-pipelined but can be executed in any IU
++(define_insn_reservation "ppce300c3_multiply" 2
++ (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
++ ppce300c3_iu_stage0+ppce300c3_retire")
++
++;; Divide. We use the average latency time here. We omit reserving a
++;; retire unit because of the result automata will be huge.
++(define_insn_reservation "ppce300c3_divide" 20
++ (and (eq_attr "type" "idiv")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
++ ppce300c3_mu_div*19")
++
++;; CR logical
++(define_insn_reservation "ppce300c3_cr_logical" 1
++ (and (eq_attr "type" "cr_logical,delayed_cr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mfcr
++(define_insn_reservation "ppce300c3_mfcr" 1
++ (and (eq_attr "type" "mfcr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mtcrf
++(define_insn_reservation "ppce300c3_mtcrf" 1
++ (and (eq_attr "type" "mtcr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mtjmpr
++(define_insn_reservation "ppce300c3_mtjmpr" 1
++ (and (eq_attr "type" "mtjmpr,mfjmpr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Float point instructions
++(define_insn_reservation "ppce300c3_fpcompare" 3
++ (and (eq_attr "type" "fpcompare")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fp" 3
++ (and (eq_attr "type" "fp")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_dmul" 4
++ (and (eq_attr "type" "dmul")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
++
++; Divides are not pipelined
++(define_insn_reservation "ppce300c3_sdiv" 18
++ (and (eq_attr "type" "sdiv")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
++
++(define_insn_reservation "ppce300c3_ddiv" 33
++ (and (eq_attr "type" "ddiv")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
++
++;; Loads
++(define_insn_reservation "ppce300c3_load" 2
++ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fpload" 2
++ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++;; Stores.
++(define_insn_reservation "ppce300c3_store" 2
++ (and (eq_attr "type" "store,store_ux,store_u")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fpstore" 2
++ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
+Index: gcc-4.1.2/gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc-4.1.2.orig/gcc/config/rs6000/rs6000.c 2006-12-16 20:24:56.000000000 +0100
++++ gcc-4.1.2/gcc/config/rs6000/rs6000.c 2007-10-18 15:34:26.000000000 +0200
+@@ -557,6 +557,21 @@
+ COSTS_N_INSNS (29), /* ddiv */
+ };
+
++/* Instruction costs on E300C2 and E300C3 cores. */
++static const
++struct processor_costs ppce300c2c3_cost = {
++ COSTS_N_INSNS (4), /* mulsi */
++ COSTS_N_INSNS (4), /* mulsi_const */
++ COSTS_N_INSNS (4), /* mulsi_const9 */
++ COSTS_N_INSNS (4), /* muldi */
++ COSTS_N_INSNS (19), /* divsi */
++ COSTS_N_INSNS (19), /* divdi */
++ COSTS_N_INSNS (3), /* fp */
++ COSTS_N_INSNS (4), /* dmul */
++ COSTS_N_INSNS (18), /* sdiv */
++ COSTS_N_INSNS (33), /* ddiv */
++};
++
+ /* Instruction costs on POWER4 and POWER5 processors. */
+ static const
+ struct processor_costs power4_cost = {
+@@ -1140,6 +1155,8 @@
+ /* 8548 has a dummy entry for now. */
+ {"8548", PROCESSOR_PPC8540,
+ POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_STRICT_ALIGN},
++ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
++ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK},
+ {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
+ {"970", PROCESSOR_POWER4,
+ POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
+@@ -1529,6 +1546,11 @@
+ rs6000_cost = &ppc8540_cost;
+ break;
+
++ case PROCESSOR_PPCE300C2:
++ case PROCESSOR_PPCE300C3:
++ rs6000_cost = &ppce300c2c3_cost;
++ break;
++
+ case PROCESSOR_POWER4:
+ case PROCESSOR_POWER5:
+ rs6000_cost = &power4_cost;
+@@ -16647,6 +16669,8 @@
+ case CPU_PPC750:
+ case CPU_PPC7400:
+ case CPU_PPC8540:
++ case CPU_PPCE300C2:
++ case CPU_PPCE300C3:
+ return 2;
+ case CPU_RIOS2:
+ case CPU_PPC604:
+Index: gcc-4.1.2/gcc/config/rs6000/rs6000.h
+===================================================================
+--- gcc-4.1.2.orig/gcc/config/rs6000/rs6000.h 2006-11-18 01:25:49.000000000 +0100
++++ gcc-4.1.2/gcc/config/rs6000/rs6000.h 2007-10-18 15:32:51.000000000 +0200
+@@ -111,6 +111,8 @@
+ %{mcpu=970: -mpower4 -maltivec} \
+ %{mcpu=G5: -mpower4 -maltivec} \
+ %{mcpu=8540: -me500} \
++%{mcpu=e300c2: -mppc} \
++%{mcpu=e300c3: -mppc -mpmr} \
+ %{maltivec: -maltivec} \
+ -many"
+
+@@ -211,6 +213,8 @@
+ PROCESSOR_PPC7400,
+ PROCESSOR_PPC7450,
+ PROCESSOR_PPC8540,
++ PROCESSOR_PPCE300C2,
++ PROCESSOR_PPCE300C3,
+ PROCESSOR_POWER4,
+ PROCESSOR_POWER5
+ };
+Index: gcc-4.1.2/gcc/config/rs6000/rs6000.md
+===================================================================
+--- gcc-4.1.2.orig/gcc/config/rs6000/rs6000.md 2006-12-16 20:24:56.000000000 +0100
++++ gcc-4.1.2/gcc/config/rs6000/rs6000.md 2007-10-18 15:32:51.000000000 +0200
+@@ -103,7 +103,7 @@
+ ;; Processor type -- this attribute must exactly match the processor_type
+ ;; enumeration in rs6000.h.
+
+-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5"
++(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,power4,power5"
+ (const (symbol_ref "rs6000_cpu_attr")))
+
+ (automata_option "ndfa")
+@@ -119,6 +119,7 @@
+ (include "7xx.md")
+ (include "7450.md")
+ (include "8540.md")
++(include "e300c2c3.md")
+ (include "power4.md")
+ (include "power5.md")
+
+Index: gcc-4.1.2/gcc/config.gcc
+===================================================================
+--- gcc-4.1.2.orig/gcc/config.gcc 2007-10-18 15:26:23.000000000 +0200
++++ gcc-4.1.2/gcc/config.gcc 2007-10-18 15:32:51.000000000 +0200
+@@ -2710,7 +2710,7 @@
+ | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
+ | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
+ | 601 | 602 | 603 | 603e | ec603e | 604 \
+- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
++ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
+ | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5)
+ # OK
+ ;;
diff --git a/packages/gcc/gcc-4.3.1/gcc-arm-frename-registers.patch b/packages/gcc/gcc-4.3.1/gcc-arm-frename-registers.patch
new file mode 100644
index 0000000000..280b90358e
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/gcc-arm-frename-registers.patch
@@ -0,0 +1,25 @@
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35964
+Index: gcc-4.3.0/gcc/regrename.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/regrename.c 2008-05-28 08:31:15.000000000 -0700
++++ gcc-4.3.0/gcc/regrename.c 2008-05-28 08:34:00.000000000 -0700
+@@ -782,6 +782,10 @@
+ || (predicated && recog_data.operand_type[i] == OP_OUT))
+ recog_data.operand_type[i] = OP_INOUT;
+ }
++ /* Unshare dup_loc RTL */
++ for (i = 0; i < recog_data.n_dups; i++)
++ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
++
+
+ /* Step 1: Close chains for which we have overlapping reads. */
+ for (i = 0; i < n_ops; i++)
+@@ -813,7 +817,7 @@
+ OP_IN, 0);
+
+ for (i = 0; i < recog_data.n_dups; i++)
+- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
++ *recog_data.dup_loc[i] = old_dups[i];
+ for (i = 0; i < n_ops; i++)
+ *recog_data.operand_loc[i] = old_operands[i];
+ if (recog_data.n_dups)
diff --git a/packages/gcc/gcc-4.3.1/gcc-release-branch/.mtn2git_empty b/packages/gcc/gcc-4.3.1/gcc-release-branch/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/gcc-release-branch/.mtn2git_empty
diff --git a/packages/gcc/gcc-4.3.1/gcc-release-branch/PR-36500-fix-neon.patch b/packages/gcc/gcc-4.3.1/gcc-release-branch/PR-36500-fix-neon.patch
new file mode 100644
index 0000000000..971dfe7e29
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/gcc-release-branch/PR-36500-fix-neon.patch
@@ -0,0 +1,265 @@
+--- foo/gcc/config/arm/arm.c 2008/06/11 10:51:34 136660
++++ foo/gcc/config/arm/arm.c 2008/06/11 10:52:55 136661
+@@ -14830,124 +14830,190 @@
+ {
+ unsigned int i, fcode = ARM_BUILTIN_NEON_BASE;
+
++ tree neon_intQI_type_node;
++ tree neon_intHI_type_node;
++ tree neon_polyQI_type_node;
++ tree neon_polyHI_type_node;
++ tree neon_intSI_type_node;
++ tree neon_intDI_type_node;
++ tree neon_float_type_node;
++
++ tree intQI_pointer_node;
++ tree intHI_pointer_node;
++ tree intSI_pointer_node;
++ tree intDI_pointer_node;
++ tree float_pointer_node;
++
++ tree const_intQI_node;
++ tree const_intHI_node;
++ tree const_intSI_node;
++ tree const_intDI_node;
++ tree const_float_node;
++
++ tree const_intQI_pointer_node;
++ tree const_intHI_pointer_node;
++ tree const_intSI_pointer_node;
++ tree const_intDI_pointer_node;
++ tree const_float_pointer_node;
++
++ tree V8QI_type_node;
++ tree V4HI_type_node;
++ tree V2SI_type_node;
++ tree V2SF_type_node;
++ tree V16QI_type_node;
++ tree V8HI_type_node;
++ tree V4SI_type_node;
++ tree V4SF_type_node;
++ tree V2DI_type_node;
++
++ tree intUQI_type_node;
++ tree intUHI_type_node;
++ tree intUSI_type_node;
++ tree intUDI_type_node;
++
++ tree intEI_type_node;
++ tree intOI_type_node;
++ tree intCI_type_node;
++ tree intXI_type_node;
++
++ tree V8QI_pointer_node;
++ tree V4HI_pointer_node;
++ tree V2SI_pointer_node;
++ tree V2SF_pointer_node;
++ tree V16QI_pointer_node;
++ tree V8HI_pointer_node;
++ tree V4SI_pointer_node;
++ tree V4SF_pointer_node;
++ tree V2DI_pointer_node;
++
++ tree void_ftype_pv8qi_v8qi_v8qi;
++ tree void_ftype_pv4hi_v4hi_v4hi;
++ tree void_ftype_pv2si_v2si_v2si;
++ tree void_ftype_pv2sf_v2sf_v2sf;
++ tree void_ftype_pdi_di_di;
++ tree void_ftype_pv16qi_v16qi_v16qi;
++ tree void_ftype_pv8hi_v8hi_v8hi;
++ tree void_ftype_pv4si_v4si_v4si;
++ tree void_ftype_pv4sf_v4sf_v4sf;
++ tree void_ftype_pv2di_v2di_v2di;
++
++ tree reinterp_ftype_dreg[5][5];
++ tree reinterp_ftype_qreg[5][5];
++ tree dreg_types[5], qreg_types[5];
++
+ /* Create distinguished type nodes for NEON vector element types,
+ and pointers to values of such types, so we can detect them later. */
+- tree neon_intQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
+- tree neon_intHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
+- tree neon_polyQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
+- tree neon_polyHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
+- tree neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode));
+- tree neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode));
+- tree neon_float_type_node = make_node (REAL_TYPE);
+-
+- tree intQI_pointer_node = build_pointer_type (neon_intQI_type_node);
+- tree intHI_pointer_node = build_pointer_type (neon_intHI_type_node);
+- tree intSI_pointer_node = build_pointer_type (neon_intSI_type_node);
+- tree intDI_pointer_node = build_pointer_type (neon_intDI_type_node);
+- tree float_pointer_node = build_pointer_type (neon_float_type_node);
++ neon_intQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
++ neon_intHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
++ neon_polyQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
++ neon_polyHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
++ neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode));
++ neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode));
++ neon_float_type_node = make_node (REAL_TYPE);
++ TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE;
++ layout_type (neon_float_type_node);
++
++ intQI_pointer_node = build_pointer_type (neon_intQI_type_node);
++ intHI_pointer_node = build_pointer_type (neon_intHI_type_node);
++ intSI_pointer_node = build_pointer_type (neon_intSI_type_node);
++ intDI_pointer_node = build_pointer_type (neon_intDI_type_node);
++ float_pointer_node = build_pointer_type (neon_float_type_node);
+
+ /* Next create constant-qualified versions of the above types. */
+- tree const_intQI_node = build_qualified_type (neon_intQI_type_node,
+- TYPE_QUAL_CONST);
+- tree const_intHI_node = build_qualified_type (neon_intHI_type_node,
+- TYPE_QUAL_CONST);
+- tree const_intSI_node = build_qualified_type (neon_intSI_type_node,
+- TYPE_QUAL_CONST);
+- tree const_intDI_node = build_qualified_type (neon_intDI_type_node,
+- TYPE_QUAL_CONST);
+- tree const_float_node = build_qualified_type (neon_float_type_node,
+- TYPE_QUAL_CONST);
+-
+- tree const_intQI_pointer_node = build_pointer_type (const_intQI_node);
+- tree const_intHI_pointer_node = build_pointer_type (const_intHI_node);
+- tree const_intSI_pointer_node = build_pointer_type (const_intSI_node);
+- tree const_intDI_pointer_node = build_pointer_type (const_intDI_node);
+- tree const_float_pointer_node = build_pointer_type (const_float_node);
++ const_intQI_node = build_qualified_type (neon_intQI_type_node,
++ TYPE_QUAL_CONST);
++ const_intHI_node = build_qualified_type (neon_intHI_type_node,
++ TYPE_QUAL_CONST);
++ const_intSI_node = build_qualified_type (neon_intSI_type_node,
++ TYPE_QUAL_CONST);
++ const_intDI_node = build_qualified_type (neon_intDI_type_node,
++ TYPE_QUAL_CONST);
++ const_float_node = build_qualified_type (neon_float_type_node,
++ TYPE_QUAL_CONST);
++
++ const_intQI_pointer_node = build_pointer_type (const_intQI_node);
++ const_intHI_pointer_node = build_pointer_type (const_intHI_node);
++ const_intSI_pointer_node = build_pointer_type (const_intSI_node);
++ const_intDI_pointer_node = build_pointer_type (const_intDI_node);
++ const_float_pointer_node = build_pointer_type (const_float_node);
+
+ /* Now create vector types based on our NEON element types. */
+ /* 64-bit vectors. */
+- tree V8QI_type_node =
++ V8QI_type_node =
+ build_vector_type_for_mode (neon_intQI_type_node, V8QImode);
+- tree V4HI_type_node =
++ V4HI_type_node =
+ build_vector_type_for_mode (neon_intHI_type_node, V4HImode);
+- tree V2SI_type_node =
++ V2SI_type_node =
+ build_vector_type_for_mode (neon_intSI_type_node, V2SImode);
+- tree V2SF_type_node =
++ V2SF_type_node =
+ build_vector_type_for_mode (neon_float_type_node, V2SFmode);
+ /* 128-bit vectors. */
+- tree V16QI_type_node =
++ V16QI_type_node =
+ build_vector_type_for_mode (neon_intQI_type_node, V16QImode);
+- tree V8HI_type_node =
++ V8HI_type_node =
+ build_vector_type_for_mode (neon_intHI_type_node, V8HImode);
+- tree V4SI_type_node =
++ V4SI_type_node =
+ build_vector_type_for_mode (neon_intSI_type_node, V4SImode);
+- tree V4SF_type_node =
++ V4SF_type_node =
+ build_vector_type_for_mode (neon_float_type_node, V4SFmode);
+- tree V2DI_type_node =
++ V2DI_type_node =
+ build_vector_type_for_mode (neon_intDI_type_node, V2DImode);
+
+ /* Unsigned integer types for various mode sizes. */
+- tree intUQI_type_node = make_unsigned_type (GET_MODE_PRECISION (QImode));
+- tree intUHI_type_node = make_unsigned_type (GET_MODE_PRECISION (HImode));
+- tree intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode));
+- tree intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode));
++ intUQI_type_node = make_unsigned_type (GET_MODE_PRECISION (QImode));
++ intUHI_type_node = make_unsigned_type (GET_MODE_PRECISION (HImode));
++ intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode));
++ intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode));
+
+ /* Opaque integer types for structures of vectors. */
+- tree intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode));
+- tree intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode));
+- tree intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode));
+- tree intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode));
++ intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode));
++ intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode));
++ intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode));
++ intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode));
+
+ /* Pointers to vector types. */
+- tree V8QI_pointer_node = build_pointer_type (V8QI_type_node);
+- tree V4HI_pointer_node = build_pointer_type (V4HI_type_node);
+- tree V2SI_pointer_node = build_pointer_type (V2SI_type_node);
+- tree V2SF_pointer_node = build_pointer_type (V2SF_type_node);
+- tree V16QI_pointer_node = build_pointer_type (V16QI_type_node);
+- tree V8HI_pointer_node = build_pointer_type (V8HI_type_node);
+- tree V4SI_pointer_node = build_pointer_type (V4SI_type_node);
+- tree V4SF_pointer_node = build_pointer_type (V4SF_type_node);
+- tree V2DI_pointer_node = build_pointer_type (V2DI_type_node);
++ V8QI_pointer_node = build_pointer_type (V8QI_type_node);
++ V4HI_pointer_node = build_pointer_type (V4HI_type_node);
++ V2SI_pointer_node = build_pointer_type (V2SI_type_node);
++ V2SF_pointer_node = build_pointer_type (V2SF_type_node);
++ V16QI_pointer_node = build_pointer_type (V16QI_type_node);
++ V8HI_pointer_node = build_pointer_type (V8HI_type_node);
++ V4SI_pointer_node = build_pointer_type (V4SI_type_node);
++ V4SF_pointer_node = build_pointer_type (V4SF_type_node);
++ V2DI_pointer_node = build_pointer_type (V2DI_type_node);
+
+ /* Operations which return results as pairs. */
+- tree void_ftype_pv8qi_v8qi_v8qi =
++ void_ftype_pv8qi_v8qi_v8qi =
+ build_function_type_list (void_type_node, V8QI_pointer_node, V8QI_type_node,
+ V8QI_type_node, NULL);
+- tree void_ftype_pv4hi_v4hi_v4hi =
++ void_ftype_pv4hi_v4hi_v4hi =
+ build_function_type_list (void_type_node, V4HI_pointer_node, V4HI_type_node,
+ V4HI_type_node, NULL);
+- tree void_ftype_pv2si_v2si_v2si =
++ void_ftype_pv2si_v2si_v2si =
+ build_function_type_list (void_type_node, V2SI_pointer_node, V2SI_type_node,
+ V2SI_type_node, NULL);
+- tree void_ftype_pv2sf_v2sf_v2sf =
++ void_ftype_pv2sf_v2sf_v2sf =
+ build_function_type_list (void_type_node, V2SF_pointer_node, V2SF_type_node,
+ V2SF_type_node, NULL);
+- tree void_ftype_pdi_di_di =
++ void_ftype_pdi_di_di =
+ build_function_type_list (void_type_node, intDI_pointer_node,
+ neon_intDI_type_node, neon_intDI_type_node, NULL);
+- tree void_ftype_pv16qi_v16qi_v16qi =
++ void_ftype_pv16qi_v16qi_v16qi =
+ build_function_type_list (void_type_node, V16QI_pointer_node,
+ V16QI_type_node, V16QI_type_node, NULL);
+- tree void_ftype_pv8hi_v8hi_v8hi =
++ void_ftype_pv8hi_v8hi_v8hi =
+ build_function_type_list (void_type_node, V8HI_pointer_node, V8HI_type_node,
+ V8HI_type_node, NULL);
+- tree void_ftype_pv4si_v4si_v4si =
++ void_ftype_pv4si_v4si_v4si =
+ build_function_type_list (void_type_node, V4SI_pointer_node, V4SI_type_node,
+ V4SI_type_node, NULL);
+- tree void_ftype_pv4sf_v4sf_v4sf =
++ void_ftype_pv4sf_v4sf_v4sf =
+ build_function_type_list (void_type_node, V4SF_pointer_node, V4SF_type_node,
+ V4SF_type_node, NULL);
+- tree void_ftype_pv2di_v2di_v2di =
++ void_ftype_pv2di_v2di_v2di =
+ build_function_type_list (void_type_node, V2DI_pointer_node, V2DI_type_node,
+ V2DI_type_node, NULL);
+
+- tree reinterp_ftype_dreg[5][5];
+- tree reinterp_ftype_qreg[5][5];
+- tree dreg_types[5], qreg_types[5];
+-
+- TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE;
+- layout_type (neon_float_type_node);
+-
+ /* Define typedefs which exactly correspond to the modes we are basing vector
+ types on. If you change these names you'll need to change
+ the table used by arm_mangle_type too. */
diff --git a/packages/gcc/gcc-4.3.1/gcc41-configure.in.patch b/packages/gcc/gcc-4.3.1/gcc41-configure.in.patch
new file mode 100644
index 0000000000..3d33bcb978
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.0/gcc43-build-id.patch b/packages/gcc/gcc-4.3.1/gcc43-build-id.patch
index 4e162e6472..4e162e6472 100644
--- a/packages/gcc/gcc-4.3.0/gcc43-build-id.patch
+++ b/packages/gcc/gcc-4.3.1/gcc43-build-id.patch
diff --git a/packages/gcc/gcc-4.3.0/gcc43-ppc64-ia64-GNU-stack.patch b/packages/gcc/gcc-4.3.1/gcc43-ppc64-ia64-GNU-stack.patch
index d49f2b9855..d49f2b9855 100644
--- a/packages/gcc/gcc-4.3.0/gcc43-ppc64-ia64-GNU-stack.patch
+++ b/packages/gcc/gcc-4.3.1/gcc43-ppc64-ia64-GNU-stack.patch
diff --git a/packages/gcc/gcc-4.3.1/intermask-bigendian.patch b/packages/gcc/gcc-4.3.1/intermask-bigendian.patch
new file mode 100644
index 0000000000..fdff3d3d86
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/intermask-bigendian.patch
@@ -0,0 +1,24 @@
+--- gcc-4.2.0/gcc/config/arm/bpabi.h
++++ gcc-4.2.0/gcc/config/arm/bpabi.h
+@@ -33,9 +33,19 @@
+ #undef FPUTYPE_DEFAULT
+ #define FPUTYPE_DEFAULT FPUTYPE_VFP
+
++/*
++ * '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
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#endif
++
+ /* EABI targets should enable interworking by default. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT MASK_INTERWORK
++#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
+
+ /* The ARM BPABI functions return a boolean; they use no special
+ calling convention. */
+
diff --git a/packages/gcc/gcc-4.3.1/ldflags.patch b/packages/gcc/gcc-4.3.1/ldflags.patch
new file mode 100644
index 0000000000..9576f60778
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.0/pr34130.patch b/packages/gcc/gcc-4.3.1/pr34130.patch
index 415335f4b4..415335f4b4 100644
--- a/packages/gcc/gcc-4.3.0/pr34130.patch
+++ b/packages/gcc/gcc-4.3.1/pr34130.patch
diff --git a/packages/gcc/gcc-4.3.1/sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.3.1/sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..4377c2143b
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/sh3-installfix-fixheaders.patch b/packages/gcc/gcc-4.3.1/sh3-installfix-fixheaders.patch
new file mode 100644
index 0000000000..a06cd2e075
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/unbreak-armv4t.patch b/packages/gcc/gcc-4.3.1/unbreak-armv4t.patch
new file mode 100644
index 0000000000..b3399abfdb
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/zecke-no-host-includes.patch b/packages/gcc/gcc-4.3.1/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/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.3.1/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.3.1/zecke-xgcc-cpp.patch
new file mode 100644
index 0000000000..3ccd124764
--- /dev/null
+++ b/packages/gcc/gcc-4.3.1/zecke-xgcc-cpp.patch
@@ -0,0 +1,16 @@
+upstream: n/a
+comment: Use the preprocessor we have just compiled instead the one of
+the system. There might be incompabilities between us and them.
+
+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 CPP; \
+ 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.4.bb b/packages/gcc/gcc-cross-initial_4.2.4.bb
new file mode 100644
index 0000000000..fe326d304b
--- /dev/null
+++ b/packages/gcc/gcc-cross-initial_4.2.4.bb
@@ -0,0 +1,5 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-initial.inc
+
+EXTRA_OECONF += "--disable-libmudflap --disable-libgomp \
+ --disable-libssp"
diff --git a/packages/gcc/gcc-cross-initial_4.3.0.bb b/packages/gcc/gcc-cross-initial_4.3.1.bb
index 7060d46758..c8738ad614 100644
--- a/packages/gcc/gcc-cross-initial_4.3.0.bb
+++ b/packages/gcc/gcc-cross-initial_4.3.1.bb
@@ -1,8 +1,11 @@
require gcc-cross_${PV}.bb
require gcc-cross-initial.inc
-EXTRA_OECONF += "--disable-libmudflap --disable-libgomp \
- --disable-libssp"
+DEPENDS += "gmp-native mpfr-native"
+
+EXTRA_OECONF += " --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libssp"
# Hack till we fix *libc properly
do_stage_append() {
diff --git a/packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb b/packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
index e4068cbeb4..9b5a2fed2c 100644
--- a/packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
+++ b/packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
@@ -7,7 +7,7 @@ DEFAULT_PREFERENCE = "-1"
require gcc-cross-initial_csl-arm-2005q3.bb
require gcc-cross-kernel.inc
-PR = "r1"
+PR = "r2"
SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1"
diff --git a/packages/gcc/gcc-cross-kernel-4.2.1_csl-arm-2007q3.bb b/packages/gcc/gcc-cross-kernel-4.2.1_csl-arm-2007q3.bb
new file mode 100644
index 0000000000..f5b0d8e915
--- /dev/null
+++ b/packages/gcc/gcc-cross-kernel-4.2.1_csl-arm-2007q3.bb
@@ -0,0 +1,2 @@
+require gcc-cross-initial_${PV}.bb
+require gcc-cross-kernel.inc
diff --git a/packages/gcc/gcc-cross-kernel-4.2.4_4.2.4.bb b/packages/gcc/gcc-cross-kernel-4.2.4_4.2.4.bb
new file mode 100644
index 0000000000..f5b0d8e915
--- /dev/null
+++ b/packages/gcc/gcc-cross-kernel-4.2.4_4.2.4.bb
@@ -0,0 +1,2 @@
+require gcc-cross-initial_${PV}.bb
+require gcc-cross-kernel.inc
diff --git a/packages/gcc/gcc-cross-kernel.inc b/packages/gcc/gcc-cross-kernel.inc
index fe6539b808..7bca7d2bf5 100644
--- a/packages/gcc/gcc-cross-kernel.inc
+++ b/packages/gcc/gcc-cross-kernel.inc
@@ -1,6 +1,8 @@
# Cut-down gcc for kernel builds
# Only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
+DEPENDS += "gcc-cross"
+
PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
do_install () {
diff --git a/packages/gcc/gcc-cross-sdk_3.4.3.bb b/packages/gcc/gcc-cross-sdk_3.4.3.bb
index d9f5880c17..1a7faa5b8c 100644
--- a/packages/gcc/gcc-cross-sdk_3.4.3.bb
+++ b/packages/gcc/gcc-cross-sdk_3.4.3.bb
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
require gcc-${PV}.inc
require gcc-cross-sdk.inc
diff --git a/packages/gcc/gcc-cross-sdk_4.1.1.bb b/packages/gcc/gcc-cross-sdk_4.1.1.bb
index ee769e034e..5caec0b5a5 100644
--- a/packages/gcc/gcc-cross-sdk_4.1.1.bb
+++ b/packages/gcc/gcc-cross-sdk_4.1.1.bb
@@ -1,8 +1,8 @@
-PR = "r4"
+PR = "r5"
require gcc-${PV}.inc
require gcc-cross-sdk.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc
-DEPENDS += "gmp-native mpfr-native" \ No newline at end of file
+DEPENDS += "gmp-native mpfr-native"
diff --git a/packages/gcc/gcc-cross-sdk_4.1.2.bb b/packages/gcc/gcc-cross-sdk_4.1.2.bb
index 616a5831d0..51b99f882a 100644
--- a/packages/gcc/gcc-cross-sdk_4.1.2.bb
+++ b/packages/gcc/gcc-cross-sdk_4.1.2.bb
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
require gcc-${PV}.inc
require gcc-cross-sdk.inc
diff --git a/packages/gcc/gcc-cross-sdk_4.2.2.bb b/packages/gcc/gcc-cross-sdk_4.2.2.bb
index 54e7453e69..8057608e0d 100644
--- a/packages/gcc/gcc-cross-sdk_4.2.2.bb
+++ b/packages/gcc/gcc-cross-sdk_4.2.2.bb
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
inherit sdk
diff --git a/packages/gcc/gcc-cross-sdk_4.2.3.bb b/packages/gcc/gcc-cross-sdk_4.2.3.bb
index 7e3a459ea8..54e7453e69 100644
--- a/packages/gcc/gcc-cross-sdk_4.2.3.bb
+++ b/packages/gcc/gcc-cross-sdk_4.2.3.bb
@@ -1,4 +1,4 @@
-PR = "r3"
+PR = "r4"
inherit sdk
diff --git a/packages/gcc/gcc-cross-sdk_4.3.0.bb b/packages/gcc/gcc-cross-sdk_4.2.4.bb
index 54e7453e69..29ee187785 100644
--- a/packages/gcc/gcc-cross-sdk_4.3.0.bb
+++ b/packages/gcc/gcc-cross-sdk_4.2.4.bb
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r1"
inherit sdk
diff --git a/packages/gcc/gcc-cross-sdk_4.3.1.bb b/packages/gcc/gcc-cross-sdk_4.3.1.bb
new file mode 100644
index 0000000000..8057608e0d
--- /dev/null
+++ b/packages/gcc/gcc-cross-sdk_4.3.1.bb
@@ -0,0 +1,14 @@
+PR = "r5"
+
+inherit sdk
+
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
+require gcc-package-sdk.inc
+
+DEPENDS += "gmp-native mpfr-native"
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
+ --disable-libgomp --disable-libmudflap \
+ --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
diff --git a/packages/gcc/gcc-cross_3.4.3.bb b/packages/gcc/gcc-cross_3.4.3.bb
index 43d4b76037..8a2aa6a2bd 100644
--- a/packages/gcc/gcc-cross_3.4.3.bb
+++ b/packages/gcc/gcc-cross_3.4.3.bb
@@ -1,4 +1,4 @@
-PR = "r14"
+PR = "r15"
require gcc-${PV}.inc
require gcc-cross.inc
diff --git a/packages/gcc/gcc-cross_3.4.4.bb b/packages/gcc/gcc-cross_3.4.4.bb
index c9b5cc9924..c7a4cfe857 100644
--- a/packages/gcc/gcc-cross_3.4.4.bb
+++ b/packages/gcc/gcc-cross_3.4.4.bb
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "r10"
require gcc-${PV}.inc
require gcc-cross.inc
diff --git a/packages/gcc/gcc-cross_4.0.0.bb b/packages/gcc/gcc-cross_4.0.0.bb
index 368c82a312..ab990e2f80 100644
--- a/packages/gcc/gcc-cross_4.0.0.bb
+++ b/packages/gcc/gcc-cross_4.0.0.bb
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_4.0.2.bb b/packages/gcc/gcc-cross_4.0.2.bb
index 9d035d927b..ddecddb34a 100644
--- a/packages/gcc/gcc-cross_4.0.2.bb
+++ b/packages/gcc/gcc-cross_4.0.2.bb
@@ -1,4 +1,4 @@
-PR = "r11"
+PR = "r12"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_4.1.1.bb b/packages/gcc/gcc-cross_4.1.1.bb
index a40cbc8bef..dafa5fa79d 100644
--- a/packages/gcc/gcc-cross_4.1.1.bb
+++ b/packages/gcc/gcc-cross_4.1.1.bb
@@ -1,4 +1,4 @@
-PR = "r20"
+PR = "r21"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_4.1.2.bb b/packages/gcc/gcc-cross_4.1.2.bb
index 43f21735e7..c9e3279ffc 100644
--- a/packages/gcc/gcc-cross_4.1.2.bb
+++ b/packages/gcc/gcc-cross_4.1.2.bb
@@ -1,4 +1,4 @@
-PR = "r16"
+PR = "r17"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_4.2.1.bb b/packages/gcc/gcc-cross_4.2.1.bb
index daf42672dc..ece545b049 100644
--- a/packages/gcc/gcc-cross_4.2.1.bb
+++ b/packages/gcc/gcc-cross_4.2.1.bb
@@ -1,4 +1,4 @@
-PR = "r16"
+PR = "r17"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_4.2.2.bb b/packages/gcc/gcc-cross_4.2.2.bb
index dc3ee94a52..816eddba19 100644
--- a/packages/gcc/gcc-cross_4.2.2.bb
+++ b/packages/gcc/gcc-cross_4.2.2.bb
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "r10"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_4.2.3.bb b/packages/gcc/gcc-cross_4.2.3.bb
index 11e04594fc..72f72835c3 100644
--- a/packages/gcc/gcc-cross_4.2.3.bb
+++ b/packages/gcc/gcc-cross_4.2.3.bb
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_4.3.0.bb b/packages/gcc/gcc-cross_4.2.4.bb
index 9821d3cd83..036ebd96b0 100644
--- a/packages/gcc/gcc-cross_4.3.0.bb
+++ b/packages/gcc/gcc-cross_4.2.4.bb
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r1"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_4.3.1.bb b/packages/gcc/gcc-cross_4.3.1.bb
new file mode 100644
index 0000000000..066fa32b86
--- /dev/null
+++ b/packages/gcc/gcc-cross_4.3.1.bb
@@ -0,0 +1,18 @@
+PR = "r8"
+
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
+require gcc-package-cross.inc
+
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
+EXTRA_OECONF += " --enable-cheaders=c_std --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
+
+# Hack till we fix *libc properly
+do_stage_append() {
+ ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
+}
+
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${layout_includedir}"
diff --git a/packages/gcc/gcc-cross_csl-arm-2005q3.bb b/packages/gcc/gcc-cross_csl-arm-2005q3.bb
index 5085855010..8726500ce2 100644
--- a/packages/gcc/gcc-cross_csl-arm-2005q3.bb
+++ b/packages/gcc/gcc-cross_csl-arm-2005q3.bb
@@ -1,4 +1,4 @@
-PR = "r3"
+PR = "r4"
require gcc-csl-arm-2005q3.inc
require gcc-cross.inc
diff --git a/packages/gcc/gcc-cross_csl-arm-2006q1.bb b/packages/gcc/gcc-cross_csl-arm-2006q1.bb
index 29231920bb..45ace68af9 100644
--- a/packages/gcc/gcc-cross_csl-arm-2006q1.bb
+++ b/packages/gcc/gcc-cross_csl-arm-2006q1.bb
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
require gcc-csl-arm-2006q1.inc
require gcc-cross.inc
diff --git a/packages/gcc/gcc-cross_csl-arm-2007q3.bb b/packages/gcc/gcc-cross_csl-arm-2007q3.bb
index 4fde67b006..cd10cfbdef 100644
--- a/packages/gcc/gcc-cross_csl-arm-2007q3.bb
+++ b/packages/gcc/gcc-cross_csl-arm-2007q3.bb
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
require gcc-csl-arm-2007q3.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-cross_csl-arm-2008q1.bb b/packages/gcc/gcc-cross_csl-arm-2008q1.bb
index 85fcaecec7..01b5bdacc4 100644
--- a/packages/gcc/gcc-cross_csl-arm-2008q1.bb
+++ b/packages/gcc/gcc-cross_csl-arm-2008q1.bb
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
require gcc-csl-arm-2008q1.inc
require gcc-cross4.inc
diff --git a/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch b/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
index 921cab6e18..3ccd124764 100644
--- a/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
+++ b/packages/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
@@ -10,7 +10,7 @@ Index: gcc-4.1.1/Makefile.in
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; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-native_3.4.6.bb b/packages/gcc/gcc-native_3.4.6.bb
index 6f74a1ea46..5f39f1bbb3 100644
--- a/packages/gcc/gcc-native_3.4.6.bb
+++ b/packages/gcc/gcc-native_3.4.6.bb
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "r8"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_3.4.3.bb b/packages/gcc/gcc_3.4.3.bb
index 1e68af5d22..0f31362dc1 100644
--- a/packages/gcc/gcc_3.4.3.bb
+++ b/packages/gcc/gcc_3.4.3.bb
@@ -1,4 +1,4 @@
-PR = "r14"
+PR = "r15"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_3.4.4.bb b/packages/gcc/gcc_3.4.4.bb
index ff7cb7e57b..7ec84b6012 100644
--- a/packages/gcc/gcc_3.4.4.bb
+++ b/packages/gcc/gcc_3.4.4.bb
@@ -1,4 +1,4 @@
-PR = "r8"
+PR = "r9"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.0.0.bb b/packages/gcc/gcc_4.0.0.bb
index 2df12ef9ef..9fd2b0acc3 100644
--- a/packages/gcc/gcc_4.0.0.bb
+++ b/packages/gcc/gcc_4.0.0.bb
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.0.2.bb b/packages/gcc/gcc_4.0.2.bb
index ff7cb7e57b..7ec84b6012 100644
--- a/packages/gcc/gcc_4.0.2.bb
+++ b/packages/gcc/gcc_4.0.2.bb
@@ -1,4 +1,4 @@
-PR = "r8"
+PR = "r9"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.1.1.bb b/packages/gcc/gcc_4.1.1.bb
index 9dbfca57c0..9e23eb8af7 100644
--- a/packages/gcc/gcc_4.1.1.bb
+++ b/packages/gcc/gcc_4.1.1.bb
@@ -1,4 +1,4 @@
-PR = "r20"
+PR = "r21"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.1.2.bb b/packages/gcc/gcc_4.1.2.bb
index da1ecb9b17..a8c8b71648 100644
--- a/packages/gcc/gcc_4.1.2.bb
+++ b/packages/gcc/gcc_4.1.2.bb
@@ -1,4 +1,4 @@
-PR = "r12"
+PR = "r13"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.2.1.bb b/packages/gcc/gcc_4.2.1.bb
index c51eb23b05..da1ecb9b17 100644
--- a/packages/gcc/gcc_4.2.1.bb
+++ b/packages/gcc/gcc_4.2.1.bb
@@ -1,4 +1,4 @@
-PR = "r11"
+PR = "r12"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.2.2.bb b/packages/gcc/gcc_4.2.2.bb
index 556fc74267..a2ae0c0e92 100644
--- a/packages/gcc/gcc_4.2.2.bb
+++ b/packages/gcc/gcc_4.2.2.bb
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "r8"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.2.3.bb b/packages/gcc/gcc_4.2.3.bb
index 7238aed4d7..556fc74267 100644
--- a/packages/gcc/gcc_4.2.3.bb
+++ b/packages/gcc/gcc_4.2.3.bb
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.3.0.bb b/packages/gcc/gcc_4.2.4.bb
index 033f33f8d3..ff100fd892 100644
--- a/packages/gcc/gcc_4.3.0.bb
+++ b/packages/gcc/gcc_4.2.4.bb
@@ -1,4 +1,4 @@
-PR = "r3"
+PR = "r1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_4.3.1.bb b/packages/gcc/gcc_4.3.1.bb
new file mode 100644
index 0000000000..318ccd3775
--- /dev/null
+++ b/packages/gcc/gcc_4.3.1.bb
@@ -0,0 +1,10 @@
+PR = "r4"
+
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
+
+SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
diff --git a/packages/gcc/gcc_csl-arm-2005q3.bb b/packages/gcc/gcc_csl-arm-2005q3.bb
index 2df12ef9ef..9fd2b0acc3 100644
--- a/packages/gcc/gcc_csl-arm-2005q3.bb
+++ b/packages/gcc/gcc_csl-arm-2005q3.bb
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_csl-arm-2006q1.bb b/packages/gcc/gcc_csl-arm-2006q1.bb
index 4999c6a53e..cc7540af15 100644
--- a/packages/gcc/gcc_csl-arm-2006q1.bb
+++ b/packages/gcc/gcc_csl-arm-2006q1.bb
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_csl-arm-2007q3.bb b/packages/gcc/gcc_csl-arm-2007q3.bb
index d610713177..832167ca4e 100644
--- a/packages/gcc/gcc_csl-arm-2007q3.bb
+++ b/packages/gcc/gcc_csl-arm-2007q3.bb
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gcc/gcc_csl-arm-2008q1.bb b/packages/gcc/gcc_csl-arm-2008q1.bb
index d610713177..832167ca4e 100644
--- a/packages/gcc/gcc_csl-arm-2008q1.bb
+++ b/packages/gcc/gcc_csl-arm-2008q1.bb
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/packages/gdb/files/sim-install-6.6.patch b/packages/gdb/files/sim-install-6.6.patch
deleted file mode 100644
index a39ceab01f..0000000000
--- a/packages/gdb/files/sim-install-6.6.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- gdb-6.1/sim/common/Makefile.in~ 2004-01-15 21:25:06.000000000 +0000
-+++ gdb-6.1/sim/common/Makefile.in 2004-07-22 17:07:46.237809032 +0100
-@@ -34,7 +34,7 @@
-
- datadir = @datadir@
- mandir = @mandir@
--man1dir = $(mandir)/man1
-+man1dir = $(DESTDIR)$(mandir)/man1
- infodir = @infodir@
- includedir = @includedir@
-
-
diff --git a/packages/gdb/gdb-6.8/early_debug_in_nptl.patch b/packages/gdb/gdb-6.8/early_debug_in_nptl.patch
deleted file mode 100644
index c53f0d8ad5..0000000000
--- a/packages/gdb/gdb-6.8/early_debug_in_nptl.patch
+++ /dev/null
@@ -1,306 +0,0 @@
-http://sourceware.org/ml/gdb-patches/2007-06/msg00479.html
-
-Index: gdb/linux-thread-db.c
-===================================================================
---- gdb/linux-thread-db.c.orig 2006-10-20 03:08:14.000000000 +0200
-+++ gdb/linux-thread-db.c 2008-03-01 14:45:52.000000000 +0100
-@@ -213,6 +213,21 @@
- }
- }
-
-+/* Return 1 if any threads have been registered. There may be none if
-+ the threading library is not fully initialized yet. */
-+
-+static int
-+have_threads_callback (struct thread_info *thread, void *dummy)
-+{
-+ return 1;
-+}
-+
-+static int
-+have_threads (void)
-+{
-+ return iterate_over_threads (have_threads_callback, NULL) != NULL;
-+}
-+
- /* A callback function for td_ta_thr_iter, which we use to map all
- threads to LWPs.
-
-@@ -700,23 +715,6 @@
- }
-
- static void
--thread_db_attach (char *args, int from_tty)
--{
-- target_beneath->to_attach (args, from_tty);
--
-- /* Destroy thread info; it's no longer valid. */
-- init_thread_list ();
--
-- /* The child process is now the actual multi-threaded
-- program. Snatch its process ID... */
-- proc_handle.pid = GET_PID (inferior_ptid);
--
-- /* ...and perform the remaining initialization steps. */
-- enable_thread_event_reporting ();
-- thread_db_find_new_threads ();
--}
--
--static void
- detach_thread (ptid_t ptid, int verbose)
- {
- struct thread_info *thread_info;
-@@ -742,14 +740,13 @@
- disable_thread_event_reporting ();
-
- /* There's no need to save & restore inferior_ptid here, since the
-- inferior is supposed to be survive this function call. */
-+ inferior is not supposed to survive this function call. */
- inferior_ptid = lwp_from_thread (inferior_ptid);
-
-- /* Forget about the child's process ID. We shouldn't need it
-- anymore. */
-- proc_handle.pid = 0;
--
- target_beneath->to_detach (args, from_tty);
-+
-+ /* Should this be done by detach_command? */
-+ target_mourn_inferior ();
- }
-
- static int
-@@ -870,12 +867,6 @@
-
- ptid = target_beneath->to_wait (ptid, ourstatus);
-
-- if (proc_handle.pid == 0)
-- /* The current child process isn't the actual multi-threaded
-- program yet, so don't try to do any special thread-specific
-- post-processing and bail out early. */
-- return ptid;
--
- if (ourstatus->kind == TARGET_WAITKIND_EXITED
- || ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
- return pid_to_ptid (-1);
-@@ -889,23 +880,32 @@
- return pid_to_ptid (GET_PID (ptid));
- }
-
-+ /* If we do not know about the main thread yet, this would be a good time to
-+ find it. */
-+ if (ourstatus->kind == TARGET_WAITKIND_STOPPED && !have_threads ())
-+ thread_db_find_new_threads ();
-+
- if (ourstatus->kind == TARGET_WAITKIND_STOPPED
- && ourstatus->value.sig == TARGET_SIGNAL_TRAP)
- /* Check for a thread event. */
- check_event (ptid);
-
-- if (!ptid_equal (trap_ptid, null_ptid))
-- trap_ptid = thread_from_lwp (trap_ptid);
-+ if (have_threads ())
-+ {
-+ /* Change ptids back into the higher level PID + TID format. If
-+ the thread is dead and no longer on the thread list, we will
-+ get back a dead ptid. This can occur if the thread death
-+ event gets postponed by other simultaneous events. In such a
-+ case, we want to just ignore the event and continue on. */
-+
-+ if (!ptid_equal (trap_ptid, null_ptid))
-+ trap_ptid = thread_from_lwp (trap_ptid);
-+
-+ ptid = thread_from_lwp (ptid);
-+ if (GET_PID (ptid) == -1)
-+ ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
-+ }
-
-- /* Change the ptid back into the higher level PID + TID format.
-- If the thread is dead and no longer on the thread list, we will
-- get back a dead ptid. This can occur if the thread death event
-- gets postponed by other simultaneous events. In such a case,
-- we want to just ignore the event and continue on. */
-- ptid = thread_from_lwp (ptid);
-- if (GET_PID (ptid) == -1)
-- ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
--
- return ptid;
- }
-
-@@ -944,30 +944,6 @@
- }
-
- static void
--thread_db_create_inferior (char *exec_file, char *allargs, char **env,
-- int from_tty)
--{
-- unpush_target (&thread_db_ops);
-- using_thread_db = 0;
-- target_beneath->to_create_inferior (exec_file, allargs, env, from_tty);
--}
--
--static void
--thread_db_post_startup_inferior (ptid_t ptid)
--{
-- if (proc_handle.pid == 0)
-- {
-- /* The child process is now the actual multi-threaded
-- program. Snatch its process ID... */
-- proc_handle.pid = GET_PID (ptid);
--
-- /* ...and perform the remaining initialization steps. */
-- enable_thread_event_reporting ();
-- thread_db_find_new_threads ();
-- }
--}
--
--static void
- thread_db_mourn_inferior (void)
- {
- /* Forget about the child's process ID. We shouldn't need it
-@@ -1002,6 +978,22 @@
-
- ptid = ptid_build (GET_PID (inferior_ptid), ti.ti_lid, ti.ti_tid);
-
-+ if (ti.ti_tid == 0)
-+ {
-+ /* A thread ID of zero means that this is the main thread, but
-+ glibc has not yet initialized thread-local storage and the
-+ pthread library. We do not know what the thread's TID will
-+ be yet. Just enable event reporting and otherwise ignore
-+ it. */
-+
-+ err = td_thr_event_enable_p (th_p, 1);
-+ if (err != TD_OK)
-+ error (_("Cannot enable thread event reporting for %s: %s"),
-+ target_pid_to_str (ptid), thread_db_err_str (err));
-+
-+ return 0;
-+ }
-+
- if (!in_thread_list (ptid))
- attach_thread (ptid, th_p, &ti, 1);
-
-@@ -1058,6 +1050,16 @@
- return NULL;
- }
-
-+/* Return 1 if this thread has the same LWP as the passed PTID. */
-+
-+static int
-+same_ptid_callback (struct thread_info *thread, void *arg)
-+{
-+ ptid_t *ptid_p = arg;
-+
-+ return GET_LWP (thread->ptid) == GET_LWP (*ptid_p);
-+}
-+
- /* Get the address of the thread local variable in load module LM which
- is stored at OFFSET within the thread local storage for thread PTID. */
-
-@@ -1066,6 +1068,21 @@
- CORE_ADDR lm,
- CORE_ADDR offset)
- {
-+ /* If we have not discovered any threads yet, check now. */
-+ if (!is_thread (ptid) && !have_threads ())
-+ thread_db_find_new_threads ();
-+
-+ /* Try to find a matching thread if we still have the LWP ID instead
-+ of the thread ID. */
-+ if (!is_thread (ptid))
-+ {
-+ struct thread_info *thread;
-+
-+ thread = iterate_over_threads (same_ptid_callback, &ptid);
-+ if (thread != NULL)
-+ ptid = thread->ptid;
-+ }
-+
- if (is_thread (ptid))
- {
- td_err_e err;
-@@ -1125,14 +1142,11 @@
- thread_db_ops.to_shortname = "multi-thread";
- thread_db_ops.to_longname = "multi-threaded child process.";
- thread_db_ops.to_doc = "Threads and pthreads support.";
-- thread_db_ops.to_attach = thread_db_attach;
- thread_db_ops.to_detach = thread_db_detach;
- thread_db_ops.to_resume = thread_db_resume;
- thread_db_ops.to_wait = thread_db_wait;
- thread_db_ops.to_xfer_partial = thread_db_xfer_partial;
- thread_db_ops.to_kill = thread_db_kill;
-- thread_db_ops.to_create_inferior = thread_db_create_inferior;
-- thread_db_ops.to_post_startup_inferior = thread_db_post_startup_inferior;
- thread_db_ops.to_mourn_inferior = thread_db_mourn_inferior;
- thread_db_ops.to_find_new_threads = thread_db_find_new_threads;
- thread_db_ops.to_pid_to_str = thread_db_pid_to_str;
-Index: gdb/gdbserver/thread-db.c
-===================================================================
---- gdb/gdbserver/thread-db.c.orig 2006-10-17 18:02:27.000000000 +0200
-+++ gdb/gdbserver/thread-db.c 2008-03-01 14:44:41.000000000 +0100
-@@ -40,6 +40,7 @@
- /* Connection to the libthread_db library. */
- static td_thragent_t *thread_agent;
-
-+static void thread_db_find_new_threads (void);
- static int find_new_threads_callback (const td_thrhandle_t *th_p, void *data);
-
- static char *
-@@ -134,6 +135,8 @@
- td_event_msg_t msg;
- td_err_e err;
- struct inferior_linux_data *tdata;
-+ struct thread_info *inferior;
-+ struct process_info *process;
-
- if (debug_threads)
- fprintf (stderr, "Thread creation event.\n");
-@@ -149,6 +152,14 @@
- fprintf (stderr, "thread getmsg err: %s\n",
- thread_db_err_str (err));
-
-+ /* If we do not know about the main thread yet, this would be a good time to
-+ find it. We need to do this to pick up the main thread before any newly
-+ created threads. */
-+ inferior = (struct thread_info *) all_threads.head;
-+ process = get_thread_process (inferior);
-+ if (process->thread_known == 0)
-+ thread_db_find_new_threads ();
-+
- /* msg.event == TD_EVENT_CREATE */
-
- find_new_threads_callback (msg.th_p, NULL);
-@@ -231,8 +242,24 @@
- {
- inferior = (struct thread_info *) all_threads.head;
- process = get_thread_process (inferior);
-+
- if (process->thread_known == 0)
- {
-+ /* If the new thread ID is zero, a final thread ID will be
-+ available later. Do not enable thread debugging yet. */
-+ if (ti_p->ti_tid == 0)
-+ {
-+ err = td_thr_event_enable (th_p, 1);
-+ if (err != TD_OK)
-+ error ("Cannot enable thread event reporting for %d: %s",
-+ ti_p->ti_lid, thread_db_err_str (err));
-+ return;
-+ }
-+
-+ if (process->lwpid != ti_p->ti_lid)
-+ fatal ("PID mismatch! Expected %ld, got %ld",
-+ (long) process->lwpid, (long) ti_p->ti_lid);
-+
- /* Switch to indexing the threads list by TID. */
- change_inferior_id (&all_threads, ti_p->ti_tid);
- goto found;
-@@ -331,6 +358,8 @@
-
- process = get_thread_process (thread);
- if (!process->thread_known)
-+ thread_db_find_new_threads ();
-+ if (!process->thread_known)
- return TD_NOTHR;
-
- err = td_thr_tls_get_addr (&process->th, (psaddr_t) load_module, offset,
diff --git a/packages/gdb/gdb-cross-sdk_6.6.bb b/packages/gdb/gdb-cross-sdk_6.6.bb
index b96348959f..656119cf93 100644
--- a/packages/gdb/gdb-cross-sdk_6.6.bb
+++ b/packages/gdb/gdb-cross-sdk_6.6.bb
@@ -2,6 +2,12 @@ require gdb-cross.inc
inherit sdk
+DEPENDS = "ncurses-sdk"
+
+PR = "r3"
+
+SRC_URI += "file://early_debug_in_nptl.patch;patch=1;pnum=0"
+
do_stage() {
:
}
diff --git a/packages/gdb/gdb-cross-sdk_6.8.bb b/packages/gdb/gdb-cross-sdk_6.8.bb
index b96348959f..be5c4807d8 100644
--- a/packages/gdb/gdb-cross-sdk_6.8.bb
+++ b/packages/gdb/gdb-cross-sdk_6.8.bb
@@ -1,7 +1,23 @@
require gdb-cross.inc
+DEPENDS = "ncurses-sdk"
+
inherit sdk
+PR = "r1"
+
+do_configure_prepend() {
+ for i in $(find ${S} -name "warning*m4") ; do
+ sed -i -e s:-Werror::g $i
+ done
+ for i in $(find ${S} -name "configure.ac") ; do
+ sed -i -e s:-Werror::g $i
+ done
+ for i in $(find ${S} -name "configure") ; do
+ sed -i -e s:-Werror::g $i
+ done
+}
+
do_stage() {
:
}
diff --git a/packages/gdb/gdb-cross_6.6.bb b/packages/gdb/gdb-cross_6.6.bb
index 0fbd11015c..570dd52859 100644
--- a/packages/gdb/gdb-cross_6.6.bb
+++ b/packages/gdb/gdb-cross_6.6.bb
@@ -1,8 +1,7 @@
require gdb-cross.inc
+inherit cross
-SRC_URI += "file://sim-install-6.6.patch;patch=1"
-SRC_URI += "file://early_debug_in_nptl.patch;patch=1;pnum=0"
+PR = "r3"
-inherit cross
+SRC_URI += "file://early_debug_in_nptl.patch;patch=1;pnum=0"
-PR = "r2"
diff --git a/packages/gdb/gdb-cross_6.8.bb b/packages/gdb/gdb-cross_6.8.bb
index b0fb2e5788..f63f144d66 100644
--- a/packages/gdb/gdb-cross_6.8.bb
+++ b/packages/gdb/gdb-cross_6.8.bb
@@ -1,8 +1,4 @@
require gdb-cross.inc
-
-SRC_URI += "file://sim-install-6.6.patch;patch=1"
-SRC_URI += "file://early_debug_in_nptl.patch;patch=1;pnum=0"
-
inherit cross
-PR = "r1"
+PR = "r2"
diff --git a/packages/gimp/gimp.inc b/packages/gimp/gimp.inc
index 7a75f7d619..171ac79786 100644
--- a/packages/gimp/gimp.inc
+++ b/packages/gimp/gimp.inc
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gimp.org"
SECTION = "x11/graphics"
LICENSE = "GPL"
-DEPENDS = "sed-native libart-lgpl gtk+ jpeg libpng libexif tiff"
+DEPENDS = "sed-native gdk-pixbuf-csource-native libart-lgpl gtk+ jpeg libpng libexif tiff"
SRC_URI = "ftp://ftp.gimp.org/pub/gimp/v2.3/gimp-${PV}.tar.bz2 \
file://configure-libwmf.patch;patch=1"
diff --git a/packages/glib-2.0/glib-2.0-2.16.1/gcc-4.2-inline-fix.patch b/packages/glib-2.0/glib-2.0-2.16.1/gcc-4.2-inline-fix.patch
index d6cbeeb8a4..b21851bd63 100644
--- a/packages/glib-2.0/glib-2.0-2.16.1/gcc-4.2-inline-fix.patch
+++ b/packages/glib-2.0/glib-2.0-2.16.1/gcc-4.2-inline-fix.patch
@@ -1,13 +1,29 @@
+Stole from gentoo bugzilla
+http://bugs.gentoo.org/show_bug.cgi?id=156475
+
+Lets this work with gcc 4.2/4.3
+-Khem
Index: glib-2.16.1/glib/gutils.h
===================================================================
---- glib-2.16.1.orig/glib/gutils.h 2008-03-21 16:18:57.000000000 +0100
-+++ glib-2.16.1/glib/gutils.h 2008-03-21 16:19:09.000000000 +0100
-@@ -97,7 +97,7 @@
+--- glib-2.16.1.orig/glib/gutils.h 2008-03-10 17:31:56.000000000 -0700
++++ glib-2.16.1/glib/gutils.h 2008-06-04 15:19:12.000000000 -0700
+@@ -96,13 +96,14 @@
+ #ifdef G_IMPLEMENT_INLINES
# define G_INLINE_FUNC
# undef G_CAN_INLINE
- #elif defined (__GNUC__)
+-#elif defined (__GNUC__)
-# ifdef __GNUC_STDC_INLINE__
-+# ifdef __GNUC_GNU_INLINE__
- # define G_INLINE_FUNC extern inline __attribute__ ((__gnu_inline__))
+-# define G_INLINE_FUNC extern inline __attribute__ ((__gnu_inline__))
++#elif defined (__GNUC__)
++# if __GNUC_PREREQ (4,2) && defined (__STDC_VERSION__) \
++ && __STDC_VERSION__ >= 199901L
++# define G_INLINE_FUNC extern __inline __attribute__ ((__gnu_inline__))
# else
- # define G_INLINE_FUNC extern inline
+-# define G_INLINE_FUNC extern inline
++# define G_INLINE_FUNC extern __inline
+ # endif
+-#elif defined (G_CAN_INLINE)
++#elif defined (G_CAN_INLINE)
+ # define G_INLINE_FUNC static inline
+ #else /* can't inline */
+ # define G_INLINE_FUNC
diff --git a/packages/glib-2.0/glib-2.0-2.16.3/.mtn2git_empty b/packages/glib-2.0/glib-2.0-2.16.3/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0-2.16.3/.mtn2git_empty
diff --git a/packages/glib-2.0/glib-2.0-2.16.3/configure-libtool.patch b/packages/glib-2.0/glib-2.0-2.16.3/configure-libtool.patch
new file mode 100644
index 0000000000..3ba79b8986
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0-2.16.3/configure-libtool.patch
@@ -0,0 +1,34 @@
+# Poky renames libtool to $host_alias-libtool.
+# ./$host_alias-libtool isn't created until after configure runs with libtool >= 2.2.2
+# so we can't call # it at this point. We can safely assume a version is available
+# from PATH though
+
+--- 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-native_2.16.1.bb b/packages/glib-2.0/glib-2.0-native_2.16.1.bb
new file mode 100644
index 0000000000..4a610c4a74
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0-native_2.16.1.bb
@@ -0,0 +1,39 @@
+require glib-2.0_${PV}.bb
+
+FILESPATH = "${FILE_DIRNAME}/glib-2.0-${PV}:${FILE_DIRNAME}/files"
+DEPENDS = "gtk-doc-native"
+PR = "r1"
+
+inherit native
+
+do_configure_prepend() {
+ if [ -e ${S}/${TARGET_SYS}-libtool ] ; then
+ echo "${TARGET_SYS}-libtool already present"
+ else
+ cp ${STAGING_BINDIR}/${TARGET_SYS}-libtool ${S}
+ fi
+
+}
+
+do_stage () {
+ install -m 0755 gobject/glib-mkenums ${STAGING_BINDIR}/
+ install -m 0755 gobject/.libs/glib-genmarshal ${STAGING_BINDIR}/
+ install -m 0755 glib-gettextize ${STAGING_BINDIR}/
+ oe_libinstall -so -C glib libglib-2.0 ${STAGING_LIBDIR}
+ oe_libinstall -so -C gmodule libgmodule-2.0 ${STAGING_LIBDIR}
+ oe_libinstall -so -C gthread libgthread-2.0 ${STAGING_LIBDIR}
+ oe_libinstall -so -C gobject libgobject-2.0 ${STAGING_LIBDIR}
+ autotools_stage_includes
+ install -d ${STAGING_INCDIR}/glib-2.0/glib
+ install -m 0755 ${S}/glibconfig.h ${STAGING_INCDIR}/glib-2.0/glibconfig.h
+ install -d ${STAGING_DATADIR}/aclocal
+ install -m 0644 ${S}/m4macros/glib-2.0.m4 ${STAGING_DATADIR}/aclocal/glib-2.0.m4
+ install -m 0644 ${S}/m4macros/glib-gettext.m4 ${STAGING_DATADIR}/aclocal/glib-gettext.m4
+ install -d ${STAGING_DATADIR}/glib-2.0/gettext/po
+ install -m 0755 mkinstalldirs ${STAGING_DATADIR}/glib-2.0/gettext/
+ install -m 0644 po/Makefile.in.in ${STAGING_DATADIR}/glib-2.0/gettext/po/
+}
+
+do_install () {
+ :
+}
diff --git a/packages/glib-2.0/glib-2.0_2.16.1.bb b/packages/glib-2.0/glib-2.0_2.16.1.bb
index ef7a1e84fc..db388d7277 100644
--- a/packages/glib-2.0/glib-2.0_2.16.1.bb
+++ b/packages/glib-2.0/glib-2.0_2.16.1.bb
@@ -1,10 +1,12 @@
require glib.inc
-PR = "r4"
+PR = "r5"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glib/2.16/glib-${PV}.tar.bz2 \
file://glibconfig-sysdefs.h \
file://configure-libtool.patch;patch=1 \
file://gcc-4.2-inline-fix.patch;patch=1 \
file://hurd-arg-max.patch;patch=1 \
- "
+"
+S = "${WORKDIR}/glib-${PV}"
+
diff --git a/packages/glib-2.0/glib-2.0_2.16.3.bb b/packages/glib-2.0/glib-2.0_2.16.3.bb
new file mode 100644
index 0000000000..f70539f18e
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0_2.16.3.bb
@@ -0,0 +1,11 @@
+require glib.inc
+
+# This version requires a newer libtool that isn't default yet
+DEFAULT_PREFERENCE = "-1"
+
+PR = "r0"
+
+SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glib/2.16/glib-${PV}.tar.bz2 \
+ file://glibconfig-sysdefs.h \
+ file://configure-libtool.patch;patch=1 \
+ "
diff --git a/packages/glibc/glibc-stage.inc b/packages/glibc/glibc-stage.inc
index a86cf7888e..46220d7831 100644
--- a/packages/glibc/glibc-stage.inc
+++ b/packages/glibc/glibc-stage.inc
@@ -16,8 +16,8 @@ do_stage() {
install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
done
for i in libc.a libc_pic.a libc_nonshared.a; do
- install -m 0644 ${B}/$i ${STAGING_DIR_HOST}/${layout_base_libdir}/ || die "failed to install $i"
+ install -m 0644 ${B}/$i ${STAGING_DIR_HOST}/${layout_libdir}/ || die "failed to install $i"
done
- echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_DIR_HOST}/${layout_base_libdir}/libpthread.so
- echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_DIR_HOST}/${layout_base_libdir}/libc.so
+ echo 'GROUP ( ${layout_base_libdir}/libpthread.so.0 ${layout_libdir}/libpthread_nonshared.a )' > ${STAGING_DIR_HOST}/${layout_libdir}/libpthread.so
+ echo 'GROUP ( ${layout_base_libdir}/libc.so.6 ${layout_libdir}/libc_nonshared.a )' > ${STAGING_DIR_HOST}/${layout_libdir}/libc.so
}
diff --git a/packages/glibc/glibc_2.3.2+cvs20040726.bb b/packages/glibc/glibc_2.3.2+cvs20040726.bb
index c40968dd7f..8beed8e8dc 100644
--- a/packages/glibc/glibc_2.3.2+cvs20040726.bb
+++ b/packages/glibc/glibc_2.3.2+cvs20040726.bb
@@ -3,7 +3,7 @@ require glibc.inc
DEFAULT_PREFERENCE_sh3 = "-99"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs"
-PR = "r25"
+PR = "r26"
GLIBC_ADDONS ?= "linuxthreads"
diff --git a/packages/glibc/glibc_2.3.2.bb b/packages/glibc/glibc_2.3.2.bb
index 6ea2951eb6..fc06794e61 100644
--- a/packages/glibc/glibc_2.3.2.bb
+++ b/packages/glibc/glibc_2.3.2.bb
@@ -1,6 +1,6 @@
require glibc.inc
-PR = "r14"
+PR = "r15"
DEFAULT_PREFERENCE_sh3 = "-99"
diff --git a/packages/glibc/glibc_2.3.3+cvs20041128.bb b/packages/glibc/glibc_2.3.3+cvs20041128.bb
index 9c344ccc46..4c9b3dce94 100644
--- a/packages/glibc/glibc_2.3.3+cvs20041128.bb
+++ b/packages/glibc/glibc_2.3.3+cvs20041128.bb
@@ -3,7 +3,7 @@ require glibc.inc
DEFAULT_PREFERENCE_sh3 = "-99"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs"
-PR = "r10"
+PR = "r11"
GLIBC_ADDONS ?= "linuxthreads"
diff --git a/packages/glibc/glibc_2.3.3+cvs20050221.bb b/packages/glibc/glibc_2.3.3+cvs20050221.bb
index 51de036ece..4517adedcc 100644
--- a/packages/glibc/glibc_2.3.3+cvs20050221.bb
+++ b/packages/glibc/glibc_2.3.3+cvs20050221.bb
@@ -3,7 +3,7 @@ require glibc.inc
DEFAULT_PREFERENCE_sh3 = "-99"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs"
-PR = "r10"
+PR = "r11"
GLIBC_ADDONS ?= "linuxthreads"
diff --git a/packages/glibc/glibc_2.3.3+cvs20050420.bb b/packages/glibc/glibc_2.3.3+cvs20050420.bb
index 6fb4b12293..b1a5d66b17 100644
--- a/packages/glibc/glibc_2.3.3+cvs20050420.bb
+++ b/packages/glibc/glibc_2.3.3+cvs20050420.bb
@@ -5,7 +5,7 @@ DEFAULT_PREFERENCE_i586 = "0"
DEFAULT_PREFERENCE_sh3 = "-99"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs"
-PR = "r8"
+PR = "r9"
GLIBC_ADDONS ?= "linuxthreads"
diff --git a/packages/glibc/glibc_2.3.3.bb b/packages/glibc/glibc_2.3.3.bb
index b1eeef30f0..510709aba9 100644
--- a/packages/glibc/glibc_2.3.3.bb
+++ b/packages/glibc/glibc_2.3.3.bb
@@ -1,6 +1,6 @@
require glibc.inc
-PR = "r11"
+PR = "r12"
DEFAULT_PREFERENCE_sh3 = "-99"
diff --git a/packages/glibc/glibc_2.3.5+cvs20050627.bb b/packages/glibc/glibc_2.3.5+cvs20050627.bb
index 4e80f90d2c..d0a396d465 100644
--- a/packages/glibc/glibc_2.3.5+cvs20050627.bb
+++ b/packages/glibc/glibc_2.3.5+cvs20050627.bb
@@ -2,7 +2,7 @@ require glibc.inc
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs-2.3.5"
SRCDATE = "20050627"
-PR = "r17"
+PR = "r18"
#Doesnt build for sh3
DEFAULT_PREFERENCE_sh3="-1"
diff --git a/packages/glibc/glibc_2.3.6.bb b/packages/glibc/glibc_2.3.6.bb
index bebc48dfa5..4519be9d03 100644
--- a/packages/glibc/glibc_2.3.6.bb
+++ b/packages/glibc/glibc_2.3.6.bb
@@ -1,5 +1,7 @@
require glibc.inc
+PR = "r0"
+
#FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.3.6', '${FILE_DIRNAME}/orig/glibc', '${FILE_DIRNAME}/orig/files', '${FILE_DIRNAME}/orig' ], d)}"
GLIBC_ADDONS ?= "linuxthreads"
diff --git a/packages/glibc/glibc_2.4.bb b/packages/glibc/glibc_2.4.bb
index 0ab3dbb157..1112486c50 100644
--- a/packages/glibc/glibc_2.4.bb
+++ b/packages/glibc/glibc_2.4.bb
@@ -1,6 +1,6 @@
require glibc.inc
-PR = "r15"
+PR = "r16"
#add the hosts that are confirmed to be working to COMPATIBLE_HOSTi
COMPATIBLE_HOST = '(i.86.*-linux|sh.*-linux)'
diff --git a/packages/glibc/glibc_2.5.bb b/packages/glibc/glibc_2.5.bb
index c74a748357..6df70076b8 100644
--- a/packages/glibc/glibc_2.5.bb
+++ b/packages/glibc/glibc_2.5.bb
@@ -1,5 +1,5 @@
require glibc.inc
-PR = "r12"
+PR = "r13"
ARM_INSTRUCTION_SET = "arm"
diff --git a/packages/glibc/glibc_2.6.1.bb b/packages/glibc/glibc_2.6.1.bb
index c1c0c3150d..5069ea19e2 100644
--- a/packages/glibc/glibc_2.6.1.bb
+++ b/packages/glibc/glibc_2.6.1.bb
@@ -1,5 +1,5 @@
require glibc.inc
-PR = "r5"
+PR = "r6"
ARM_INSTRUCTION_SET = "arm"
diff --git a/packages/glibc/glibc_2.7.bb b/packages/glibc/glibc_2.7.bb
index d355d85360..760883c4b6 100644
--- a/packages/glibc/glibc_2.7.bb
+++ b/packages/glibc/glibc_2.7.bb
@@ -5,7 +5,7 @@ ARM_INSTRUCTION_SET = "arm"
PACKAGES_DYNAMIC = "libc6*"
RPROVIDES_${PN}-dev = "libc6-dev"
-PR = "r2"
+PR = "r3"
# the -isystem in bitbake.conf screws up glibc do_stage
BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
diff --git a/packages/gnome/goffice_0.6.3.bb b/packages/gnome/goffice_0.6.3.bb
new file mode 100644
index 0000000000..17e3a96417
--- /dev/null
+++ b/packages/gnome/goffice_0.6.3.bb
@@ -0,0 +1,22 @@
+DESCRIPTION="Gnome Office Library"
+LICENSE="GPLv2"
+PR="r0"
+
+DEPENDS="glib-2.0 gtk+ pango cairo libgnomeprint libgsf libglade libpcre libxml2 libart-lgpl"
+
+FILES_${PN}-dbg += "${libdir}/goffice/${PV}/plugins/*/.debug"
+
+inherit gnome pkgconfig
+
+do_stage() {
+ autotools_stage_all
+}
+
+PACKAGES_DYNAMIC = "goffice-plugin-*"
+
+python populate_packages_prepend () {
+ goffice_libdir = bb.data.expand('${libdir}/goffice/${PV}/plugins', d)
+
+ do_split_packages(d, goffice_libdir, '(.*)', 'goffice-plugin-%s', 'Goffice plugin for %s', allow_dirs=True)
+}
+
diff --git a/packages/gnome/libart-lgpl/mipsel/.mtn2git_empty b/packages/gnome/libart-lgpl/mipsel/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gnome/libart-lgpl/mipsel/.mtn2git_empty
diff --git a/packages/gnome/libart-lgpl/mipsel/art_config.h b/packages/gnome/libart-lgpl/mipsel/art_config.h
new file mode 100644
index 0000000000..b0e74ad6ae
--- /dev/null
+++ b/packages/gnome/libart-lgpl/mipsel/art_config.h
@@ -0,0 +1,10 @@
+/* Automatically generated by gen_art_config.c */
+
+#define ART_SIZEOF_CHAR 1
+#define ART_SIZEOF_SHORT 2
+#define ART_SIZEOF_INT 4
+#define ART_SIZEOF_LONG 4
+
+typedef unsigned char art_u8;
+typedef unsigned short art_u16;
+typedef unsigned int art_u32;
diff --git a/packages/gnuchess/files/.mtn2git_empty b/packages/gnuchess/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gnuchess/files/.mtn2git_empty
diff --git a/packages/gnuchess/files/fix_cast_error_and_gnuchess_exec.patch b/packages/gnuchess/files/fix_cast_error_and_gnuchess_exec.patch
new file mode 100644
index 0000000000..8dba103dc3
--- /dev/null
+++ b/packages/gnuchess/files/fix_cast_error_and_gnuchess_exec.patch
@@ -0,0 +1,23 @@
+diff -Naur fltk-chess.orig/fltk-chess.cxx fltk-chess/fltk-chess.cxx
+--- fltk-chess.orig/fltk-chess.cxx 2005-08-25 01:42:28.000000000 +0400
++++ fltk-chess/fltk-chess.cxx 2008-05-17 19:26:57.000000000 +0400
+@@ -705,8 +705,8 @@
+
+ void cb_P(Fl_Widget * ob, void *p)
+ {
+-
+- changeP = (char) p;
++ int temp_p = (int) p;
++ changeP = (char) temp_p;
+ }
+
+
+@@ -881,7 +881,7 @@
+ // close(fdFrom[0]);
+ // close(fdFrom[1]);
+
+- execl("./gnuchess", NULL);
++ execl("/bin/sh", "/bin/sh", "-c", "exec gnuchess", NULL);
+
+ } else {
+
diff --git a/packages/gnuchess/files/fltk-chess.desktop b/packages/gnuchess/files/fltk-chess.desktop
new file mode 100644
index 0000000000..6c422659d6
--- /dev/null
+++ b/packages/gnuchess/files/fltk-chess.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=FLTK Chess
+Comment=FLTK frontend to GNUchess
+Exec=fltk-chess
+Type=Application
+Icon=fltk-chess
+Categories=Game;BoardGame;
diff --git a/packages/gnuchess/fltk-chess_0.5.bb b/packages/gnuchess/fltk-chess_0.5.bb
new file mode 100644
index 0000000000..fae7411329
--- /dev/null
+++ b/packages/gnuchess/fltk-chess_0.5.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "fltk-chess is a frontend for the Gnuchess chess playing engine."
+AUTHOR = "Andreas Holzer <a.holzer@cheese.at>"
+SECTION = "x11/games"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "fltk"
+RDEPENDS = "gnuchess"
+
+
+SRC_URI = "http://members.cheese.at/woody/fltk-chess/fltk-chess-${PV}.tgz \
+ file://fix_cast_error_and_gnuchess_exec.patch;patch=1 \
+ file://fltk-chess.desktop"
+S = "${WORKDIR}/fltk-chess/"
+
+
+do_compile() {
+ `fltk-config --cxx --cxxflags --ldflags --use-images` -o fltk-chess \
+ fltk-chess.cxx
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${datadir}/pixmaps/fltk-chess/
+ install -d ${D}${datadir}/applications/
+ install -m 0755 ${S}/fltk-chess ${D}${bindir}
+ install -m 0644 ${S}/bitmaps/*.pnx ${D}${datadir}/pixmaps/fltk-chess/
+ install -m 0644 ${S}/bitmaps/{user,computer}.png \
+ ${D}${datadir}/pixmaps/fltk-chess/
+ install -m 0644 ${S}/bitmaps/fltk-chess.png ${D}${datadir}/pixmaps/
+ install -m 0644 ${WORKDIR}/fltk-chess.desktop ${D}${datadir}/applications/
+}
+
+
diff --git a/packages/gnumeric/gnumeric_1.8.3.bb b/packages/gnumeric/gnumeric_1.8.3.bb
new file mode 100644
index 0000000000..9fa01408f6
--- /dev/null
+++ b/packages/gnumeric/gnumeric_1.8.3.bb
@@ -0,0 +1,29 @@
+LICENSE = "GPL"
+SECTION = "x11/utils"
+S = "${WORKDIR}/gnumeric-${PV}"
+DEPENDS = "libgsf gtk+ libxml2 goffice libglade libart-lgpl intltool-native libgnomecanvas libgnomeprint libgnomeprintui libbonoboui orbit2-native"
+DESCRIPTION = "Gnumeric spreadsheet for GNOME"
+
+PR = "r0"
+
+inherit gnome flow-lossage
+
+SRC_URI += "file://remove-docs.patch;patch=1"
+
+EXTRA_OECONF=" --without-perl "
+
+PACKAGES_DYNAMIC = "gnumeric-plugin-*"
+
+FILES_${PN}-dbg += "${libdir}/gnumeric/${PV}/plugins/*/.debug"
+FILES_gnumeric_append = " /usr/lib/libspreadsheet-${PV}.so "
+
+# We need native orbit-idl with target idl files. No way to say it in a clean way:
+do_configure_append () {
+ find -name Makefile -exec sed -i '/\/usr\/bin\/orbit-idl-2/{s:/usr/bin:${STAGING_BINDIR_NATIVE}:;s:/usr/share:${STAGING_DATADIR}:g}' {} \;
+}
+
+python populate_packages_prepend () {
+ gnumeric_libdir = bb.data.expand('${libdir}/gnumeric/${PV}/plugins', d)
+
+ do_split_packages(d, gnumeric_libdir, '(.*)', 'gnumeric-plugin-%s', 'Gnumeric plugin for %s', allow_dirs=True)
+}
diff --git a/packages/gnuradio/gnuradio.inc b/packages/gnuradio/gnuradio.inc
index ddf7c68eca..9cb936a105 100644
--- a/packages/gnuradio/gnuradio.inc
+++ b/packages/gnuradio/gnuradio.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "GNU Radio"
SECTION = "apps"
PRIORITY = "optional"
LICENSE = "GPL"
-DEPENDS = " guile-native fftwf python libusb virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native"
+DEPENDS = " guile-native fftwf python libusb-compat virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native"
RDEPENDS_${PN} = "python-core python-audio python-threading python-codecs python-lang python-textutils"
RDEPENDS_gnuradio-usrp = "python-core"
diff --git a/packages/gnuradio/gnuradio_3.0.4.bb b/packages/gnuradio/gnuradio_3.0.4.bb
index 0474e0d5c2..0f339c30c1 100644
--- a/packages/gnuradio/gnuradio_3.0.4.bb
+++ b/packages/gnuradio/gnuradio_3.0.4.bb
@@ -1,6 +1,6 @@
require gnuradio.inc
-PR = "r1"
+PR = "r2"
SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \
file://no-trellis-doc.patch;patch=1 \
diff --git a/packages/gnuradio/gnuradio_3.1.2.bb b/packages/gnuradio/gnuradio_3.1.2.bb
index 0474e0d5c2..0f339c30c1 100644
--- a/packages/gnuradio/gnuradio_3.1.2.bb
+++ b/packages/gnuradio/gnuradio_3.1.2.bb
@@ -1,6 +1,6 @@
require gnuradio.inc
-PR = "r1"
+PR = "r2"
SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \
file://no-trellis-doc.patch;patch=1 \
diff --git a/packages/gnuradio/gnuradio_svn.bb b/packages/gnuradio/gnuradio_svn.bb
index e7ac492714..f72cf2fb9a 100644
--- a/packages/gnuradio/gnuradio_svn.bb
+++ b/packages/gnuradio/gnuradio_svn.bb
@@ -3,7 +3,7 @@ require gnuradio.inc
DEFAULT_PREFERENCE = "-1"
PV = "3.0.4+svnr${SRCREV}"
-PR = "r3"
+PR = "r4"
SRC_URI = "svn://gnuradio.org/svn/gnuradio;module=trunk;proto=http \
file://no-trellis-doc.patch;patch=1 \
diff --git a/packages/gpe-conf/gpe-conf-0.2.7/.mtn2git_empty b/packages/gpe-conf/gpe-conf-0.2.7/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gpe-conf/gpe-conf-0.2.7/.mtn2git_empty
diff --git a/packages/gpe-conf/gpe-conf-0.2.7/poweroff.patch b/packages/gpe-conf/gpe-conf-0.2.7/poweroff.patch
new file mode 100644
index 0000000000..2255886968
--- /dev/null
+++ b/packages/gpe-conf/gpe-conf-0.2.7/poweroff.patch
@@ -0,0 +1,11 @@
+--- gpe-conf/suid.c~ 2008-06-05 12:41:26.000000000 +0200
++++ gpe-conf/suid.c 2008-06-05 12:41:26.000000000 +0200
+@@ -454,7 +454,7 @@
+ else if (strcmp (cmd, "SHDN") == 0) // shutdown device
+ {
+ fscanf (in, "%100s", arg2);
+- system ("poweroff");
++ system ("/sbin/poweroff");
+ }
+ else if (strcmp (cmd, "MODP") == 0) /* modprobe kernel module */
+ {
diff --git a/packages/gpe-conf/gpe-conf_0.2.7.bb b/packages/gpe-conf/gpe-conf_0.2.7.bb
index b908e6c50b..ec836eb068 100644
--- a/packages/gpe-conf/gpe-conf_0.2.7.bb
+++ b/packages/gpe-conf/gpe-conf_0.2.7.bb
@@ -10,12 +10,14 @@ RDEPENDS_gpe-conf-panel = "gpe-conf"
RPROVIDES_${PN} += " bl"
RCONFLICTS_${PN} = "bl"
-PR = "r0"
+PR = "r1"
GPE_TARBALL_SUFFIX = "bz2"
inherit gpe autotools pkgconfig
+SRC_URI += "file://poweroff.patch;patch=1"
+
PACKAGES += "gpe-conf-panel"
FILES_${PN} = "${sysconfdir} ${bindir} ${datadir}/pixmaps \
diff --git a/packages/gpe-login/gpe-login_0.93.bb b/packages/gpe-login/gpe-login_0.93.bb
new file mode 100644
index 0000000000..ec168bfc93
--- /dev/null
+++ b/packages/gpe-login/gpe-login_0.93.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "GPE user login screen"
+SECTION = "gpe"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "gtk+ libgpewidget gpe-ownerinfo xkbd"
+RDEPENDS = "xkbd gpe-theme-clearlooks"
+RPROVIDES_${PN} = "gpe-session-starter"
+PR = "r0"
+
+SRC_URI_OVERRIDES_PACKAGE_ARCH = "1"
+
+GPE_TARBALL_SUFFIX = "bz2"
+
+inherit gpe autotools pkgconfig
+
+
+SRC_URI += "file://removeblue-fontsize8.patch;patch=1"
+SRC_URI += " file://chvt-keylaunch.patch;patch=1 "
+SRC_URI += " file://c-locale.patch;patch=1 "
+
+SRC_URI_append_spitz = "file://brightness-adjust-keyluanchrc.patch;patch=1"
+SRC_URI_append_akita = "file://brightness-adjust-keyluanchrc.patch;patch=1"
+SRC_URI_append_c7x0 = "file://brightness-adjust-keyluanchrc.patch;patch=1"
+
diff --git a/packages/gpsbabel/gpsbabel_1.3.3.bb b/packages/gpsbabel/gpsbabel_1.3.3.bb
index f9a8d98d4e..b5ff6a8510 100644
--- a/packages/gpsbabel/gpsbabel_1.3.3.bb
+++ b/packages/gpsbabel/gpsbabel_1.3.3.bb
@@ -1,10 +1,10 @@
SECTION = "console/utils"
DESCRIPTION = "GPS data converter"
-DEPENDS = "expat libusb"
+DEPENDS = "expat libusb-compat"
HOMEPAGE = "http://gpsbabel.sf.net"
LICENSE = "GPL"
-PR = "r0"
+PR = "r1"
SRC_URI = "${SOURCEFORGE_MIRROR}/gpsbabel/gpsbabel-${PV}.tar.gz"
diff --git a/packages/gstreamer/gst-plugin-pulse_0.9.4.bb b/packages/gstreamer/gst-plugin-pulse_0.9.4.bb
deleted file mode 100644
index a91e482358..0000000000
--- a/packages/gstreamer/gst-plugin-pulse_0.9.4.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-DESCRIPTION = "GStreamer plugin for using pulse audio as sink and source"
-HOMEPAGE = "http://0pointer.de/lennart/projects/gst-pulse/"
-LICENSE = "GPL"
-DEPENDS = "gstreamer pulseaudio"
-PR = "r1"
-
-SRC_URI = "http://0pointer.de/lennart/projects/gst-pulse/gst-pulse-${PV}.tar.gz"
-S = "${WORKDIR}/gst-pulse-${PV}"
-
-inherit autotools
-
-EXTRA_OECONF = "--disable-lynx"
-GST_LIBV = 0.10
-
-do_install() {
- install -d ${D}${libdir}/gstreamer-${GST_LIBV}/
- install -m 0755 src/.libs/libgstpulse.so ${D}${libdir}/gstreamer-${GST_LIBV}
-}
-
-export GST_MODDIR=${libdir}/gstreamer-0.10
-
-FILES_${PN} = "${libdir}/gstreamer-0.10/libgstpulse.so"
-FILES_${PN}-dev = "\
- ${libdir}/gstreamer-0.10/libgstpulse.a \
- ${libdir}/gstreamer-0.10/libgstpulse.la \
- ${libdir}/gstreamer-0.10/libgstpulse.so*"
-FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
-
diff --git a/packages/gstreamer/gst-plugins-base_0.10.17.bb b/packages/gstreamer/gst-plugins-base_0.10.17.bb
index 33b189a0ff..56c9bfab04 100644
--- a/packages/gstreamer/gst-plugins-base_0.10.17.bb
+++ b/packages/gstreamer/gst-plugins-base_0.10.17.bb
@@ -6,7 +6,7 @@ PROVIDES += "gst-plugins"
# if alsa has been built and is present. You will
# not get an error if this is not present, just
# a missing alsa plugin
-DEPENDS += "alsa-lib"
+DEPENDS += "alsa-lib libsm"
-PR = "r2"
+PR = "r3"
diff --git a/packages/gstreamer/gst-plugins-good_0.10.7.bb b/packages/gstreamer/gst-plugins-good_0.10.7.bb
index e84c4801f1..fb551f5176 100644
--- a/packages/gstreamer/gst-plugins-good_0.10.7.bb
+++ b/packages/gstreamer/gst-plugins-good_0.10.7.bb
@@ -1,4 +1,5 @@
require gst-plugins.inc
+PR = "r1"
EXTRA_OECONF += "--with-check=no"
-DEPENDS += "gst-plugins-base"
+DEPENDS += "gst-plugins-base esound"
diff --git a/packages/gstreamer/gst-plugins.inc b/packages/gstreamer/gst-plugins.inc
index 66546d5f2b..eaba8343f3 100644
--- a/packages/gstreamer/gst-plugins.inc
+++ b/packages/gstreamer/gst-plugins.inc
@@ -1,6 +1,6 @@
require gst-common.inc
DESCRIPTION = "Plugins for GStreamer"
-DEPENDS = "gstreamer libmikmod libmad liboil libogg tremor libvorbis libid3tag esound"
+DEPENDS = "gstreamer libmikmod libmad liboil libogg tremor libvorbis libid3tag"
PACKAGES_DYNAMIC = "gst-plugin-*"
diff --git a/packages/gtk+/gtk+-2.12.3/hardcoded_libtool.patch b/packages/gtk+/gtk+-2.12.3/hardcoded_libtool.patch
index 6adb0cfef6..1c2cd0576d 100644
--- a/packages/gtk+/gtk+-2.12.3/hardcoded_libtool.patch
+++ b/packages/gtk+/gtk+-2.12.3/hardcoded_libtool.patch
@@ -5,7 +5,7 @@
auto)
export SED
- deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
-+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo $deplibs_check_method') | sh`
++ deplibs_check_method=`($host_alias-libtool --config; echo 'eval echo $deplibs_check_method') | sh`
if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
enable_explicit_deps=yes
else
@@ -14,7 +14,7 @@
dnl (in a rather ugly way even)
if $dynworks; then
- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-+ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
++ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config"
pixbuf_deplibs_check=`$pixbuf_libtool_config | \
grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
@@ -23,7 +23,7 @@
# code in place for now, since pango and atk still require gmodule.
export SED
-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
if test -n "$export_dynamic"; then
GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/packages/gtk+/gtk+_2.12.3.bb b/packages/gtk+/gtk+_2.12.3.bb
index 3d3bd0c8cf..7f2074b96c 100644
--- a/packages/gtk+/gtk+_2.12.3.bb
+++ b/packages/gtk+/gtk+_2.12.3.bb
@@ -1,6 +1,6 @@
require gtk+.inc
-PR = "r1"
+PR = "r2"
DEPENDS += "cairo"
diff --git a/packages/gtk-webcore/midori-0.0.18/.mtn2git_empty b/packages/gtk-webcore/midori-0.0.18/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gtk-webcore/midori-0.0.18/.mtn2git_empty
diff --git a/packages/gtk-webcore/midori-0.0.18/desktop.patch b/packages/gtk-webcore/midori-0.0.18/desktop.patch
new file mode 100644
index 0000000000..bb1225432a
--- /dev/null
+++ b/packages/gtk-webcore/midori-0.0.18/desktop.patch
@@ -0,0 +1,7 @@
+--- midori-0.0.18/midori.desktop.in-orig 2008-03-19 14:34:52.000000000 -0700
++++ midori-0.0.18/midori.desktop.in 2008-03-19 14:21:56.000000000 -0700
+@@ -1,4 +1,3 @@
+-
+ [Desktop Entry]
+ Version=1.0
+ Encoding=UTF-8
diff --git a/packages/gtk-webcore/midori_0.0.18.bb b/packages/gtk-webcore/midori_0.0.18.bb
index b879fef57b..bb144f8600 100644
--- a/packages/gtk-webcore/midori_0.0.18.bb
+++ b/packages/gtk-webcore/midori_0.0.18.bb
@@ -1 +1,6 @@
-require midori.inc
+require midori.inc
+
+PR = "r2"
+
+SRC_URI += "file://desktop.patch;patch=1"
+
diff --git a/packages/gtkmm/gtkmm_2.10.11.bb b/packages/gtkmm/gtkmm_2.12.7.bb
index b8ba69f50e..b8ba69f50e 100644
--- a/packages/gtkmm/gtkmm_2.10.11.bb
+++ b/packages/gtkmm/gtkmm_2.12.7.bb
diff --git a/packages/guile/files/configure-fix.patch b/packages/guile/files/configure-fix.patch
new file mode 100644
index 0000000000..c59798d9e9
--- /dev/null
+++ b/packages/guile/files/configure-fix.patch
@@ -0,0 +1,10 @@
+--- /tmp/configure.in 2008-06-04 12:33:55.451086283 +0200
++++ guile-1.8.5/configure.in 2008-06-04 12:34:03.974994278 +0200
+@@ -38,7 +38,6 @@
+ ]),
+ [bug-guile@gnu.org])
+ AC_CONFIG_AUX_DIR([build-aux])
+-AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR(GUILE-VERSION)
+
+ AM_INIT_AUTOMAKE([gnu no-define check-news])
diff --git a/packages/guile/guile-native_1.8.5.bb b/packages/guile/guile-native_1.8.5.bb
new file mode 100644
index 0000000000..b29a7ebd71
--- /dev/null
+++ b/packages/guile/guile-native_1.8.5.bb
@@ -0,0 +1,130 @@
+SECTION = "unknown"
+LICENSE = "GPL"
+DEPENDS = "gmp-native"
+SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \
+ file://configure-fix.patch;patch=1 \
+"
+
+inherit autotools native
+
+S="${WORKDIR}/guile-${PV}"
+
+OE_LT_RPATH_ALLOW = "any"
+LDFLAGS += " -L${STAGING_LIBDIR} "
+
+LIBGUILE_HEADERS = "\
+__scm.h \
+alist.h \
+arbiters.h \
+async.h \
+backtrace.h \
+boolean.h \
+chars.h \
+continuations.h \
+debug-malloc.h \
+debug.h \
+deprecation.h \
+dynl.h \
+dynwind.h \
+environments.h \
+eq.h \
+error.h \
+eval.h \
+evalext.h \
+extensions.h \
+feature.h \
+filesys.h \
+fluids.h \
+fports.h \
+gc.h \
+gdb_interface.h \
+gdbint.h \
+goops.h \
+gsubr.h \
+guardians.h \
+hash.h \
+hashtab.h \
+hooks.h \
+init.h \
+ioext.h \
+iselect.h \
+keywords.h \
+lang.h \
+list.h \
+load.h \
+macros.h \
+mallocs.h \
+modules.h \
+net_db.h \
+numbers.h \
+objects.h \
+objprop.h \
+options.h \
+pairs.h \
+ports.h \
+posix.h \
+print.h \
+procprop.h \
+procs.h \
+properties.h \
+ramap.h \
+random.h \
+rdelim.h \
+read.h \
+regex-posix.h \
+root.h \
+rw.h \
+scmconfig.h \
+scmsigs.h \
+script.h \
+simpos.h \
+smob.h \
+snarf.h \
+socket.h \
+sort.h \
+srcprop.h \
+stackchk.h \
+stacks.h \
+stime.h \
+strings.h \
+strorder.h \
+strports.h \
+struct.h \
+symbols.h \
+tags.h \
+threads.h \
+throw.h \
+unif.h \
+validate.h \
+values.h \
+variable.h \
+vectors.h \
+version.h \
+vports.h \
+weaks.h \
+"
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/libguile
+ for i in ${LIBGUILE_HEADERS}; do
+ install -m 0644 libguile/$i ${STAGING_INCDIR}/libguile/$i
+ done
+
+ install -d ${STAGING_BINDIR_NATIVE}
+ install -m 0755 ${S}/libguile/.libs/guile ${STAGING_BINDIR_NATIVE}/
+
+ install -m 0644 libguile.h ${STAGING_INCDIR}/libguile.h
+ install -d ${STAGING_INCDIR}/guile
+ install -m 0644 libguile/gh.h ${STAGING_INCDIR}/guile/
+ install -d ${STAGING_INCDIR}/guile/srfi
+ install -d ${STAGING_INCDIR}/guile-readline
+ install -m 0644 guile-readline/readline.h ${STAGING_INCDIR}/guile-readline/
+ install -d ${STAGING_DATADIR}/aclocal
+ install -m 0644 guile-config/guile.m4 ${STAGING_DATADIR}/aclocal
+
+ install -d ${STAGING_DATADIR}/guile/1.8
+ cp -pPr ${S}/ice-9 ${STAGING_DATADIR}/guile/1.8/
+
+ oe_libinstall -C guile-readline -so -a libguilereadline-v-17 ${STAGING_LIBDIR}
+ oe_libinstall -C libguile -so -a libguile ${STAGING_LIBDIR}
+}
diff --git a/packages/hal/files/20hal b/packages/hal/files/20hal
index 834e51afc0..926bd893e2 100644
--- a/packages/hal/files/20hal
+++ b/packages/hal/files/20hal
@@ -33,7 +33,7 @@ do_start() {
do_stop() {
echo "Stopping $DESC" "$NAME"
- start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--exec $DAEMON
}
diff --git a/packages/hal/files/autoconf.diff b/packages/hal/files/autoconf.diff
new file mode 100644
index 0000000000..eb30cccdbe
--- /dev/null
+++ b/packages/hal/files/autoconf.diff
@@ -0,0 +1,11 @@
+--- hal-0.5.9/configure.in~ 2007-04-03 05:36:44.000000000 +0100
++++ hal-0.5.9/configure.in 2007-04-03 10:29:39.000000000 +0100
+@@ -6,7 +6,7 @@
+ # Patches for that is welcome.
+ #
+
+-AC_PREREQ(2.59c)
++AC_PREREQ(2.59)
+ AC_INIT(hal, 0.5.9, david@fubar.dk)
+ AM_INIT_AUTOMAKE(hal, 0.5.9)
+ AM_CONFIG_HEADER(config.h)
diff --git a/packages/hal/files/sg-inhibit.patch b/packages/hal/files/sg-inhibit.patch
new file mode 100644
index 0000000000..f0cc41448a
--- /dev/null
+++ b/packages/hal/files/sg-inhibit.patch
@@ -0,0 +1,24 @@
+--- hal-0.5.9.1/hald/linux/probing/linux_dvd_rw_utils.c.old 2007-08-03 17:24:12.000000000 +0100
++++ hal-0.5.9.1/hald/linux/probing/linux_dvd_rw_utils.c 2007-08-03 17:25:06.000000000 +0100
+@@ -58,6 +58,10 @@
+
+ #include "linux_dvd_rw_utils.h"
+
++#if defined(SG_FLAG_UNUSED_LUN_INHIBIT)
++# define SG_FLAG_LUN_INHIBIT SG_FLAG_UNUSED_LUN_INHIBIT
++#endif
++
+ typedef enum {
+ NONE = CGC_DATA_NONE, // 3
+ READ = CGC_DATA_READ, // 2
+@@ -153,8 +153,8 @@
+ errno = EIO;
+ ret = -1;
+ if (cmd->sg_io.masked_status & CHECK_CONDITION) {
+- CREAM_ON_ERRNO (cmd->sg_io.sbp);
+- ret = ERRCODE (cmd->sg_io.sbp);
++ CREAM_ON_ERRNO ((char*)cmd->sg_io.sbp);
++ ret = ERRCODE ((char*)cmd->sg_io.sbp);
+ if (ret == 0)
+ ret = -1;
+ }
diff --git a/packages/hal/hal-info_20070831.bb b/packages/hal/hal-info_20070831.bb
new file mode 100644
index 0000000000..a379254937
--- /dev/null
+++ b/packages/hal/hal-info_20070831.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Hardware Abstraction Layer device information"
+HOMEPAGE = "http://freedesktop.org/Software/hal"
+SECTION = "unknown"
+LICENSE = "GPL AFL"
+DEPENDS = "hal"
+
+SRC_URI = "git://anongit.freedesktop.org/hal-info/;protocol=git;tag=HAL_INFO_${PV}"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-recall --disable-video"
+
+PACKAGE_ARCH = "all"
+FILES_${PN} += "/usr/share/hal/"
diff --git a/packages/hal/hal-info_git.bb b/packages/hal/hal-info_git.bb
index 2812f19fe0..48192a8e7e 100644
--- a/packages/hal/hal-info_git.bb
+++ b/packages/hal/hal-info_git.bb
@@ -2,13 +2,13 @@ DESCRIPTION = "Hardware Abstraction Layer device information"
HOMEPAGE = "http://freedesktop.org/Software/hal"
SECTION = "unknown"
LICENSE = "GPL AFL"
+DEPENDS = "hal"
PV = "${SRCDATE}+git"
-PR = "r1"
+PR = "r2"
-DEFAULT_PREFERENCE = "-1"
-SRC_URI = "git://anongit.freedesktop.org/hal-info/;protocol=git"
+SRC_URI = "git://anongit.freedesktop.org/hal-info/;protocol=git;rev=HAL_INFO_20070831"
S = "${WORKDIR}/git"
@@ -19,3 +19,6 @@ EXTRA_OECONF = "--disable-recall --disable-video"
PACKAGE_ARCH = "all"
FILES_${PN} += "${datadir}/hal/"
+
+# By default, use the released hal-info
+DEFAULT_PREFERENCE = "-1"
diff --git a/packages/hal/hal/.mtn2git_empty b/packages/hal/hal/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/hal/hal/.mtn2git_empty
diff --git a/packages/hal/hal/configure_fix.patch b/packages/hal/hal/configure_fix.patch
new file mode 100644
index 0000000000..e8417040de
--- /dev/null
+++ b/packages/hal/hal/configure_fix.patch
@@ -0,0 +1,60 @@
+The AC_LANG sections upset libtool 2.2.2, as do .cpp files without a call
+to AC_PROG_CXX. Easiest solution is to patch this out for now.
+
+RP - 14/4/08
+
+Index: hal-0.5.9.1/configure.in
+===================================================================
+--- hal-0.5.9.1.orig/configure.in 2008-04-14 22:41:49.000000000 +0100
++++ hal-0.5.9.1/configure.in 2008-04-14 22:43:13.000000000 +0100
+@@ -345,32 +345,8 @@
+ fi
+
+ dnl Check for libsmbios
+-AC_LANG_PUSH([C++])
+-AC_CHECK_LIB(smbios, SMBIOSFreeMemory, LIB_SMBIOS=yes , LIB_SMBIOS=no )
+-AC_LANG_POP([C++])
+-if test "$LIB_SMBIOS" = "yes" ; then
+- AC_MSG_CHECKING([for libsmbios >= 0.13.4])
+- AC_TRY_RUN(
+- #include <smbios/version.h>
+- int main ()
+- {
+- int major ;
+- int minor ;
+- int micro ;
+-
+- if ( sscanf( LIBSMBIOS_RELEASE_VERSION , "%d.%d.%d", &major, &minor, &micro ) == 3 ) {
+- if ((major == 0 && minor == 13 && micro >= 4) ||
+- (major >= 0 && minor > 13)) {
+- return 0;
+- }
+- }
+- return 1;
+- } , [USE_SMBIOS=yes; AC_MSG_RESULT(yes); AM_CONDITIONAL(HAVE_SMBIOS,true)],
+- [USE_SMBIOS=no; AC_MSG_RESULT(failed); AM_CONDITIONAL(HAVE_SMBIOS,false)])
+-else
+- USE_SMBIOS=no
+- AM_CONDITIONAL(HAVE_SMBIOS,false)
+-fi
++USE_SMBIOS=no
++AM_CONDITIONAL(HAVE_SMBIOS,false)
+
+ AC_ARG_WITH([libpci],
+ [AS_HELP_STRING([--without-libpci],
+Index: hal-0.5.9.1/hald/linux/addons/Makefile.am
+===================================================================
+--- hal-0.5.9.1.orig/hald/linux/addons/Makefile.am 2008-04-14 22:45:18.000000000 +0100
++++ hal-0.5.9.1/hald/linux/addons/Makefile.am 2008-04-14 22:46:05.000000000 +0100
+@@ -60,11 +60,6 @@
+ hald_addon_usb_csr_LDADD = $(top_builddir)/libhal/libhal.la -lusb @GLIB_LIBS@
+ endif
+
+-if BUILD_DELL
+-libexec_PROGRAMS += hald-addon-dell-backlight
+-hald_addon_dell_backlight_SOURCES = addon-dell-backlight.cpp ../../logger.c
+-hald_addon_dell_backlight_LDADD = $(top_builddir)/libhal/libhal.la -lsmbios @GLIB_LIBS@
+-endif
+ endif
+
+ hald_addon_acpi_SOURCES = addon-acpi.c ../../logger.c ../../util_helper.c
diff --git a/packages/hal/hal_0.5.9.1.bb b/packages/hal/hal_0.5.9.1.bb
new file mode 100644
index 0000000000..3d2ba155b5
--- /dev/null
+++ b/packages/hal/hal_0.5.9.1.bb
@@ -0,0 +1,93 @@
+DESCRIPTION = "Hardware Abstraction Layer"
+HOMEPAGE = "http://freedesktop.org/Software/hal"
+SECTION = "unknown"
+LICENSE = "GPL LGPL AFL"
+
+DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat libusb-compat"
+RDEPENDS_${PN} += "udev hal-info"
+RRECOMMENDS_${PN} += "udev-utils"
+
+PR = "r7"
+
+SRC_URI = "http://freedesktop.org/~david/dist/hal-${PV}.tar.gz \
+ file://configure_fix.patch;patch=1 \
+ file://sg-inhibit.patch;patch=1 \
+ file://20hal \
+ file://99_hal"
+
+S = "${WORKDIR}/hal-${PV}"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
+ --with-expat=${STAGING_DIR_HOST}${layout_prefix} \
+ --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
+ --with-hotplug=${sysconfdir}/hotplug.d \
+ --disable-docbook-docs \
+ --disable-policy-kit \
+ --disable-acpi --disable-acpi-acpid --disable-acpi-proc \
+ --disable-sonypic \
+ --disable-pmu --disable-pci \
+ --disable-pci-ids --disable-pnp-ids \
+ "
+
+do_install_append() {
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
+}
+
+do_stage() {
+ autotools_stage_all
+ install -d ${STAGING_LIBDIR}
+ install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
+ install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
+}
+
+# At the time the postinst runs, dbus might not be setup so only restart if running
+pkg_postinst_hal () {
+ # can not do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+
+ /etc/init.d/populate-volatile.sh update
+
+ grep haldaemon /etc/group || addgroup haldaemon
+ grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
+
+ DBUSPID=`pidof dbus-daemon`
+
+ if [ "x$DBUSPID" != "x" ]; then
+ /etc/init.d/dbus-1 reload
+ fi
+}
+
+pkg_postrm_hal () {
+ deluser haldaemon || true
+ delgroup haldaemon || true
+}
+
+PACKAGES =+ "libhal libhal-storage"
+
+FILES_libhal = "${libdir}/libhal.so.*"
+FILES_libhal-storage = "${libdir}/libhal-storage.so.*"
+
+FILES_${PN} = "${sysconfdir} \
+ ${bindir}/lshal \
+ ${bindir}/hal-find-by-capability \
+ ${bindir}/hal-find-by-property \
+ ${bindir}/hal-device \
+ ${bindir}/hal-get-property \
+ ${bindir}/hal-set-property \
+ ${bindir}/hal-lock \
+ ${bindir}/hal-is-caller-locked-out \
+ ${bindir}/hal-disable-polling \
+ ${sbindir} \
+ ${libdir}/libhal.so.* \
+ ${libdir}/libhal-storage.so.* \
+ ${libdir}/hal \
+ ${libexecdir} \
+ ${datadir}/hal/fdi \
+ ${datadir}/hal/scripts"
diff --git a/packages/hal/hal_0.5.9.bb b/packages/hal/hal_0.5.9.bb
index d84179eb1e..b878638ff2 100644
--- a/packages/hal/hal_0.5.9.bb
+++ b/packages/hal/hal_0.5.9.bb
@@ -1,11 +1,11 @@
require hal.inc
-DEPENDS = "virtual/kernel dbus-glib udev intltool intltool-native expat libusb"
+DEPENDS = "virtual/kernel dbus-glib udev intltool intltool-native expat libusb-compat"
RDEPENDS += "udev hal-info"
#RDEPENDS_hal-device-manager = "python hal python-pygnome"
RRECOMMENDS = "udev-utils"
-PR = "r6"
+PR = "r7"
SRC_URI += "file://99_hal \
file://20hal \
diff --git a/packages/hal/hal_git.bb b/packages/hal/hal_git.bb
new file mode 100644
index 0000000000..659ab8eb6c
--- /dev/null
+++ b/packages/hal/hal_git.bb
@@ -0,0 +1,89 @@
+DESCRIPTION = "Hardware Abstraction Layer"
+HOMEPAGE = "http://freedesktop.org/Software/hal"
+SECTION = "unknown"
+LICENSE = "GPL LGPL AFL"
+
+DEFAULT_PREFERENCE = "-1"
+
+DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat libusb-compat"
+RDEPENDS_${PN} += "udev hal-info"
+RRECOMMENDS_${PN} += "udev-utils"
+
+SRC_URI = "git://anongit.freedesktop.org/hal/;protocol=git \
+ file://20hal \
+ file://99_hal"
+
+PV = "0.5.9.1+git${SRCDATE}"
+PR = "r5"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
+ --with-expat=${STAGING_DIR_HOST}${layout_prefix} \
+ --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
+ --with-hotplug=${sysconfdir}/hotplug.d \
+ --disable-docbook-docs \
+ --disable-policy-kit \
+ --disable-acpi --disable-acpi-acpid --disable-acpi-proc \
+ --disable-sonypic \
+ --disable-pmu --disable-pci \
+ --disable-pci-ids --disable-pnp-ids \
+ "
+
+do_install_append() {
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
+}
+
+do_stage() {
+ autotools_stage_all
+ install -d ${STAGING_LIBDIR}
+ install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
+ install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
+}
+
+# At the time the postinst runs, dbus might not be setup so only restart if running
+pkg_postinst_hal () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+
+ /etc/init.d/populate-volatile.sh update
+
+ grep haldaemon /etc/group || addgroup haldaemon
+ grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
+
+ DBUSPID=`pidof dbus-daemon`
+
+ if [ "x$DBUSPID" != "x" ]; then
+ /etc/init.d/dbus-1 reload
+ fi
+}
+
+pkg_postrm_hal () {
+ deluser haldaemon || true
+ delgroup haldaemon || true
+}
+
+FILES_${PN} = "${sysconfdir} \
+ ${bindir}/lshal \
+ ${bindir}/hal-find-by-capability \
+ ${bindir}/hal-find-by-property \
+ ${bindir}/hal-device \
+ ${bindir}/hal-get-property \
+ ${bindir}/hal-set-property \
+ ${bindir}/hal-lock \
+ ${bindir}/hal-is-caller-locked-out \
+ ${bindir}/hal-disable-polling \
+ ${sbindir} \
+ ${libdir}/libhal.so.* \
+ ${libdir}/libhal-storage.so.* \
+ ${libdir}/hal \
+ ${libexecdir} \
+ ${datadir}/hal/fdi \
+ ${datadir}/hal/scripts"
diff --git a/packages/handsfree/.mtn2git_empty b/packages/handsfree/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/handsfree/.mtn2git_empty
diff --git a/packages/handsfree/files/.mtn2git_empty b/packages/handsfree/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/handsfree/files/.mtn2git_empty
diff --git a/packages/handsfree/files/Makefile.patch b/packages/handsfree/files/Makefile.patch
new file mode 100644
index 0000000000..6ca8dd2698
--- /dev/null
+++ b/packages/handsfree/files/Makefile.patch
@@ -0,0 +1,19 @@
+--- handsfree/old/Makefile 2006-11-21 18:01:13.000000000 +0000
++++ handsfree/Makefile 2006-11-21 14:01:17.000000000 +0000
+@@ -9,12 +9,12 @@
+ # I use a dmixer as default alsa device to mix
+ # the handsfree output with other sound playback
+ #
+-ALSA_PLAY="default"
+-ALSA_REC="plughw:0,0"
++#ALSA_PLAY="default"
++#ALSA_REC="plughw:0,0"
+
+
+-LDFLAGS= -lbluetooth -lasound
+-CFLAGS=-g -Wall -DOSS=0
++#LDFLAGS= -lbluetooth -lasound
++#CFLAGS=-g -Wall -DOSS=0
+
+ all: handsfree headset
+
diff --git a/packages/handsfree/handsfree_0.1.bb b/packages/handsfree/handsfree_0.1.bb
new file mode 100644
index 0000000000..bd909a0140
--- /dev/null
+++ b/packages/handsfree/handsfree_0.1.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "Handsfree and Handset Bluetooth tool"
+HOMEPAGE = "http://www.soft.uni-linz.ac.at/_wiki/tiki-index.php?page=ProjectBluezHandsfree"
+SECTION = "network/misc"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+DEPENDS= "bluez-libs alsa-lib"
+PR = "r0"
+
+
+SRC_URI = "\
+ http://www.soft.uni-linz.ac.at/~vogl/bluez/handsfree-040326.tar.gz \
+ file://Makefile.patch;patch=1 \
+"
+S = "${WORKDIR}/handsfree"
+
+# Alsa devices
+# Example: "plughw:0,0"
+ALSA_PLAY = "default"
+ALSA_REC = "default"
+
+CFLAGS =+ "-DOSS=0 "
+LDFLAGS =+ "-lbluetooth -lasound "
+
+do_compile() {
+ oe_runmake all
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 handsfree ${D}${bindir}
+ install -m 0755 headset ${D}${bindir}
+}
diff --git a/packages/i2c-tools/read-edid_1.4.1.bb b/packages/i2c-tools/read-edid_1.4.1.bb
new file mode 100644
index 0000000000..e1f10ca48d
--- /dev/null
+++ b/packages/i2c-tools/read-edid_1.4.1.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "read-edid elucidates various very useful informations from a conforming PnP monitor"
+LICENSE = "GPL"
+
+SRC_URI = "http://john.fremlin.de/programs/linux/read-edid/read-edid-${PV}.tar.gz \
+ http://ftp.de.debian.org/debian/pool/main/r/read-edid/read-edid_1.4.1-2.1.diff.gz;patch=1 "
+
+inherit autotools
+
+do_compile() {
+ oe_runmake parse-edid
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install -m 0755 parse-edid ${D}/${sbindir}/
+}
+
+PACKAGES =+ "parse-edid"
+FILES_parse-edid = "${sbindir}/parse-edid"
diff --git a/packages/icewm/icewm-1.2.20/configure.patch b/packages/icewm/icewm-1.2.20/configure.patch
deleted file mode 100644
index d6071bf260..0000000000
--- a/packages/icewm/icewm-1.2.20/configure.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- icewm-1.2.20/configure.in.orig 2006-06-17 18:03:43.000000000 -0600
-+++ icewm-1.2.20/configure.in 2006-06-17 18:03:45.000000000 -0600
-@@ -426,32 +426,43 @@
- AC_MSG_ERROR("xfreetype or core fonts must be enabled")
- fi
- if test "$enable_xfreetype" != "no" -o "$enable_xfreetype" = "implied"; then
-- AC_PATH_PROG(XFT_CONFIG, xft-config,, ${with_xft_arg-${PATH}})
-- if test "${XFT_CONFIG}" != ""; then
-- XFT_CFLAGS=`${XFT_CONFIG} --cflags`
-- XFT_LIBS=`${XFT_CONFIG} --libs`
-- AC_DEFINE(CONFIG_XFREETYPE, 2, [Define to enable XFreeType support.])
-- CORE_CFLAGS="${CORE_CFLAGS} $XFT_CFLAGS"
-- CORE_LIBS="${CORE_LIBS} $XFT_LIBS"
-- features="${features} xfreetype"
-- else
-- AC_CHECK_HEADERS(X11/Xft/Xft.h,
-- [ AC_CHECK_LIB(Xft, XftDrawCreate,
-- [ AC_DEFINE(CONFIG_XFREETYPE, 1, [Define to enable XFreeType support.])
-- CORE_LIBS="${CORE_LIBS} -lXft"
-- enable_corefonts=yes
-- features="${features} xfreetype" ],
-- [ if test "$enable_xfreetype" != "implied"; then
-- AC_MSG_ERROR([Xft support has been requested but libraries were not found.
-+ AC_PATH_PROG(PKG_CONFIG, pkg-config)
-+
-+ if test "${PKG_CONFIG}" != ""; then
-+ XFT_CFLAGS=`${PKG_CONFIG} xft --cflags`
-+ XFT_LIBS=`${PKG_CONFIG} xft --libs`
-+ AC_DEFINE(CONFIG_XFREETYPE, 2, [Define to enable XFreeType support.])
-+ CORE_CFLAGS="${CORE_CFLAGS} $XFT_CFLAGS"
-+ CORE_LIBS="${CORE_LIBS} $XFT_LIBS"
-+ features="${features} xfreetype"
-+ else
-+ AC_PATH_PROG(XFT_CONFIG, xft-config,, ${with_xft_arg-${PATH}})
-+ if test "${XFT_CONFIG}" != ""; then
-+ XFT_CFLAGS=`${XFT_CONFIG} --cflags`
-+ XFT_LIBS=`${XFT_CONFIG} --libs`
-+ AC_DEFINE(CONFIG_XFREETYPE, 2, [Define to enable XFreeType support.])
-+ CORE_CFLAGS="${CORE_CFLAGS} $XFT_CFLAGS"
-+ CORE_LIBS="${CORE_LIBS} $XFT_LIBS"
-+ features="${features} xfreetype"
-+ else
-+ AC_CHECK_HEADERS(X11/Xft/Xft.h,
-+ [ AC_CHECK_LIB(Xft, XftDrawCreate,
-+ [ AC_DEFINE(CONFIG_XFREETYPE, 1, [Define to enable XFreeType support.])
-+ CORE_LIBS="${CORE_LIBS} -lXft"
-+ enable_corefonts=yes
-+ features="${features} xfreetype" ],
-+ [ if test "$enable_xfreetype" != "implied"; then
-+ AC_MSG_ERROR([Xft support has been requested but libraries were not found.
- *** Configure your X server to support XFreeType.
- *** Information about how to do this can be found in RELNOTES for XFree86.])
-- fi ])],
-- [ if test "$enable_xfreetype" != "implied"; then
-- AC_MSG_ERROR([Xft support has been requested but headers were not found.
-+ fi ])],
-+ [ if test "$enable_xfreetype" != "implied"; then
-+ AC_MSG_ERROR([Xft support has been requested but headers were not found.
- *** Configure your X server to support XFreeType.
- *** Information about how to do this can be found in RELNOTES for XFree86.])
-- fi ])
-- fi
-+ fi ])
-+ fi
-+ fi
- fi
-
- if test "$enable_corefonts" = "yes"; then
diff --git a/packages/icewm/icewm-1.2.20/makefile.patch b/packages/icewm/icewm-1.2.20/makefile.patch
deleted file mode 100644
index 9473c9b2a9..0000000000
--- a/packages/icewm/icewm-1.2.20/makefile.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- ./src/Makefile.in 2005-02-01 21:56:08.000000000 +0100
-+++ ./src/Makefile.in 2005-02-01 21:55:12.000000000 +0100
-@@ -206,10 +206,21 @@
- %.o: %.cc
- @echo " CXX " $@
- @$(CXX) $(CXXFLAGS) $(GCCDEP) -c $<
--
--genpref $(BINARIES):
-+
-+HOSTCXX=g++
-+HOSTLD=g++
-+
-+genpref.o: genpref.cc
-+ @echo " HOSTCXX " $@
-+ @$(HOSTCXX) $(CXXFLAGS) $(GCCDEP) -c $<
-+
-+$(BINARIES):
- @echo " LD " $@
- @$(LD) -o $@$(EXEEXT) $($@_OBJS) $(LFLAGS) $($@_LFLAGS) $(LIBS) $($@_LIBS)
-+
-+genpref:
-+ @echo " HOSTLD " $@
-+ @$(HOSTLD) -o $@$(EXEEXT) $($@_OBJS) $(LFLAGS) $($@_LFLAGS) $(LIBS) $($@_LIBS)
-
- ################################################################################
-
diff --git a/packages/icewm/icewm-1.2.30/makefile.patch b/packages/icewm/icewm-1.2.30/makefile.patch
index 9473c9b2a9..753f6a57a2 100644
--- a/packages/icewm/icewm-1.2.30/makefile.patch
+++ b/packages/icewm/icewm-1.2.30/makefile.patch
@@ -1,26 +1,23 @@
--- ./src/Makefile.in 2005-02-01 21:56:08.000000000 +0100
+++ ./src/Makefile.in 2005-02-01 21:55:12.000000000 +0100
-@@ -206,10 +206,21 @@
+@@ -206,10 +206,18 @@
%.o: %.cc
@echo " CXX " $@
@$(CXX) $(CXXFLAGS) $(GCCDEP) -c $<
-
-genpref $(BINARIES):
+
-+HOSTCXX=g++
-+HOSTLD=g++
-+
+genpref.o: genpref.cc
-+ @echo " HOSTCXX " $@
-+ @$(HOSTCXX) $(CXXFLAGS) $(GCCDEP) -c $<
++ @echo " BUILD_CXX " $@
++ @$(BUILD_CXX) $(BUILD_CXXFLAGS) $(DEBUG) $(DEFS) $(GCCDEP) -c $<
+
+$(BINARIES):
@echo " LD " $@
@$(LD) -o $@$(EXEEXT) $($@_OBJS) $(LFLAGS) $($@_LFLAGS) $(LIBS) $($@_LIBS)
+
+genpref:
-+ @echo " HOSTLD " $@
-+ @$(HOSTLD) -o $@$(EXEEXT) $($@_OBJS) $(LFLAGS) $($@_LFLAGS) $(LIBS) $($@_LIBS)
++ @echo " BUILD_CXX " $@
++ @$(BUILD_CXX) $(BUILD_LDFLAGS) -o $@$(EXEEXT) $($@_OBJS) $(LIBS) $($@_LIBS)
################################################################################
diff --git a/packages/icewm/icewm_1.2.20.bb b/packages/icewm/icewm_1.2.20.bb
deleted file mode 100644
index 1567e985e2..0000000000
--- a/packages/icewm/icewm_1.2.20.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SECTION = "x11/wm"
-DESCRIPTION = "IceWM Window Manager"
-LICENSE = "GPL"
-DEPENDS = "virtual/libx11 libxext libxcomposite libxfixes libxdamage libxrender libxinerama libxpm xrandr xft mkfontdir-native"
-RRECOMMENDS = "ttf-dejavu-sans"
-PR = "r2"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/icewm/icewm-${PV}.tar.gz \
- file://makefile.patch;patch=1 \
- file://configure.patch;patch=1"
-
-S = "${WORKDIR}/icewm-${PV}"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-i18n --without-imlib --with-xpm --with-gnome-menus \
- --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR} \
- --with-mkfontdir=${STAGING_BINDIR_NATIVE}/mkfontdir"
-
-pkg_postinst() {
-update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/icewm-session 10
-}
-
-pkg_postrm() {
-update-alternatives --remove x-window-manager /usr/bin/icewm-session
-}
diff --git a/packages/icewm/icewm_1.2.30.bb b/packages/icewm/icewm_1.2.30.bb
index 3dfffb1ae8..cd8cfe5bde 100644
--- a/packages/icewm/icewm_1.2.30.bb
+++ b/packages/icewm/icewm_1.2.30.bb
@@ -1,13 +1,15 @@
-SECTION = "x11/wm"
DESCRIPTION = "IceWM Window Manager"
+SECTION = "x11/wm"
LICENSE = "GPL"
DEPENDS = "virtual/libx11 libxext libxcomposite libxfixes libxdamage libxrender libxinerama libxpm xrandr xft mkfontdir-native"
RRECOMMENDS = "ttf-dejavu-sans"
-PR = "r1"
+PR = "r2"
-SRC_URI = "${SOURCEFORGE_MIRROR}/icewm/icewm-${PV}.tar.gz \
- file://makefile.patch;patch=1 \
- file://configure.patch;patch=1"
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/icewm/icewm-${PV}.tar.gz \
+ file://makefile.patch;patch=1 \
+ file://configure.patch;patch=1 \
+"
inherit autotools pkgconfig
diff --git a/packages/icu/icu-3.6.inc b/packages/icu/icu-3.6.inc
index ec95cabb84..04fc8420ab 100644
--- a/packages/icu/icu-3.6.inc
+++ b/packages/icu/icu-3.6.inc
@@ -11,6 +11,7 @@ inherit autotools pkgconfig binconfig
do_configure() {
libtoolize --force
+ gnu-configize --force
oe_runconf
}
diff --git a/packages/imagemagick/imagemagick_6.3.5-10.bb b/packages/imagemagick/imagemagick_6.3.5-10.bb
index 56229802ac..c6e65d4c60 100644
--- a/packages/imagemagick/imagemagick_6.3.5-10.bb
+++ b/packages/imagemagick/imagemagick_6.3.5-10.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "ImageMagick is an image convertion tools"
SECTION = "console/utils"
LICENSE = "GPL"
DEPENDS = "tiff"
-PR = "r1"
+PR = "r2"
SRC_URI = "ftp://ftp.nluug.nl/pub/ImageMagick/ImageMagick-${PV}.tar.bz2 \
file://PerlMagic_MakePatch;patch=1 \
@@ -15,6 +15,7 @@ S = "${WORKDIR}/ImageMagick-${IMVER}"
inherit autotools binconfig pkgconfig
+EXTRA_AUTORECONF += "--exclude=libtoolize"
EXTRA_OECONF = "--without-x --without-freetype --without-perl"
EXTRA_OECONF_openprotium = "--without-x --without-freetype --without-xml --without-perl"
diff --git a/packages/images/beagleboard-demo-image.bb b/packages/images/beagleboard-demo-image.bb
new file mode 100644
index 0000000000..03371c730e
--- /dev/null
+++ b/packages/images/beagleboard-demo-image.bb
@@ -0,0 +1,37 @@
+# Demo image for beagleboard
+
+XSERVER ?= "xserver-kdrive-fbdev"
+
+ANGSTROM_EXTRA_INSTALL ?= ""
+
+export IMAGE_BASENAME = "Beagleboard-demo-image"
+
+DEPENDS = "task-base"
+IMAGE_INSTALL = "\
+ ${XSERVER} \
+ task-base-extended \
+ angstrom-x11-base-depends \
+ angstrom-gpe-task-base \
+ angstrom-gpe-task-settings \
+ ${ANGSTROM_EXTRA_INSTALL} \
+ angstrom-zeroconf-audio \
+ gpe-scap \
+ psplash \
+ e-wm exhibit \
+ xterm xmms epiphany-firefox-replacement \
+ hicolor-icon-theme gnome-icon-theme \
+ jaaa nmap iperf gnuplot \
+ abiword \
+# gnumeric \
+# gimp \
+ powertop \
+ pidgin \
+# irssi \
+"
+
+IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
+
+#zap root password for release images
+ROOTFS_POSTPROCESS_COMMAND += '${@base_conditional("DISTRO_TYPE", "release", "zap_root_password; ", "",d)}'
+
+inherit image
diff --git a/packages/images/fso-image-light.bb b/packages/images/fso-image-light.bb
new file mode 100644
index 0000000000..921c636b12
--- /dev/null
+++ b/packages/images/fso-image-light.bb
@@ -0,0 +1,32 @@
+#------------------------------------------------------
+# freesmartphone.org Image Recipe, Light Edition
+#------------------------------------------------------
+
+require fso-image.bb
+
+IMAGE_LINGUAS = ""
+
+IMAGE_INSTALL = "\
+ ${BASE_INSTALL} \
+ ${X_INSTALL} \
+ ${PYTHON_INSTALL} \
+ ${ZHONE_INSTALL} \
+"
+
+inherit image
+
+# perform some convenience tweaks to the rootfs
+mickey_rootfs_postprocess() {
+ curdir=$PWD
+ cd ${IMAGE_ROOTFS}
+ date "+%m%d%H%M%Y" >./etc/timestamp
+ echo "alias pico=nano" >>./etc/profile
+ echo "alias fso='cd /local/pkg/fso'" >>./etc/profile
+ mkdir -p ./local/pkg
+ echo >>./etc/fstab
+ echo "# NFS Host" >>./etc/fstab
+ echo "192.168.0.200:/local/pkg /local/pkg nfs noauto,nolock,soft,rsize=32768,wsize=32768 0 0" >>./etc/fstab
+ cd $curdir
+}
+
+ROOTFS_POSTPROCESS_COMMAND += "mickey_rootfs_postprocess"
diff --git a/packages/images/fso-image.bb b/packages/images/fso-image.bb
index 72cbfd71c6..a08dac18b7 100644
--- a/packages/images/fso-image.bb
+++ b/packages/images/fso-image.bb
@@ -3,33 +3,9 @@
#------------------------------------------------------
IMAGE_LINGUAS = ""
-
-ADD_INSTALL = "\
- fontconfig-utils \
- \
- ttf-dejavu-common \
- ttf-dejavu-sans \
- ttf-dejavu-serif \
- \
-"
-
-MICKEY_INSTALL = "\
- htop \
- mickeyterm \
- nano \
- powertop \
- s3c24xx-gpio \
-"
-
-ZHONE_INSTALL = "\
- gsm0710muxd \
- python-odeviced \
- python-ophoned \
- python-ousaged \
- zhone \
-"
-
-IMAGE_INSTALL = "\
+
+# getting the base system up
+BASE_INSTALL = "\
${MACHINE_TASK_PROVIDER} \
netbase \
sysfsutils \
@@ -38,7 +14,10 @@ IMAGE_INSTALL = "\
screen \
fbset \
fbset-modes \
- \
+"
+
+# getting an X window system up
+X_INSTALL = "\
matchbox-wm \
${XSERVER} \
xserver-kdrive-common \
@@ -48,14 +27,84 @@ IMAGE_INSTALL = "\
xset \
xrandr \
\
- python-codecs \
+ fontconfig-utils \
\
- ${ADD_INSTALL} \
- ${MICKEY_INSTALL} \
+ ttf-dejavu-common \
+ ttf-dejavu-sans \
+ ttf-dejavu-serif \
+ \
+"
+
+# useful command line tools
+TOOLS_INSTALL = "\
+# bash \
+ htop \
+ mickeyterm \
+ mplayer \
+ nano \
+ powertop \
+ s3c24xx-gpio \
+"
+
+# audio
+AUDIO_INSTALL = "\
+ alsa-oss \
+ alsa-state \
+ alsa-utils-aplay \
+ gst-meta-audio \
+ gst-plugin-mad \
+ gst-plugin-modplug \
+ gst-plugin-sid \
+ fso-sounds \
+"
+
+# FIXME these should rather be part of alsa-state,
+# once Om stabilizes them...
+AUDIO_INSTALL_append_om-gta01 = "\
+ openmoko-alsa-scenarios \
+"
+AUDIO_INSTALL_append_om-gta02 = "\
+ openmoko-alsa-scenarios \
+"
+
+# python
+PYTHON_INSTALL = "\
+ task-python-efl \
+ python-codecs \
+ python-gst \
+"
+
+# zhone
+ZHONE_INSTALL = "\
+ gsm0710muxd \
+ frameworkd \
+ zhone \
+"
+
+IMAGE_INSTALL = "\
+ ${BASE_INSTALL} \
+ ${X_INSTALL} \
+ ${AUDIO_INSTALL} \
+ ${TOOLS_INSTALL} \
+ ${PYTHON_INSTALL} \
${ZHONE_INSTALL} \
"
-
+
inherit image
-
-ROOTFS_POSTPROCESS_COMMAND += 'date "+%m%d%H%M%Y" >${IMAGE_ROOTFS}/etc/timestamp'
+# perform some convenience tweaks to the rootfs
+mickey_rootfs_postprocess() {
+ curdir=$PWD
+ cd ${IMAGE_ROOTFS}
+ date "+%m%d%H%M%Y" >./etc/timestamp
+ echo "alias pico=nano" >>./etc/profile
+ echo "alias fso='cd /local/pkg/fso'" >>./etc/profile
+ echo "alias ipkg='opkg'" >>./etc/profile
+ mkdir -p ./local/pkg
+ echo >>./etc/fstab
+ echo "# NFS Host" >>./etc/fstab
+ echo "192.168.0.200:/local/pkg /local/pkg nfs noauto,nolock,soft,rsize=32768,wsize=32768 0 0" >>./etc/fstab
+ cd $curdir
+}
+
+ROOTFS_POSTPROCESS_COMMAND += "mickey_rootfs_postprocess"
diff --git a/packages/images/moko-underground-image.bb b/packages/images/moko-underground-image.bb
index 5752ce6037..590aaf941f 100644
--- a/packages/images/moko-underground-image.bb
+++ b/packages/images/moko-underground-image.bb
@@ -13,6 +13,11 @@ ADD_INSTALL = "\
\
"
+TOOLS_INSTALL = "\
+ nano \
+ powertop \
+ htop \
+"
IMAGE_INSTALL = "\
${MACHINE_TASK_PROVIDER} \
@@ -27,6 +32,7 @@ IMAGE_INSTALL = "\
task-pyneo \
\
${ADD_INSTALL} \
+ ${TOOLS_INSTALL} \
"
inherit image
diff --git a/packages/images/neuros-osd-base-image.bb b/packages/images/neuros-osd-base-image.bb
new file mode 100644
index 0000000000..ddf524574a
--- /dev/null
+++ b/packages/images/neuros-osd-base-image.bb
@@ -0,0 +1,18 @@
+# This image is intended to be the base for further neuros images
+
+# Select which Secure Shell Daemon gets included into the rootfs
+DISTRO_SSH_DAEMON ?= "dropbear"
+
+# Include a timestamp that initscripts can use to set the time to a
+# more sane value after a reboot
+IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
+
+IMAGE_INSTALL = "task-boot \
+ util-linux-mount util-linux-umount \
+ ${DISTRO_SSH_DAEMON} \
+ "
+
+IMAGE_LINGUAS = ""
+
+inherit image
+
diff --git a/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb b/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
index ff42ba532b..60361f5862 100644
--- a/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
+++ b/packages/ipkg-utils/ipkg-utils-native_1.6+cvs20050404.bb
@@ -1,7 +1,7 @@
require ipkg-utils_${PV}.bb
RDEPENDS = ""
-PR = "r17"
+PR = "r18"
inherit native
diff --git a/packages/ipkg-utils/ipkg-utils/arfile_even_alignment.patch b/packages/ipkg-utils/ipkg-utils/arfile_even_alignment.patch
new file mode 100644
index 0000000000..3ab133fb15
--- /dev/null
+++ b/packages/ipkg-utils/ipkg-utils/arfile_even_alignment.patch
@@ -0,0 +1,11 @@
+--- ipkg-utils/arfile.py.orig 2008-06-11 21:07:01.000000000 -0500
++++ ipkg-utils/arfile.py 2008-06-14 19:56:04.000000000 -0500
+@@ -86,6 +86,8 @@
+ return FileSection(self.f, self.f.tell(), size)
+
+ # Skip data and loop
++ if size % 2:
++ size = size + 1
+ data = self.f.seek(size, 1)
+ # print hex(f.tell())
+
diff --git a/packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch b/packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch
index 389a86018b..02f30c1504 100644
--- a/packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch
+++ b/packages/ipkg-utils/ipkg-utils/ipkg-py-tarfile.patch
@@ -1,6 +1,7 @@
-diff -r 720080c24d2f arfile.py
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/arfile.py Sun Jan 27 23:26:35 2008 +0200
+Index: ipkg-utils/arfile.py
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ ipkg-utils/arfile.py 2008-05-30 15:33:49.000000000 +0100
@@ -0,0 +1,124 @@
+"""
+arfile - A module to parse GNU ar archives.
@@ -126,10 +127,11 @@ diff -r 720080c24d2f arfile.py
+
+ f2 = tarf.extractfile("control")
+ print f2.read()
-diff -r 720080c24d2f ipkg.py
---- a/ipkg.py Sun Jan 27 23:13:26 2008 +0200
-+++ b/ipkg.py Sun Jan 27 23:26:35 2008 +0200
-@@ -41,6 +41,8 @@ import string
+Index: ipkg-utils/ipkg.py
+===================================================================
+--- ipkg-utils.orig/ipkg.py 2008-05-30 15:33:49.000000000 +0100
++++ ipkg-utils/ipkg.py 2008-05-30 15:35:58.000000000 +0100
+@@ -41,6 +41,8 @@
import string
import commands
from stat import ST_SIZE
@@ -138,7 +140,7 @@ diff -r 720080c24d2f ipkg.py
class Version:
"""A class for holding parsed package version information."""
-@@ -131,77 +133,61 @@ class Package:
+@@ -131,78 +133,63 @@
self.section = None
self.filename_header = None
self.file_list = []
@@ -174,9 +176,9 @@ diff -r 720080c24d2f ipkg.py
- self.md5 = sum.hexdigest()
- else:
- self.md5 = string.join(map((lambda x:"%02x" % ord(x)),sum.digest()),'')
-- stat = os.stat(fn)
+ stat = os.stat(fn)
- self.size = stat[ST_SIZE]
-+
++ self.size = stat[ST_SIZE]
self.filename = os.path.basename(fn)
## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,))
- if self.isdeb:
@@ -232,7 +234,7 @@ diff -r 720080c24d2f ipkg.py
self.scratch_dir = None
self.file_dir = None
self.meta_dir = None
-+
+
+ def __getattr__(self, name):
+ if name == "md5":
+ self._computeFileMD5()
@@ -250,10 +252,11 @@ diff -r 720080c24d2f ipkg.py
+ sum.update(data)
+ f.close()
+ self.md5 = sum.hexdigest()
-
++
def read_control(self, control):
import os
-@@ -221,9 +207,15 @@ class Package:
+
+@@ -221,9 +208,15 @@
value = value + '\n' + line
if name == 'size':
self.size = int(value)
@@ -270,7 +273,7 @@ diff -r 720080c24d2f ipkg.py
return # consumes one blank line at end of package descriptoin
else:
line = control.readline()
-@@ -314,7 +306,27 @@ class Package:
+@@ -314,7 +307,27 @@
return self.section
def get_file_list(self):
@@ -299,10 +302,11 @@ diff -r 720080c24d2f ipkg.py
def write_package(self, dirname):
buf = self.render_control()
-diff -r 720080c24d2f setup.py
---- a/setup.py Sun Jan 27 23:13:26 2008 +0200
-+++ b/setup.py Sun Jan 27 23:26:35 2008 +0200
-@@ -16,6 +16,6 @@ distutils.core.setup( name = 'ipkg-utils
+Index: ipkg-utils/setup.py
+===================================================================
+--- ipkg-utils.orig/setup.py 2005-03-03 16:40:17.000000000 +0000
++++ ipkg-utils/setup.py 2008-05-30 15:33:49.000000000 +0100
+@@ -16,6 +16,6 @@
platforms = 'POSIX',
keywords = 'ipkg familiar',
url = 'http://www.handhelds.org/sources.html/',
diff --git a/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb b/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
index 4b7471a163..707a005c5c 100644
--- a/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
+++ b/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb
@@ -5,12 +5,13 @@ LICENSE = "GPL"
CONFLICTS = "ipkg-link"
RDEPENDS = "python"
SRCDATE = "20050404"
-PR = "r19"
+PR = "r20.1"
SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils \
file://ipkg-utils-fix.patch;patch=1 \
file://ipkg-py-sane-vercompare.patch;patch=1 \
file://ipkg-py-tarfile.patch;patch=1 \
+ file://arfile_even_alignment.patch;patch=1 \
file://ipkg-make-index-track-stamps.patch;patch=1 \
file://fields_tweaks.patch;patch=1 "
diff --git a/packages/jamvm/jamvm.inc b/packages/jamvm/jamvm.inc
index 930159e891..af6fd47ee6 100644
--- a/packages/jamvm/jamvm.inc
+++ b/packages/jamvm/jamvm.inc
@@ -19,4 +19,4 @@ CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
ALTERNATIVE_NAME = "java"
ALTERNATIVE_PATH = "${bindir}/jamvm"
-ALTERNATIVE_PRIORITY = "10"
+ALTERNATIVE_PRIORITY = "5"
diff --git a/packages/jamvm/jamvm_1.4.5.bb b/packages/jamvm/jamvm_1.4.5.bb
index 3cc0431266..8414c5615c 100644
--- a/packages/jamvm/jamvm_1.4.5.bb
+++ b/packages/jamvm/jamvm_1.4.5.bb
@@ -1,4 +1,6 @@
require jamvm.inc
+PR = "r1"
+
SRC_URI += "file://jamvm-1.3.1-size-defaults.patch;patch=1"
diff --git a/packages/jamvm/jamvm_1.5.0.bb b/packages/jamvm/jamvm_1.5.0.bb
index 366658dd97..81977a5f40 100644
--- a/packages/jamvm/jamvm_1.5.0.bb
+++ b/packages/jamvm/jamvm_1.5.0.bb
@@ -2,7 +2,7 @@ require jamvm.inc
SRC_URI += "file://debian-jni.patch;patch=1;pnum=0"
-PR = "r1"
+PR = "r2"
do_configure_prepend() {
# Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
diff --git a/packages/jamvm/jamvm_1.5.1.bb b/packages/jamvm/jamvm_1.5.1.bb
index bf9271c938..366658dd97 100644
--- a/packages/jamvm/jamvm_1.5.1.bb
+++ b/packages/jamvm/jamvm_1.5.1.bb
@@ -2,7 +2,7 @@ require jamvm.inc
SRC_URI += "file://debian-jni.patch;patch=1;pnum=0"
-PR = "r0"
+PR = "r1"
do_configure_prepend() {
# Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
diff --git a/packages/kerneloops/.mtn2git_empty b/packages/kerneloops/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/kerneloops/.mtn2git_empty
diff --git a/packages/kerneloops/kerneloops_0.11.bb b/packages/kerneloops/kerneloops_0.11.bb
new file mode 100644
index 0000000000..3d530a64ab
--- /dev/null
+++ b/packages/kerneloops/kerneloops_0.11.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "Kernel oops collection utility"
+LICENSE = "GPLv2"
+DEPENDS = "libnotify dbus gtk+"
+
+SRC_URI = "http://www.kerneloops.org/download/kerneloops-0.11.tar.gz"
+
+do_compile_prepend() {
+ sed -i -e 's:gcc:$(CC):g' ${S}/Makefile
+}
+
+inherit update-rc.d
+INITSCRIPT_NAME = "kerneloops"
+
+do_install() {
+ install -d ${D}/${datadir}/applications
+ install -d ${D}/${datadir}/icons
+ install -d ${D}/${bindir}
+ install -d ${D}/${INIT_D_DIR}
+
+ install -m 0755 kerneloops ${D}/${bindir}
+ install -m 0755 kerneloops-applet ${D}/${bindir}
+ install -m 0644 kerneloops-applet.desktop ${D}/${datadir}/applications
+ install -m 0644 icon.png ${D}/${datadir}/icons
+ install -m 0755 kerneloops.init ${D}/${INIT_D_DIR}/kerneloops
+}
+
+FILES_${PN} += "${datadir}/icons"
+
diff --git a/packages/keymaps/files/tosa/keymap-2.6.map b/packages/keymaps/files/tosa/keymap-2.6.map
index f83e4bfe39..8533612121 100644
--- a/packages/keymaps/files/tosa/keymap-2.6.map
+++ b/packages/keymaps/files/tosa/keymap-2.6.map
@@ -1,297 +1,123 @@
# Default kernel keymap. This uses 7 modifier combinations.
keymaps 0-2,4-5,8,12
+# Change the above line into
+# keymaps 0-2,4-6,8,12
+# in case you want the entries
+# altgr control keycode 83 = Boot
+# altgr control keycode 111 = Boot
+# below.
#
-keycode 1 = Escape Escape
-# alt keycode 1 = Meta_Escape
-#keycode 2 = one exclam
-# alt keycode 2 = Meta_one
-#keycode 3 = two at at
-# control keycode 3 = nul
-# shift control keycode 3 = nul
-# alt keycode 3 = Meta_two
-#keycode 4 = three numbersign
-# control keycode 4 = Escape
-# alt keycode 4 = Meta_three
-#keycode 5 = four dollar dollar
-# control keycode 5 = Control_backslash
-# alt keycode 5 = Meta_four
-#keycode 6 = five percent
-# control keycode 6 = Control_bracketright
-# alt keycode 6 = Meta_five
-#keycode 7 = six asciicircum
-# control keycode 7 = Control_asciicircum
-# alt keycode 7 = Meta_six
-#keycode 8 = seven ampersand braceleft
-# control keycode 8 = Control_underscore
-# alt keycode 8 = Meta_seven
-#keycode 9 = eight asterisk bracketleft
-# control keycode 9 = Delete
-# alt keycode 9 = Meta_eight
-#keycode 10 = nine parenleft bracketright
-# alt keycode 10 = Meta_nine
-#keycode 11 = zero parenright braceright
-# alt keycode 11 = Meta_zero
-#keycode 12 = minus underscore backslash
-# control keycode 12 = Control_underscore
-# shift control keycode 12 = Control_underscore
-# alt keycode 12 = Meta_minus
-#keycode 13 = equal plus
-# alt keycode 13 = Meta_equal
-keycode 14 = BackSpace BackSpace
- altgr keycode 14 = Delete
-#keycode 14 = Delete Delete
-# control keycode 14 = BackSpace
-# alt keycode 14 = Meta_Delete
-keycode 15 = Tab Tab
- altgr keycode 15 = Caps_Lock
-keycode 16 = q
- altgr keycode 16 = one
-keycode 17 = w
- altgr keycode 17 = two
-keycode 18 = e
- altgr keycode 18 = three
-# altgr keycode 18 = Hex_E
-keycode 19 = r
- altgr keycode 19 = four
-keycode 20 = t
- altgr keycode 20 = five
-keycode 21 = y
- altgr keycode 21 = six
-keycode 22 = u
- altgr keycode 22 = seven
-keycode 23 = i
- altgr keycode 23 = eight
-keycode 24 = o
- altgr keycode 24 = nine
-keycode 25 = p
- altgr keycode 25 = zero
-#keycode 26 = bracketleft braceleft
-# control keycode 26 = Escape
-# alt keycode 26 = Meta_bracketleft
-#keycode 27 = bracketright braceright asciitilde
-# control keycode 27 = Control_bracketright
-# alt keycode 27 = Meta_bracketright
-keycode 28 = Return
- altgr keycode 28 = greater
-# alt keycode 28 = Meta_Control_m
-keycode 29 = Control
-keycode 30 = a
- altgr keycode 30 = exclam
-# altgr keycode 30 = Hex_A
-keycode 31 = s
- altgr keycode 31 = at
-keycode 32 = d
- altgr keycode 32 = numbersign
-# altgr keycode 32 = Hex_D
-keycode 33 = f
- altgr keycode 33 = dollar
-# altgr keycode 33 = Hex_F
-keycode 34 = g
- altgr keycode 34 = percent
-keycode 35 = h
- altgr keycode 35 = underscore
-keycode 36 = j
- altgr keycode 36 = ampersand
-keycode 37 = k
- altgr keycode 37 = asterisk
-keycode 38 = l
- altgr keycode 38 = parenleft
-#keycode 39 = semicolon colon
-# alt keycode 39 = Meta_semicolon
-keycode 40 = apostrophe quotedbl
- altgr keycode 40 = asciitilde
-# control keycode 40 = Control_g
-# alt keycode 40 = Meta_apostrophe
-#keycode 41 = grave asciitilde
-# control keycode 41 = nul
-# alt keycode 41 = Meta_grave
-keycode 42 = Shift
-#keycode 43 = backslash bar
-# control keycode 43 = Control_backslash
-# alt keycode 43 = Meta_backslash
-keycode 44 = z
-## alt keycode 44 =
-keycode 45 = x
- altgr keycode 45 = Control_x
-keycode 46 = c
- altgr keycode 46 = Control_c
-# altgr keycode 46 = Hex_C
-keycode 47 = v
- altgr keycode 47 = Control_v
-keycode 48 = b
- altgr keycode 48 = minus
-# altgr keycode 48 = Hex_B
-keycode 49 = n
- altgr keycode 49 = plus
-keycode 50 = m
- altgr keycode 50 = equal
-keycode 51 = comma semicolon
- altgr keycode 51 = parenright
-#keycode 51 = comma less
-# alt keycode 51 = Meta_comma
-keycode 52 = period colon
- control keycode 52 = Compose
- altgr keycode 52 = less
-#keycode 52 = period greater
-# control keycode 52 = Compose
-# alt keycode 52 = Meta_period
-keycode 53 = slash question
- altgr keycode 53 = Num_Lock
-# control keycode 53 = Delete
-# alt keycode 53 = Meta_slash
-keycode 54 = Shift
-#keycode 55 = KP_Multiply
-#keycode 56 = Alt
-keycode 57 = space space
- altgr keycode 57 = bar
-# control keycode 57 = nul
-# alt keycode 57 = Meta_space
-#keycode 58 = Caps_Lock
-#keycode 59 = F1 F11 Console_13
-# control keycode 59 = F1
-# alt keycode 59 = Console_1
-# control alt keycode 59 = Console_1
-#keycode 60 = F2 F12 Console_14
-# control keycode 60 = F2
-# alt keycode 60 = Console_2
-# control alt keycode 60 = Console_2
-#keycode 61 = F3 F13 Console_15
-# control keycode 61 = F3
-# alt keycode 61 = Console_3
-# control alt keycode 61 = Console_3
-#keycode 62 = F4 F14 Console_16
-# control keycode 62 = F4
-# alt keycode 62 = Console_4
-# control alt keycode 62 = Console_4
-#keycode 63 = F5 F15 Console_17
-# control keycode 63 = F5
-# alt keycode 63 = Console_5
-# control alt keycode 63 = Console_5
-#keycode 64 = F6 F16 Console_18
-# control keycode 64 = F6
-# alt keycode 64 = Console_6
-# control alt keycode 64 = Console_6
-#keycode 65 = F7 F17 Console_19
-# control keycode 65 = F7
-# alt keycode 65 = Console_7
-# control alt keycode 65 = Console_7
-#keycode 66 = F8 F18 Console_20
-# control keycode 66 = F8
-# alt keycode 66 = Console_8
-# control alt keycode 66 = Console_8
-#keycode 67 = F9 F19 Console_21
-# control keycode 67 = F9
-# alt keycode 67 = Console_9
-# control alt keycode 67 = Console_9
-#keycode 68 = F10 F20 Console_22
-# control keycode 68 = F10
-# alt keycode 68 = Console_10
-# control alt keycode 68 = Console_10
-#keycode 69 = Num_Lock
-# shift keycode 69 = Bare_Num_Lock
-#keycode 70 = Scroll_Lock Show_Memory Show_Registers
-# control keycode 70 = Show_State
-# alt keycode 70 = Scroll_Lock
-#keycode 71 = KP_7
-# alt keycode 71 = Ascii_7
-# altgr keycode 71 = Hex_7
-#keycode 72 = KP_8
-# alt keycode 72 = Ascii_8
-# altgr keycode 72 = Hex_8
-#keycode 73 = KP_9
-# alt keycode 73 = Ascii_9
-# altgr keycode 73 = Hex_9
-#keycode 74 = KP_Subtract
-#keycode 75 = KP_4
-# alt keycode 75 = Ascii_4
-# altgr keycode 75 = Hex_4
-#keycode 76 = KP_5
-# alt keycode 76 = Ascii_5
-# altgr keycode 76 = Hex_5
-#keycode 77 = KP_6
-# alt keycode 77 = Ascii_6
-# altgr keycode 77 = Hex_6
-#keycode 78 = KP_Add
-#keycode 79 = KP_1
-# alt keycode 79 = Ascii_1
-# altgr keycode 79 = Hex_1
-#keycode 80 = KP_2
-# alt keycode 80 = Ascii_2
-# altgr keycode 80 = Hex_2
-#keycode 81 = KP_3
-# alt keycode 81 = Ascii_3
-# altgr keycode 81 = Hex_3
-#keycode 82 = KP_0
-# alt keycode 82 = Ascii_0
-# altgr keycode 82 = Hex_0
-#keycode 83 = KP_Period
-## altgr control keycode 83 = Boot
-# control alt keycode 83 = Boot
-#keycode 84 = Last_Console
-#keycode 85 =
-#keycode 86 = less greater bar
-# alt keycode 86 = Meta_less
-#keycode 87 = F11 F11 Console_23
-# control keycode 87 = F11
-# alt keycode 87 = Console_11
-# control alt keycode 87 = Console_11
-#keycode 88 = F12 F12 Console_24
-# control keycode 88 = F12
-# alt keycode 88 = Console_12
-# control alt keycode 88 = Console_12
-#keycode 89 =
-#keycode 90 =
-keycode 91 = space
-#keycode 91 =
-keycode 92 = Return
-#keycode 92 =
-#keycode 93 =
-#keycode 94 =
-#keycode 95 =
-#keycode 96 = KP_Enter
-#keycode 97 = Control
-#keycode 98 = KP_Divide
-#keycode 99 = Control_backslash
-# control keycode 99 = Control_backslash
-# alt keycode 99 = Control_backslash
-keycode 100 = AltGr
-#keycode 101 = Break
-#keycode 102 = Find
-keycode 103 = Up
- altgr keycode 103 = Prior
- shift keycode 104 = Scroll_Backward
-#keycode 104 = Prior
-# shift keycode 104 = Scroll_Backward
-keycode 105 = Left
- altgr keycode 105 = Decr_Console
-keycode 106 = Right
- altgr keycode 106 = Incr_Console
-#keycode 107 = Select
-keycode 108 = Down
- altgr keycode 108 = Next
- shift keycode 108 = Scroll_Forward
-#keycode 109 = Next
-# shift keycode 109 = Scroll_Forward
-#keycode 110 = Insert
-#keycode 111 = Remove
-## altgr control keycode 111 = Boot
-# control alt keycode 111 = Boot
-#keycode 112 = Macro
-#keycode 113 = F13
-#keycode 114 = F14
-#keycode 115 = Help
-#keycode 116 = Do
-#keycode 117 = F17
-#keycode 118 = KP_MinPlus
-#keycode 119 = Pause
-#keycode 120 =
-#keycode 121 =
-#keycode 122 =
-#keycode 123 =
-#keycode 124 =
-#keycode 125 =
-#keycode 126 =
-#keycode 127 =
+keycode 1 =
+keycode 14 = BackSpace
+ altgr keycode 14 = Delete
+keycode 15 = Tab
+ altgr keycode 15 = Caps_Lock
+keycode 16 = q
+ altgr keycode 16 = one
+keycode 17 = w
+ altgr keycode 17 = two
+keycode 18 = e
+ altgr keycode 18 = three
+keycode 19 = r
+ altgr keycode 19 = four
+keycode 20 = t
+ altgr keycode 20 = five
+keycode 21 = y
+ altgr keycode 21 = six
+keycode 22 = u
+ altgr keycode 22 = seven
+keycode 23 = i
+ altgr keycode 23 = eight
+keycode 24 = o
+ altgr keycode 24 = nine
+keycode 25 = p
+ altgr keycode 25 = zero
+keycode 26 =
+keycode 27 =
+keycode 28 = Return
+ altgr keycode 28 = greater
+keycode 29 = Control
+keycode 30 = a
+ altgr keycode 30 = exclam
+keycode 31 = s
+ altgr keycode 31 = at
+keycode 32 = d
+ altgr keycode 32 = numbersign
+keycode 33 = f
+ altgr keycode 33 = dollar
+keycode 34 = g
+ altgr keycode 34 = percent
+keycode 35 = h
+ altgr keycode 35 = underscore
+keycode 36 = j
+ altgr keycode 36 = ampersand
+keycode 37 = k
+ altgr keycode 37 = asterisk
+keycode 38 = l
+ altgr keycode 38 = parenleft
+keycode 39 =
+keycode 40 = apostrophe quotedbl
+ altgr keycode 40 = asciitilde
+keycode 41 =
+keycode 42 = Shift
+keycode 43 =
+keycode 44 = z
+ altgr keycode 44 = backslash
+keycode 45 = x
+keycode 46 = c
+ altgr keycode 46 = Control_c
+keycode 47 = v
+ altgr keycode 47 = Control_v
+keycode 48 = b
+ altgr keycode 48 = minus
+keycode 49 = n
+ altgr keycode 49 = plus
+keycode 50 = m
+ altgr keycode 50 = equal
+keycode 51 = comma semicolon
+ altgr keycode 51 = parenright
+keycode 52 = period colon
+ altgr keycode 52 = less
+ control keycode 52 = Compose
+keycode 53 = slash question
+ altgr keycode 53 = Num_Lock
+keycode 54 = Shift
+keycode 55 =
+keycode 56 = Alt
+keycode 57 = space space
+ altgr keycode 57 = bar
+keycode 58 =
+keycode 59 = F9 # Calendar
+ altgr keycode 59 = braceleft
+keycode 60 = F10 # Contact
+ altgr keycode 60 = bracketleft
+keycode 61 = AltGr # Fn
+keycode 62 = Escape # Cancel
+keycode 63 = space # Bulleye
+keycode 64 = Control # Dot
+keycode 65 = F15 # Backlight/Rotate
+ altgr keycode 65 = asciicircum
+keycode 66 = F24 # Rec
+keycode 67 = F12 # Home
+ altgr keycode 67 = grave
+keycode 68 = F13 # Email
+ altgr keycode 68 = braceright
+keycode 79 = F15
+keycode 80 = F16
+keycode 82 = F17
+keycode 87 = Return # OK
+keycode 88 = F11 # Menu
+ altgr keycode 88 = bracketright
+keycode 97 = Control
+keycode 99 = F12
+keycode 103 = Up Scroll_Backward
+ altgr keycode 103 = PageUp
+keycode 105 = Left Prior
+ altgr keycode 105 = Decr_Console
+keycode 106 = Right Next
+ altgr keycode 106 = Incr_Console
+keycode 108 = Down Scroll_Forward
+ altgr keycode 108 = PageDown
string F1 = "\033[[A"
string F2 = "\033[[B"
string F3 = "\033[[C"
diff --git a/packages/keymaps/keymaps_1.0.bb b/packages/keymaps/keymaps_1.0.bb
index c4d22d4b13..89b1cfacde 100644
--- a/packages/keymaps/keymaps_1.0.bb
+++ b/packages/keymaps/keymaps_1.0.bb
@@ -3,7 +3,7 @@ SECTION = "base"
RDEPENDS = "initscripts console-tools"
LICENSE = "GPL"
PACKAGE_ARCH = "${MACHINE}"
-PR = "r19"
+PR = "r20"
inherit update-rc.d
diff --git a/packages/lame/lame_3.96.1.bb b/packages/lame/lame_3.96.1.bb
index 0c5c245829..ab9a99c064 100644
--- a/packages/lame/lame_3.96.1.bb
+++ b/packages/lame/lame_3.96.1.bb
@@ -20,6 +20,7 @@ do_configure() {
aclocal
autoconf
libtoolize --force
+ gnu-configize --force
oe_runconf
}
diff --git a/packages/lasertraq/.mtn2git_empty b/packages/lasertraq/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/lasertraq/.mtn2git_empty
diff --git a/packages/lasertraq/lasertraq.inc b/packages/lasertraq/lasertraq.inc
new file mode 100644
index 0000000000..32b4679405
--- /dev/null
+++ b/packages/lasertraq/lasertraq.inc
@@ -0,0 +1,10 @@
+DESCRIPTION = "LaserTraq is a package to enable you to use a laserpointer in connection with a camera as input device."
+LICENSE = "GPL"
+DEPENDS = "gstreamer gtk+"
+
+SRC_URI = "http://lasertraq.googlecode.com/files/lasertraq-0.8-r213.tar.bz2"
+
+inherit autotools
+
+S = "${WORKDIR}/lasertraq/${PN}"
+
diff --git a/packages/lasertraq/traqconfig_0.8.bb b/packages/lasertraq/traqconfig_0.8.bb
new file mode 100644
index 0000000000..9687b8636b
--- /dev/null
+++ b/packages/lasertraq/traqconfig_0.8.bb
@@ -0,0 +1,6 @@
+require lasertraq.inc
+
+
+FILES_${PN} += "${datadir}/gnome ${datadir}/traqConfig"
+FILES_${PN}-doc += "/usr/doc/"
+
diff --git a/packages/lcd4linux/.mtn2git_empty b/packages/lcd4linux/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/lcd4linux/.mtn2git_empty
diff --git a/packages/lcd4linux/files/.mtn2git_empty b/packages/lcd4linux/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/lcd4linux/files/.mtn2git_empty
diff --git a/packages/lcd4linux/files/lcd4linux.init b/packages/lcd4linux/files/lcd4linux.init
new file mode 100644
index 0000000000..0972c9005e
--- /dev/null
+++ b/packages/lcd4linux/files/lcd4linux.init
@@ -0,0 +1,56 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: lcd4linux
+# Required-Start:
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: daemon for driving LCD based displays
+# Description: LCD4Linux is a small program that grabs information from
+# the kernel and some subsystems and displays it on an
+# external liquid crystal display.
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/lcd4linux
+NAME=lcd4linux
+DESC=lcd4linux
+
+test -x $DAEMON || exit 0
+test -f /etc/lcd4linux.conf || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ chmod 600 /etc/lcd4linux.conf
+ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON || true
+ echo "$NAME."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packages/lcd4linux/files/libusb-compat.diff b/packages/lcd4linux/files/libusb-compat.diff
new file mode 100644
index 0000000000..43d7cb9f63
--- /dev/null
+++ b/packages/lcd4linux/files/libusb-compat.diff
@@ -0,0 +1,95 @@
+diff -Nurd lcd4linux-0.10.1-RC2.orig/drv_BWCT.c lcd4linux-0.10.1-RC2/drv_BWCT.c
+--- lcd4linux-0.10.1-RC2.orig/drv_BWCT.c 2007-02-25 13:39:09.000000000 +0100
++++ lcd4linux-0.10.1-RC2/drv_BWCT.c 2008-06-22 11:57:01.000000000 +0200
+@@ -72,7 +72,6 @@
+ static usb_dev_handle *lcd;
+ static int interface;
+
+-extern int usb_debug;
+ extern int got_signal;
+
+
+@@ -89,7 +88,6 @@
+
+ info("%s: scanning USB for BWCT LCD...", Name);
+
+- usb_debug = 0;
+
+ usb_init();
+ usb_find_busses();
+diff -Nurd lcd4linux-0.10.1-RC2.orig/drv_LCD2USB.c lcd4linux-0.10.1-RC2/drv_LCD2USB.c
+--- lcd4linux-0.10.1-RC2.orig/drv_LCD2USB.c 2007-02-25 13:39:10.000000000 +0100
++++ lcd4linux-0.10.1-RC2/drv_LCD2USB.c 2008-06-22 11:57:47.000000000 +0200
+@@ -98,7 +98,6 @@
+ static usb_dev_handle *lcd;
+ static int controllers = 0;
+
+-extern int usb_debug;
+ extern int got_signal;
+
+ /****************************************/
+@@ -120,7 +119,6 @@
+ if (device_id != NULL)
+ info("%s: scanning for device id: %s", Name, device_id);
+
+- usb_debug = 0;
+
+ usb_init();
+ usb_find_busses();
+diff -Nurd lcd4linux-0.10.1-RC2.orig/drv_picoLCD.c lcd4linux-0.10.1-RC2/drv_picoLCD.c
+--- lcd4linux-0.10.1-RC2.orig/drv_picoLCD.c 2007-02-25 13:39:10.000000000 +0100
++++ lcd4linux-0.10.1-RC2/drv_picoLCD.c 2008-06-22 11:58:10.000000000 +0200
+@@ -75,7 +75,6 @@
+ static char *BufPtr;
+
+ static usb_dev_handle *lcd;
+-extern int usb_debug;
+
+
+
+@@ -97,7 +96,6 @@
+
+ info("%s: scanning for picoLCD...", Name);
+
+- usb_debug = 0;
+
+ usb_init();
+ usb_find_busses();
+diff -Nurd lcd4linux-0.10.1-RC2.orig/drv_Trefon.c lcd4linux-0.10.1-RC2/drv_Trefon.c
+--- lcd4linux-0.10.1-RC2.orig/drv_Trefon.c 2007-02-25 13:39:10.000000000 +0100
++++ lcd4linux-0.10.1-RC2/drv_Trefon.c 2008-06-22 11:58:50.000000000 +0200
+@@ -72,7 +72,6 @@
+ static usb_dev_handle *lcd;
+ static int interface;
+
+-extern int usb_debug;
+
+
+ /****************************************/
+@@ -88,7 +87,6 @@
+
+ info("%s: scanning USB for TREFON LCD...", Name);
+
+- usb_debug = 0;
+
+ usb_init();
+ usb_find_busses();
+diff -Nurd lcd4linux-0.10.1-RC2.orig/drv_USBLCD.c lcd4linux-0.10.1-RC2/drv_USBLCD.c
+--- lcd4linux-0.10.1-RC2.orig/drv_USBLCD.c 2007-02-25 13:39:10.000000000 +0100
++++ lcd4linux-0.10.1-RC2/drv_USBLCD.c 2008-06-22 11:58:57.000000000 +0200
+@@ -86,7 +86,6 @@
+ static usb_dev_handle *lcd;
+ static int interface;
+
+-extern int usb_debug;
+
+ #endif
+
+@@ -107,7 +106,6 @@
+
+ info("%s: scanning for USBLCD...", Name);
+
+- usb_debug = 0;
+
+ usb_init();
+ usb_find_busses();
diff --git a/packages/lcd4linux/lcd4linux_0.10.0.bb b/packages/lcd4linux/lcd4linux_0.10.0.bb
new file mode 100644
index 0000000000..4c164de709
--- /dev/null
+++ b/packages/lcd4linux/lcd4linux_0.10.0.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "LCD4Linux is a small program that grabs information from the kernel and some subsystems and displays it on an external liquid crystal display."
+LICENSE = "GPLv2"
+
+DEPENDS = "libusb-compat ncurses readline virtual/libx11"
+
+PV = "0.10.0+0.10.1-RC2"
+PR = "r3"
+
+SRC_URI = "http://ssl.bulix.org/projects/lcd4linux/raw-attachment/wiki/Download/lcd4linux-0.10.1-RC2.tar.gz \
+ file://libusb-compat.diff;patch=1 \
+ file://lcd4linux.init"
+
+S = "${WORKDIR}/lcd4linux-0.10.1-RC2"
+
+
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "lcd4linux"
+CONFFILES_${PN} += "${sysconfdir}/lcd4linux.conf"
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}
+ install -m 0600 ${S}/lcd4linux.conf.sample ${D}/${sysconfdir}/lcd4linux.conf
+ install -d ${D}/${INIT_D_DIR}
+ install -m 0755 ${WORKDIR}/lcd4linux.init ${D}/${INIT_D_DIR}/lcd4linux
+}
+
diff --git a/packages/lcms/lcms_1.13.bb b/packages/lcms/lcms_1.13.bb
index b2a2f960aa..af1869e75d 100644
--- a/packages/lcms/lcms_1.13.bb
+++ b/packages/lcms/lcms_1.13.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Little cms is a small-footprint, speed optimized color management engine."
SECTION = "libs"
LICENSE = "LGPL"
-SRC_URI = "http://www.littlecms.com/lcms-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/lcms/lcms-${PV}.tar.gz"
inherit autotools pkgconfig
diff --git a/packages/lcms/lcms_1.15.bb b/packages/lcms/lcms_1.17.bb
index c8b6ede7fb..f4f3dd20ff 100644
--- a/packages/lcms/lcms_1.15.bb
+++ b/packages/lcms/lcms_1.17.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Little cms is a small-footprint, speed optimized color management engine."
SECTION = "libs"
LICENSE = "LGPL"
-SRC_URI = "http://www.littlecms.com/lcms-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/lcms/lcms-${PV}.tar.gz"
inherit autotools pkgconfig
diff --git a/packages/libexosip2/libexosip2_3.1.0.bb b/packages/libexosip2/libexosip2_3.1.0.bb
new file mode 100644
index 0000000000..60bdc0a036
--- /dev/null
+++ b/packages/libexosip2/libexosip2_3.1.0.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "High level Session Initiation Protocol (SIP) library"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "libosip2"
+SRCNAME = "libeXosip2"
+LEAD_SONAME = "libeXosip2"
+
+PR = "r0"
+SRC_URI = "http://download.savannah.nongnu.org/releases/exosip/${SRCNAME}-${PV}.tar.gz"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit autotools pkgconfig
+EXTRA_OECONF = "--disable-josua"
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/packages/libfakekey/files/.mtn2git_empty b/packages/libfakekey/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libfakekey/files/.mtn2git_empty
diff --git a/packages/libfakekey/files/configure-fix.patch b/packages/libfakekey/files/configure-fix.patch
new file mode 100644
index 0000000000..9a40622c4f
--- /dev/null
+++ b/packages/libfakekey/files/configure-fix.patch
@@ -0,0 +1,10 @@
+--- /tmp/configure.ac 2008-06-02 17:13:41.006467345 +0200
++++ libfakekey/configure.ac 2008-06-02 17:13:55.109795271 +0200
+@@ -19,6 +19,7 @@
+ AC_SUBST(LT_CURRENT)
+ AC_SUBST(LT_REVISION)
+ LT_AGE=0
++AC_SUBST(LT_AGE)
+
+ LT_VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
+ AC_SUBST(LT_VERSION_INFO)
diff --git a/packages/libfakekey/libfakekey_svn.bb b/packages/libfakekey/libfakekey_svn.bb
index af7c9bbaad..946080cf33 100644
--- a/packages/libfakekey/libfakekey_svn.bb
+++ b/packages/libfakekey/libfakekey_svn.bb
@@ -3,8 +3,10 @@ LICENSE = "GPL"
DEPENDS = "libxtst"
SECTION = "x11/wm"
PV = "0.2+svnr${SRCREV}"
+PR = "r1"
-SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN};proto=http"
+SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN};proto=http \
+ file://configure-fix.patch;patch=1"
S = "${WORKDIR}/${PN}"
diff --git a/packages/libgpewidget/libgpewidget_0.115.bb b/packages/libgpewidget/libgpewidget_0.115.bb
index f679296c71..9ea3009404 100644
--- a/packages/libgpewidget/libgpewidget_0.115.bb
+++ b/packages/libgpewidget/libgpewidget_0.115.bb
@@ -2,8 +2,8 @@ LICENSE = "LGPL"
DESCRIPTION = "libgpewidget contains a collection of widgets and other common code shared by many GPE applications."
SECTION = "gpe/libs"
PRIORITY = "optional"
-DEPENDS = "gtk+ cairo libxrender gtk-doc"
-PR = "r0"
+DEPENDS = "gtk+ cairo libxinerama libxrender gtk-doc"
+PR = "r1"
GPE_TARBALL_SUFFIX = "bz2"
inherit gpe pkgconfig autotools
diff --git a/packages/libiconv/libiconv-1.12/.mtn2git_empty b/packages/libiconv/libiconv-1.12/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libiconv/libiconv-1.12/.mtn2git_empty
diff --git a/packages/libiconv/libiconv-1.12/autotools.patch b/packages/libiconv/libiconv-1.12/autotools.patch
new file mode 100644
index 0000000000..769a60fb25
--- /dev/null
+++ b/packages/libiconv/libiconv-1.12/autotools.patch
@@ -0,0 +1,24948 @@
+Index: libiconv-1.12/libcharset/configure.ac
+===================================================================
+--- libiconv-1.12.orig/libcharset/configure.ac 2007-03-05 01:56:23.000000000 +0100
++++ libiconv-1.12/libcharset/configure.ac 2008-06-06 22:59:25.487260530 +0200
+@@ -16,17 +16,17 @@
+ dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
+ dnl Fifth Floor, Boston, MA 02110-1301, USA.
+
+-AC_PREREQ(2.13)
++AC_PREREQ(2.61)
++AC_INIT([libcharset],[1.4] )
++AC_CONFIG_SRCDIR([lib/localcharset.c])
+
+-PACKAGE=libcharset
+-VERSION=1.4
+-
+-AC_INIT(lib/localcharset.c)
+ AC_CONFIG_AUX_DIR(build-aux)
+ AC_CONFIG_HEADER(config.h)
+ AC_PROG_MAKE_SET
+-AC_SUBST(PACKAGE)
+-AC_SUBST(VERSION)
++dnl AC_SUBST(PACKAGE)
++dnl AC_SUBST(VERSION)
++
++AC_CONFIG_MACRO_DIR([m4])
+
+ dnl checks for basic programs
+
+Index: libiconv-1.12/configure.ac
+===================================================================
+--- libiconv-1.12.orig/configure.ac 2007-10-24 01:32:52.000000000 +0200
++++ libiconv-1.12/configure.ac 2008-06-06 22:59:25.487260530 +0200
+@@ -24,6 +24,8 @@
+ AC_CONFIG_HEADERS(config.h lib/config.h)
+ AC_PROG_MAKE_SET
+
++AC_CONFIG_MACRO_DIR([m4])
++
+ dnl checks for basic programs
+
+ AC_PROG_CC
+Index: libiconv-1.12/libcharset/m4/libtool.m4
+===================================================================
+--- libiconv-1.12.orig/libcharset/m4/libtool.m4 2007-10-27 02:46:10.000000000 +0200
++++ libiconv-1.12/libcharset/m4/libtool.m4 2008-06-06 23:00:06.407256379 +0200
+@@ -1,107 +1,186 @@
+ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+-## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007
+-## Free Software Foundation, Inc.
+-## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+-##
+-## This file is free software; the Free Software Foundation gives
+-## unlimited permission to copy and/or distribute it, with or without
+-## modifications, as long as this notice is preserved.
+-
+-# serial 51 AC_PROG_LIBTOOL
+-
+-
+-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+-# -----------------------------------------------------------
+-# If this macro is not defined by Autoconf, define it here.
+-m4_ifdef([AC_PROVIDE_IFELSE],
+- [],
+- [m4_define([AC_PROVIDE_IFELSE],
+- [m4_ifdef([AC_PROVIDE_$1],
+- [$2], [$3])])])
++#
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
++# 2006, 2007, 2008 Free Software Foundation, Inc.
++# Written by Gordon Matzigkeit, 1996
++#
++# This file is free software; the Free Software Foundation gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++
++m4_define([_LT_COPYING], [dnl
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
++# 2006, 2007, 2008 Free Software Foundation, Inc.
++# Written by Gordon Matzigkeit, 1996
++#
++# This file is part of GNU Libtool.
++#
++# GNU Libtool 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.
++#
++# As a special exception to the GNU General Public License,
++# if you distribute this file as part of a program or library that
++# is built using GNU Libtool, you may include this file under the
++# same distribution terms that you use for the rest of that program.
++#
++# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
++# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
++# obtained by writing to the Free Software Foundation, Inc.,
++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++])
+
++# serial 56 LT_INIT
+
+-# AC_PROG_LIBTOOL
+-# ---------------
+-AC_DEFUN([AC_PROG_LIBTOOL],
+-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+- AC_PROVIDE_IFELSE([AC_PROG_CXX],
+- [AC_LIBTOOL_CXX],
+- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+- ])])
+-dnl And a similar setup for Fortran 77 support
+- AC_PROVIDE_IFELSE([AC_PROG_F77],
+- [AC_LIBTOOL_F77],
+- [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+-])])
+-
+-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+- [AC_LIBTOOL_GCJ],
+- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+- [AC_LIBTOOL_GCJ],
+- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+- [AC_LIBTOOL_GCJ],
+- [ifdef([AC_PROG_GCJ],
+- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+- ifdef([A][M_PROG_GCJ],
+- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+- ifdef([LT_AC_PROG_GCJ],
+- [define([LT_AC_PROG_GCJ],
+- defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+-])])# AC_PROG_LIBTOOL
+
++# LT_PREREQ(VERSION)
++# ------------------
++# Complain and exit if this libtool version is less that VERSION.
++m4_defun([LT_PREREQ],
++[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
++ [m4_default([$3],
++ [m4_fatal([Libtool version $1 or higher is required],
++ 63)])],
++ [$2])])
+
+-# _AC_PROG_LIBTOOL
+-# ----------------
+-AC_DEFUN([_AC_PROG_LIBTOOL],
+-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
++
++# _LT_CHECK_BUILDDIR
++# ------------------
++# Complain if the absolute build directory name contains unusual characters
++m4_defun([_LT_CHECK_BUILDDIR],
++[case `pwd` in
++ *\ * | *\ *)
++ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
++esac
++])
++
++
++# LT_INIT([OPTIONS])
++# ------------------
++AC_DEFUN([LT_INIT],
++[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
++AC_BEFORE([$0], [LT_LANG])dnl
++AC_BEFORE([$0], [LT_OUTPUT])dnl
++AC_BEFORE([$0], [LTDL_INIT])dnl
++m4_require([_LT_CHECK_BUILDDIR])dnl
++
++dnl Autoconf doesn't catch unexpanded LT_ macros by default:
++m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
++m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
++dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
++dnl unless we require an AC_DEFUNed macro:
++AC_REQUIRE([LTOPTIONS_VERSION])dnl
++AC_REQUIRE([LTSUGAR_VERSION])dnl
++AC_REQUIRE([LTVERSION_VERSION])dnl
++AC_REQUIRE([LTOBSOLETE_VERSION])dnl
++m4_require([_LT_PROG_LTMAIN])dnl
++
++dnl Parse OPTIONS
++_LT_SET_OPTIONS([$0], [$1])
+
+ # This can be used to rebuild libtool when needed
+-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++LIBTOOL_DEPS="$ltmain"
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(SHELL) $(top_builddir)'
++LIBTOOL="$LIBTOOL/$host_alias-libtool"
+ AC_SUBST(LIBTOOL)dnl
+
+-# Prevent multiple expansion
+-define([AC_PROG_LIBTOOL], [])
+-])# _AC_PROG_LIBTOOL
++_LT_SETUP
+
++# Only expand once:
++m4_define([LT_INIT])
++])# LT_INIT
++
++# Old names:
++AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
++AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
++dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+-# AC_LIBTOOL_SETUP
+-# ----------------
+-AC_DEFUN([AC_LIBTOOL_SETUP],
+-[AC_PREREQ(2.50)dnl
+-AC_REQUIRE([AC_ENABLE_SHARED])dnl
+-AC_REQUIRE([AC_ENABLE_STATIC])dnl
+-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+-AC_REQUIRE([AC_CANONICAL_HOST])dnl
++
++# _LT_CC_BASENAME(CC)
++# -------------------
++# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
++m4_defun([_LT_CC_BASENAME],
++[for cc_temp in $1""; do
++ case $cc_temp in
++ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
++ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
++ \-*) ;;
++ *) break;;
++ esac
++done
++cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
++])
++
++
++# _LT_FILEUTILS_DEFAULTS
++# ----------------------
++# It is okay to use these file commands and assume they have been set
++# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
++m4_defun([_LT_FILEUTILS_DEFAULTS],
++[: ${CP="cp -f"}
++: ${MV="mv -f"}
++: ${RM="rm -f"}
++])# _LT_FILEUTILS_DEFAULTS
++
++
++# _LT_SETUP
++# ---------
++m4_defun([_LT_SETUP],
++[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
++_LT_DECL([], [host_alias], [0], [The host system])dnl
++_LT_DECL([], [host], [0])dnl
++_LT_DECL([], [host_os], [0])dnl
++dnl
++_LT_DECL([], [build_alias], [0], [The build system])dnl
++_LT_DECL([], [build], [0])dnl
++_LT_DECL([], [build_os], [0])dnl
++dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+-AC_REQUIRE([AC_PROG_LD])dnl
+-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+-AC_REQUIRE([AC_PROG_NM])dnl
+-
++AC_REQUIRE([LT_PATH_LD])dnl
++AC_REQUIRE([LT_PATH_NM])dnl
++dnl
+ AC_REQUIRE([AC_PROG_LN_S])dnl
+-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+-AC_REQUIRE([AC_OBJEXT])dnl
+-AC_REQUIRE([AC_EXEEXT])dnl
++test -z "$LN_S" && LN_S="ln -s"
++_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+ dnl
++AC_REQUIRE([LT_CMD_MAX_LEN])dnl
++_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
++_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
++dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_CHECK_SHELL_FEATURES])dnl
++m4_require([_LT_CMD_RELOAD])dnl
++m4_require([_LT_CHECK_MAGIC_METHOD])dnl
++m4_require([_LT_CMD_OLD_ARCHIVE])dnl
++m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
++
++_LT_CONFIG_LIBTOOL_INIT([
++# See if we are running on zsh, and set the options which allow our
++# commands through without removal of \ escapes INIT.
++if test -n "\${ZSH_VERSION+set}" ; then
++ setopt NO_GLOB_SUBST
++fi
++])
++if test -n "${ZSH_VERSION+set}" ; then
++ setopt NO_GLOB_SUBST
++fi
+
+-AC_LIBTOOL_SYS_MAX_CMD_LEN
+-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+-AC_LIBTOOL_OBJDIR
++_LT_CHECK_OBJDIR
+
+-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+-_LT_AC_PROG_ECHO_BACKSLASH
++m4_require([_LT_TAG_COMPILER])dnl
++_LT_PROG_ECHO_BACKSLASH
+
+ case $host_os in
+ aix3*)
+@@ -117,1977 +196,2538 @@
+
+ # Sed substitution that helps us do robust quoting. It backslashifies
+ # metacharacters that are still active within double-quoted strings.
+-Xsed='sed -e 1s/^X//'
+-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
++sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+ # Same as above, but do not quote variable references.
+-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
++double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+ # Sed substitution to delay expansion of an escaped shell variable in a
+ # double_quote_subst'ed string.
+ delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
++# Sed substitution to delay expansion of an escaped single quote.
++delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
++
+ # Sed substitution to avoid accidental globbing in evaled expressions
+ no_glob_subst='s/\*/\\\*/g'
+
+-# Constants:
+-rm="rm -f"
+-
+ # Global variables:
+-default_ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+
+ # All known linkers require a `.a' archive for static linking (except MSVC,
+ # which needs '.lib').
+ libext=a
+-ltmain="$ac_aux_dir/ltmain.sh"
+-ofile="$default_ofile"
+-with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+-AC_CHECK_TOOL(AR, ar, false)
+-AC_CHECK_TOOL(RANLIB, ranlib, :)
+-AC_CHECK_TOOL(STRIP, strip, :)
++with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+ old_CC="$CC"
+ old_CFLAGS="$CFLAGS"
+
+ # Set sane defaults for various variables
+-test -z "$AR" && AR=ar
+-test -z "$AR_FLAGS" && AR_FLAGS=cru
+-test -z "$AS" && AS=as
+ test -z "$CC" && CC=cc
+ test -z "$LTCC" && LTCC=$CC
+ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+-test -z "$DLLTOOL" && DLLTOOL=dlltool
+ test -z "$LD" && LD=ld
+-test -z "$LN_S" && LN_S="ln -s"
+-test -z "$MAGIC_CMD" && MAGIC_CMD=file
+-test -z "$NM" && NM=nm
+-test -z "$SED" && SED=sed
+-test -z "$OBJDUMP" && OBJDUMP=objdump
+-test -z "$RANLIB" && RANLIB=:
+-test -z "$STRIP" && STRIP=:
+ test -z "$ac_objext" && ac_objext=o
+
+-# Determine commands to create old-style static archives.
+-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+-old_postinstall_cmds='chmod 644 $oldlib'
+-old_postuninstall_cmds=
+-
+-if test -n "$RANLIB"; then
+- case $host_os in
+- openbsd*)
+- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+- ;;
+- *)
+- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+- ;;
+- esac
+- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+-fi
+-
+ _LT_CC_BASENAME([$compiler])
+
+ # Only perform the check for file, if the check method requires it
++test -z "$MAGIC_CMD" && MAGIC_CMD=file
+ case $deplibs_check_method in
+ file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+- AC_PATH_MAGIC
++ _LT_PATH_MAGIC
+ fi
+ ;;
+ esac
+
+-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+-enable_win32_dll=yes, enable_win32_dll=no)
+-
+-AC_ARG_ENABLE([libtool-lock],
+- [AC_HELP_STRING([--disable-libtool-lock],
+- [avoid locking (might break parallel builds)])])
+-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
++# Use C for the default configuration in the libtool script
++LT_SUPPORTED_TAG([CC])
++_LT_LANG_C_CONFIG
++_LT_LANG_DEFAULT_CONFIG
++_LT_CONFIG_COMMANDS
++])# _LT_SETUP
+
+-AC_ARG_WITH([pic],
+- [AC_HELP_STRING([--with-pic],
+- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+- [pic_mode="$withval"],
+- [pic_mode=default])
+-test -z "$pic_mode" && pic_mode=default
+
+-# Use C for the default configuration in the libtool script
+-tagname=
+-AC_LIBTOOL_LANG_C_CONFIG
+-_LT_AC_TAGCONFIG
+-])# AC_LIBTOOL_SETUP
++# _LT_PROG_LTMAIN
++# ---------------
++# Note that this code is called both from `configure', and `config.status'
++# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
++# `config.status' has no value for ac_aux_dir unless we are using Automake,
++# so we pass a copy along to make sure it has a sensible value anyway.
++m4_defun([_LT_PROG_LTMAIN],
++[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
++_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
++ltmain="$ac_aux_dir/ltmain.sh"
++])# _LT_PROG_LTMAIN
+
+
+-# _LT_AC_SYS_COMPILER
+-# -------------------
+-AC_DEFUN([_LT_AC_SYS_COMPILER],
+-[AC_REQUIRE([AC_PROG_CC])dnl
++## ------------------------------------- ##
++## Accumulate code for creating libtool. ##
++## ------------------------------------- ##
++
++# So that we can recreate a full libtool script including additional
++# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
++# in macros and then make a single call at the end using the `libtool'
++# label.
++
++
++# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
++# ----------------------------------------
++# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
++m4_define([_LT_CONFIG_LIBTOOL_INIT],
++[m4_ifval([$1],
++ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
++ [$1
++])])])
++
++# Initialize.
++m4_define([_LT_OUTPUT_LIBTOOL_INIT])
++
++
++# _LT_CONFIG_LIBTOOL([COMMANDS])
++# ------------------------------
++# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
++m4_define([_LT_CONFIG_LIBTOOL],
++[m4_ifval([$1],
++ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
++ [$1
++])])])
++
++# Initialize.
++m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
++
++
++# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
++# -----------------------------------------------------
++m4_defun([_LT_CONFIG_SAVE_COMMANDS],
++[_LT_CONFIG_LIBTOOL([$1])
++_LT_CONFIG_LIBTOOL_INIT([$2])
++])
+
+-# If no C compiler was specified, use CC.
+-LTCC=${LTCC-"$CC"}
+
+-# If no C compiler flags were specified, use CFLAGS.
+-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
++# _LT_FORMAT_COMMENT([COMMENT])
++# -----------------------------
++# Add leading comment marks to the start of each line, and a trailing
++# full-stop to the whole comment if one is not present already.
++m4_define([_LT_FORMAT_COMMENT],
++[m4_ifval([$1], [
++m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
++ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
++)])
+
+-# Allow CC to be a program name with arguments.
+-compiler=$CC
+-])# _LT_AC_SYS_COMPILER
+
+
+-# _LT_CC_BASENAME(CC)
+-# -------------------
+-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+-AC_DEFUN([_LT_CC_BASENAME],
+-[for cc_temp in $1""; do
+- case $cc_temp in
+- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+- \-*) ;;
+- *) break;;
+- esac
+-done
+-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
++## ------------------------ ##
++## FIXME: Eliminate VARNAME ##
++## ------------------------ ##
++
++
++# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
++# -------------------------------------------------------------------
++# CONFIGNAME is the name given to the value in the libtool script.
++# VARNAME is the (base) name used in the configure script.
++# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
++# VARNAME. Any other value will be used directly.
++m4_define([_LT_DECL],
++[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
++ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
++ [m4_ifval([$1], [$1], [$2])])
++ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
++ m4_ifval([$4],
++ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
++ lt_dict_add_subkey([lt_decl_dict], [$2],
++ [tagged?], [m4_ifval([$5], [yes], [no])])])
+ ])
+
+
+-# _LT_COMPILER_BOILERPLATE
+-# ------------------------
+-# Check for compiler boilerplate output or warnings with
+-# the simple compiler test code.
+-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-ac_outfile=conftest.$ac_objext
+-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+-_lt_compiler_boilerplate=`cat conftest.err`
+-$rm conftest*
+-])# _LT_COMPILER_BOILERPLATE
+-
++# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
++# --------------------------------------------------------
++m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
++
++
++# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
++# ------------------------------------------------
++m4_define([lt_decl_tag_varnames],
++[_lt_decl_filter([tagged?], [yes], $@)])
++
++
++# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
++# ---------------------------------------------------------
++m4_define([_lt_decl_filter],
++[m4_case([$#],
++ [0], [m4_fatal([$0: too few arguments: $#])],
++ [1], [m4_fatal([$0: too few arguments: $#: $1])],
++ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
++ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
++ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
++])
+
+-# _LT_LINKER_BOILERPLATE
+-# ----------------------
+-# Check for linker boilerplate output or warnings with
+-# the simple link test code.
+-AC_DEFUN([_LT_LINKER_BOILERPLATE],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-ac_outfile=conftest.$ac_objext
+-echo "$lt_simple_link_test_code" >conftest.$ac_ext
+-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+-_lt_linker_boilerplate=`cat conftest.err`
+-$rm conftest*
+-])# _LT_LINKER_BOILERPLATE
+
++# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
++# --------------------------------------------------
++m4_define([lt_decl_quote_varnames],
++[_lt_decl_filter([value], [1], $@)])
++
++
++# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
++# ---------------------------------------------------
++m4_define([lt_decl_dquote_varnames],
++[_lt_decl_filter([value], [2], $@)])
++
++
++# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
++# ---------------------------------------------------
++m4_define([lt_decl_varnames_tagged],
++[_$0(m4_quote(m4_default([$1], [[, ]])),
++ m4_quote(m4_if([$2], [],
++ m4_quote(lt_decl_tag_varnames),
++ m4_quote(m4_shift($@)))),
++ m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
++m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
++
++
++# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
++# ------------------------------------------------
++m4_define([lt_decl_all_varnames],
++[_$0(m4_quote(m4_default([$1], [[, ]])),
++ m4_if([$2], [],
++ m4_quote(lt_decl_varnames),
++ m4_quote(m4_shift($@))))[]dnl
++])
++m4_define([_lt_decl_all_varnames],
++[lt_join($@, lt_decl_varnames_tagged([$1],
++ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
++])
+
+-# _LT_AC_SYS_LIBPATH_AIX
+-# ----------------------
+-# Links a minimal program and checks the executable
+-# for the system default hardcoded library path. In most cases,
+-# this is /usr/lib:/lib, but when the MPI compilers are used
+-# the location of the communication and MPI libs are included too.
+-# If we don't find anything, use the default library path according
+-# to the aix ld manual.
+-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+-lt_aix_libpath_sed='
+- /Import File Strings/,/^$/ {
+- /^0/ {
+- s/^0 *\(.*\)$/\1/
+- p
+- }
+- }'
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-# Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then
+- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-fi],[])
+-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+-])# _LT_AC_SYS_LIBPATH_AIX
+
++# _LT_CONFIG_STATUS_DECLARE([VARNAME])
++# ------------------------------------
++# Quote a variable value, and forward it to `config.status' so that its
++# declaration there will have the same value as in `configure'. VARNAME
++# must have a single quote delimited value for this to work.
++m4_define([_LT_CONFIG_STATUS_DECLARE],
++[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+-# _LT_AC_SHELL_INIT(ARG)
+-# ----------------------
+-AC_DEFUN([_LT_AC_SHELL_INIT],
+-[ifdef([AC_DIVERSION_NOTICE],
+- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+- [AC_DIVERT_PUSH(NOTICE)])
+-$1
+-AC_DIVERT_POP
+-])# _LT_AC_SHELL_INIT
+
++# _LT_CONFIG_STATUS_DECLARATIONS
++# ------------------------------
++# We delimit libtool config variables with single quotes, so when
++# we write them to config.status, we have to be sure to quote all
++# embedded single quotes properly. In configure, this macro expands
++# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
++#
++# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
++m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
++[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
++ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+-# _LT_AC_PROG_ECHO_BACKSLASH
+-# --------------------------
+-# Add some code to the start of the generated configure script which
+-# will find an echo command which doesn't interpret backslashes.
+-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+-[_LT_AC_SHELL_INIT([
+-# Check that we are running under the correct shell.
+-SHELL=${CONFIG_SHELL-/bin/sh}
+
+-case X$ECHO in
+-X*--fallback-echo)
+- # Remove one level of quotation (which was required for Make).
+- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+- ;;
+-esac
++# _LT_LIBTOOL_TAGS
++# ----------------
++# Output comment and list of tags supported by the script
++m4_defun([_LT_LIBTOOL_TAGS],
++[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
++available_tags="_LT_TAGS"dnl
++])
+
+-echo=${ECHO-echo}
+-if test "X[$]1" = X--no-reexec; then
+- # Discard the --no-reexec flag, and continue.
+- shift
+-elif test "X[$]1" = X--fallback-echo; then
+- # Avoid inline document here, it may be left over
+- :
+-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+- # Yippee, $echo works!
+- :
+-else
+- # Restart under the correct shell.
+- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+-fi
+
+-if test "X[$]1" = X--fallback-echo; then
+- # used as fallback echo
+- shift
+- cat <<EOF
+-[$]*
+-EOF
+- exit 0
+-fi
++# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
++# -----------------------------------
++# Extract the dictionary values for VARNAME (optionally with TAG) and
++# expand to a commented shell variable setting:
++#
++# # Some comment about what VAR is for.
++# visible_name=$lt_internal_name
++m4_define([_LT_LIBTOOL_DECLARE],
++[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
++ [description])))[]dnl
++m4_pushdef([_libtool_name],
++ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
++m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
++ [0], [_libtool_name=[$]$1],
++ [1], [_libtool_name=$lt_[]$1],
++ [2], [_libtool_name=$lt_[]$1],
++ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
++m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
++])
+
+-# The HP-UX ksh and POSIX shell print the target directory to stdout
+-# if CDPATH is set.
+-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+-if test -z "$ECHO"; then
+-if test "X${echo_test_string+set}" != Xset; then
+-# find a string as large as possible, as long as the shell can cope with it
+- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+- if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+- echo_test_string=`eval $cmd` &&
+- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+- then
+- break
+- fi
+- done
+-fi
++# _LT_LIBTOOL_CONFIG_VARS
++# -----------------------
++# Produce commented declarations of non-tagged libtool config variables
++# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
++# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
++# section) are produced by _LT_LIBTOOL_TAG_VARS.
++m4_defun([_LT_LIBTOOL_CONFIG_VARS],
++[m4_foreach([_lt_var],
++ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
++ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- :
+-else
+- # The Solaris, AIX, and Digital Unix default echo programs unquote
+- # backslashes. This makes it impossible to quote backslashes using
+- # echo "$something" | sed 's/\\/\\\\/g'
+- #
+- # So, first we look for a working echo in the user's PATH.
+
+- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+- for dir in $PATH /usr/ucb; do
+- IFS="$lt_save_ifs"
+- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- echo="$dir/echo"
+- break
+- fi
+- done
+- IFS="$lt_save_ifs"
++# _LT_LIBTOOL_TAG_VARS(TAG)
++# -------------------------
++m4_define([_LT_LIBTOOL_TAG_VARS],
++[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
++ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+- if test "X$echo" = Xecho; then
+- # We didn't find a better echo, so look for alternatives.
+- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- # This shell has a builtin print -r that does the trick.
+- echo='print -r'
+- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+- test "X$CONFIG_SHELL" != X/bin/ksh; then
+- # If we have ksh, try running configure again with it.
+- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+- export ORIGINAL_CONFIG_SHELL
+- CONFIG_SHELL=/bin/ksh
+- export CONFIG_SHELL
+- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+- else
+- # Try using printf.
+- echo='printf %s\n'
+- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- # Cool, printf works
+- :
+- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+- test "X$echo_testing_string" = 'X\t' &&
+- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+- export CONFIG_SHELL
+- SHELL="$CONFIG_SHELL"
+- export SHELL
+- echo="$CONFIG_SHELL [$]0 --fallback-echo"
+- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+- test "X$echo_testing_string" = 'X\t' &&
+- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- echo="$CONFIG_SHELL [$]0 --fallback-echo"
+- else
+- # maybe with a smaller string...
+- prev=:
+
+- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+- then
+- break
+- fi
+- prev="$cmd"
+- done
++# _LT_TAGVAR(VARNAME, [TAGNAME])
++# ------------------------------
++m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+- if test "$prev" != 'sed 50q "[$]0"'; then
+- echo_test_string=`eval $prev`
+- export echo_test_string
+- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+- else
+- # Oops. We lost completely, so just stick with echo.
+- echo=echo
+- fi
+- fi
+- fi
+- fi
+-fi
+-fi
+
+-# Copy echo and quote the copy suitably for passing to libtool from
+-# the Makefile, instead of quoting the original, which is used later.
+-ECHO=$echo
+-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+- ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+-fi
++# _LT_CONFIG_COMMANDS
++# -------------------
++# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
++# variables for single and double quote escaping we saved from calls
++# to _LT_DECL, we can put quote escaped variables declarations
++# into `config.status', and then the shell code to quote escape them in
++# for loops in `config.status'. Finally, any additional code accumulated
++# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
++m4_defun([_LT_CONFIG_COMMANDS],
++[AC_PROVIDE_IFELSE([LT_OUTPUT],
++ dnl If the libtool generation code has been placed in $CONFIG_LT,
++ dnl instead of duplicating it all over again into config.status,
++ dnl then we will have config.status run $CONFIG_LT later, so it
++ dnl needs to know what name is stored there:
++ [AC_CONFIG_COMMANDS([libtool],
++ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
++ dnl If the libtool generation code is destined for config.status,
++ dnl expand the accumulated commands and init code now:
++ [AC_CONFIG_COMMANDS([libtool],
++ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
++])#_LT_CONFIG_COMMANDS
+
+-AC_SUBST(ECHO)
+-])])# _LT_AC_PROG_ECHO_BACKSLASH
+
++# Initialize.
++m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
++[
+
+-# _LT_AC_LOCK
+-# -----------
+-AC_DEFUN([_LT_AC_LOCK],
+-[AC_ARG_ENABLE([libtool-lock],
+- [AC_HELP_STRING([--disable-libtool-lock],
+- [avoid locking (might break parallel builds)])])
+-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
++# The HP-UX ksh and POSIX shell print the target directory to stdout
++# if CDPATH is set.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+-# Some flags need to be propagated to the compiler or linker for good
+-# libtool support.
+-case $host in
+-ia64-*-hpux*)
+- # Find out which ABI we are using.
+- echo 'int i;' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- case `/usr/bin/file conftest.$ac_objext` in
+- *ELF-32*)
+- HPUX_IA64_MODE="32"
++sed_quote_subst='$sed_quote_subst'
++double_quote_subst='$double_quote_subst'
++delay_variable_subst='$delay_variable_subst'
++_LT_CONFIG_STATUS_DECLARATIONS
++LTCC='$LTCC'
++LTCFLAGS='$LTCFLAGS'
++compiler='$compiler_DEFAULT'
++
++# Quote evaled strings.
++for var in lt_decl_all_varnames([[ \
++]], lt_decl_quote_varnames); do
++ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
++ *[[\\\\\\\`\\"\\\$]]*)
++ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+- *ELF-64*)
+- HPUX_IA64_MODE="64"
++ *)
++ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+- fi
+- rm -rf conftest*
+- ;;
+-*-*-irix6*)
+- # Find out which ABI we are using.
+- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- if test "$lt_cv_prog_gnu_ld" = yes; then
+- case `/usr/bin/file conftest.$ac_objext` in
+- *32-bit*)
+- LD="${LD-ld} -melf32bsmip"
+- ;;
+- *N32*)
+- LD="${LD-ld} -melf32bmipn32"
++done
++
++# Double-quote double-evaled strings.
++for var in lt_decl_all_varnames([[ \
++]], lt_decl_dquote_varnames); do
++ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
++ *[[\\\\\\\`\\"\\\$]]*)
++ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+- *64-bit*)
+- LD="${LD-ld} -melf64bmip"
++ *)
++ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+- else
+- case `/usr/bin/file conftest.$ac_objext` in
+- *32-bit*)
+- LD="${LD-ld} -32"
+- ;;
+- *N32*)
+- LD="${LD-ld} -n32"
+- ;;
+- *64-bit*)
+- LD="${LD-ld} -64"
+- ;;
+- esac
+- fi
+- fi
+- rm -rf conftest*
+- ;;
+-
+-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+-s390*-*linux*|sparc*-*linux*)
+- # Find out which ABI we are using.
+- echo 'int i;' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- case `/usr/bin/file conftest.o` in
+- *32-bit*)
+- case $host in
+- x86_64-*kfreebsd*-gnu)
+- LD="${LD-ld} -m elf_i386_fbsd"
+- ;;
+- x86_64-*linux*)
+- LD="${LD-ld} -m elf_i386"
+- ;;
+- ppc64-*linux*|powerpc64-*linux*)
+- LD="${LD-ld} -m elf32ppclinux"
+- ;;
+- s390x-*linux*)
+- LD="${LD-ld} -m elf_s390"
+- ;;
+- sparc64-*linux*)
+- LD="${LD-ld} -m elf32_sparc"
+- ;;
+- esac
+- ;;
+- *64-bit*)
+- case $host in
+- x86_64-*kfreebsd*-gnu)
+- LD="${LD-ld} -m elf_x86_64_fbsd"
+- ;;
+- x86_64-*linux*)
+- LD="${LD-ld} -m elf_x86_64"
+- ;;
+- ppc*-*linux*|powerpc*-*linux*)
+- LD="${LD-ld} -m elf64ppc"
+- ;;
+- s390*-*linux*)
+- LD="${LD-ld} -m elf64_s390"
+- ;;
+- sparc*-*linux*)
+- LD="${LD-ld} -m elf64_sparc"
+- ;;
+- esac
+- ;;
+- esac
+- fi
+- rm -rf conftest*
+- ;;
+-
+-*-*-sco3.2v5*)
+- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+- SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -belf"
+- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+- [AC_LANG_PUSH(C)
+- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+- AC_LANG_POP])
+- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+- CFLAGS="$SAVE_CFLAGS"
+- fi
+- ;;
+-sparc*-*solaris*)
+- # Find out which ABI we are using.
+- echo 'int i;' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- case `/usr/bin/file conftest.o` in
+- *64-bit*)
+- case $lt_cv_prog_gnu_ld in
+- yes*) LD="${LD-ld} -m elf64_sparc" ;;
+- *) LD="${LD-ld} -64" ;;
+- esac
+- ;;
+- esac
+- fi
+- rm -rf conftest*
+- ;;
++done
+
+-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+- AC_CHECK_TOOL(AS, as, false)
+- AC_CHECK_TOOL(OBJDUMP, objdump, false)
++# Fix-up fallback echo if it was mangled by the above quoting rules.
++case \$lt_ECHO in
++*'\\\[$]0 --fallback-echo"')dnl "
++ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+- ])
+ esac
+
+-need_locks="$enable_libtool_lock"
++_LT_OUTPUT_LIBTOOL_INIT
++])
+
+-])# _LT_AC_LOCK
+
++# LT_OUTPUT
++# ---------
++# This macro allows early generation of the libtool script (before
++# AC_OUTPUT is called), incase it is used in configure for compilation
++# tests.
++AC_DEFUN([LT_OUTPUT],
++[: ${CONFIG_LT=./config.lt}
++AC_MSG_NOTICE([creating $CONFIG_LT])
++cat >"$CONFIG_LT" <<_LTEOF
++#! $SHELL
++# Generated by $as_me.
++# Run this file to recreate a libtool stub with the current configuration.
++
++lt_cl_silent=false
++SHELL=\${CONFIG_SHELL-$SHELL}
++_LTEOF
++
++cat >>"$CONFIG_LT" <<\_LTEOF
++AS_SHELL_SANITIZE
++_AS_PREPARE
+
+-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+-# ----------------------------------------------------------------
+-# Check whether the given compiler option works
+-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+-[AC_REQUIRE([LT_AC_PROG_SED])
+-AC_CACHE_CHECK([$1], [$2],
+- [$2=no
+- ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+- lt_compiler_flag="$3"
+- # Insert the option either (1) after the last *FLAGS variable, or
+- # (2) before a word containing "conftest.", or (3) at the end.
+- # Note that $ac_compile itself does not contain backslashes and begins
+- # with a dollar sign (not a hyphen), so the echo should work correctly.
+- # The option is referenced via a variable to avoid confusing sed.
+- lt_compile=`echo "$ac_compile" | $SED \
+- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+- -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+- (eval "$lt_compile" 2>conftest.err)
+- ac_status=$?
+- cat conftest.err >&AS_MESSAGE_LOG_FD
+- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+- if (exit $ac_status) && test -s "$ac_outfile"; then
+- # The compiler can only warn and ignore the option if not recognized
+- # So say no if there are warnings other than the usual output.
+- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+- $2=yes
+- fi
+- fi
+- $rm conftest*
+-])
++exec AS_MESSAGE_FD>&1
++exec AS_MESSAGE_LOG_FD>>config.log
++{
++ echo
++ AS_BOX([Running $as_me.])
++} >&AS_MESSAGE_LOG_FD
++
++lt_cl_help="\
++\`$as_me' creates a local libtool stub from the current configuration,
++for use in further configure time tests before the real libtool is
++generated.
++
++Usage: $[0] [[OPTIONS]]
++
++ -h, --help print this help, then exit
++ -V, --version print version number, then exit
++ -q, --quiet do not print progress messages
++ -d, --debug don't remove temporary files
++
++Report bugs to <bug-libtool@gnu.org>."
++
++lt_cl_version="\
++m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
++m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
++configured by $[0], generated by m4_PACKAGE_STRING.
++
++Copyright (C) 2008 Free Software Foundation, Inc.
++This config.lt script is free software; the Free Software Foundation
++gives unlimited permision to copy, distribute and modify it."
+
+-if test x"[$]$2" = xyes; then
+- ifelse([$5], , :, [$5])
+-else
+- ifelse([$6], , :, [$6])
+-fi
+-])# AC_LIBTOOL_COMPILER_OPTION
++while test $[#] != 0
++do
++ case $[1] in
++ --version | --v* | -V )
++ echo "$lt_cl_version"; exit 0 ;;
++ --help | --h* | -h )
++ echo "$lt_cl_help"; exit 0 ;;
++ --debug | --d* | -d )
++ debug=: ;;
++ --quiet | --q* | --silent | --s* | -q )
++ lt_cl_silent=: ;;
+
++ -*) AC_MSG_ERROR([unrecognized option: $[1]
++Try \`$[0] --help' for more information.]) ;;
+
+-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+-# [ACTION-SUCCESS], [ACTION-FAILURE])
+-# ------------------------------------------------------------
+-# Check whether the given compiler option works
+-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_CACHE_CHECK([$1], [$2],
+- [$2=no
+- save_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$LDFLAGS $3"
+- echo "$lt_simple_link_test_code" > conftest.$ac_ext
+- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+- # The linker can only warn and ignore the option if not recognized
+- # So say no if there are warnings
+- if test -s conftest.err; then
+- # Append any errors to the config.log.
+- cat conftest.err 1>&AS_MESSAGE_LOG_FD
+- $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+- if diff conftest.exp conftest.er2 >/dev/null; then
+- $2=yes
+- fi
+- else
+- $2=yes
+- fi
+- fi
+- $rm conftest*
+- LDFLAGS="$save_LDFLAGS"
+-])
++ *) AC_MSG_ERROR([unrecognized argument: $[1]
++Try \`$[0] --help' for more information.]) ;;
++ esac
++ shift
++done
+
+-if test x"[$]$2" = xyes; then
+- ifelse([$4], , :, [$4])
+-else
+- ifelse([$5], , :, [$5])
++if $lt_cl_silent; then
++ exec AS_MESSAGE_FD>/dev/null
+ fi
+-])# AC_LIBTOOL_LINKER_OPTION
++_LTEOF
+
++cat >>"$CONFIG_LT" <<_LTEOF
++_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
++_LTEOF
++
++cat >>"$CONFIG_LT" <<\_LTEOF
++AC_MSG_NOTICE([creating $ofile])
++_LT_OUTPUT_LIBTOOL_COMMANDS
++AS_EXIT(0)
++_LTEOF
++chmod +x "$CONFIG_LT"
++
++# configure is writing to config.log, but config.lt does its own redirection,
++# appending to config.log, which fails on DOS, as config.log is still kept
++# open by configure. Here we exec the FD to /dev/null, effectively closing
++# config.log, so it can be properly (re)opened and appended to by config.lt.
++if test "$no_create" != yes; then
++ lt_cl_success=:
++ test "$silent" = yes &&
++ lt_config_lt_args="$lt_config_lt_args --quiet"
++ exec AS_MESSAGE_LOG_FD>/dev/null
++ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
++ exec AS_MESSAGE_LOG_FD>>config.log
++ $lt_cl_success || AS_EXIT(1)
++fi
++])# LT_OUTPUT
+
+-# AC_LIBTOOL_SYS_MAX_CMD_LEN
+-# --------------------------
+-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+-[# find the maximum length of command line arguments
+-AC_MSG_CHECKING([the maximum length of command line arguments])
+-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+- i=0
+- teststring="ABCD"
+
+- case $build_os in
+- msdosdjgpp*)
+- # On DJGPP, this test can blow up pretty badly due to problems in libc
+- # (any single argument exceeding 2000 bytes causes a buffer overrun
+- # during glob expansion). Even if it were fixed, the result of this
+- # check would be larger than it should be.
+- lt_cv_sys_max_cmd_len=12288; # 12K is about right
+- ;;
++# _LT_CONFIG(TAG)
++# ---------------
++# If TAG is the built-in tag, create an initial libtool script with a
++# default configuration from the untagged config vars. Otherwise add code
++# to config.status for appending the configuration named by TAG from the
++# matching tagged config vars.
++m4_defun([_LT_CONFIG],
++[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++_LT_CONFIG_SAVE_COMMANDS([
++ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
++ m4_if(_LT_TAG, [C], [
++ # See if we are running on zsh, and set the options which allow our
++ # commands through without removal of \ escapes.
++ if test -n "${ZSH_VERSION+set}" ; then
++ setopt NO_GLOB_SUBST
++ fi
+
+- gnu*)
+- # Under GNU Hurd, this test is not required because there is
+- # no limit to the length of command line arguments.
+- # Libtool will interpret -1 as no limit whatsoever
+- lt_cv_sys_max_cmd_len=-1;
+- ;;
++ cfgfile="${ofile}T"
++ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
++ $RM "$cfgfile"
+
+- cygwin* | mingw*)
+- # On Win9x/ME, this test blows up -- it succeeds, but takes
+- # about 5 minutes as the teststring grows exponentially.
+- # Worse, since 9x/ME are not pre-emptively multitasking,
+- # you end up with a "frozen" computer, even though with patience
+- # the test eventually succeeds (with a max line length of 256k).
+- # Instead, let's just punt: use the minimum linelength reported by
+- # all of the supported platforms: 8192 (on NT/2K/XP).
+- lt_cv_sys_max_cmd_len=8192;
+- ;;
++ cat <<_LT_EOF >> "$cfgfile"
++#! $SHELL
+
+- amigaos*)
+- # On AmigaOS with pdksh, this test takes hours, literally.
+- # So we just punt and use a minimum line length of 8192.
+- lt_cv_sys_max_cmd_len=8192;
+- ;;
++# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
++# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
++# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
++# NOTE: Changes made to this file will be lost: look at ltmain.sh.
++#
++_LT_COPYING
++_LT_LIBTOOL_TAGS
+
+- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+- # This has been around since 386BSD, at least. Likely further.
+- if test -x /sbin/sysctl; then
+- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+- elif test -x /usr/sbin/sysctl; then
+- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+- else
+- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+- fi
+- # And add a safety zone
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+- ;;
++# ### BEGIN LIBTOOL CONFIG
++_LT_LIBTOOL_CONFIG_VARS
++_LT_LIBTOOL_TAG_VARS
++# ### END LIBTOOL CONFIG
+
+- interix*)
+- # We know the value 262144 and hardcode it with a safety zone (like BSD)
+- lt_cv_sys_max_cmd_len=196608
+- ;;
++_LT_EOF
+
+- osf*)
+- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+- # nice to cause kernel panics so lets avoid the loop below.
+- # First set a reasonable default.
+- lt_cv_sys_max_cmd_len=16384
+- #
+- if test -x /sbin/sysconfig; then
+- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+- *1*) lt_cv_sys_max_cmd_len=-1 ;;
+- esac
+- fi
+- ;;
+- sco3.2v5*)
+- lt_cv_sys_max_cmd_len=102400
+- ;;
+- sysv5* | sco5v6* | sysv4.2uw2*)
+- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+- if test -n "$kargmax"; then
+- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+- else
+- lt_cv_sys_max_cmd_len=32768
+- fi
+- ;;
+- *)
+- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+- if test -n "$lt_cv_sys_max_cmd_len"; then
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+- else
+- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+- = "XX$teststring") >/dev/null 2>&1 &&
+- new_result=`expr "X$teststring" : ".*" 2>&1` &&
+- lt_cv_sys_max_cmd_len=$new_result &&
+- test $i != 17 # 1/2 MB should be enough
+- do
+- i=`expr $i + 1`
+- teststring=$teststring$teststring
+- done
+- teststring=
+- # Add a significant safety factor because C++ compilers can tack on massive
+- # amounts of additional arguments before passing them to the linker.
+- # It appears as though 1/2 is a usable value.
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+- fi
++ case $host_os in
++ aix3*)
++ cat <<\_LT_EOF >> "$cfgfile"
++# AIX sometimes has problems with the GCC collect2 program. For some
++# reason, if we set the COLLECT_NAMES environment variable, the problems
++# vanish in a puff of smoke.
++if test "X${COLLECT_NAMES+set}" != Xset; then
++ COLLECT_NAMES=
++ export COLLECT_NAMES
++fi
++_LT_EOF
+ ;;
+ esac
+-])
+-if test -n $lt_cv_sys_max_cmd_len ; then
+- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+-else
+- AC_MSG_RESULT(none)
+-fi
+-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
++ _LT_PROG_LTMAIN
+
+-# _LT_AC_CHECK_DLFCN
+-# ------------------
+-AC_DEFUN([_LT_AC_CHECK_DLFCN],
+-[AC_CHECK_HEADERS(dlfcn.h)dnl
+-])# _LT_AC_CHECK_DLFCN
++ # We use sed instead of cat because bash on DJGPP gets confused if
++ # if finds mixed CR/LF and LF-only lines. Since sed operates in
++ # text mode, it properly converts lines to CR/LF. This bash problem
++ # is reportedly fixed, but why not run on old versions too?
++ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
++ || (rm -f "$cfgfile"; exit 1)
+
++ _LT_PROG_XSI_SHELLFNS
+
+-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+-# ---------------------------------------------------------------------
+-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+-if test "$cross_compiling" = yes; then :
+- [$4]
+-else
+- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+- lt_status=$lt_dlunknown
+- cat > conftest.$ac_ext <<EOF
+-[#line __oline__ "configure"
+-#include "confdefs.h"
++ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
++ || (rm -f "$cfgfile"; exit 1)
+
+-#if HAVE_DLFCN_H
+-#include <dlfcn.h>
+-#endif
++ mv -f "$cfgfile" "$ofile" ||
++ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
++ chmod +x "$ofile"
++],
++[cat <<_LT_EOF >> "$ofile"
+
+-#include <stdio.h>
++dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
++dnl in a comment (ie after a #).
++# ### BEGIN LIBTOOL TAG CONFIG: $1
++_LT_LIBTOOL_TAG_VARS(_LT_TAG)
++# ### END LIBTOOL TAG CONFIG: $1
++_LT_EOF
++])dnl /m4_if
++],
++[m4_if([$1], [], [
++ PACKAGE='$PACKAGE'
++ VERSION='$VERSION'
++ TIMESTAMP='$TIMESTAMP'
++ RM='$RM'
++ ofile='$ofile'], [])
++])dnl /_LT_CONFIG_SAVE_COMMANDS
++])# _LT_CONFIG
++
++
++# LT_SUPPORTED_TAG(TAG)
++# ---------------------
++# Trace this macro to discover what tags are supported by the libtool
++# --tag option, using:
++# autoconf --trace 'LT_SUPPORTED_TAG:$1'
++AC_DEFUN([LT_SUPPORTED_TAG], [])
++
++
++# C support is built-in for now
++m4_define([_LT_LANG_C_enabled], [])
++m4_define([_LT_TAGS], [])
+
+-#ifdef RTLD_GLOBAL
+-# define LT_DLGLOBAL RTLD_GLOBAL
+-#else
+-# ifdef DL_GLOBAL
+-# define LT_DLGLOBAL DL_GLOBAL
+-# else
+-# define LT_DLGLOBAL 0
+-# endif
+-#endif
+
+-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+- find out it does not work in some platform. */
+-#ifndef LT_DLLAZY_OR_NOW
+-# ifdef RTLD_LAZY
+-# define LT_DLLAZY_OR_NOW RTLD_LAZY
+-# else
+-# ifdef DL_LAZY
+-# define LT_DLLAZY_OR_NOW DL_LAZY
+-# else
+-# ifdef RTLD_NOW
+-# define LT_DLLAZY_OR_NOW RTLD_NOW
+-# else
+-# ifdef DL_NOW
+-# define LT_DLLAZY_OR_NOW DL_NOW
+-# else
+-# define LT_DLLAZY_OR_NOW 0
+-# endif
+-# endif
+-# endif
+-# endif
+-#endif
++# LT_LANG(LANG)
++# -------------
++# Enable libtool support for the given language if not already enabled.
++AC_DEFUN([LT_LANG],
++[AC_BEFORE([$0], [LT_OUTPUT])dnl
++m4_case([$1],
++ [C], [_LT_LANG(C)],
++ [C++], [_LT_LANG(CXX)],
++ [Java], [_LT_LANG(GCJ)],
++ [Fortran 77], [_LT_LANG(F77)],
++ [Fortran], [_LT_LANG(FC)],
++ [Windows Resource], [_LT_LANG(RC)],
++ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
++ [_LT_LANG($1)],
++ [m4_fatal([$0: unsupported language: "$1"])])])dnl
++])# LT_LANG
+
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+
+-void fnord() { int i=42;}
+-int main ()
+-{
+- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+- int status = $lt_dlunknown;
++# _LT_LANG(LANGNAME)
++# ------------------
++m4_defun([_LT_LANG],
++[m4_ifdef([_LT_LANG_]$1[_enabled], [],
++ [LT_SUPPORTED_TAG([$1])dnl
++ m4_append([_LT_TAGS], [$1 ])dnl
++ m4_define([_LT_LANG_]$1[_enabled], [])dnl
++ _LT_LANG_$1_CONFIG($1)])dnl
++])# _LT_LANG
+
+- if (self)
+- {
+- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+- /* dlclose (self); */
+- }
+- else
+- puts (dlerror ());
+
+- exit (status);
+-}]
+-EOF
+- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+- lt_status=$?
+- case x$lt_status in
+- x$lt_dlno_uscore) $1 ;;
+- x$lt_dlneed_uscore) $2 ;;
+- x$lt_dlunknown|x*) $3 ;;
+- esac
+- else :
+- # compilation failed
+- $3
+- fi
+-fi
+-rm -fr conftest*
+-])# _LT_AC_TRY_DLOPEN_SELF
++# _LT_LANG_DEFAULT_CONFIG
++# -----------------------
++m4_defun([_LT_LANG_DEFAULT_CONFIG],
++[AC_PROVIDE_IFELSE([AC_PROG_CXX],
++ [LT_LANG(CXX)],
++ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
++
++AC_PROVIDE_IFELSE([AC_PROG_F77],
++ [LT_LANG(F77)],
++ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
++
++AC_PROVIDE_IFELSE([AC_PROG_FC],
++ [LT_LANG(FC)],
++ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
++
++dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
++dnl pulling things in needlessly.
++AC_PROVIDE_IFELSE([AC_PROG_GCJ],
++ [LT_LANG(GCJ)],
++ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
++ [LT_LANG(GCJ)],
++ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
++ [LT_LANG(GCJ)],
++ [m4_ifdef([AC_PROG_GCJ],
++ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
++ m4_ifdef([A][M_PROG_GCJ],
++ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
++ m4_ifdef([LT_PROG_GCJ],
++ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
++
++AC_PROVIDE_IFELSE([LT_PROG_RC],
++ [LT_LANG(RC)],
++ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
++])# _LT_LANG_DEFAULT_CONFIG
++
++# Obsolete macros:
++AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
++AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
++AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
++AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
++dnl AC_DEFUN([AC_LIBTOOL_F77], [])
++dnl AC_DEFUN([AC_LIBTOOL_FC], [])
++dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+-# AC_LIBTOOL_DLOPEN_SELF
+-# ----------------------
+-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+-if test "x$enable_dlopen" != xyes; then
+- enable_dlopen=unknown
+- enable_dlopen_self=unknown
+- enable_dlopen_self_static=unknown
+-else
+- lt_cv_dlopen=no
+- lt_cv_dlopen_libs=
++# _LT_TAG_COMPILER
++# ----------------
++m4_defun([_LT_TAG_COMPILER],
++[AC_REQUIRE([AC_PROG_CC])dnl
+
+- case $host_os in
+- beos*)
+- lt_cv_dlopen="load_add_on"
+- lt_cv_dlopen_libs=
+- lt_cv_dlopen_self=yes
+- ;;
++_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
++_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
++_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
++_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+- mingw* | pw32*)
+- lt_cv_dlopen="LoadLibrary"
+- lt_cv_dlopen_libs=
+- ;;
++# If no C compiler was specified, use CC.
++LTCC=${LTCC-"$CC"}
+
+- cygwin*)
+- lt_cv_dlopen="dlopen"
+- lt_cv_dlopen_libs=
+- ;;
++# If no C compiler flags were specified, use CFLAGS.
++LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+- darwin*)
+- # if libdl is installed we need to link against it
+- AC_CHECK_LIB([dl], [dlopen],
+- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+- lt_cv_dlopen="dyld"
+- lt_cv_dlopen_libs=
+- lt_cv_dlopen_self=yes
+- ])
+- ;;
++# Allow CC to be a program name with arguments.
++compiler=$CC
++])# _LT_TAG_COMPILER
+
+- *)
+- AC_CHECK_FUNC([shl_load],
+- [lt_cv_dlopen="shl_load"],
+- [AC_CHECK_LIB([dld], [shl_load],
+- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+- [AC_CHECK_FUNC([dlopen],
+- [lt_cv_dlopen="dlopen"],
+- [AC_CHECK_LIB([dl], [dlopen],
+- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+- [AC_CHECK_LIB([svld], [dlopen],
+- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+- [AC_CHECK_LIB([dld], [dld_link],
+- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+- ])
+- ])
+- ])
+- ])
+- ])
++
++# _LT_COMPILER_BOILERPLATE
++# ------------------------
++# Check for compiler boilerplate output or warnings with
++# the simple compiler test code.
++m4_defun([_LT_COMPILER_BOILERPLATE],
++[m4_require([_LT_DECL_SED])dnl
++ac_outfile=conftest.$ac_objext
++echo "$lt_simple_compile_test_code" >conftest.$ac_ext
++eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
++_lt_compiler_boilerplate=`cat conftest.err`
++$RM conftest*
++])# _LT_COMPILER_BOILERPLATE
++
++
++# _LT_LINKER_BOILERPLATE
++# ----------------------
++# Check for linker boilerplate output or warnings with
++# the simple link test code.
++m4_defun([_LT_LINKER_BOILERPLATE],
++[m4_require([_LT_DECL_SED])dnl
++ac_outfile=conftest.$ac_objext
++echo "$lt_simple_link_test_code" >conftest.$ac_ext
++eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
++_lt_linker_boilerplate=`cat conftest.err`
++$RM -r conftest*
++])# _LT_LINKER_BOILERPLATE
++
++# _LT_REQUIRED_DARWIN_CHECKS
++# -------------------------
++m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
++ case $host_os in
++ rhapsody* | darwin*)
++ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
++ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
++ AC_CHECK_TOOL([LIPO], [lipo], [:])
++ AC_CHECK_TOOL([OTOOL], [otool], [:])
++ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
++ _LT_DECL([], [DSYMUTIL], [1],
++ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
++ _LT_DECL([], [NMEDIT], [1],
++ [Tool to change global to local symbols on Mac OS X])
++ _LT_DECL([], [LIPO], [1],
++ [Tool to manipulate fat objects and archives on Mac OS X])
++ _LT_DECL([], [OTOOL], [1],
++ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
++ _LT_DECL([], [OTOOL64], [1],
++ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
++
++ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
++ [lt_cv_apple_cc_single_mod=no
++ if test -z "${LT_MULTI_MODULE}"; then
++ # By default we will add the -single_module flag. You can override
++ # by either setting the environment variable LT_MULTI_MODULE
++ # non-empty at configure time, or by adding -multi_module to the
++ # link flags.
++ rm -rf libconftest.dylib*
++ echo "int foo(void){return 1;}" > conftest.c
++ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
++-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
++ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
++ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
++ _lt_result=$?
++ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
++ lt_cv_apple_cc_single_mod=yes
++ else
++ cat conftest.err >&AS_MESSAGE_LOG_FD
++ fi
++ rm -rf libconftest.dylib*
++ rm -f conftest.*
++ fi])
++ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
++ [lt_cv_ld_exported_symbols_list],
++ [lt_cv_ld_exported_symbols_list=no
++ save_LDFLAGS=$LDFLAGS
++ echo "_main" > conftest.sym
++ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
++ [lt_cv_ld_exported_symbols_list=yes],
++ [lt_cv_ld_exported_symbols_list=no])
++ LDFLAGS="$save_LDFLAGS"
++ ])
++ case $host_os in
++ rhapsody* | darwin1.[[012]])
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
++ darwin1.*)
++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++ darwin*) # darwin 5.x on
++ # if running on 10.5 or later, the deployment target defaults
++ # to the OS version, if on x86, and 10.4, the deployment
++ # target defaults to 10.4. Don't you love it?
++ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
++ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++ 10.[[012]]*)
++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++ 10.*)
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++ esac
++ ;;
++ esac
++ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
++ _lt_dar_single_mod='$single_module'
++ fi
++ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
++ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
++ else
++ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
++ fi
++ if test "$DSYMUTIL" != ":"; then
++ _lt_dsymutil='~$DSYMUTIL $lib || :'
++ else
++ _lt_dsymutil=
++ fi
+ ;;
+ esac
++])
+
+- if test "x$lt_cv_dlopen" != xno; then
+- enable_dlopen=yes
++
++# _LT_DARWIN_LINKER_FEATURES
++# --------------------------
++# Checks for linker and compiler features on darwin
++m4_defun([_LT_DARWIN_LINKER_FEATURES],
++[
++ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_automatic, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
++ if test "$GCC" = "yes"; then
++ output_verbose_link_cmd=echo
++ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++ m4_if([$1], [CXX],
++[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
++ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
++ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
++ fi
++],[])
+ else
+- enable_dlopen=no
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
++])
+
+- case $lt_cv_dlopen in
+- dlopen)
+- save_CPPFLAGS="$CPPFLAGS"
+- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
++# _LT_SYS_MODULE_PATH_AIX
++# -----------------------
++# Links a minimal program and checks the executable
++# for the system default hardcoded library path. In most cases,
++# this is /usr/lib:/lib, but when the MPI compilers are used
++# the location of the communication and MPI libs are included too.
++# If we don't find anything, use the default library path according
++# to the aix ld manual.
++m4_defun([_LT_SYS_MODULE_PATH_AIX],
++[m4_require([_LT_DECL_SED])dnl
++AC_LINK_IFELSE(AC_LANG_PROGRAM,[
++lt_aix_libpath_sed='
++ /Import File Strings/,/^$/ {
++ /^0/ {
++ s/^0 *\(.*\)$/\1/
++ p
++ }
++ }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++# Check for a 64-bit object if we didn't find anything.
++if test -z "$aix_libpath"; then
++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi],[])
++if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
++])# _LT_SYS_MODULE_PATH_AIX
+
+- save_LDFLAGS="$LDFLAGS"
+- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+- save_LIBS="$LIBS"
+- LIBS="$lt_cv_dlopen_libs $LIBS"
++# _LT_SHELL_INIT(ARG)
++# -------------------
++m4_define([_LT_SHELL_INIT],
++[ifdef([AC_DIVERSION_NOTICE],
++ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
++ [AC_DIVERT_PUSH(NOTICE)])
++$1
++AC_DIVERT_POP
++])# _LT_SHELL_INIT
+
+- AC_CACHE_CHECK([whether a program can dlopen itself],
+- lt_cv_dlopen_self, [dnl
+- _LT_AC_TRY_DLOPEN_SELF(
+- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+- ])
+
+- if test "x$lt_cv_dlopen_self" = xyes; then
+- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+- lt_cv_dlopen_self_static, [dnl
+- _LT_AC_TRY_DLOPEN_SELF(
+- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+- ])
+- fi
++# _LT_PROG_ECHO_BACKSLASH
++# -----------------------
++# Add some code to the start of the generated configure script which
++# will find an echo command which doesn't interpret backslashes.
++m4_defun([_LT_PROG_ECHO_BACKSLASH],
++[_LT_SHELL_INIT([
++# Check that we are running under the correct shell.
++SHELL=${CONFIG_SHELL-/bin/sh}
+
+- CPPFLAGS="$save_CPPFLAGS"
+- LDFLAGS="$save_LDFLAGS"
+- LIBS="$save_LIBS"
+- ;;
+- esac
++case X$lt_ECHO in
++X*--fallback-echo)
++ # Remove one level of quotation (which was required for Make).
++ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
++ ;;
++esac
+
+- case $lt_cv_dlopen_self in
+- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+- *) enable_dlopen_self=unknown ;;
+- esac
++ECHO=${lt_ECHO-echo}
++if test "X[$]1" = X--no-reexec; then
++ # Discard the --no-reexec flag, and continue.
++ shift
++elif test "X[$]1" = X--fallback-echo; then
++ # Avoid inline document here, it may be left over
++ :
++elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
++ # Yippee, $ECHO works!
++ :
++else
++ # Restart under the correct shell.
++ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
++fi
+
+- case $lt_cv_dlopen_self_static in
+- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+- *) enable_dlopen_self_static=unknown ;;
+- esac
++if test "X[$]1" = X--fallback-echo; then
++ # used as fallback echo
++ shift
++ cat <<_LT_EOF
++[$]*
++_LT_EOF
++ exit 0
+ fi
+-])# AC_LIBTOOL_DLOPEN_SELF
+
++# The HP-UX ksh and POSIX shell print the target directory to stdout
++# if CDPATH is set.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+-# ---------------------------------
+-# Check to see if options -c and -o are simultaneously supported by compiler
+-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+- $rm -r conftest 2>/dev/null
+- mkdir conftest
+- cd conftest
+- mkdir out
+- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++if test -z "$lt_ECHO"; then
++ if test "X${echo_test_string+set}" != Xset; then
++ # find a string as large as possible, as long as the shell can cope with it
++ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
++ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
++ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
++ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
++ then
++ break
++ fi
++ done
++ fi
+
+- lt_compiler_flag="-o out/conftest2.$ac_objext"
++ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
++ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ :
++ else
++ # The Solaris, AIX, and Digital Unix default echo programs unquote
++ # backslashes. This makes it impossible to quote backslashes using
++ # echo "$something" | sed 's/\\/\\\\/g'
++ #
++ # So, first we look for a working echo in the user's PATH.
++
++ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
++ for dir in $PATH /usr/ucb; do
++ IFS="$lt_save_ifs"
++ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
++ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
++ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ ECHO="$dir/echo"
++ break
++ fi
++ done
++ IFS="$lt_save_ifs"
++
++ if test "X$ECHO" = Xecho; then
++ # We didn't find a better echo, so look for alternatives.
++ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
++ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ # This shell has a builtin print -r that does the trick.
++ ECHO='print -r'
++ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
++ test "X$CONFIG_SHELL" != X/bin/ksh; then
++ # If we have ksh, try running configure again with it.
++ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
++ export ORIGINAL_CONFIG_SHELL
++ CONFIG_SHELL=/bin/ksh
++ export CONFIG_SHELL
++ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
++ else
++ # Try using printf.
++ ECHO='printf %s\n'
++ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
++ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ # Cool, printf works
++ :
++ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
++ test "X$echo_testing_string" = 'X\t' &&
++ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
++ export CONFIG_SHELL
++ SHELL="$CONFIG_SHELL"
++ export SHELL
++ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
++ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
++ test "X$echo_testing_string" = 'X\t' &&
++ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
++ else
++ # maybe with a smaller string...
++ prev=:
++
++ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
++ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
++ then
++ break
++ fi
++ prev="$cmd"
++ done
++
++ if test "$prev" != 'sed 50q "[$]0"'; then
++ echo_test_string=`eval $prev`
++ export echo_test_string
++ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
++ else
++ # Oops. We lost completely, so just stick with echo.
++ ECHO=echo
++ fi
++ fi
++ fi
++ fi
++ fi
++fi
++
++# Copy echo and quote the copy suitably for passing to libtool from
++# the Makefile, instead of quoting the original, which is used later.
++lt_ECHO=$ECHO
++if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
++ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
++fi
++
++AC_SUBST(lt_ECHO)
++])
++_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
++_LT_DECL([], [ECHO], [1],
++ [An echo program that does not interpret backslashes])
++])# _LT_PROG_ECHO_BACKSLASH
++
++
++# _LT_ENABLE_LOCK
++# ---------------
++m4_defun([_LT_ENABLE_LOCK],
++[AC_ARG_ENABLE([libtool-lock],
++ [AS_HELP_STRING([--disable-libtool-lock],
++ [avoid locking (might break parallel builds)])])
++test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
++
++# Some flags need to be propagated to the compiler or linker for good
++# libtool support.
++case $host in
++ia64-*-hpux*)
++ # Find out which ABI we are using.
++ echo 'int i;' > conftest.$ac_ext
++ if AC_TRY_EVAL(ac_compile); then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *ELF-32*)
++ HPUX_IA64_MODE="32"
++ ;;
++ *ELF-64*)
++ HPUX_IA64_MODE="64"
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++*-*-irix6*)
++ # Find out which ABI we are using.
++ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
++ if AC_TRY_EVAL(ac_compile); then
++ if test "$lt_cv_prog_gnu_ld" = yes; then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *32-bit*)
++ LD="${LD-ld} -melf32bsmip"
++ ;;
++ *N32*)
++ LD="${LD-ld} -melf32bmipn32"
++ ;;
++ *64-bit*)
++ LD="${LD-ld} -melf64bmip"
++ ;;
++ esac
++ else
++ case `/usr/bin/file conftest.$ac_objext` in
++ *32-bit*)
++ LD="${LD-ld} -32"
++ ;;
++ *N32*)
++ LD="${LD-ld} -n32"
++ ;;
++ *64-bit*)
++ LD="${LD-ld} -64"
++ ;;
++ esac
++ fi
++ fi
++ rm -rf conftest*
++ ;;
++
++x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
++ # Find out which ABI we are using.
++ echo 'int i;' > conftest.$ac_ext
++ if AC_TRY_EVAL(ac_compile); then
++ case `/usr/bin/file conftest.o` in
++ *32-bit*)
++ case $host in
++ x86_64-*kfreebsd*-gnu)
++ LD="${LD-ld} -m elf_i386_fbsd"
++ ;;
++ x86_64-*linux*)
++ LD="${LD-ld} -m elf_i386"
++ ;;
++ ppc64-*linux*|powerpc64-*linux*)
++ LD="${LD-ld} -m elf32ppclinux"
++ ;;
++ s390x-*linux*)
++ LD="${LD-ld} -m elf_s390"
++ ;;
++ sparc64-*linux*)
++ LD="${LD-ld} -m elf32_sparc"
++ ;;
++ esac
++ ;;
++ *64-bit*)
++ case $host in
++ x86_64-*kfreebsd*-gnu)
++ LD="${LD-ld} -m elf_x86_64_fbsd"
++ ;;
++ x86_64-*linux*)
++ LD="${LD-ld} -m elf_x86_64"
++ ;;
++ ppc*-*linux*|powerpc*-*linux*)
++ LD="${LD-ld} -m elf64ppc"
++ ;;
++ s390*-*linux*|s390*-*tpf*)
++ LD="${LD-ld} -m elf64_s390"
++ ;;
++ sparc*-*linux*)
++ LD="${LD-ld} -m elf64_sparc"
++ ;;
++ esac
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++
++*-*-sco3.2v5*)
++ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
++ SAVE_CFLAGS="$CFLAGS"
++ CFLAGS="$CFLAGS -belf"
++ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
++ [AC_LANG_PUSH(C)
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
++ AC_LANG_POP])
++ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
++ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
++ CFLAGS="$SAVE_CFLAGS"
++ fi
++ ;;
++sparc*-*solaris*)
++ # Find out which ABI we are using.
++ echo 'int i;' > conftest.$ac_ext
++ if AC_TRY_EVAL(ac_compile); then
++ case `/usr/bin/file conftest.o` in
++ *64-bit*)
++ case $lt_cv_prog_gnu_ld in
++ yes*) LD="${LD-ld} -m elf64_sparc" ;;
++ *)
++ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
++ LD="${LD-ld} -64"
++ fi
++ ;;
++ esac
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++esac
++
++need_locks="$enable_libtool_lock"
++])# _LT_ENABLE_LOCK
++
++
++# _LT_CMD_OLD_ARCHIVE
++# -------------------
++m4_defun([_LT_CMD_OLD_ARCHIVE],
++[AC_CHECK_TOOL(AR, ar, false)
++test -z "$AR" && AR=ar
++test -z "$AR_FLAGS" && AR_FLAGS=cru
++_LT_DECL([], [AR], [1], [The archiver])
++_LT_DECL([], [AR_FLAGS], [1])
++
++AC_CHECK_TOOL(STRIP, strip, :)
++test -z "$STRIP" && STRIP=:
++_LT_DECL([], [STRIP], [1], [A symbol stripping program])
++
++AC_CHECK_TOOL(RANLIB, ranlib, :)
++test -z "$RANLIB" && RANLIB=:
++_LT_DECL([], [RANLIB], [1],
++ [Commands used to install an old-style archive])
++
++# Determine commands to create old-style static archives.
++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
++old_postinstall_cmds='chmod 644 $oldlib'
++old_postuninstall_cmds=
++
++if test -n "$RANLIB"; then
++ case $host_os in
++ openbsd*)
++ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
++ ;;
++ *)
++ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
++ ;;
++ esac
++ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
++fi
++_LT_DECL([], [old_postinstall_cmds], [2])
++_LT_DECL([], [old_postuninstall_cmds], [2])
++_LT_TAGDECL([], [old_archive_cmds], [2],
++ [Commands used to build an old-style archive])
++])# _LT_CMD_OLD_ARCHIVE
++
++
++# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
++# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
++# ----------------------------------------------------------------
++# Check whether the given compiler option works
++AC_DEFUN([_LT_COMPILER_OPTION],
++[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_SED])dnl
++AC_CACHE_CHECK([$1], [$2],
++ [$2=no
++ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
++ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+- (eval "$lt_compile" 2>out/conftest.err)
++ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+- cat out/conftest.err >&AS_MESSAGE_LOG_FD
++ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+- if (exit $ac_status) && test -s out/conftest2.$ac_objext
+- then
++ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+- # So say no if there are warnings
+- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
++ # So say no if there are warnings other than the usual output.
++ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
++ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
++ $2=yes
+ fi
+ fi
+- chmod u+w . 2>&AS_MESSAGE_LOG_FD
+- $rm conftest*
+- # SGI C++ compiler will create directory out/ii_files/ for
+- # template instantiation
+- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+- $rm out/* && rmdir out
+- cd ..
+- rmdir conftest
+- $rm conftest*
++ $RM conftest*
+ ])
+-])# AC_LIBTOOL_PROG_CC_C_O
+-
+-
+-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+-# -----------------------------------------
+-# Check to see if we can do hard links to lock some files if needed
+-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+-[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+-hard_links="nottested"
+-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+- # do not overwrite the value of need_locks provided by the user
+- AC_MSG_CHECKING([if we can lock with hard links])
+- hard_links=yes
+- $rm conftest*
+- ln conftest.a conftest.b 2>/dev/null && hard_links=no
+- touch conftest.a
+- ln conftest.a conftest.b 2>&5 || hard_links=no
+- ln conftest.a conftest.b 2>/dev/null && hard_links=no
+- AC_MSG_RESULT([$hard_links])
+- if test "$hard_links" = no; then
+- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+- need_locks=warn
+- fi
++if test x"[$]$2" = xyes; then
++ m4_if([$5], , :, [$5])
+ else
+- need_locks=no
++ m4_if([$6], , :, [$6])
+ fi
+-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+-
++])# _LT_COMPILER_OPTION
+
+-# AC_LIBTOOL_OBJDIR
+-# -----------------
+-AC_DEFUN([AC_LIBTOOL_OBJDIR],
+-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+-[rm -f .libs 2>/dev/null
+-mkdir .libs 2>/dev/null
+-if test -d .libs; then
+- lt_cv_objdir=.libs
+-else
+- # MS-DOS does not allow filenames that begin with a dot.
+- lt_cv_objdir=_libs
+-fi
+-rmdir .libs 2>/dev/null])
+-objdir=$lt_cv_objdir
+-])# AC_LIBTOOL_OBJDIR
++# Old name:
++AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+-# ----------------------------------------------
+-# Check hardcoding attributes.
+-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+-[AC_MSG_CHECKING([how to hardcode library paths into programs])
+-_LT_AC_TAGVAR(hardcode_action, $1)=
+-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+- test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+- test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
++# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
++# [ACTION-SUCCESS], [ACTION-FAILURE])
++# ----------------------------------------------------
++# Check whether the given linker option works
++AC_DEFUN([_LT_LINKER_OPTION],
++[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_SED])dnl
++AC_CACHE_CHECK([$1], [$2],
++ [$2=no
++ save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS $3"
++ echo "$lt_simple_link_test_code" > conftest.$ac_ext
++ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
++ # The linker can only warn and ignore the option if not recognized
++ # So say no if there are warnings
++ if test -s conftest.err; then
++ # Append any errors to the config.log.
++ cat conftest.err 1>&AS_MESSAGE_LOG_FD
++ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
++ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++ if diff conftest.exp conftest.er2 >/dev/null; then
++ $2=yes
++ fi
++ else
++ $2=yes
++ fi
++ fi
++ $RM -r conftest*
++ LDFLAGS="$save_LDFLAGS"
++])
+
+- # We can hardcode non-existant directories.
+- if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+- # If the only mechanism to avoid hardcoding is shlibpath_var, we
+- # have to relink, otherwise we might link with an installed library
+- # when we should be linking with a yet-to-be-installed one
+- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+- test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+- # Linking always hardcodes the temporary library directory.
+- _LT_AC_TAGVAR(hardcode_action, $1)=relink
+- else
+- # We can link without hardcoding, and we can hardcode nonexisting dirs.
+- _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+- fi
++if test x"[$]$2" = xyes; then
++ m4_if([$4], , :, [$4])
+ else
+- # We cannot hardcode anything, or else we can only hardcode existing
+- # directories.
+- _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
++ m4_if([$5], , :, [$5])
+ fi
+-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
++])# _LT_LINKER_OPTION
+
+-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+- # Fast installation is not supported
+- enable_fast_install=no
+-elif test "$shlibpath_overrides_runpath" = yes ||
+- test "$enable_shared" = no; then
+- # Fast installation is not necessary
+- enable_fast_install=needless
+-fi
+-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
++# Old name:
++AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+-# AC_LIBTOOL_SYS_LIB_STRIP
+-# ------------------------
+-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+-[striplib=
+-old_striplib=
+-AC_MSG_CHECKING([whether stripping libraries is possible])
+-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+- AC_MSG_RESULT([yes])
+-else
+-# FIXME - insert some real tests, host_os isn't really good enough
+- case $host_os in
+- darwin*)
+- if test -n "$STRIP" ; then
+- striplib="$STRIP -x"
+- old_striplib="$STRIP -S"
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_RESULT([no])
+-fi
+- ;;
+- *)
+- AC_MSG_RESULT([no])
++# LT_CMD_MAX_LEN
++#---------------
++AC_DEFUN([LT_CMD_MAX_LEN],
++[AC_REQUIRE([AC_CANONICAL_HOST])dnl
++# find the maximum length of command line arguments
++AC_MSG_CHECKING([the maximum length of command line arguments])
++AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
++ i=0
++ teststring="ABCD"
++
++ case $build_os in
++ msdosdjgpp*)
++ # On DJGPP, this test can blow up pretty badly due to problems in libc
++ # (any single argument exceeding 2000 bytes causes a buffer overrun
++ # during glob expansion). Even if it were fixed, the result of this
++ # check would be larger than it should be.
++ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+- esac
+-fi
+-])# AC_LIBTOOL_SYS_LIB_STRIP
+
++ gnu*)
++ # Under GNU Hurd, this test is not required because there is
++ # no limit to the length of command line arguments.
++ # Libtool will interpret -1 as no limit whatsoever
++ lt_cv_sys_max_cmd_len=-1;
++ ;;
+
+-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+-# -----------------------------
+-# PORTME Fill in your ld.so characteristics
+-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_MSG_CHECKING([dynamic linker characteristics])
+-library_names_spec=
+-libname_spec='lib$name'
+-soname_spec=
+-shrext_cmds=".so"
+-postinstall_cmds=
+-postuninstall_cmds=
+-finish_cmds=
+-finish_eval=
+-shlibpath_var=
+-shlibpath_overrides_runpath=unknown
+-version_type=none
+-dynamic_linker="$host_os ld.so"
+-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+-m4_if($1,[],[
+-if test "$GCC" = yes; then
+- case $host_os in
+- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+- *) lt_awk_arg="/^libraries:/" ;;
+- esac
+- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+- # if the path contains ";" then we assume it to be the separator
+- # otherwise default to the standard path separator (i.e. ":") - it is
+- # assumed that no part of a normal pathname contains ";" but that should
+- # okay in the real world where ";" in dirpaths is itself problematic.
+- lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+- else
+- lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+- fi
+- # Ok, now we have the path, separated by spaces, we can step through it
+- # and add multilib dir if necessary.
+- lt_tmp_lt_search_path_spec=
+- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+- for lt_sys_path in $lt_search_path_spec; do
+- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+- else
+- test -d "$lt_sys_path" && \
+- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+- fi
+- done
+- lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+-BEGIN {RS=" "; FS="/|\n";} {
+- lt_foo="";
+- lt_count=0;
+- for (lt_i = NF; lt_i > 0; lt_i--) {
+- if ($lt_i != "" && $lt_i != ".") {
+- if ($lt_i == "..") {
+- lt_count++;
+- } else {
+- if (lt_count == 0) {
+- lt_foo="/" $lt_i lt_foo;
+- } else {
+- lt_count--;
+- }
+- }
+- }
+- }
+- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+-}'`
+- sys_lib_search_path_spec=`echo $lt_search_path_spec`
+-else
+- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+-fi])
+-need_lib_prefix=unknown
+-hardcode_into_libs=no
++ cygwin* | mingw*)
++ # On Win9x/ME, this test blows up -- it succeeds, but takes
++ # about 5 minutes as the teststring grows exponentially.
++ # Worse, since 9x/ME are not pre-emptively multitasking,
++ # you end up with a "frozen" computer, even though with patience
++ # the test eventually succeeds (with a max line length of 256k).
++ # Instead, let's just punt: use the minimum linelength reported by
++ # all of the supported platforms: 8192 (on NT/2K/XP).
++ lt_cv_sys_max_cmd_len=8192;
++ ;;
+
+-# when you set need_version to no, make sure it does not cause -set_version
+-# flags to be left without arguments
+-need_version=unknown
++ amigaos*)
++ # On AmigaOS with pdksh, this test takes hours, literally.
++ # So we just punt and use a minimum line length of 8192.
++ lt_cv_sys_max_cmd_len=8192;
++ ;;
+
+-case $host_os in
+-aix3*)
+- version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+- shlibpath_var=LIBPATH
++ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
++ # This has been around since 386BSD, at least. Likely further.
++ if test -x /sbin/sysctl; then
++ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
++ elif test -x /usr/sbin/sysctl; then
++ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
++ else
++ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
++ fi
++ # And add a safety zone
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
++ ;;
+
+- # AIX 3 has no versioning support, so we append a major version to the name.
+- soname_spec='${libname}${release}${shared_ext}$major'
+- ;;
++ interix*)
++ # We know the value 262144 and hardcode it with a safety zone (like BSD)
++ lt_cv_sys_max_cmd_len=196608
++ ;;
+
+-aix4* | aix5*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- hardcode_into_libs=yes
+- if test "$host_cpu" = ia64; then
+- # AIX 5 supports IA64
+- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+- shlibpath_var=LD_LIBRARY_PATH
+- else
+- # With GCC up to 2.95.x, collect2 would create an import file
+- # for dependence libraries. The import file would start with
+- # the line `#! .'. This would cause the generated library to
+- # depend on `.', always an invalid library. This was fixed in
+- # development snapshots of GCC prior to 3.0.
+- case $host_os in
+- aix4 | aix4.[[01]] | aix4.[[01]].*)
+- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+- echo ' yes '
+- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+- :
+- else
+- can_build_shared=no
+- fi
+- ;;
+- esac
+- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+- # soname into executable. Probably we can add versioning support to
+- # collect2, so additional links can be useful in future.
+- if test "$aix_use_runtimelinking" = yes; then
+- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+- # instead of lib<name>.a to let people know that these are not
+- # typical AIX shared libraries.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ osf*)
++ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
++ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
++ # nice to cause kernel panics so lets avoid the loop below.
++ # First set a reasonable default.
++ lt_cv_sys_max_cmd_len=16384
++ #
++ if test -x /sbin/sysconfig; then
++ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
++ *1*) lt_cv_sys_max_cmd_len=-1 ;;
++ esac
++ fi
++ ;;
++ sco3.2v5*)
++ lt_cv_sys_max_cmd_len=102400
++ ;;
++ sysv5* | sco5v6* | sysv4.2uw2*)
++ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
++ if test -n "$kargmax"; then
++ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+- # We preserve .a as extension for shared libraries through AIX4.2
+- # and later when we are not doing run time linking.
+- library_names_spec='${libname}${release}.a $libname.a'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ lt_cv_sys_max_cmd_len=32768
+ fi
+- shlibpath_var=LIBPATH
+- fi
+- ;;
++ ;;
++ *)
++ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
++ if test -n "$lt_cv_sys_max_cmd_len"; then
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
++ else
++ # Make teststring a little bigger before we do anything with it.
++ # a 1K string should be a reasonable start.
++ for i in 1 2 3 4 5 6 7 8 ; do
++ teststring=$teststring$teststring
++ done
++ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
++ # If test is not a shell built-in, we'll probably end up computing a
++ # maximum length that is only half of the actual maximum length, but
++ # we can't tell.
++ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
++ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
++ test $i != 17 # 1/2 MB should be enough
++ do
++ i=`expr $i + 1`
++ teststring=$teststring$teststring
++ done
++ # Only check the string length outside the loop.
++ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
++ teststring=
++ # Add a significant safety factor because C++ compilers can tack on
++ # massive amounts of additional arguments before passing them to the
++ # linker. It appears as though 1/2 is a usable value.
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
++ fi
++ ;;
++ esac
++])
++if test -n $lt_cv_sys_max_cmd_len ; then
++ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
++else
++ AC_MSG_RESULT(none)
++fi
++max_cmd_len=$lt_cv_sys_max_cmd_len
++_LT_DECL([], [max_cmd_len], [0],
++ [What is the maximum length of a command?])
++])# LT_CMD_MAX_LEN
+
+-amigaos*)
+- library_names_spec='$libname.ixlibrary $libname.a'
+- # Create ${libname}_ixlibrary.a entries in /sys/libs.
+- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+- ;;
++# Old name:
++AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+-beos*)
+- library_names_spec='${libname}${shared_ext}'
+- dynamic_linker="$host_os ld.so"
+- shlibpath_var=LIBRARY_PATH
+- ;;
+
+-bsdi[[45]]*)
+- version_type=linux
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+- shlibpath_var=LD_LIBRARY_PATH
+- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+- # the default ld.so.conf also contains /usr/contrib/lib and
+- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+- # libtool to hard-code these into programs
+- ;;
++# _LT_HEADER_DLFCN
++# ----------------
++m4_defun([_LT_HEADER_DLFCN],
++[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
++])# _LT_HEADER_DLFCN
+
+-cygwin* | mingw* | pw32*)
+- version_type=windows
+- shrext_cmds=".dll"
+- need_version=no
+- need_lib_prefix=no
+
+- case $GCC,$host_os in
+- yes,cygwin* | yes,mingw* | yes,pw32*)
+- library_names_spec='$libname.dll.a'
+- # DLL is installed to $(libdir)/../bin by postinstall_cmds
+- postinstall_cmds='base_file=`basename \${file}`~
+- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+- dldir=$destdir/`dirname \$dlpath`~
+- test -d \$dldir || mkdir -p \$dldir~
+- $install_prog $dir/$dlname \$dldir/$dlname~
+- chmod a+x \$dldir/$dlname'
+- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+- dlpath=$dir/\$dldll~
+- $rm \$dlpath'
+- shlibpath_overrides_runpath=yes
++# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
++# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
++# ----------------------------------------------------------------
++m4_defun([_LT_TRY_DLOPEN_SELF],
++[m4_require([_LT_HEADER_DLFCN])dnl
++if test "$cross_compiling" = yes; then :
++ [$4]
++else
++ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
++ lt_status=$lt_dlunknown
++ cat > conftest.$ac_ext <<_LT_EOF
++[#line __oline__ "configure"
++#include "confdefs.h"
+
+- case $host_os in
+- cygwin*)
+- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+- ;;
+- mingw*)
+- # MinGW DLLs use traditional 'lib' prefix
+- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+- # It is most probably a Windows format PATH printed by
+- # mingw gcc, but we are running on Cygwin. Gcc prints its search
+- # path with ; separators, and with drive letters. We can handle the
+- # drive letters (cygwin fileutils understands them), so leave them,
+- # especially as we might pass files found there to a mingw objdump,
+- # which wouldn't understand a cygwinified path. Ahh.
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+- else
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+- fi
+- ;;
+- pw32*)
+- # pw32 DLLs use 'pw' prefix rather than 'lib'
+- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+- ;;
+- esac
+- ;;
++#if HAVE_DLFCN_H
++#include <dlfcn.h>
++#endif
+
+- *)
+- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+- ;;
+- esac
+- dynamic_linker='Win32 ld.exe'
+- # FIXME: first we should search . and the directory the executable is in
+- shlibpath_var=PATH
+- ;;
++#include <stdio.h>
+
+-darwin* | rhapsody*)
+- dynamic_linker="$host_os dyld"
+- version_type=darwin
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+- soname_spec='${libname}${release}${major}$shared_ext'
+- shlibpath_overrides_runpath=yes
+- shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+- m4_if([$1], [],[
+- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+- ;;
++#ifdef RTLD_GLOBAL
++# define LT_DLGLOBAL RTLD_GLOBAL
++#else
++# ifdef DL_GLOBAL
++# define LT_DLGLOBAL DL_GLOBAL
++# else
++# define LT_DLGLOBAL 0
++# endif
++#endif
+
+-dgux*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- ;;
++/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
++ find out it does not work in some platform. */
++#ifndef LT_DLLAZY_OR_NOW
++# ifdef RTLD_LAZY
++# define LT_DLLAZY_OR_NOW RTLD_LAZY
++# else
++# ifdef DL_LAZY
++# define LT_DLLAZY_OR_NOW DL_LAZY
++# else
++# ifdef RTLD_NOW
++# define LT_DLLAZY_OR_NOW RTLD_NOW
++# else
++# ifdef DL_NOW
++# define LT_DLLAZY_OR_NOW DL_NOW
++# else
++# define LT_DLLAZY_OR_NOW 0
++# endif
++# endif
++# endif
++# endif
++#endif
+
+-freebsd1*)
+- dynamic_linker=no
+- ;;
++#ifdef __cplusplus
++extern "C" void exit (int);
++#endif
+
+-freebsd* | dragonfly*)
+- # DragonFly does not have aout. When/if they implement a new
+- # versioning mechanism, adjust this.
+- if test -x /usr/bin/objformat; then
+- objformat=`/usr/bin/objformat`
++void fnord() { int i=42;}
++int main ()
++{
++ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
++ int status = $lt_dlunknown;
++
++ if (self)
++ {
++ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
++ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
++ /* dlclose (self); */
++ }
+ else
+- case $host_os in
+- freebsd[[123]]*) objformat=aout ;;
+- *) objformat=elf ;;
++ puts (dlerror ());
++
++ exit (status);
++}]
++_LT_EOF
++ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
++ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
++ lt_status=$?
++ case x$lt_status in
++ x$lt_dlno_uscore) $1 ;;
++ x$lt_dlneed_uscore) $2 ;;
++ x$lt_dlunknown|x*) $3 ;;
+ esac
++ else :
++ # compilation failed
++ $3
+ fi
+- version_type=freebsd-$objformat
+- case $version_type in
+- freebsd-elf*)
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+- need_version=no
+- need_lib_prefix=no
+- ;;
+- freebsd-*)
+- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+- need_version=yes
+- ;;
+- esac
+- shlibpath_var=LD_LIBRARY_PATH
++fi
++rm -fr conftest*
++])# _LT_TRY_DLOPEN_SELF
++
++
++# LT_SYS_DLOPEN_SELF
++# ------------------
++AC_DEFUN([LT_SYS_DLOPEN_SELF],
++[m4_require([_LT_HEADER_DLFCN])dnl
++if test "x$enable_dlopen" != xyes; then
++ enable_dlopen=unknown
++ enable_dlopen_self=unknown
++ enable_dlopen_self_static=unknown
++else
++ lt_cv_dlopen=no
++ lt_cv_dlopen_libs=
++
+ case $host_os in
+- freebsd2*)
+- shlibpath_overrides_runpath=yes
+- ;;
+- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+- shlibpath_overrides_runpath=yes
+- hardcode_into_libs=yes
+- ;;
+- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+- shlibpath_overrides_runpath=no
+- hardcode_into_libs=yes
++ beos*)
++ lt_cv_dlopen="load_add_on"
++ lt_cv_dlopen_libs=
++ lt_cv_dlopen_self=yes
+ ;;
+- *) # from 4.6 on, and DragonFly
+- shlibpath_overrides_runpath=yes
+- hardcode_into_libs=yes
++
++ mingw* | pw32*)
++ lt_cv_dlopen="LoadLibrary"
++ lt_cv_dlopen_libs=
+ ;;
+- esac
+- ;;
+
+-gnu*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- hardcode_into_libs=yes
+- ;;
++ cygwin*)
++ lt_cv_dlopen="dlopen"
++ lt_cv_dlopen_libs=
++ ;;
+
+-hpux9* | hpux10* | hpux11*)
+- # Give a soname corresponding to the major version so that dld.sl refuses to
+- # link against other versions.
+- version_type=sunos
+- need_lib_prefix=no
+- need_version=no
+- case $host_cpu in
+- ia64*)
+- shrext_cmds='.so'
+- hardcode_into_libs=yes
+- dynamic_linker="$host_os dld.so"
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- if test "X$HPUX_IA64_MODE" = X32; then
+- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+- else
+- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+- fi
+- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
++ darwin*)
++ # if libdl is installed we need to link against it
++ AC_CHECK_LIB([dl], [dlopen],
++ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
++ lt_cv_dlopen="dyld"
++ lt_cv_dlopen_libs=
++ lt_cv_dlopen_self=yes
++ ])
+ ;;
+- hppa*64*)
+- shrext_cmds='.sl'
+- hardcode_into_libs=yes
+- dynamic_linker="$host_os dld.sl"
+- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+- ;;
+- *)
+- shrext_cmds='.sl'
+- dynamic_linker="$host_os dld.sl"
+- shlibpath_var=SHLIB_PATH
+- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++
++ *)
++ AC_CHECK_FUNC([shl_load],
++ [lt_cv_dlopen="shl_load"],
++ [AC_CHECK_LIB([dld], [shl_load],
++ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
++ [AC_CHECK_FUNC([dlopen],
++ [lt_cv_dlopen="dlopen"],
++ [AC_CHECK_LIB([dl], [dlopen],
++ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
++ [AC_CHECK_LIB([svld], [dlopen],
++ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
++ [AC_CHECK_LIB([dld], [dld_link],
++ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
++ ])
++ ])
++ ])
++ ])
++ ])
+ ;;
+ esac
+- # HP-UX runs *really* slowly unless shared libraries are mode 555.
+- postinstall_cmds='chmod 555 $lib'
+- ;;
+
+-interix[[3-9]]*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=no
+- hardcode_into_libs=yes
+- ;;
++ if test "x$lt_cv_dlopen" != xno; then
++ enable_dlopen=yes
++ else
++ enable_dlopen=no
++ fi
+
+-irix5* | irix6* | nonstopux*)
+- case $host_os in
+- nonstopux*) version_type=nonstopux ;;
+- *)
+- if test "$lt_cv_prog_gnu_ld" = yes; then
+- version_type=linux
+- else
+- version_type=irix
+- fi ;;
+- esac
+- need_lib_prefix=no
+- need_version=no
+- soname_spec='${libname}${release}${shared_ext}$major'
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+- case $host_os in
+- irix5* | nonstopux*)
+- libsuff= shlibsuff=
+- ;;
+- *)
+- case $LD in # libtool.m4 will add one of these switches to LD
+- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+- libsuff= shlibsuff= libmagic=32-bit;;
+- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+- libsuff=32 shlibsuff=N32 libmagic=N32;;
+- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+- libsuff=64 shlibsuff=64 libmagic=64-bit;;
+- *) libsuff= shlibsuff= libmagic=never-match;;
+- esac
++ case $lt_cv_dlopen in
++ dlopen)
++ save_CPPFLAGS="$CPPFLAGS"
++ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
++
++ save_LDFLAGS="$LDFLAGS"
++ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
++
++ save_LIBS="$LIBS"
++ LIBS="$lt_cv_dlopen_libs $LIBS"
++
++ AC_CACHE_CHECK([whether a program can dlopen itself],
++ lt_cv_dlopen_self, [dnl
++ _LT_TRY_DLOPEN_SELF(
++ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
++ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
++ ])
++
++ if test "x$lt_cv_dlopen_self" = xyes; then
++ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
++ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
++ lt_cv_dlopen_self_static, [dnl
++ _LT_TRY_DLOPEN_SELF(
++ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
++ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
++ ])
++ fi
++
++ CPPFLAGS="$save_CPPFLAGS"
++ LDFLAGS="$save_LDFLAGS"
++ LIBS="$save_LIBS"
+ ;;
+ esac
+- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+- shlibpath_overrides_runpath=no
+- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+- hardcode_into_libs=yes
+- ;;
+
+-# No shared lib support for Linux oldld, aout, or coff.
+-linux*oldld* | linux*aout* | linux*coff*)
+- dynamic_linker=no
+- ;;
++ case $lt_cv_dlopen_self in
++ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
++ *) enable_dlopen_self=unknown ;;
++ esac
+
+-# This must be Linux ELF.
+-linux* | k*bsd*-gnu)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=no
+- # This implies no fast_install, which is unacceptable.
+- # Some rework will be needed to allow for fast_install
+- # before this can be enabled.
+- hardcode_into_libs=yes
++ case $lt_cv_dlopen_self_static in
++ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
++ *) enable_dlopen_self_static=unknown ;;
++ esac
++fi
++_LT_DECL([dlopen_support], [enable_dlopen], [0],
++ [Whether dlopen is supported])
++_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
++ [Whether dlopen of programs is supported])
++_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
++ [Whether dlopen of statically linked programs is supported])
++])# LT_SYS_DLOPEN_SELF
++
++# Old name:
++AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+- # Append ld.so.conf contents to the search path
+- if test -f /etc/ld.so.conf; then
+- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+- fi
+
+- # We used to test for /lib/ld.so.1 and disable shared libraries on
+- # powerpc, because MkLinux only supported shared libraries with the
+- # GNU dynamic linker. Since this was broken with cross compilers,
+- # most powerpc-linux boxes support dynamic linking these days and
+- # people can always --disable-shared, the test was removed, and we
+- # assume the GNU/Linux dynamic linker is in use.
+- dynamic_linker='GNU/Linux ld.so'
+- ;;
++# _LT_COMPILER_C_O([TAGNAME])
++# ---------------------------
++# Check to see if options -c and -o are simultaneously supported by compiler.
++# This macro does not hard code the compiler like AC_PROG_CC_C_O.
++m4_defun([_LT_COMPILER_C_O],
++[m4_require([_LT_DECL_SED])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_TAG_COMPILER])dnl
++AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
++ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
++ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
++ $RM -r conftest 2>/dev/null
++ mkdir conftest
++ cd conftest
++ mkdir out
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+-netbsd*)
+- version_type=sunos
+- need_lib_prefix=no
+- need_version=no
+- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+- dynamic_linker='NetBSD (a.out) ld.so'
+- else
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- dynamic_linker='NetBSD ld.elf_so'
+- fi
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- hardcode_into_libs=yes
+- ;;
++ lt_compiler_flag="-o out/conftest2.$ac_objext"
++ # Insert the option either (1) after the last *FLAGS variable, or
++ # (2) before a word containing "conftest.", or (3) at the end.
++ # Note that $ac_compile itself does not contain backslashes and begins
++ # with a dollar sign (not a hyphen), so the echo should work correctly.
++ lt_compile=`echo "$ac_compile" | $SED \
++ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
++ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
++ -e 's:$: $lt_compiler_flag:'`
++ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
++ (eval "$lt_compile" 2>out/conftest.err)
++ ac_status=$?
++ cat out/conftest.err >&AS_MESSAGE_LOG_FD
++ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
++ if (exit $ac_status) && test -s out/conftest2.$ac_objext
++ then
++ # The compiler can only warn and ignore the option if not recognized
++ # So say no if there are warnings
++ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
++ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
++ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
++ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
++ fi
++ fi
++ chmod u+w . 2>&AS_MESSAGE_LOG_FD
++ $RM conftest*
++ # SGI C++ compiler will create directory out/ii_files/ for
++ # template instantiation
++ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
++ $RM out/* && rmdir out
++ cd ..
++ $RM -r conftest
++ $RM conftest*
++])
++_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
++ [Does compiler simultaneously support -c and -o options?])
++])# _LT_COMPILER_C_O
+
+-newsos6)
+- version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- ;;
+
+-nto-qnx*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- ;;
++# _LT_COMPILER_FILE_LOCKS([TAGNAME])
++# ----------------------------------
++# Check to see if we can do hard links to lock some files if needed
++m4_defun([_LT_COMPILER_FILE_LOCKS],
++[m4_require([_LT_ENABLE_LOCK])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++_LT_COMPILER_C_O([$1])
+
+-openbsd*)
+- version_type=sunos
+- sys_lib_dlsearch_path_spec="/usr/lib"
+- need_lib_prefix=no
+- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+- case $host_os in
+- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+- *) need_version=no ;;
+- esac
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+- shlibpath_var=LD_LIBRARY_PATH
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- case $host_os in
+- openbsd2.[[89]] | openbsd2.[[89]].*)
+- shlibpath_overrides_runpath=no
+- ;;
+- *)
+- shlibpath_overrides_runpath=yes
+- ;;
+- esac
+- else
+- shlibpath_overrides_runpath=yes
++hard_links="nottested"
++if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
++ # do not overwrite the value of need_locks provided by the user
++ AC_MSG_CHECKING([if we can lock with hard links])
++ hard_links=yes
++ $RM conftest*
++ ln conftest.a conftest.b 2>/dev/null && hard_links=no
++ touch conftest.a
++ ln conftest.a conftest.b 2>&5 || hard_links=no
++ ln conftest.a conftest.b 2>/dev/null && hard_links=no
++ AC_MSG_RESULT([$hard_links])
++ if test "$hard_links" = no; then
++ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
++ need_locks=warn
+ fi
+- ;;
++else
++ need_locks=no
++fi
++_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
++])# _LT_COMPILER_FILE_LOCKS
+
+-os2*)
+- libname_spec='$name'
+- shrext_cmds=".dll"
+- need_lib_prefix=no
+- library_names_spec='$libname${shared_ext} $libname.a'
+- dynamic_linker='OS/2 ld.exe'
+- shlibpath_var=LIBPATH
+- ;;
+
+-osf3* | osf4* | osf5*)
+- version_type=osf
+- need_lib_prefix=no
+- need_version=no
+- soname_spec='${libname}${release}${shared_ext}$major'
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- shlibpath_var=LD_LIBRARY_PATH
+- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+- ;;
++# _LT_CHECK_OBJDIR
++# ----------------
++m4_defun([_LT_CHECK_OBJDIR],
++[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
++[rm -f .libs 2>/dev/null
++mkdir .libs 2>/dev/null
++if test -d .libs; then
++ lt_cv_objdir=.libs
++else
++ # MS-DOS does not allow filenames that begin with a dot.
++ lt_cv_objdir=_libs
++fi
++rmdir .libs 2>/dev/null])
++objdir=$lt_cv_objdir
++_LT_DECL([], [objdir], [0],
++ [The name of the directory that contains temporary libtool files])dnl
++m4_pattern_allow([LT_OBJDIR])dnl
++AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
++ [Define to the sub-directory in which libtool stores uninstalled libraries.])
++])# _LT_CHECK_OBJDIR
+
+-rdos*)
+- dynamic_linker=no
+- ;;
+
+-solaris*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- hardcode_into_libs=yes
+- # ldd complains unless libraries are executable
+- postinstall_cmds='chmod +x $lib'
+- ;;
++# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
++# --------------------------------------
++# Check hardcoding attributes.
++m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
++[AC_MSG_CHECKING([how to hardcode library paths into programs])
++_LT_TAGVAR(hardcode_action, $1)=
++if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
++ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
++ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+-sunos4*)
+- version_type=sunos
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- if test "$with_gnu_ld" = yes; then
+- need_lib_prefix=no
++ # We can hardcode non-existent directories.
++ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
++ # If the only mechanism to avoid hardcoding is shlibpath_var, we
++ # have to relink, otherwise we might link with an installed library
++ # when we should be linking with a yet-to-be-installed one
++ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
++ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
++ # Linking always hardcodes the temporary library directory.
++ _LT_TAGVAR(hardcode_action, $1)=relink
++ else
++ # We can link without hardcoding, and we can hardcode nonexisting dirs.
++ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+- need_version=yes
+- ;;
++else
++ # We cannot hardcode anything, or else we can only hardcode existing
++ # directories.
++ _LT_TAGVAR(hardcode_action, $1)=unsupported
++fi
++AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+-sysv4 | sysv4.3*)
+- version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- case $host_vendor in
+- sni)
+- shlibpath_overrides_runpath=no
+- need_lib_prefix=no
+- export_dynamic_flag_spec='${wl}-Blargedynsym'
+- runpath_var=LD_RUN_PATH
+- ;;
+- siemens)
+- need_lib_prefix=no
+- ;;
+- motorola)
+- need_lib_prefix=no
+- need_version=no
+- shlibpath_overrides_runpath=no
+- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+- ;;
++if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
++ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
++ # Fast installation is not supported
++ enable_fast_install=no
++elif test "$shlibpath_overrides_runpath" = yes ||
++ test "$enable_shared" = no; then
++ # Fast installation is not necessary
++ enable_fast_install=needless
++fi
++_LT_TAGDECL([], [hardcode_action], [0],
++ [How to hardcode a shared library path into an executable])
++])# _LT_LINKER_HARDCODE_LIBPATH
++
++
++# _LT_CMD_STRIPLIB
++# ----------------
++m4_defun([_LT_CMD_STRIPLIB],
++[m4_require([_LT_DECL_EGREP])
++striplib=
++old_striplib=
++AC_MSG_CHECKING([whether stripping libraries is possible])
++if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
++ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
++ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
++ AC_MSG_RESULT([yes])
++else
++# FIXME - insert some real tests, host_os isn't really good enough
++ case $host_os in
++ darwin*)
++ if test -n "$STRIP" ; then
++ striplib="$STRIP -x"
++ old_striplib="$STRIP -S"
++ AC_MSG_RESULT([yes])
++ else
++ AC_MSG_RESULT([no])
++ fi
++ ;;
++ *)
++ AC_MSG_RESULT([no])
++ ;;
+ esac
+- ;;
++fi
++_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
++_LT_DECL([], [striplib], [1])
++])# _LT_CMD_STRIPLIB
+
+-sysv4*MP*)
+- if test -d /usr/nec ;then
+- version_type=linux
+- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+- soname_spec='$libname${shared_ext}.$major'
+- shlibpath_var=LD_LIBRARY_PATH
++
++# _LT_SYS_DYNAMIC_LINKER([TAG])
++# -----------------------------
++# PORTME Fill in your ld.so characteristics
++m4_defun([_LT_SYS_DYNAMIC_LINKER],
++[AC_REQUIRE([AC_CANONICAL_HOST])dnl
++m4_require([_LT_DECL_EGREP])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_SED])dnl
++AC_MSG_CHECKING([dynamic linker characteristics])
++m4_if([$1],
++ [], [
++if test "$GCC" = yes; then
++ case $host_os in
++ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
++ *) lt_awk_arg="/^libraries:/" ;;
++ esac
++ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
++ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
++ # if the path contains ";" then we assume it to be the separator
++ # otherwise default to the standard path separator (i.e. ":") - it is
++ # assumed that no part of a normal pathname contains ";" but that should
++ # okay in the real world where ";" in dirpaths is itself problematic.
++ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
++ else
++ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
++ # Ok, now we have the path, separated by spaces, we can step through it
++ # and add multilib dir if necessary.
++ lt_tmp_lt_search_path_spec=
++ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
++ for lt_sys_path in $lt_search_path_spec; do
++ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
++ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
++ else
++ test -d "$lt_sys_path" && \
++ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
++ fi
++ done
++ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
++BEGIN {RS=" "; FS="/|\n";} {
++ lt_foo="";
++ lt_count=0;
++ for (lt_i = NF; lt_i > 0; lt_i--) {
++ if ($lt_i != "" && $lt_i != ".") {
++ if ($lt_i == "..") {
++ lt_count++;
++ } else {
++ if (lt_count == 0) {
++ lt_foo="/" $lt_i lt_foo;
++ } else {
++ lt_count--;
++ }
++ }
++ }
++ }
++ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
++ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
++}'`
++ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
++else
++ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
++fi])
++library_names_spec=
++libname_spec='lib$name'
++soname_spec=
++shrext_cmds=".so"
++postinstall_cmds=
++postuninstall_cmds=
++finish_cmds=
++finish_eval=
++shlibpath_var=
++shlibpath_overrides_runpath=unknown
++version_type=none
++dynamic_linker="$host_os ld.so"
++sys_lib_dlsearch_path_spec="/lib /usr/lib"
++need_lib_prefix=unknown
++hardcode_into_libs=no
++
++# when you set need_version to no, make sure it does not cause -set_version
++# flags to be left without arguments
++need_version=unknown
++
++case $host_os in
++aix3*)
++ version_type=linux
++ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
++ shlibpath_var=LIBPATH
++
++ # AIX 3 has no versioning support, so we append a major version to the name.
++ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+- version_type=freebsd-elf
++aix[[4-9]]*)
++ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+- if test "$with_gnu_ld" = yes; then
+- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+- shlibpath_overrides_runpath=no
++ if test "$host_cpu" = ia64; then
++ # AIX 5 supports IA64
++ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
++ shlibpath_var=LD_LIBRARY_PATH
+ else
+- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+- shlibpath_overrides_runpath=yes
++ # With GCC up to 2.95.x, collect2 would create an import file
++ # for dependence libraries. The import file would start with
++ # the line `#! .'. This would cause the generated library to
++ # depend on `.', always an invalid library. This was fixed in
++ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+- sco3.2v5*)
+- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+- ;;
++ aix4 | aix4.[[01]] | aix4.[[01]].*)
++ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
++ echo ' yes '
++ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
++ :
++ else
++ can_build_shared=no
++ fi
++ ;;
+ esac
++ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
++ # soname into executable. Probably we can add versioning support to
++ # collect2, so additional links can be useful in future.
++ if test "$aix_use_runtimelinking" = yes; then
++ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
++ # instead of lib<name>.a to let people know that these are not
++ # typical AIX shared libraries.
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ else
++ # We preserve .a as extension for shared libraries through AIX4.2
++ # and later when we are not doing run time linking.
++ library_names_spec='${libname}${release}.a $libname.a'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ fi
++ shlibpath_var=LIBPATH
+ fi
+- sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+-uts4*)
++amigaos*)
++ case $host_cpu in
++ powerpc)
++ # Since July 2007 AmigaOS4 officially supports .so libraries.
++ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ ;;
++ m68k)
++ library_names_spec='$libname.ixlibrary $libname.a'
++ # Create ${libname}_ixlibrary.a entries in /sys/libs.
++ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
++ ;;
++ esac
++ ;;
++
++beos*)
++ library_names_spec='${libname}${shared_ext}'
++ dynamic_linker="$host_os ld.so"
++ shlibpath_var=LIBRARY_PATH
++ ;;
++
++bsdi[[45]]*)
+ version_type=linux
++ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
++ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
++ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
++ # the default ld.so.conf also contains /usr/contrib/lib and
++ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
++ # libtool to hard-code these into programs
+ ;;
+
+-*)
+- dynamic_linker=no
+- ;;
+-esac
+-AC_MSG_RESULT([$dynamic_linker])
+-test "$dynamic_linker" = no && can_build_shared=no
+-
+-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+-if test "$GCC" = yes; then
+- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+-fi
+-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
++cygwin* | mingw* | pw32*)
++ version_type=windows
++ shrext_cmds=".dll"
++ need_version=no
++ need_lib_prefix=no
+
++ case $GCC,$host_os in
++ yes,cygwin* | yes,mingw* | yes,pw32*)
++ library_names_spec='$libname.dll.a'
++ # DLL is installed to $(libdir)/../bin by postinstall_cmds
++ postinstall_cmds='base_file=`basename \${file}`~
++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
++ dldir=$destdir/`dirname \$dlpath`~
++ test -d \$dldir || mkdir -p \$dldir~
++ $install_prog $dir/$dlname \$dldir/$dlname~
++ chmod a+x \$dldir/$dlname~
++ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
++ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
++ fi'
++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
++ dlpath=$dir/\$dldll~
++ $RM \$dlpath'
++ shlibpath_overrides_runpath=yes
+
+-# _LT_AC_TAGCONFIG
+-# ----------------
+-AC_DEFUN([_LT_AC_TAGCONFIG],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_ARG_WITH([tags],
+- [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+- [include additional configurations @<:@automatic@:>@])],
+- [tagnames="$withval"])
+-
+-if test -f "$ltmain" && test -n "$tagnames"; then
+- if test ! -f "${ofile}"; then
+- AC_MSG_WARN([output file `$ofile' does not exist])
+- fi
+-
+- if test -z "$LTCC"; then
+- eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+- if test -z "$LTCC"; then
+- AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+- else
+- AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+- fi
+- fi
+- if test -z "$LTCFLAGS"; then
+- eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+- fi
+-
+- # Extract list of available tagged configurations in $ofile.
+- # Note that this assumes the entire list is on one line.
+- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+-
+- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+- for tagname in $tagnames; do
+- IFS="$lt_save_ifs"
+- # Check whether tagname contains only valid characters
+- case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+- "") ;;
+- *) AC_MSG_ERROR([invalid tag name: $tagname])
+- ;;
++ case $host_os in
++ cygwin*)
++ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
++ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
++ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
++ ;;
++ mingw*)
++ # MinGW DLLs use traditional 'lib' prefix
++ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
++ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
++ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
++ # It is most probably a Windows format PATH printed by
++ # mingw gcc, but we are running on Cygwin. Gcc prints its search
++ # path with ; separators, and with drive letters. We can handle the
++ # drive letters (cygwin fileutils understands them), so leave them,
++ # especially as we might pass files found there to a mingw objdump,
++ # which wouldn't understand a cygwinified path. Ahh.
++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
++ else
++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
++ fi
++ ;;
++ pw32*)
++ # pw32 DLLs use 'pw' prefix rather than 'lib'
++ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
++ ;;
+ esac
++ ;;
+
+- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+- then
+- AC_MSG_ERROR([tag name \"$tagname\" already exists])
+- fi
+-
+- # Update the list of available tags.
+- if test -n "$tagname"; then
+- echo appending configuration tag \"$tagname\" to $ofile
+-
+- case $tagname in
+- CXX)
+- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+- (test "X$CXX" != "Xg++"))) ; then
+- AC_LIBTOOL_LANG_CXX_CONFIG
+- else
+- tagname=""
+- fi
+- ;;
+-
+- F77)
+- if test -n "$F77" && test "X$F77" != "Xno"; then
+- AC_LIBTOOL_LANG_F77_CONFIG
+- else
+- tagname=""
+- fi
+- ;;
+-
+- GCJ)
+- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+- AC_LIBTOOL_LANG_GCJ_CONFIG
+- else
+- tagname=""
+- fi
+- ;;
++ *)
++ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
++ ;;
++ esac
++ dynamic_linker='Win32 ld.exe'
++ # FIXME: first we should search . and the directory the executable is in
++ shlibpath_var=PATH
++ ;;
+
+- RC)
+- AC_LIBTOOL_LANG_RC_CONFIG
+- ;;
++darwin* | rhapsody*)
++ dynamic_linker="$host_os dyld"
++ version_type=darwin
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
++ soname_spec='${libname}${release}${major}$shared_ext'
++ shlibpath_overrides_runpath=yes
++ shlibpath_var=DYLD_LIBRARY_PATH
++ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++m4_if([$1], [],[
++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
++ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
++ ;;
+
+- *)
+- AC_MSG_ERROR([Unsupported tag name: $tagname])
+- ;;
+- esac
++dgux*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ ;;
+
+- # Append the new tag name to the list of available tags.
+- if test -n "$tagname" ; then
+- available_tags="$available_tags $tagname"
+- fi
+- fi
+- done
+- IFS="$lt_save_ifs"
++freebsd1*)
++ dynamic_linker=no
++ ;;
+
+- # Now substitute the updated list of available tags.
+- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+- mv "${ofile}T" "$ofile"
+- chmod +x "$ofile"
++freebsd* | dragonfly*)
++ # DragonFly does not have aout. When/if they implement a new
++ # versioning mechanism, adjust this.
++ if test -x /usr/bin/objformat; then
++ objformat=`/usr/bin/objformat`
+ else
+- rm -f "${ofile}T"
+- AC_MSG_ERROR([unable to update list of available tagged configurations.])
++ case $host_os in
++ freebsd[[123]]*) objformat=aout ;;
++ *) objformat=elf ;;
++ esac
+ fi
+-fi
+-])# _LT_AC_TAGCONFIG
+-
+-
+-# AC_LIBTOOL_DLOPEN
+-# -----------------
+-# enable checks for dlopen support
+-AC_DEFUN([AC_LIBTOOL_DLOPEN],
+- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+-])# AC_LIBTOOL_DLOPEN
+-
+-
+-# AC_LIBTOOL_WIN32_DLL
+-# --------------------
+-# declare package support for building win32 DLLs
+-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+-])# AC_LIBTOOL_WIN32_DLL
+-
+-
+-# AC_ENABLE_SHARED([DEFAULT])
+-# ---------------------------
+-# implement the --enable-shared flag
+-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+-AC_DEFUN([AC_ENABLE_SHARED],
+-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+-AC_ARG_ENABLE([shared],
+- [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+- [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+- [p=${PACKAGE-default}
+- case $enableval in
+- yes) enable_shared=yes ;;
+- no) enable_shared=no ;;
+- *)
+- enable_shared=no
+- # Look at the argument we got. We use all the common list separators.
+- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+- for pkg in $enableval; do
+- IFS="$lt_save_ifs"
+- if test "X$pkg" = "X$p"; then
+- enable_shared=yes
+- fi
+- done
+- IFS="$lt_save_ifs"
++ version_type=freebsd-$objformat
++ case $version_type in
++ freebsd-elf*)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++ need_version=no
++ need_lib_prefix=no
++ ;;
++ freebsd-*)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
++ need_version=yes
+ ;;
+- esac],
+- [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+-])# AC_ENABLE_SHARED
++ esac
++ shlibpath_var=LD_LIBRARY_PATH
++ case $host_os in
++ freebsd2*)
++ shlibpath_overrides_runpath=yes
++ ;;
++ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ ;;
++ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
++ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
++ shlibpath_overrides_runpath=no
++ hardcode_into_libs=yes
++ ;;
++ *) # from 4.6 on, and DragonFly
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ ;;
++ esac
++ ;;
+
++gnu*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ hardcode_into_libs=yes
++ ;;
+
+-# AC_DISABLE_SHARED
+-# -----------------
+-# set the default shared flag to --disable-shared
+-AC_DEFUN([AC_DISABLE_SHARED],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-AC_ENABLE_SHARED(no)
+-])# AC_DISABLE_SHARED
++hpux9* | hpux10* | hpux11*)
++ # Give a soname corresponding to the major version so that dld.sl refuses to
++ # link against other versions.
++ version_type=sunos
++ need_lib_prefix=no
++ need_version=no
++ case $host_cpu in
++ ia64*)
++ shrext_cmds='.so'
++ hardcode_into_libs=yes
++ dynamic_linker="$host_os dld.so"
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ if test "X$HPUX_IA64_MODE" = X32; then
++ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
++ else
++ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
++ fi
++ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
++ ;;
++ hppa*64*)
++ shrext_cmds='.sl'
++ hardcode_into_libs=yes
++ dynamic_linker="$host_os dld.sl"
++ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
++ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
++ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
++ ;;
++ *)
++ shrext_cmds='.sl'
++ dynamic_linker="$host_os dld.sl"
++ shlibpath_var=SHLIB_PATH
++ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ ;;
++ esac
++ # HP-UX runs *really* slowly unless shared libraries are mode 555.
++ postinstall_cmds='chmod 555 $lib'
++ ;;
+
++interix[[3-9]]*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ hardcode_into_libs=yes
++ ;;
+
+-# AC_ENABLE_STATIC([DEFAULT])
+-# ---------------------------
+-# implement the --enable-static flag
+-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+-AC_DEFUN([AC_ENABLE_STATIC],
+-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+-AC_ARG_ENABLE([static],
+- [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+- [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+- [p=${PACKAGE-default}
+- case $enableval in
+- yes) enable_static=yes ;;
+- no) enable_static=no ;;
++irix5* | irix6* | nonstopux*)
++ case $host_os in
++ nonstopux*) version_type=nonstopux ;;
+ *)
+- enable_static=no
+- # Look at the argument we got. We use all the common list separators.
+- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+- for pkg in $enableval; do
+- IFS="$lt_save_ifs"
+- if test "X$pkg" = "X$p"; then
+- enable_static=yes
+- fi
+- done
+- IFS="$lt_save_ifs"
+- ;;
+- esac],
+- [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+-])# AC_ENABLE_STATIC
++ if test "$lt_cv_prog_gnu_ld" = yes; then
++ version_type=linux
++ else
++ version_type=irix
++ fi ;;
++ esac
++ need_lib_prefix=no
++ need_version=no
++ soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
++ case $host_os in
++ irix5* | nonstopux*)
++ libsuff= shlibsuff=
++ ;;
++ *)
++ case $LD in # libtool.m4 will add one of these switches to LD
++ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
++ libsuff= shlibsuff= libmagic=32-bit;;
++ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
++ libsuff=32 shlibsuff=N32 libmagic=N32;;
++ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
++ libsuff=64 shlibsuff=64 libmagic=64-bit;;
++ *) libsuff= shlibsuff= libmagic=never-match;;
++ esac
++ ;;
++ esac
++ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
++ shlibpath_overrides_runpath=no
++ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
++ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
++ hardcode_into_libs=yes
++ ;;
+
++# No shared lib support for Linux oldld, aout, or coff.
++linux*oldld* | linux*aout* | linux*coff*)
++ dynamic_linker=no
++ ;;
+
+-# AC_DISABLE_STATIC
+-# -----------------
+-# set the default static flag to --disable-static
+-AC_DEFUN([AC_DISABLE_STATIC],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-AC_ENABLE_STATIC(no)
+-])# AC_DISABLE_STATIC
++# This must be Linux ELF.
++linux* | k*bsd*-gnu)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ # Some binutils ld are patched to set DT_RUNPATH
++ save_LDFLAGS=$LDFLAGS
++ save_libdir=$libdir
++ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
++ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
++ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
++ [shlibpath_overrides_runpath=yes])])
++ LDFLAGS=$save_LDFLAGS
++ libdir=$save_libdir
+
++ # This implies no fast_install, which is unacceptable.
++ # Some rework will be needed to allow for fast_install
++ # before this can be enabled.
++ hardcode_into_libs=yes
+
+-# AC_ENABLE_FAST_INSTALL([DEFAULT])
+-# ---------------------------------
+-# implement the --enable-fast-install flag
+-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+-AC_ARG_ENABLE([fast-install],
+- [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+- [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+- [p=${PACKAGE-default}
+- case $enableval in
+- yes) enable_fast_install=yes ;;
+- no) enable_fast_install=no ;;
+- *)
+- enable_fast_install=no
+- # Look at the argument we got. We use all the common list separators.
+- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+- for pkg in $enableval; do
+- IFS="$lt_save_ifs"
+- if test "X$pkg" = "X$p"; then
+- enable_fast_install=yes
+- fi
+- done
+- IFS="$lt_save_ifs"
++ # Append ld.so.conf contents to the search path
++ if test -f /etc/ld.so.conf; then
++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ fi
++
++ # We used to test for /lib/ld.so.1 and disable shared libraries on
++ # powerpc, because MkLinux only supported shared libraries with the
++ # GNU dynamic linker. Since this was broken with cross compilers,
++ # most powerpc-linux boxes support dynamic linking these days and
++ # people can always --disable-shared, the test was removed, and we
++ # assume the GNU/Linux dynamic linker is in use.
++ dynamic_linker='GNU/Linux ld.so'
++ ;;
++
++netbsd*)
++ version_type=sunos
++ need_lib_prefix=no
++ need_version=no
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++ dynamic_linker='NetBSD (a.out) ld.so'
++ else
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ dynamic_linker='NetBSD ld.elf_so'
++ fi
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ ;;
++
++newsos6)
++ version_type=linux
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ ;;
++
++*nto* | *qnx*)
++ version_type=qnx
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ hardcode_into_libs=yes
++ dynamic_linker='ldqnx.so'
++ ;;
++
++openbsd*)
++ version_type=sunos
++ sys_lib_dlsearch_path_spec="/usr/lib"
++ need_lib_prefix=no
++ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
++ case $host_os in
++ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
++ *) need_version=no ;;
++ esac
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ case $host_os in
++ openbsd2.[[89]] | openbsd2.[[89]].*)
++ shlibpath_overrides_runpath=no
++ ;;
++ *)
++ shlibpath_overrides_runpath=yes
++ ;;
++ esac
++ else
++ shlibpath_overrides_runpath=yes
++ fi
++ ;;
++
++os2*)
++ libname_spec='$name'
++ shrext_cmds=".dll"
++ need_lib_prefix=no
++ library_names_spec='$libname${shared_ext} $libname.a'
++ dynamic_linker='OS/2 ld.exe'
++ shlibpath_var=LIBPATH
++ ;;
++
++osf3* | osf4* | osf5*)
++ version_type=osf
++ need_lib_prefix=no
++ need_version=no
++ soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ shlibpath_var=LD_LIBRARY_PATH
++ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
++ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
++ ;;
++
++rdos*)
++ dynamic_linker=no
++ ;;
++
++solaris*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ # ldd complains unless libraries are executable
++ postinstall_cmds='chmod +x $lib'
++ ;;
++
++sunos4*)
++ version_type=sunos
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ if test "$with_gnu_ld" = yes; then
++ need_lib_prefix=no
++ fi
++ need_version=yes
++ ;;
++
++sysv4 | sysv4.3*)
++ version_type=linux
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ case $host_vendor in
++ sni)
++ shlibpath_overrides_runpath=no
++ need_lib_prefix=no
++ runpath_var=LD_RUN_PATH
++ ;;
++ siemens)
++ need_lib_prefix=no
++ ;;
++ motorola)
++ need_lib_prefix=no
++ need_version=no
++ shlibpath_overrides_runpath=no
++ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+- esac],
+- [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+-])# AC_ENABLE_FAST_INSTALL
++ esac
++ ;;
+
++sysv4*MP*)
++ if test -d /usr/nec ;then
++ version_type=linux
++ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
++ soname_spec='$libname${shared_ext}.$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ fi
++ ;;
+
+-# AC_DISABLE_FAST_INSTALL
+-# -----------------------
+-# set the default to --disable-fast-install
+-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-AC_ENABLE_FAST_INSTALL(no)
+-])# AC_DISABLE_FAST_INSTALL
++sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++ version_type=freebsd-elf
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ if test "$with_gnu_ld" = yes; then
++ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
++ else
++ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
++ case $host_os in
++ sco3.2v5*)
++ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
++ ;;
++ esac
++ fi
++ sys_lib_dlsearch_path_spec='/usr/lib'
++ ;;
++
++tpf*)
++ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ hardcode_into_libs=yes
++ ;;
+
++uts4*)
++ version_type=linux
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ ;;
+
+-# AC_LIBTOOL_PICMODE([MODE])
+-# --------------------------
+-# implement the --with-pic flag
+-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+-AC_DEFUN([AC_LIBTOOL_PICMODE],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-pic_mode=ifelse($#,1,$1,default)
+-])# AC_LIBTOOL_PICMODE
++*)
++ dynamic_linker=no
++ ;;
++esac
++AC_MSG_RESULT([$dynamic_linker])
++test "$dynamic_linker" = no && can_build_shared=no
+
++variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
++if test "$GCC" = yes; then
++ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
++fi
++
++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
++ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
++fi
++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
++ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
++fi
+
+-# AC_PROG_EGREP
+-# -------------
+-# This is predefined starting with Autoconf 2.54, so this conditional
+-# definition can be removed once we require Autoconf 2.54 or later.
+-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+- [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+- then ac_cv_prog_egrep='grep -E'
+- else ac_cv_prog_egrep='egrep'
+- fi])
+- EGREP=$ac_cv_prog_egrep
+- AC_SUBST([EGREP])
+-])])
++_LT_DECL([], [variables_saved_for_relink], [1],
++ [Variables whose values should be saved in libtool wrapper scripts and
++ restored at link time])
++_LT_DECL([], [need_lib_prefix], [0],
++ [Do we need the "lib" prefix for modules?])
++_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
++_LT_DECL([], [version_type], [0], [Library versioning type])
++_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
++_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
++_LT_DECL([], [shlibpath_overrides_runpath], [0],
++ [Is shlibpath searched before the hard-coded library search path?])
++_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
++_LT_DECL([], [library_names_spec], [1],
++ [[List of archive names. First name is the real one, the rest are links.
++ The last name is the one that the linker finds with -lNAME]])
++_LT_DECL([], [soname_spec], [1],
++ [[The coded name of the library, if different from the real name]])
++_LT_DECL([], [postinstall_cmds], [2],
++ [Command to use after installation of a shared archive])
++_LT_DECL([], [postuninstall_cmds], [2],
++ [Command to use after uninstallation of a shared archive])
++_LT_DECL([], [finish_cmds], [2],
++ [Commands used to finish a libtool library installation in a directory])
++_LT_DECL([], [finish_eval], [1],
++ [[As "finish_cmds", except a single script fragment to be evaled but
++ not shown]])
++_LT_DECL([], [hardcode_into_libs], [0],
++ [Whether we should hardcode library paths into libraries])
++_LT_DECL([], [sys_lib_search_path_spec], [2],
++ [Compile-time system search path for libraries])
++_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
++ [Run-time system search path for libraries])
++])# _LT_SYS_DYNAMIC_LINKER
+
+
+-# AC_PATH_TOOL_PREFIX
+-# -------------------
++# _LT_PATH_TOOL_PREFIX(TOOL)
++# --------------------------
+ # find a file program which can recognize shared library
+-AC_DEFUN([AC_PATH_TOOL_PREFIX],
+-[AC_REQUIRE([AC_PROG_EGREP])dnl
++AC_DEFUN([_LT_PATH_TOOL_PREFIX],
++[m4_require([_LT_DECL_EGREP])dnl
+ AC_MSG_CHECKING([for $1])
+ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+ [case $MAGIC_CMD in
+@@ -2100,7 +2740,7 @@
+ dnl $ac_dummy forces splitting on constant user-supplied paths.
+ dnl POSIX.2 word splitting is done only on the output of word expansions,
+ dnl not every word. This closes a longstanding sh security hole.
+- ac_dummy="ifelse([$2], , $PATH, [$2])"
++ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+@@ -2115,7 +2755,7 @@
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+- cat <<EOF 1>&2
++ cat <<_LT_EOF 1>&2
+
+ *** Warning: the command libtool uses to detect shared libraries,
+ *** $file_magic_cmd, produces output that libtool cannot recognize.
+@@ -2126,7 +2766,7 @@
+ *** may want to report the problem to your system manager and/or to
+ *** bug-libtool@gnu.org
+
+-EOF
++_LT_EOF
+ fi ;;
+ esac
+ fi
+@@ -2143,37 +2783,47 @@
+ else
+ AC_MSG_RESULT(no)
+ fi
+-])# AC_PATH_TOOL_PREFIX
++_LT_DECL([], [MAGIC_CMD], [0],
++ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
++])# _LT_PATH_TOOL_PREFIX
+
++# Old name:
++AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+-# AC_PATH_MAGIC
+-# -------------
++
++# _LT_PATH_MAGIC
++# --------------
+ # find a file program which can recognize a shared library
+-AC_DEFUN([AC_PATH_MAGIC],
+-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
++m4_defun([_LT_PATH_MAGIC],
++[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+ if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+- AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
++ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+ fi
+-])# AC_PATH_MAGIC
++])# _LT_PATH_MAGIC
+
+
+-# AC_PROG_LD
++# LT_PATH_LD
+ # ----------
+ # find the pathname to the GNU or non-GNU linker
+-AC_DEFUN([AC_PROG_LD],
+-[AC_ARG_WITH([gnu-ld],
+- [AC_HELP_STRING([--with-gnu-ld],
+- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+- [test "$withval" = no || with_gnu_ld=yes],
+- [with_gnu_ld=no])
+-AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_REQUIRE([AC_PROG_CC])dnl
++AC_DEFUN([LT_PATH_LD],
++[AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
++m4_require([_LT_DECL_SED])dnl
++m4_require([_LT_DECL_EGREP])dnl
++
++AC_ARG_WITH([gnu-ld],
++ [AS_HELP_STRING([--with-gnu-ld],
++ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
++ [test "$withval" = no || with_gnu_ld=yes],
++ [with_gnu_ld=no])dnl
++
+ ac_prog=ld
+ if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+@@ -2190,9 +2840,9 @@
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
++ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
++ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
++ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+@@ -2242,15 +2892,24 @@
+ AC_MSG_RESULT(no)
+ fi
+ test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+-AC_PROG_LD_GNU
+-])# AC_PROG_LD
++_LT_PATH_LD_GNU
++AC_SUBST([LD])
+
++_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
++])# LT_PATH_LD
+
+-# AC_PROG_LD_GNU
+-# --------------
+-AC_DEFUN([AC_PROG_LD_GNU],
+-[AC_REQUIRE([AC_PROG_EGREP])dnl
+-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
++# Old names:
++AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
++AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AM_PROG_LD], [])
++dnl AC_DEFUN([AC_PROG_LD], [])
++
++
++# _LT_PATH_LD_GNU
++#- --------------
++m4_defun([_LT_PATH_LD_GNU],
++[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+ [# I'd rather use --version here, but apparently some GNU lds only accept -v.
+ case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+@@ -2261,14 +2920,14 @@
+ ;;
+ esac])
+ with_gnu_ld=$lt_cv_prog_gnu_ld
+-])# AC_PROG_LD_GNU
++])# _LT_PATH_LD_GNU
+
+
+-# AC_PROG_LD_RELOAD_FLAG
+-# ----------------------
++# _LT_CMD_RELOAD
++# --------------
+ # find reload flag for linker
+ # -- PORTME Some linkers may need a different reload flag.
+-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
++m4_defun([_LT_CMD_RELOAD],
+ [AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+@@ -2287,15 +2946,18 @@
+ fi
+ ;;
+ esac
+-])# AC_PROG_LD_RELOAD_FLAG
++_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
++_LT_DECL([], [reload_cmds], [2])dnl
++])# _LT_CMD_RELOAD
+
+
+-# AC_DEPLIBS_CHECK_METHOD
+-# -----------------------
++# _LT_CHECK_MAGIC_METHOD
++# ----------------------
+ # how to check for library dependencies
+ # -- PORTME fill in with the dynamic library characteristics
+-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+-[AC_CACHE_CHECK([how to recognize dependent libraries],
++m4_defun([_LT_CHECK_MAGIC_METHOD],
++[m4_require([_LT_DECL_EGREP])
++AC_CACHE_CHECK([how to recognize dependent libraries],
+ lt_cv_deplibs_check_method,
+ [lt_cv_file_magic_cmd='$MAGIC_CMD'
+ lt_cv_file_magic_test_file=
+@@ -2312,7 +2974,7 @@
+ # whether `pass_all' will *always* work, you probably want this one.
+
+ case $host_os in
+-aix4* | aix5*)
++aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+@@ -2350,7 +3012,7 @@
+ ;;
+
+ freebsd* | dragonfly*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+@@ -2408,7 +3070,7 @@
+ ;;
+
+ netbsd*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+@@ -2421,12 +3083,12 @@
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+-nto-qnx*)
+- lt_cv_deplibs_check_method=unknown
++*nto* | *qnx*)
++ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+ openbsd*)
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+@@ -2445,6 +3107,10 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++ lt_cv_deplibs_check_method=pass_all
++ ;;
++
+ sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+@@ -2472,7 +3138,7 @@
+ esac
+ ;;
+
+-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+@@ -2480,14 +3146,20 @@
+ file_magic_cmd=$lt_cv_file_magic_cmd
+ deplibs_check_method=$lt_cv_deplibs_check_method
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+-])# AC_DEPLIBS_CHECK_METHOD
+
++_LT_DECL([], [deplibs_check_method], [1],
++ [Method to check whether dependent libraries are shared objects])
++_LT_DECL([], [file_magic_cmd], [1],
++ [Command to use when deplibs_check_method == "file_magic"])
++])# _LT_CHECK_MAGIC_METHOD
+
+-# AC_PROG_NM
++
++# LT_PATH_NM
+ # ----------
+-# find the pathname to a BSD-compatible name lister
+-AC_DEFUN([AC_PROG_NM],
+-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
++# find the pathname to a BSD- or MS-compatible name lister
++AC_DEFUN([LT_PATH_NM],
++[AC_REQUIRE([AC_PROG_CC])dnl
++AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+ [if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+@@ -2529,16 +3201,51 @@
+ done
+ IFS="$lt_save_ifs"
+ done
+- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
++ : ${lt_cv_path_NM=no}
+ fi])
+-NM="$lt_cv_path_NM"
+-])# AC_PROG_NM
++if test "$lt_cv_path_NM" != "no"; then
++ NM="$lt_cv_path_NM"
++else
++ # Didn't find any BSD compatible name lister, look for dumpbin.
++ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
++ AC_SUBST([DUMPBIN])
++ if test "$DUMPBIN" != ":"; then
++ NM="$DUMPBIN"
++ fi
++fi
++test -z "$NM" && NM=nm
++AC_SUBST([NM])
++_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
++AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
++ [lt_cv_nm_interface="BSD nm"
++ echo "int some_variable = 0;" > conftest.$ac_ext
++ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
++ (eval "$ac_compile" 2>conftest.err)
++ cat conftest.err >&AS_MESSAGE_LOG_FD
++ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
++ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
++ cat conftest.err >&AS_MESSAGE_LOG_FD
++ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
++ cat conftest.out >&AS_MESSAGE_LOG_FD
++ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
++ lt_cv_nm_interface="MS dumpbin"
++ fi
++ rm -f conftest*])
++])# LT_PATH_NM
++
++# Old names:
++AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
++AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AM_PROG_NM], [])
++dnl AC_DEFUN([AC_PROG_NM], [])
+
+-# AC_CHECK_LIBM
+-# -------------
++
++# LT_LIB_M
++# --------
+ # check for math library
+-AC_DEFUN([AC_CHECK_LIBM],
++AC_DEFUN([LT_LIB_M],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ LIBM=
+ case $host in
+@@ -2553,3986 +3260,3739 @@
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+ esac
+-])# AC_CHECK_LIBM
++AC_SUBST([LIBM])
++])# LT_LIB_M
+
++# Old name:
++AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+-# -----------------------------------
+-# sets LIBLTDL to the link flags for the libltdl convenience library and
+-# LTDLINCL to the include flags for the libltdl header and adds
+-# --enable-ltdl-convenience to the configure arguments. Note that
+-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
+-# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
+-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+-# (note the single quotes!). If your package is not flat and you're not
+-# using automake, define top_builddir and top_srcdir appropriately in
+-# the Makefiles.
+-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+- case $enable_ltdl_convenience in
+- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+- "") enable_ltdl_convenience=yes
+- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+- esac
+- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+- # For backwards non-gettext consistent compatibility...
+- INCLTDL="$LTDLINCL"
+-])# AC_LIBLTDL_CONVENIENCE
+
++# _LT_COMPILER_NO_RTTI([TAGNAME])
++# -------------------------------
++m4_defun([_LT_COMPILER_NO_RTTI],
++[m4_require([_LT_TAG_COMPILER])dnl
+
+-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+-# -----------------------------------
+-# sets LIBLTDL to the link flags for the libltdl installable library and
+-# LTDLINCL to the include flags for the libltdl header and adds
+-# --enable-ltdl-install to the configure arguments. Note that
+-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
+-# and an installed libltdl is not found, it is assumed to be `libltdl'.
+-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+-# '${top_srcdir}/' (note the single quotes!). If your package is not
+-# flat and you're not using automake, define top_builddir and top_srcdir
+-# appropriately in the Makefiles.
+-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+- AC_CHECK_LIB(ltdl, lt_dlinit,
+- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+- [if test x"$enable_ltdl_install" = xno; then
+- AC_MSG_WARN([libltdl not installed, but installation disabled])
+- else
+- enable_ltdl_install=yes
+- fi
+- ])
+- if test x"$enable_ltdl_install" = x"yes"; then
+- ac_configure_args="$ac_configure_args --enable-ltdl-install"
+- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+- else
+- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+- LIBLTDL="-lltdl"
+- LTDLINCL=
+- fi
+- # For backwards non-gettext consistent compatibility...
+- INCLTDL="$LTDLINCL"
+-])# AC_LIBLTDL_INSTALLABLE
++_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
++if test "$GCC" = yes; then
++ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+-# AC_LIBTOOL_CXX
+-# --------------
+-# enable support for C++ libraries
+-AC_DEFUN([AC_LIBTOOL_CXX],
+-[AC_REQUIRE([_LT_AC_LANG_CXX])
+-])# AC_LIBTOOL_CXX
++ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
++ lt_cv_prog_compiler_rtti_exceptions,
++ [-fno-rtti -fno-exceptions], [],
++ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
++fi
++_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
++ [Compiler flag to turn off builtin functions])
++])# _LT_COMPILER_NO_RTTI
+
+
+-# _LT_AC_LANG_CXX
+-# ---------------
+-AC_DEFUN([_LT_AC_LANG_CXX],
+-[AC_REQUIRE([AC_PROG_CXX])
+-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+-])# _LT_AC_LANG_CXX
++# _LT_CMD_GLOBAL_SYMBOLS
++# ----------------------
++m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
++[AC_REQUIRE([AC_CANONICAL_HOST])dnl
++AC_REQUIRE([AC_PROG_CC])dnl
++AC_REQUIRE([LT_PATH_NM])dnl
++AC_REQUIRE([LT_PATH_LD])dnl
++m4_require([_LT_DECL_SED])dnl
++m4_require([_LT_DECL_EGREP])dnl
++m4_require([_LT_TAG_COMPILER])dnl
+
+-# _LT_AC_PROG_CXXCPP
+-# ------------------
+-AC_DEFUN([_LT_AC_PROG_CXXCPP],
++# Check for command to grab the raw symbol name followed by C symbol from nm.
++AC_MSG_CHECKING([command to parse $NM output from $compiler object])
++AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+ [
+-AC_REQUIRE([AC_PROG_CXX])
+-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+- (test "X$CXX" != "Xg++"))) ; then
+- AC_PROG_CXXCPP
+-fi
+-])# _LT_AC_PROG_CXXCPP
+-
+-# AC_LIBTOOL_F77
+-# --------------
+-# enable support for Fortran 77 libraries
+-AC_DEFUN([AC_LIBTOOL_F77],
+-[AC_REQUIRE([_LT_AC_LANG_F77])
+-])# AC_LIBTOOL_F77
+-
+-
+-# _LT_AC_LANG_F77
+-# ---------------
+-AC_DEFUN([_LT_AC_LANG_F77],
+-[AC_REQUIRE([AC_PROG_F77])
+-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+-])# _LT_AC_LANG_F77
+-
+-
+-# AC_LIBTOOL_GCJ
+-# --------------
+-# enable support for GCJ libraries
+-AC_DEFUN([AC_LIBTOOL_GCJ],
+-[AC_REQUIRE([_LT_AC_LANG_GCJ])
+-])# AC_LIBTOOL_GCJ
+-
+-
+-# _LT_AC_LANG_GCJ
+-# ---------------
+-AC_DEFUN([_LT_AC_LANG_GCJ],
+-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+-])# _LT_AC_LANG_GCJ
+-
+-
+-# AC_LIBTOOL_RC
+-# -------------
+-# enable support for Windows resource files
+-AC_DEFUN([AC_LIBTOOL_RC],
+-[AC_REQUIRE([LT_AC_PROG_RC])
+-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+-])# AC_LIBTOOL_RC
+-
+-
+-# AC_LIBTOOL_LANG_C_CONFIG
+-# ------------------------
+-# Ensure that the configuration vars for the C compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+-[lt_save_CC="$CC"
+-AC_LANG_PUSH(C)
+-
+-# Source file extension for C test sources.
+-ac_ext=c
+-
+-# Object file extension for compiled C test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
+-
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;"
+-
+-# Code to be used in simple link tests
+-lt_simple_link_test_code='int main(){return(0);}'
+-
+-_LT_AC_SYS_COMPILER
+-
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
++# These are sane defaults that work on at least a few old systems.
++# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+-## CAVEAT EMPTOR:
+-## There is no encapsulation within the following macros, do not change
+-## the running order or otherwise move them around unless you know exactly
+-## what you are doing...
+-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+-AC_LIBTOOL_PROG_COMPILER_PIC($1)
+-AC_LIBTOOL_PROG_CC_C_O($1)
+-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+-AC_LIBTOOL_PROG_LD_SHLIBS($1)
+-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+-AC_LIBTOOL_SYS_LIB_STRIP
+-AC_LIBTOOL_DLOPEN_SELF
+-
+-# Report which library types will actually be built
+-AC_MSG_CHECKING([if libtool supports shared libraries])
+-AC_MSG_RESULT([$can_build_shared])
++# Character class describing NM global symbol codes.
++symcode='[[BCDEGRST]]'
+
+-AC_MSG_CHECKING([whether to build shared libraries])
+-test "$can_build_shared" = "no" && enable_shared=no
++# Regexp to match symbols that can be accessed directly from C.
++sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+-# On AIX, shared libraries and static libraries use the same namespace, and
+-# are all built from PIC.
++# Define system-specific variables.
+ case $host_os in
+-aix3*)
+- test "$enable_shared" = yes && enable_static=no
+- if test -n "$RANLIB"; then
+- archive_cmds="$archive_cmds~\$RANLIB \$lib"
+- postinstall_cmds='$RANLIB $lib'
+- fi
++aix*)
++ symcode='[[BCDT]]'
+ ;;
+-
+-aix4* | aix5*)
+- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+- test "$enable_shared" = yes && enable_static=no
++cygwin* | mingw* | pw32*)
++ symcode='[[ABCDGISTW]]'
++ ;;
++hpux*)
++ if test "$host_cpu" = ia64; then
++ symcode='[[ABCDEGRST]]'
+ fi
+- ;;
++ ;;
++irix* | nonstopux*)
++ symcode='[[BCDEGRST]]'
++ ;;
++osf*)
++ symcode='[[BCDEGQRST]]'
++ ;;
++solaris*)
++ symcode='[[BDRT]]'
++ ;;
++sco3.2v5*)
++ symcode='[[DT]]'
++ ;;
++sysv4.2uw2*)
++ symcode='[[DT]]'
++ ;;
++sysv5* | sco5v6* | unixware* | OpenUNIX*)
++ symcode='[[ABDT]]'
++ ;;
++sysv4)
++ symcode='[[DFNSTU]]'
++ ;;
+ esac
+-AC_MSG_RESULT([$enable_shared])
+-
+-AC_MSG_CHECKING([whether to build static libraries])
+-# Make sure either enable_shared or enable_static is yes.
+-test "$enable_shared" = yes || enable_static=yes
+-AC_MSG_RESULT([$enable_static])
+-
+-AC_LIBTOOL_CONFIG($1)
+-
+-AC_LANG_POP
+-CC="$lt_save_CC"
+-])# AC_LIBTOOL_LANG_C_CONFIG
+-
+
+-# AC_LIBTOOL_LANG_CXX_CONFIG
+-# --------------------------
+-# Ensure that the configuration vars for the C compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+-[AC_LANG_PUSH(C++)
+-AC_REQUIRE([AC_PROG_CXX])
+-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+-
+-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+-_LT_AC_TAGVAR(always_export_symbols, $1)=no
+-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+-_LT_AC_TAGVAR(hardcode_direct, $1)=no
+-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+-_LT_AC_TAGVAR(module_cmds, $1)=
+-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+-_LT_AC_TAGVAR(no_undefined_flag, $1)=
+-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
++# If we're using GNU nm, then use its standard symbol codes.
++case `$NM -V 2>&1` in
++*GNU* | *'with BFD'*)
++ symcode='[[ABCDGIRSTW]]' ;;
++esac
+
+-# Dependencies to place before and after the object being linked:
+-_LT_AC_TAGVAR(predep_objects, $1)=
+-_LT_AC_TAGVAR(postdep_objects, $1)=
+-_LT_AC_TAGVAR(predeps, $1)=
+-_LT_AC_TAGVAR(postdeps, $1)=
+-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
++# Transform an extracted symbol line into a proper C declaration.
++# Some systems (esp. on ia64) link data and code symbols differently,
++# so use this general approach.
++lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+-# Source file extension for C++ test sources.
+-ac_ext=cpp
++# Transform an extracted symbol line into symbol name and symbol address
++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+-# Object file extension for compiled C++ test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
++# Handle CRLF in mingw tool chain
++opt_cr=
++case $build_os in
++mingw*)
++ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
++ ;;
++esac
+
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;"
++# Try without a prefix underscore, then with it.
++for ac_symprfx in "" "_"; do
+
+-# Code to be used in simple link tests
+-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
++ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
++ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+-_LT_AC_SYS_COMPILER
++ # Write the raw and C identifiers.
++ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
++ # Fake it for dumpbin and say T for any non-static function
++ # and D for any global variable.
++ # Also find C++ and __fastcall symbols from MSVC++,
++ # which start with @ or ?.
++ lt_cv_sys_global_symbol_pipe="$AWK ['"\
++" {last_section=section; section=\$ 3};"\
++" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
++" \$ 0!~/External *\|/{next};"\
++" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
++" {if(hide[section]) next};"\
++" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
++" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
++" s[1]~/^[@?]/{print s[1], s[1]; next};"\
++" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
++" ' prfx=^$ac_symprfx]"
++ else
++ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
++ fi
+
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
++ # Check to see that the pipe works correctly.
++ pipe_works=no
+
+-# Allow CC to be a program name with arguments.
+-lt_save_CC=$CC
+-lt_save_LD=$LD
+-lt_save_GCC=$GCC
+-GCC=$GXX
+-lt_save_with_gnu_ld=$with_gnu_ld
+-lt_save_path_LD=$lt_cv_path_LD
+-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+-else
+- $as_unset lt_cv_prog_gnu_ld
+-fi
+-if test -n "${lt_cv_path_LDCXX+set}"; then
+- lt_cv_path_LD=$lt_cv_path_LDCXX
+-else
+- $as_unset lt_cv_path_LD
+-fi
+-test -z "${LDCXX+set}" || LD=$LDCXX
+-CC=${CXX-"c++"}
+-compiler=$CC
+-_LT_AC_TAGVAR(compiler, $1)=$CC
+-_LT_CC_BASENAME([$compiler])
++ rm -f conftest*
++ cat > conftest.$ac_ext <<_LT_EOF
++#ifdef __cplusplus
++extern "C" {
++#endif
++char nm_test_var;
++void nm_test_func(void);
++void nm_test_func(void){}
++#ifdef __cplusplus
++}
++#endif
++int main(){nm_test_var='a';nm_test_func();return(0);}
++_LT_EOF
+
+-# We don't want -fno-exception wen compiling C++ code, so set the
+-# no_builtin_flag separately
+-if test "$GXX" = yes; then
+- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+-else
+- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+-fi
++ if AC_TRY_EVAL(ac_compile); then
++ # Now try to grab the symbols.
++ nlist=conftest.nm
++ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
++ # Try sorting and uniquifying the output.
++ if sort "$nlist" | uniq > "$nlist"T; then
++ mv -f "$nlist"T "$nlist"
++ else
++ rm -f "$nlist"T
++ fi
+
+-if test "$GXX" = yes; then
+- # Set up default GNU C++ configuration
++ # Make sure that we snagged all the symbols we need.
++ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
++ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
++ cat <<_LT_EOF > conftest.$ac_ext
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+- AC_PROG_LD
++_LT_EOF
++ # Now generate the symbol file.
++ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+- # Check if GNU C++ uses GNU ld as the underlying linker, since the
+- # archiving commands below assume that GNU ld is being used.
+- if test "$with_gnu_ld" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ cat <<_LT_EOF >> conftest.$ac_ext
+
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++/* The mapping between symbol names and symbols. */
++const struct {
++ const char *name;
++ void *address;
++}
++lt__PROGRAM__LTX_preloaded_symbols[[]] =
++{
++ { "@PROGRAM@", (void *) 0 },
++_LT_EOF
++ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
++ cat <<\_LT_EOF >> conftest.$ac_ext
++ {0, (void *) 0}
++};
+
+- # If archive_cmds runs LD, not CC, wlarc should be empty
+- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+- # investigate it a little bit more. (MM)
+- wlarc='${wl}'
++/* This works around a problem in FreeBSD linker */
++#ifdef FREEBSD_WORKAROUND
++static const void *lt_preloaded_setup() {
++ return lt__PROGRAM__LTX_preloaded_symbols;
++}
++#endif
+
+- # ancient GNU ld didn't support --whole-archive et. al.
+- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+- grep 'no-whole-archive' > /dev/null; then
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++#ifdef __cplusplus
++}
++#endif
++_LT_EOF
++ # Now try linking the two files.
++ mv conftest.$ac_objext conftstm.$ac_objext
++ lt_save_LIBS="$LIBS"
++ lt_save_CFLAGS="$CFLAGS"
++ LIBS="conftstm.$ac_objext"
++ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
++ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
++ pipe_works=yes
++ fi
++ LIBS="$lt_save_LIBS"
++ CFLAGS="$lt_save_CFLAGS"
++ else
++ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
++ fi
++ else
++ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
++ fi
+ else
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
++ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+- with_gnu_ld=no
+- wlarc=
+-
+- # A generic and very simple default shared library creation
+- # command for GNU C++ for the case where it uses the native
+- # linker, instead of GNU ld. If possible, this setting should
+- # overridden to take advantage of the native linker features on
+- # the platform it is being used on.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
++ cat conftest.$ac_ext >&5
+ fi
++ rm -rf conftest* conftst*
+
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+-
++ # Do not use the global_symbol_pipe unless it works.
++ if test "$pipe_works" = yes; then
++ break
++ else
++ lt_cv_sys_global_symbol_pipe=
++ fi
++done
++])
++if test -z "$lt_cv_sys_global_symbol_pipe"; then
++ lt_cv_sys_global_symbol_to_cdecl=
++fi
++if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
++ AC_MSG_RESULT(failed)
+ else
+- GXX=no
+- with_gnu_ld=no
+- wlarc=
++ AC_MSG_RESULT(ok)
+ fi
+
+-# PORTME: fill in a description of your system's C++ link characteristics
+-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+-case $host_os in
+- aix3*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- aix4* | aix5*)
+- if test "$host_cpu" = ia64; then
+- # On IA64, the linker does run time linking by default, so we don't
+- # have to do anything special.
+- aix_use_runtimelinking=no
+- exp_sym_flag='-Bexport'
+- no_entry_flag=""
+- else
+- aix_use_runtimelinking=no
++_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
++ [Take the output of nm and produce a listing of raw symbols and C names])
++_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
++ [Transform the output of nm in a proper C declaration])
++_LT_DECL([global_symbol_to_c_name_address],
++ [lt_cv_sys_global_symbol_to_c_name_address], [1],
++ [Transform the output of nm in a C name address pair])
++_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
++ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
++ [Transform the output of nm in a C name address pair when lib prefix is needed])
++]) # _LT_CMD_GLOBAL_SYMBOLS
+
+- # Test if we are trying to use run time linking or normal
+- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+- # need to do runtime linking.
+- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+- for ld_flag in $LDFLAGS; do
+- case $ld_flag in
+- *-brtl*)
+- aix_use_runtimelinking=yes
+- break
+- ;;
+- esac
+- done
+- ;;
+- esac
+
+- exp_sym_flag='-bexport'
+- no_entry_flag='-bnoentry'
+- fi
++# _LT_COMPILER_PIC([TAGNAME])
++# ---------------------------
++m4_defun([_LT_COMPILER_PIC],
++[m4_require([_LT_TAG_COMPILER])dnl
++_LT_TAGVAR(lt_prog_compiler_wl, $1)=
++_LT_TAGVAR(lt_prog_compiler_pic, $1)=
++_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+- # When large executables or shared objects are built, AIX ld can
+- # have problems creating the table of contents. If linking a library
+- # or program results in "error TOC overflow" add -mminimal-toc to
+- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+-
+- _LT_AC_TAGVAR(archive_cmds, $1)=''
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
++AC_MSG_CHECKING([for $compiler option to produce PIC])
++m4_if([$1], [CXX], [
++ # C++ specific cases for pic, static, wl, etc.
++ if test "$GXX" = yes; then
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+- if test "$GXX" = yes; then
+- case $host_os in aix4.[[012]]|aix4.[[012]].*)
+- # We only want to do this on AIX 4.2 and lower, the check
+- # below for broken collect2 doesn't work under 4.3+
+- collect2name=`${CC} -print-prog-name=collect2`
+- if test -f "$collect2name" && \
+- strings "$collect2name" | grep resolve_lib_name >/dev/null
+- then
+- # We have reworked collect2
+- :
+- else
+- # We have old collect2
+- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+- # It fails to find uninstalled libraries when the uninstalled
+- # path is not listed in the libpath. Setting hardcode_minus_L
+- # to unsupported forces relinking
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+- fi
+- ;;
+- esac
+- shared_flag='-shared'
+- if test "$aix_use_runtimelinking" = yes; then
+- shared_flag="$shared_flag "'${wl}-G'
+- fi
+- else
+- # not using gcc
++ case $host_os in
++ aix*)
++ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+- # chokes on -Wl,-G. The following line is correct:
+- shared_flag='-G'
+- else
+- if test "$aix_use_runtimelinking" = yes; then
+- shared_flag='${wl}-G'
+- else
+- shared_flag='${wl}-bM:SRE'
+- fi
++ # AIX 5 now supports IA64 processor
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+- fi
+-
+- # It seems that -bexpall does not export symbols beginning with
+- # underscore (_), so it is better to generate a list of symbols to export.
+- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+- if test "$aix_use_runtimelinking" = yes; then
+- # Warning - without using the other runtime loading flags (-brtl),
+- # -berok will link without error, but may produce a broken library.
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+- # Determine the default libpath from the value encoded in an empty executable.
+- _LT_AC_SYS_LIBPATH_AIX
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++ ;;
+
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+- else
+- if test "$host_cpu" = ia64; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+- else
+- # Determine the default libpath from the value encoded in an empty executable.
+- _LT_AC_SYS_LIBPATH_AIX
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+- # Warning - without using the other run time loading flags,
+- # -berok will link without error, but may produce a broken library.
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+- # Exported symbols can be pulled into shared objects from archives
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+- # This is similar to how AIX traditionally builds its shared libraries.
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+- fi
+- fi
+- ;;
+-
+- beos*)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+- # support --undefined. This deserves some investigation. FIXME
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+-
+- chorus*)
+- case $cc_basename in
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- ;;
+-
+- cygwin* | mingw* | pw32*)
+- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+- # as there is no search path for DLLs.
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- _LT_AC_TAGVAR(always_export_symbols, $1)=no
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+-
+- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+- # If the export-symbols file already is a .def file (1st line
+- # is EXPORTS), use it as is; otherwise, prepend...
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+- cp $export_symbols $output_objdir/$soname.def;
+- else
+- echo EXPORTS > $output_objdir/$soname.def;
+- cat $export_symbols >> $output_objdir/$soname.def;
+- fi~
+- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- darwin* | rhapsody*)
+- case $host_os in
+- rhapsody* | darwin1.[[012]])
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+- ;;
+- *) # Darwin 1.3 on
+- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+- else
+- case ${MACOSX_DEPLOYMENT_TARGET} in
+- 10.[[012]])
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+- ;;
+- 10.*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+- ;;
+- esac
+- fi
+- ;;
+- esac
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+-
+- if test "$GXX" = yes ; then
+- lt_int_apple_cc_single_mod=no
+- output_verbose_link_cmd='echo'
+- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+- lt_int_apple_cc_single_mod=yes
+- fi
+- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+- fi
+- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- else
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- fi
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- else
+- case $cc_basename in
+- xlc*)
+- output_verbose_link_cmd='echo'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- ;;
+- *)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- fi
++ amigaos*)
++ case $host_cpu in
++ powerpc)
++ # see comment about AmigaOS4 .so support
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ m68k)
++ # FIXME: we need at least 68020 code to build shared libraries, but
++ # adding the `-m68020' flag to GCC prevents building anything better,
++ # like `-m68040'.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
++ esac
++ ;;
+
+- dgux*)
+- case $cc_basename in
+- ec++*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- ghcx*)
+- # Green Hills C++ Compiler
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- ;;
+- freebsd[[12]]*)
+- # C++ shared libraries reported to be fairly broken before switch to ELF
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- freebsd-elf*)
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- ;;
+- freebsd* | dragonfly*)
+- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+- # conventions
+- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+- ;;
+- gnu*)
+- ;;
+- hpux9*)
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+- # but as the default
+- # location of the library.
+-
+- case $cc_basename in
+- CC*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ # PIC is the default for these OSes.
+ ;;
+- aCC*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
++ mingw* | cygwin* | os2* | pw32*)
++ # This hack is so that the source file can tell whether it is being
++ # built for inclusion in a dll (and should export symbols for example).
++ # Although the cygwin gcc ignores -fPIC, still need this for old-style
++ # (--disable-auto-import) libraries
++ m4_if([$1], [GCJ], [],
++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+- *)
+- if test "$GXX" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+- else
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ darwin* | rhapsody*)
++ # PIC is the default on this platform
++ # Common symbols not allowed in MH_DYLIB files
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
++ ;;
++ *djgpp*)
++ # DJGPP does not support shared libraries at all
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
++ ;;
++ interix[[3-9]]*)
++ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
++ # Instead, we relocate shared libraries at runtime.
++ ;;
++ sysv4*MP*)
++ if test -d /usr/nec; then
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+- esac
+- ;;
+- hpux10*|hpux11*)
+- if test $with_gnu_ld = no; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
++ hpux*)
++ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
++ # not for PA HP-UX.
+ case $host_cpu in
+- hppa*64*|ia64*) ;;
++ hppa*64*|ia64*)
++ ;;
+ *)
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- ;;
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
+ esac
+- fi
+- case $host_cpu in
+- hppa*64*|ia64*)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
++ *qnx* | *nto*)
++ # QNX uses GNU C++, but need to define -shared option too, otherwise
++ # it will coredump.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+- # but as the default
+- # location of the library.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+-
+- case $cc_basename in
+- CC*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ else
++ case $host_os in
++ aix[[4-9]]*)
++ # All AIX code is PIC.
++ if test "$host_cpu" = ia64; then
++ # AIX 5 now supports IA64 processor
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ else
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
++ fi
+ ;;
+- aCC*)
+- case $host_cpu in
+- hppa*64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- ;;
+- ia64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ chorus*)
++ case $cc_basename in
++ cxch68*)
++ # Green Hills C++ Compiler
++ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+- *)
+- if test "$GXX" = yes; then
+- if test $with_gnu_ld = no; then
++ dgux*)
++ case $cc_basename in
++ ec++*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ ;;
++ ghcx*)
++ # Green Hills C++ Compiler
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ ;;
++ *)
++ ;;
++ esac
++ ;;
++ freebsd* | dragonfly*)
++ # FreeBSD uses GNU C++
++ ;;
++ hpux9* | hpux10* | hpux11*)
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
++ if test "$host_cpu" != ia64; then
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
++ fi
++ ;;
++ aCC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+- hppa*64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- ;;
+- ia64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ hppa*64*|ia64*)
++ # +Z the default
+ ;;
+ *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+- fi
+- else
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- esac
+- ;;
+- interix[[3-9]]*)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+- # Instead, shared libraries are loaded at an image base (0x10000000 by
+- # default) and relocated if they conflict, which is a slow very memory
+- # consuming and fragmenting process. To avoid this, we pick a random,
+- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+- ;;
+- irix5* | irix6*)
+- case $cc_basename in
+- CC*)
+- # SGI C++
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+-
+- # Archives containing C++ object files must be created using
+- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+- # necessary to make sure instantiated templates are included
+- # in the archive.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
++ ;;
++ *)
++ ;;
++ esac
+ ;;
+- *)
+- if test "$GXX" = yes; then
+- if test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+- fi
+- fi
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
++ interix*)
++ # This is c89, which is MS Visual C++ (no shared libs)
++ # Anyone wants to do a port?
+ ;;
+- esac
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- ;;
+- linux* | k*bsd*-gnu)
+- case $cc_basename in
+- KCC*)
+- # Kuck and Associates, Inc. (KAI) C++ Compiler
+-
+- # KCC will only create a shared library if the output file
+- # ends with ".so" (or ".sl" for HP-UX), so rename the library
+- # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+-
+- # Archives containing C++ object files must be created using
+- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+- ;;
+- icpc*)
+- # Intel C++
+- with_gnu_ld=yes
+- # version 8.0 and above of icpc choke on multiply defined symbols
+- # if we add $predep_objects and $postdep_objects, however 7.1 and
+- # earlier do not add the objects themselves.
+- case `$CC -V 2>&1` in
+- *"Version 7."*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- ;;
+- *) # Version 8.0 or newer
+- tmp_idyn=
+- case $host_cpu in
+- ia64*) tmp_idyn=' -i_dynamic';;
+- esac
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- ;;
++ irix5* | irix6* | nonstopux*)
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ # CC pic flag -KPIC is the default.
++ ;;
++ *)
++ ;;
+ esac
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+- ;;
+- pgCC*)
+- # Portland Group C++ compiler
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+- ;;
+- cxx*)
+- # Compaq C++
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+-
+- runpath_var=LD_RUN_PATH
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+- *)
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*)
+- # Sun C++ 5.9
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+-
+- # Not sure whether something based on
+- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+- # would be better.
+- output_verbose_link_cmd='echo'
+-
+- # Archives containing C++ object files must be created using
+- # "CC -xar", where "CC" is the Sun C++ compiler. This is
+- # necessary to make sure instantiated templates are included
+- # in the archive.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+- ;;
++ linux* | k*bsd*-gnu)
++ case $cc_basename in
++ KCC*)
++ # KAI C++ Compiler
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ icpc* | ecpc* )
++ # Intel C++
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
++ ;;
++ pgCC* | pgcpp*)
++ # Portland Group C++ compiler
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
++ cxx*)
++ # Compaq C++
++ # Make sure the PIC flag is empty. It appears that all Alpha
++ # Linux and Compaq Tru64 Unix objects are PIC.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
++ xlc* | xlC*)
++ # IBM XL 8.0 on PPC
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
++ ;;
++ *)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ # Sun C++ 5.9
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++ ;;
++ esac
++ ;;
+ esac
+ ;;
+- esac
+- ;;
+- lynxos*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- m88k*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- mvs*)
+- case $cc_basename in
+- cxx*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- ;;
+- netbsd*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+- wlarc=
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- fi
+- # Workaround some broken pre-1.5 toolchains
+- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+- ;;
+- openbsd2*)
+- # C++ shared libraries are fairly broken
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- openbsd*)
+- if test -f /usr/libexec/ld.so; then
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+- fi
+- output_verbose_link_cmd='echo'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- osf3*)
+- case $cc_basename in
+- KCC*)
+- # Kuck and Associates, Inc. (KAI) C++ Compiler
+-
+- # KCC will only create a shared library if the output file
+- # ends with ".so" (or ".sl" for HP-UX), so rename the library
+- # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Archives containing C++ object files must be created using
+- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+-
+- ;;
+- RCC*)
+- # Rational C++ 2.4.1
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- cxx*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
++ lynxos*)
+ ;;
+- *)
+- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+-
+- else
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
++ m88k*)
+ ;;
+- esac
+- ;;
+- osf4* | osf5*)
+- case $cc_basename in
+- KCC*)
+- # Kuck and Associates, Inc. (KAI) C++ Compiler
+-
+- # KCC will only create a shared library if the output file
+- # ends with ".so" (or ".sl" for HP-UX), so rename the library
+- # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Archives containing C++ object files must be created using
+- # the KAI C++ compiler.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+- ;;
+- RCC*)
+- # Rational C++ 2.4.1
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- cxx*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+- echo "-hidden">> $lib.exp~
+- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+- $rm $lib.exp'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
++ mvs*)
++ case $cc_basename in
++ cxx*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
++ ;;
++ *)
++ ;;
++ esac
+ ;;
+- *)
+- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+-
+- else
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
++ netbsd*)
+ ;;
+- esac
+- ;;
+- psos*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- sunos4*)
+- case $cc_basename in
+- CC*)
+- # Sun C++ 4.x
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- lcc*)
+- # Lucid
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ *qnx* | *nto*)
++ # QNX uses GNU C++, but need to define -shared option too, otherwise
++ # it will coredump.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
++ ;;
++ osf3* | osf4* | osf5*)
++ case $cc_basename in
++ KCC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
++ ;;
++ RCC*)
++ # Rational C++ 2.4.1
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ ;;
++ cxx*)
++ # Digital/Compaq C++
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # Make sure the PIC flag is empty. It appears that all Alpha
++ # Linux and Compaq Tru64 Unix objects are PIC.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
++ *)
++ ;;
++ esac
+ ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ psos*)
+ ;;
+- esac
+- ;;
+- solaris*)
+- case $cc_basename in
+- CC*)
+- # Sun C++ 4.2, 5.x and Centerline C++
+- _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- case $host_os in
+- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ solaris*)
++ case $cc_basename in
++ CC*)
++ # Sun C++ 4.2, 5.x and Centerline C++
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++ ;;
++ gcx*)
++ # Green Hills C++ Compiler
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
++ ;;
+ *)
+- # The compiler driver will combine and reorder linker options,
+- # but understands `-z linker_flag'.
+- # Supported since Solaris 2.6 (maybe 2.5.1?)
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+-
+- output_verbose_link_cmd='echo'
+-
+- # Archives containing C++ object files must be created using
+- # "CC -xar", where "CC" is the Sun C++ compiler. This is
+- # necessary to make sure instantiated templates are included
+- # in the archive.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+- ;;
+- gcx*)
+- # Green Hills C++ Compiler
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+-
+- # The C++ compiler must be used to create the archive.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+- *)
+- # GNU C++ compiler with Solaris linker
+- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+- if $CC --version | grep -v '^2\.7' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+- else
+- # g++ 2.7 appears to require `-G' NOT `-shared' on this
+- # platform.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+- fi
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+- case $host_os in
+- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ sunos4*)
++ case $cc_basename in
++ CC*)
++ # Sun C++ 4.x
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
++ lcc*)
++ # Lucid
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ ;;
+ *)
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+- esac
+- fi
+- ;;
+- esac
+- ;;
+- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- runpath_var='LD_RUN_PATH'
+-
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- esac
+- ;;
+- sysv5* | sco3.2v5* | sco5v6*)
+- # Note: We can NOT use -z defs as we might desire, because we do not
+- # link with -lc, and that would cause any symbols used from libc to
+- # always be unresolved, which means just about no library would
+- # ever link correctly. If we're not using GNU ld we use -z text
+- # though, which does catch some bad symbols but isn't as heavy-handed
+- # as -z defs.
+- # For security reasons, it is highly recommended that you always
+- # use absolute paths for naming shared libraries, and exclude the
+- # DT_RUNPATH tag from executables and libraries. But doing so
+- # requires that you compile everything twice, which is a pain.
+- # So that behaviour is only enabled if SCOABSPATH is set to a
+- # non-empty value in the environment. Most likely only useful for
+- # creating official distributions of packages.
+- # This is a hack until libtool officially supports absolute path
+- # names for shared libraries.
+- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+- runpath_var='LD_RUN_PATH'
+-
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ esac
+ ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
++ esac
+ ;;
+- esac
+- ;;
+- tandem*)
+- case $cc_basename in
+- NCC*)
+- # NonStop-UX NCC 3.20
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ tandem*)
++ case $cc_basename in
++ NCC*)
++ # NonStop-UX NCC 3.20
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ ;;
++ *)
++ ;;
++ esac
+ ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ vxworks*)
+ ;;
+- esac
+- ;;
+- vxworks*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+-esac
+-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+-
+-_LT_AC_TAGVAR(GCC, $1)="$GXX"
+-_LT_AC_TAGVAR(LD, $1)="$LD"
+-
+-## CAVEAT EMPTOR:
+-## There is no encapsulation within the following macros, do not change
+-## the running order or otherwise move them around unless you know exactly
+-## what you are doing...
+-AC_LIBTOOL_POSTDEP_PREDEP($1)
+-AC_LIBTOOL_PROG_COMPILER_PIC($1)
+-AC_LIBTOOL_PROG_CC_C_O($1)
+-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+-AC_LIBTOOL_PROG_LD_SHLIBS($1)
+-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+-
+-AC_LIBTOOL_CONFIG($1)
+-
+-AC_LANG_POP
+-CC=$lt_save_CC
+-LDCXX=$LD
+-LD=$lt_save_LD
+-GCC=$lt_save_GCC
+-with_gnu_ldcxx=$with_gnu_ld
+-with_gnu_ld=$lt_save_with_gnu_ld
+-lt_cv_path_LDCXX=$lt_cv_path_LD
+-lt_cv_path_LD=$lt_save_path_LD
+-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+-])# AC_LIBTOOL_LANG_CXX_CONFIG
+-
+-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+-# ------------------------------------
+-# Figure out "hidden" library dependencies from verbose
+-# compiler output when linking a shared library.
+-# Parse the compiler output and extract the necessary
+-# objects, libraries and library flags.
+-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+-dnl we can't use the lt_simple_compile_test_code here,
+-dnl because it contains code intended for an executable,
+-dnl not a library. It's possible we should let each
+-dnl tag define a new lt_????_link_test_code variable,
+-dnl but it's only used here...
+-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+-int a;
+-void foo (void) { a = 0; }
+-EOF
+-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+-class Foo
+-{
+-public:
+- Foo (void) { a = 0; }
+-private:
+- int a;
+-};
+-EOF
+-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+- subroutine foo
+- implicit none
+- integer*4 a
+- a=0
+- return
+- end
+-EOF
+-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+-public class foo {
+- private int a;
+- public void bar (void) {
+- a = 0;
+- }
+-};
+-EOF
+-])
+-dnl Parse the compiler output and extract the necessary
+-dnl objects, libraries and library flags.
+-if AC_TRY_EVAL(ac_compile); then
+- # Parse the compiler output and extract the necessary
+- # objects, libraries and library flags.
+-
+- # Sentinel used to keep track of whether or not we are before
+- # the conftest object file.
+- pre_test_object_deps_done=no
+-
+- # The `*' in the case matches for architectures that use `case' in
+- # $output_verbose_cmd can trigger glob expansion during the loop
+- # eval without this substitution.
+- output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+-
+- for p in `eval $output_verbose_link_cmd`; do
+- case $p in
+-
+- -L* | -R* | -l*)
+- # Some compilers place space between "-{L,R}" and the path.
+- # Remove the space.
+- if test $p = "-L" \
+- || test $p = "-R"; then
+- prev=$p
+- continue
+- else
+- prev=
+- fi
+-
+- if test "$pre_test_object_deps_done" = no; then
+- case $p in
+- -L* | -R*)
+- # Internal compiler library paths should come after those
+- # provided the user. The postdeps already come after the
+- # user supplied libs so there is no need to process them.
+- if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+- else
+- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+- fi
+- ;;
+- # The "-l" case would never come before the object being
+- # linked, so don't bother handling this case.
+- esac
+- else
+- if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+- _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+- else
+- _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+- fi
+- fi
+- ;;
+-
+- *.$objext)
+- # This assumes that the test object file only shows up
+- # once in the compiler output.
+- if test "$p" = "conftest.$objext"; then
+- pre_test_object_deps_done=yes
+- continue
+- fi
+-
+- if test "$pre_test_object_deps_done" = no; then
+- if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+- _LT_AC_TAGVAR(predep_objects, $1)="$p"
+- else
+- _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+- fi
+- else
+- if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+- _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+- else
+- _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+- fi
+- fi
+- ;;
+-
+- *) ;; # Ignore the rest.
+-
+- esac
+- done
+-
+- # Clean up.
+- rm -f a.out a.exe
+-else
+- echo "libtool.m4: error: problem compiling $1 test program"
+-fi
+-
+-$rm -f confest.$objext
+-
+-# PORTME: override above test on systems where it is broken
+-ifelse([$1],[CXX],
+-[case $host_os in
+-interix[[3-9]]*)
+- # Interix 3.5 installs completely hosed .la files for C++, so rather than
+- # hack all around it, let's just trust "g++" to DTRT.
+- _LT_AC_TAGVAR(predep_objects,$1)=
+- _LT_AC_TAGVAR(postdep_objects,$1)=
+- _LT_AC_TAGVAR(postdeps,$1)=
+- ;;
+-
+-linux*)
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*)
+- # Sun C++ 5.9
+- #
+- # The more standards-conforming stlport4 library is
+- # incompatible with the Cstd library. Avoid specifying
+- # it if it's in CXXFLAGS. Ignore libCrun as
+- # -library=stlport4 depends on it.
+- case " $CXX $CXXFLAGS " in
+- *" -library=stlport4 "*)
+- solaris_use_stlport4=yes
+- ;;
+- esac
+- if test "$solaris_use_stlport4" != yes; then
+- _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+- fi
+- ;;
+- esac
+- ;;
+-
+-solaris*)
+- case $cc_basename in
+- CC*)
+- # The more standards-conforming stlport4 library is
+- # incompatible with the Cstd library. Avoid specifying
+- # it if it's in CXXFLAGS. Ignore libCrun as
+- # -library=stlport4 depends on it.
+- case " $CXX $CXXFLAGS " in
+- *" -library=stlport4 "*)
+- solaris_use_stlport4=yes
+- ;;
+- esac
+-
+- # Adding this requires a known-good setup of shared libraries for
+- # Sun compiler versions before 5.6, else PIC objects from an old
+- # archive will be linked into the output, leading to subtle bugs.
+- if test "$solaris_use_stlport4" != yes; then
+- _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+- fi
+- ;;
+- esac
+- ;;
+-esac
+-])
+-
+-case " $_LT_AC_TAGVAR(postdeps, $1) " in
+-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+-esac
+-])# AC_LIBTOOL_POSTDEP_PREDEP
+-
+-# AC_LIBTOOL_LANG_F77_CONFIG
+-# --------------------------
+-# Ensure that the configuration vars for the C compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+-[AC_REQUIRE([AC_PROG_F77])
+-AC_LANG_PUSH(Fortran 77)
+-
+-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+-_LT_AC_TAGVAR(always_export_symbols, $1)=no
+-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+-_LT_AC_TAGVAR(hardcode_direct, $1)=no
+-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+-_LT_AC_TAGVAR(module_cmds, $1)=
+-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+-_LT_AC_TAGVAR(no_undefined_flag, $1)=
+-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+-
+-# Source file extension for f77 test sources.
+-ac_ext=f
+-
+-# Object file extension for compiled f77 test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
+-
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code="\
+- subroutine t
+- return
+- end
+-"
+-
+-# Code to be used in simple link tests
+-lt_simple_link_test_code="\
+- program t
+- end
+-"
+-
+-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+-_LT_AC_SYS_COMPILER
+-
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
+-
+-# Allow CC to be a program name with arguments.
+-lt_save_CC="$CC"
+-CC=${F77-"f77"}
+-compiler=$CC
+-_LT_AC_TAGVAR(compiler, $1)=$CC
+-_LT_CC_BASENAME([$compiler])
+-
+-AC_MSG_CHECKING([if libtool supports shared libraries])
+-AC_MSG_RESULT([$can_build_shared])
+-
+-AC_MSG_CHECKING([whether to build shared libraries])
+-test "$can_build_shared" = "no" && enable_shared=no
+-
+-# On AIX, shared libraries and static libraries use the same namespace, and
+-# are all built from PIC.
+-case $host_os in
+-aix3*)
+- test "$enable_shared" = yes && enable_static=no
+- if test -n "$RANLIB"; then
+- archive_cmds="$archive_cmds~\$RANLIB \$lib"
+- postinstall_cmds='$RANLIB $lib'
+- fi
+- ;;
+-aix4* | aix5*)
+- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+- test "$enable_shared" = yes && enable_static=no
+- fi
+- ;;
+-esac
+-AC_MSG_RESULT([$enable_shared])
+-
+-AC_MSG_CHECKING([whether to build static libraries])
+-# Make sure either enable_shared or enable_static is yes.
+-test "$enable_shared" = yes || enable_static=yes
+-AC_MSG_RESULT([$enable_static])
+-
+-_LT_AC_TAGVAR(GCC, $1)="$G77"
+-_LT_AC_TAGVAR(LD, $1)="$LD"
+-
+-AC_LIBTOOL_PROG_COMPILER_PIC($1)
+-AC_LIBTOOL_PROG_CC_C_O($1)
+-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+-AC_LIBTOOL_PROG_LD_SHLIBS($1)
+-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+-
+-AC_LIBTOOL_CONFIG($1)
+-
+-AC_LANG_POP
+-CC="$lt_save_CC"
+-])# AC_LIBTOOL_LANG_F77_CONFIG
+-
++ *)
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
++ ;;
++ esac
++ fi
++],
++[
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+-# AC_LIBTOOL_LANG_GCJ_CONFIG
+-# --------------------------
+-# Ensure that the configuration vars for the C compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+-[AC_LANG_SAVE
++ case $host_os in
++ aix*)
++ # All AIX code is PIC.
++ if test "$host_cpu" = ia64; then
++ # AIX 5 now supports IA64 processor
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ fi
++ ;;
+
+-# Source file extension for Java test sources.
+-ac_ext=java
++ amigaos*)
++ case $host_cpu in
++ powerpc)
++ # see comment about AmigaOS4 .so support
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ m68k)
++ # FIXME: we need at least 68020 code to build shared libraries, but
++ # adding the `-m68020' flag to GCC prevents building anything better,
++ # like `-m68040'.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
++ ;;
++ esac
++ ;;
+
+-# Object file extension for compiled Java test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ # PIC is the default for these OSes.
++ ;;
+
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code="class foo {}"
++ mingw* | cygwin* | pw32* | os2*)
++ # This hack is so that the source file can tell whether it is being
++ # built for inclusion in a dll (and should export symbols for example).
++ # Although the cygwin gcc ignores -fPIC, still need this for old-style
++ # (--disable-auto-import) libraries
++ m4_if([$1], [GCJ], [],
++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
++ ;;
+
+-# Code to be used in simple link tests
+-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
++ darwin* | rhapsody*)
++ # PIC is the default on this platform
++ # Common symbols not allowed in MH_DYLIB files
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
++ ;;
+
+-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+-_LT_AC_SYS_COMPILER
++ hpux*)
++ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
++ # not for PA HP-UX.
++ case $host_cpu in
++ hppa*64*|ia64*)
++ # +Z the default
++ ;;
++ *)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ esac
++ ;;
+
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
++ interix[[3-9]]*)
++ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
++ # Instead, we relocate shared libraries at runtime.
++ ;;
+
+-# Allow CC to be a program name with arguments.
+-lt_save_CC="$CC"
+-CC=${GCJ-"gcj"}
+-compiler=$CC
+-_LT_AC_TAGVAR(compiler, $1)=$CC
+-_LT_CC_BASENAME([$compiler])
++ msdosdjgpp*)
++ # Just because we use GCC doesn't mean we suddenly get shared libraries
++ # on systems that don't support them.
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
++ enable_shared=no
++ ;;
+
+-# GCJ did not exist at the time GCC didn't implicitly link libc in.
+-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
++ *nto* | *qnx*)
++ # QNX uses GNU C++, but need to define -shared option too, otherwise
++ # it will coredump.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
++ ;;
+
+-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
++ sysv4*MP*)
++ if test -d /usr/nec; then
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
++ fi
++ ;;
+
+-## CAVEAT EMPTOR:
+-## There is no encapsulation within the following macros, do not change
+-## the running order or otherwise move them around unless you know exactly
+-## what you are doing...
+-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+-AC_LIBTOOL_PROG_COMPILER_PIC($1)
+-AC_LIBTOOL_PROG_CC_C_O($1)
+-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+-AC_LIBTOOL_PROG_LD_SHLIBS($1)
+-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
++ *)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ esac
++ else
++ # PORTME Check for flag to pass linker flags through the system compiler.
++ case $host_os in
++ aix*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ if test "$host_cpu" = ia64; then
++ # AIX 5 now supports IA64 processor
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ else
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
++ fi
++ ;;
+
+-AC_LIBTOOL_CONFIG($1)
++ mingw* | cygwin* | pw32* | os2*)
++ # This hack is so that the source file can tell whether it is being
++ # built for inclusion in a dll (and should export symbols for example).
++ m4_if([$1], [GCJ], [],
++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
++ ;;
+
+-AC_LANG_RESTORE
+-CC="$lt_save_CC"
+-])# AC_LIBTOOL_LANG_GCJ_CONFIG
++ hpux9* | hpux10* | hpux11*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
++ # not for PA HP-UX.
++ case $host_cpu in
++ hppa*64*|ia64*)
++ # +Z the default
++ ;;
++ *)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
++ ;;
++ esac
++ # Is there a better lt_prog_compiler_static that works with the bundled CC?
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
++ ;;
+
++ irix5* | irix6* | nonstopux*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # PIC (with -KPIC) is the default.
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
+
+-# AC_LIBTOOL_LANG_RC_CONFIG
+-# -------------------------
+-# Ensure that the configuration vars for the Windows resource compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+-[AC_LANG_SAVE
++ linux* | k*bsd*-gnu)
++ case $cc_basename in
++ icc* | ecc* | ifort*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
++ ;;
++ pgcc* | pgf77* | pgf90* | pgf95*)
++ # Portland Group compilers (*not* the Pentium gcc compiler,
++ # which looks to be a dead project)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
++ ccc*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # All Alpha code is PIC.
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
++ xl*)
++ # IBM XL C 8.0/Fortran 10.1 on PPC
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
++ ;;
++ *)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ # Sun C 5.9
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ ;;
++ *Sun\ F*)
++ # Sun Fortran 8.3 passes all unrecognized flags to the linker
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
++ ;;
++ esac
++ ;;
++ esac
++ ;;
+
+-# Source file extension for RC test sources.
+-ac_ext=rc
++ newsos6)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
+
+-# Object file extension for compiled RC test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
++ *nto* | *qnx*)
++ # QNX uses GNU C++, but need to define -shared option too, otherwise
++ # it will coredump.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
++ ;;
+
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
++ osf3* | osf4* | osf5*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # All OSF/1 code is PIC.
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
+
+-# Code to be used in simple link tests
+-lt_simple_link_test_code="$lt_simple_compile_test_code"
++ rdos*)
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
+
+-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+-_LT_AC_SYS_COMPILER
++ solaris*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ case $cc_basename in
++ f77* | f90* | f95*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
++ *)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
++ esac
++ ;;
+
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
++ sunos4*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
+
+-# Allow CC to be a program name with arguments.
+-lt_save_CC="$CC"
+-CC=${RC-"windres"}
+-compiler=$CC
+-_LT_AC_TAGVAR(compiler, $1)=$CC
+-_LT_CC_BASENAME([$compiler])
+-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
++ sysv4 | sysv4.2uw2* | sysv4.3*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
+
+-AC_LIBTOOL_CONFIG($1)
++ sysv4*MP*)
++ if test -d /usr/nec ;then
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ fi
++ ;;
+
+-AC_LANG_RESTORE
+-CC="$lt_save_CC"
+-])# AC_LIBTOOL_LANG_RC_CONFIG
++ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
+
++ unicos*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
++ ;;
+
+-# AC_LIBTOOL_CONFIG([TAGNAME])
+-# ----------------------------
+-# If TAGNAME is not passed, then create an initial libtool script
+-# with a default configuration from the untagged config vars. Otherwise
+-# add code to config.status for appending the configuration named by
+-# TAGNAME from the matching tagged config vars.
+-AC_DEFUN([AC_LIBTOOL_CONFIG],
+-[# The else clause should only fire when bootstrapping the
+-# libtool distribution, otherwise you forgot to ship ltmain.sh
+-# with your package, and you will get complaints that there are
+-# no rules to generate ltmain.sh.
+-if test -f "$ltmain"; then
+- # See if we are running on zsh, and set the options which allow our commands through
+- # without removal of \ escapes.
+- if test -n "${ZSH_VERSION+set}" ; then
+- setopt NO_GLOB_SUBST
+- fi
+- # Now quote all the things that may contain metacharacters while being
+- # careful not to overquote the AC_SUBSTed values. We take copies of the
+- # variables and quote the copies for generation of the libtool script.
+- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+- SED SHELL STRIP \
+- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+- deplibs_check_method reload_flag reload_cmds need_locks \
+- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+- lt_cv_sys_global_symbol_to_c_name_address \
+- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+- old_postinstall_cmds old_postuninstall_cmds \
+- _LT_AC_TAGVAR(compiler, $1) \
+- _LT_AC_TAGVAR(CC, $1) \
+- _LT_AC_TAGVAR(LD, $1) \
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+- _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+- _LT_AC_TAGVAR(old_archive_cmds, $1) \
+- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+- _LT_AC_TAGVAR(predep_objects, $1) \
+- _LT_AC_TAGVAR(postdep_objects, $1) \
+- _LT_AC_TAGVAR(predeps, $1) \
+- _LT_AC_TAGVAR(postdeps, $1) \
+- _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+- _LT_AC_TAGVAR(archive_cmds, $1) \
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+- _LT_AC_TAGVAR(postinstall_cmds, $1) \
+- _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+- _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+- _LT_AC_TAGVAR(no_undefined_flag, $1) \
+- _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+- _LT_AC_TAGVAR(hardcode_automatic, $1) \
+- _LT_AC_TAGVAR(module_cmds, $1) \
+- _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+- _LT_AC_TAGVAR(fix_srcfile_path, $1) \
+- _LT_AC_TAGVAR(exclude_expsyms, $1) \
+- _LT_AC_TAGVAR(include_expsyms, $1); do
+-
+- case $var in
+- _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+- _LT_AC_TAGVAR(archive_cmds, $1) | \
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+- _LT_AC_TAGVAR(module_cmds, $1) | \
+- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+- _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+- extract_expsyms_cmds | reload_cmds | finish_cmds | \
+- postinstall_cmds | postuninstall_cmds | \
+- old_postinstall_cmds | old_postuninstall_cmds | \
+- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+- # Double-quote double-evaled strings.
+- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
++ uts4*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
++
+ *)
+- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+- done
+-
+- case $lt_echo in
+- *'\[$]0 --fallback-echo"')
+- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
++ fi
++])
++case $host_os in
++ # For platforms which do not support PIC, -DPIC is meaningless:
++ *djgpp*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+- esac
+-
+-ifelse([$1], [],
+- [cfgfile="${ofile}T"
+- trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+- $rm -f "$cfgfile"
+- AC_MSG_NOTICE([creating $ofile])],
+- [cfgfile="$ofile"])
+-
+- cat <<__EOF__ >> "$cfgfile"
+-ifelse([$1], [],
+-[#! $SHELL
++ *)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
++ ;;
++esac
++AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
++_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
++ [How to pass a linker flag through the compiler])
+
+-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+-#
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+-# Free Software Foundation, Inc.
+ #
+-# This file is part of GNU Libtool:
+-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+-#
+-# 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.
++# Check to make sure the PIC flag actually works.
+ #
+-# 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.
++if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
++ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
++ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
++ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
++ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
++ "" | " "*) ;;
++ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
++ esac],
++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
++fi
++_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
++ [Additional compiler flags for building library objects])
++
+ #
+-# 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.
++# Check to make sure the static flag actually works.
+ #
+-# As a special exception to the GNU General Public License, if you
+-# distribute this file as part of a program that contains a
+-# configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
+-
+-# A sed program that does not truncate output.
+-SED=$lt_SED
+-
+-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+-Xsed="$SED -e 1s/^X//"
+-
+-# The HP-UX ksh and POSIX shell print the target directory to stdout
+-# if CDPATH is set.
+-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+-
+-# The names of the tagged configurations supported by this script.
+-available_tags=
+-
+-# ### BEGIN LIBTOOL CONFIG],
+-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+-
+-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+-
+-# Shell to use when invoking shell scripts.
+-SHELL=$lt_SHELL
+-
+-# Whether or not to build shared libraries.
+-build_libtool_libs=$enable_shared
+-
+-# Whether or not to build static libraries.
+-build_old_libs=$enable_static
+-
+-# Whether or not to add -lc for building shared libraries.
+-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+-
+-# Whether or not to disallow shared libs when runtime libs are static
+-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+-
+-# Whether or not to optimize for fast installation.
+-fast_install=$enable_fast_install
+-
+-# The host system.
+-host_alias=$host_alias
+-host=$host
+-host_os=$host_os
+-
+-# The build system.
+-build_alias=$build_alias
+-build=$build
+-build_os=$build_os
+-
+-# An echo program that does not interpret backslashes.
+-echo=$lt_echo
+-
+-# The archiver.
+-AR=$lt_AR
+-AR_FLAGS=$lt_AR_FLAGS
+-
+-# A C compiler.
+-LTCC=$lt_LTCC
+-
+-# LTCC compiler flags.
+-LTCFLAGS=$lt_LTCFLAGS
+-
+-# A language-specific compiler.
+-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+-
+-# Is the compiler the GNU C compiler?
+-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+-
+-# An ERE matcher.
+-EGREP=$lt_EGREP
+-
+-# The linker used to build libraries.
+-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+-
+-# Whether we need hard or soft links.
+-LN_S=$lt_LN_S
+-
+-# A BSD-compatible nm program.
+-NM=$lt_NM
+-
+-# A symbol stripping program
+-STRIP=$lt_STRIP
+-
+-# Used to examine libraries when file_magic_cmd begins "file"
+-MAGIC_CMD=$MAGIC_CMD
+-
+-# Used on cygwin: DLL creation program.
+-DLLTOOL="$DLLTOOL"
+-
+-# Used on cygwin: object dumper.
+-OBJDUMP="$OBJDUMP"
++wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
++_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
++ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
++ $lt_tmp_static_flag,
++ [],
++ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
++_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
++ [Compiler flag to prevent dynamic linking])
++])# _LT_COMPILER_PIC
+
+-# Used on cygwin: assembler.
+-AS="$AS"
+
+-# The name of the directory that contains temporary libtool files.
+-objdir=$objdir
++# _LT_LINKER_SHLIBS([TAGNAME])
++# ----------------------------
++# See if the linker supports building shared libraries.
++m4_defun([_LT_LINKER_SHLIBS],
++[AC_REQUIRE([LT_PATH_LD])dnl
++AC_REQUIRE([LT_PATH_NM])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_EGREP])dnl
++m4_require([_LT_DECL_SED])dnl
++m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
++m4_require([_LT_TAG_COMPILER])dnl
++AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
++m4_if([$1], [CXX], [
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++ case $host_os in
++ aix[[4-9]]*)
++ # If we're using GNU nm, then we don't want the "-C" option.
++ # -C means demangle to AIX nm, but means don't demangle with GNU nm
++ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ else
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ fi
++ ;;
++ pw32*)
++ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
++ ;;
++ cygwin* | mingw*)
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
++ ;;
++ *)
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++ ;;
++ esac
++ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
++], [
++ runpath_var=
++ _LT_TAGVAR(allow_undefined_flag, $1)=
++ _LT_TAGVAR(always_export_symbols, $1)=no
++ _LT_TAGVAR(archive_cmds, $1)=
++ _LT_TAGVAR(archive_expsym_cmds, $1)=
++ _LT_TAGVAR(compiler_needs_object, $1)=no
++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++ _LT_TAGVAR(hardcode_automatic, $1)=no
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=
++ _LT_TAGVAR(hardcode_minus_L, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
++ _LT_TAGVAR(inherit_rpath, $1)=no
++ _LT_TAGVAR(link_all_deplibs, $1)=unknown
++ _LT_TAGVAR(module_cmds, $1)=
++ _LT_TAGVAR(module_expsym_cmds, $1)=
++ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
++ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
++ _LT_TAGVAR(thread_safe_flag_spec, $1)=
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=
++ # include_expsyms should be a list of space-separated symbols to be *always*
++ # included in the symbol list
++ _LT_TAGVAR(include_expsyms, $1)=
++ # exclude_expsyms can be an extended regexp of symbols to exclude
++ # it will be wrapped by ` (' and `)$', so one must not match beginning or
++ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
++ # as well as any symbol that contains `d'.
++ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
++ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
++ # platforms (ab)use it in PIC code, but their linkers get confused if
++ # the symbol is explicitly referenced. Since portable code cannot
++ # rely on this symbol name, it's probably fine to never include it in
++ # preloaded symbol tables.
++ # Exclude shared library initialization/finalization symbols.
++dnl Note also adjust exclude_expsyms for C++ above.
++ extract_expsyms_cmds=
+
+-# How to create reloadable object files.
+-reload_flag=$lt_reload_flag
+-reload_cmds=$lt_reload_cmds
++ case $host_os in
++ cygwin* | mingw* | pw32*)
++ # FIXME: the MSVC++ port hasn't been tested in a loooong time
++ # When not using gcc, we currently assume that we are using
++ # Microsoft Visual C++.
++ if test "$GCC" != yes; then
++ with_gnu_ld=no
++ fi
++ ;;
++ interix*)
++ # we just hope/assume this is gcc and not c89 (= MSVC++)
++ with_gnu_ld=yes
++ ;;
++ openbsd*)
++ with_gnu_ld=no
++ ;;
++ esac
+
+-# How to pass a linker flag through the compiler.
+-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
++ _LT_TAGVAR(ld_shlibs, $1)=yes
++ if test "$with_gnu_ld" = yes; then
++ # If archive_cmds runs LD, not CC, wlarc should be empty
++ wlarc='${wl}'
+
+-# Object file suffix (normally "o").
+-objext="$ac_objext"
++ # Set some defaults for GNU ld with shared library support. These
++ # are reset later if shared libraries are not supported. Putting them
++ # here allows them to be overridden if necessary.
++ runpath_var=LD_RUN_PATH
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++ # ancient GNU ld didn't support --whole-archive et. al.
++ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
++ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++ else
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=
++ fi
++ supports_anon_versioning=no
++ case `$LD -v 2>&1` in
++ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
++ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
++ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
++ *\ 2.11.*) ;; # other 2.11 versions
++ *) supports_anon_versioning=yes ;;
++ esac
+
+-# Old archive suffix (normally "a").
+-libext="$libext"
++ # See if GNU ld supports shared libraries.
++ case $host_os in
++ aix[[3-9]]*)
++ # On AIX/PPC, the GNU linker is very broken
++ if test "$host_cpu" != ia64; then
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ cat <<_LT_EOF 1>&2
+
+-# Shared library suffix (normally ".so").
+-shrext_cmds='$shrext_cmds'
++*** Warning: the GNU linker, at least up to release 2.9.1, is reported
++*** to be unable to reliably create shared libraries on AIX.
++*** Therefore, libtool is disabling shared libraries support. If you
++*** really care for shared libraries, you may want to modify your PATH
++*** so that a non-GNU linker is found, and then restart.
+
+-# Executable file suffix (normally "").
+-exeext="$exeext"
++_LT_EOF
++ fi
++ ;;
+
+-# Additional compiler flags for building library objects.
+-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+-pic_mode=$pic_mode
++ amigaos*)
++ case $host_cpu in
++ powerpc)
++ # see comment about AmigaOS4 .so support
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)=''
++ ;;
++ m68k)
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ ;;
++ esac
++ ;;
+
+-# What is the maximum length of a command?
+-max_cmd_len=$lt_cv_sys_max_cmd_len
++ beos*)
++ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
++ # support --undefined. This deserves some investigation. FIXME
++ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Does compiler simultaneously support -c and -o options?
+-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
++ cygwin* | mingw* | pw32*)
++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
++ # as there is no search path for DLLs.
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ _LT_TAGVAR(always_export_symbols, $1)=no
++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+-# Must we lock files when doing compilation?
+-need_locks=$lt_need_locks
++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++ # If the export-symbols file already is a .def file (1st line
++ # is EXPORTS), use it as is; otherwise, prepend...
++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
++ cp $export_symbols $output_objdir/$soname.def;
++ else
++ echo EXPORTS > $output_objdir/$soname.def;
++ cat $export_symbols >> $output_objdir/$soname.def;
++ fi~
++ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Do we need the lib prefix for modules?
+-need_lib_prefix=$need_lib_prefix
++ interix[[3-9]]*)
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
++ # Instead, shared libraries are loaded at an image base (0x10000000 by
++ # default) and relocated if they conflict, which is a slow very memory
++ # consuming and fragmenting process. To avoid this, we pick a random,
++ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
++ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++ ;;
+
+-# Do we need a version for libraries?
+-need_version=$need_version
++ gnu* | linux* | tpf* | k*bsd*-gnu)
++ tmp_diet=no
++ if test "$host_os" = linux-dietlibc; then
++ case $cc_basename in
++ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
++ esac
++ fi
++ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
++ && test "$tmp_diet" = no
++ then
++ tmp_addflag=
++ tmp_sharedflag='-shared'
++ case $cc_basename,$host_cpu in
++ pgcc*) # Portland Group C compiler
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ tmp_addflag=' $pic_flag'
++ ;;
++ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ tmp_addflag=' $pic_flag -Mnomain' ;;
++ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
++ tmp_addflag=' -i_dynamic' ;;
++ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
++ tmp_addflag=' -i_dynamic -nofor_main' ;;
++ ifc* | ifort*) # Intel Fortran compiler
++ tmp_addflag=' -nofor_main' ;;
++ xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
++ tmp_sharedflag='-qmkshrobj'
++ tmp_addflag= ;;
++ esac
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*) # Sun C 5.9
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ _LT_TAGVAR(compiler_needs_object, $1)=yes
++ tmp_sharedflag='-G' ;;
++ *Sun\ F*) # Sun Fortran 8.3
++ tmp_sharedflag='-G' ;;
++ esac
++ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+-# Whether dlopen is supported.
+-dlopen_support=$enable_dlopen
++ if test "x$supports_anon_versioning" = xyes; then
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
++ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
++ echo "local: *; };" >> $output_objdir/$libname.ver~
++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++ fi
+
+-# Whether dlopen of programs is supported.
+-dlopen_self=$enable_dlopen_self
++ case $cc_basename in
++ xlf*)
++ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
++ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
++ if test "x$supports_anon_versioning" = xyes; then
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
++ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
++ echo "local: *; };" >> $output_objdir/$libname.ver~
++ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
++ fi
++ ;;
++ esac
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Whether dlopen of statically linked programs is supported.
+-dlopen_self_static=$enable_dlopen_self_static
++ netbsd*)
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
++ wlarc=
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ fi
++ ;;
+
+-# Compiler flag to prevent dynamic linking.
+-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
++ solaris*)
++ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ cat <<_LT_EOF 1>&2
+
+-# Compiler flag to turn off builtin functions.
+-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
++*** Warning: The releases 2.8.* of the GNU linker cannot reliably
++*** create shared libraries on Solaris systems. Therefore, libtool
++*** is disabling shared libraries support. We urge you to upgrade GNU
++*** binutils to release 2.9.1 or newer. Another option is to modify
++*** your PATH or compiler configuration so that the native linker is
++*** used, and then restart.
+
+-# Compiler flag to allow reflexive dlopens.
+-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
++_LT_EOF
++ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Compiler flag to generate shared objects directly from archives.
+-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
++ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
++ case `$LD -v 2>&1` in
++ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ cat <<_LT_EOF 1>&2
+
+-# Compiler flag to generate thread-safe objects.
+-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
++*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
++*** reliably create shared libraries on SCO systems. Therefore, libtool
++*** is disabling shared libraries support. We urge you to upgrade GNU
++*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
++*** your PATH or compiler configuration so that the native linker is
++*** used, and then restart.
+
+-# Library versioning type.
+-version_type=$version_type
++_LT_EOF
++ ;;
++ *)
++ # For security reasons, it is highly recommended that you always
++ # use absolute paths for naming shared libraries, and exclude the
++ # DT_RUNPATH tag from executables and libraries. But doing so
++ # requires that you compile everything twice, which is a pain.
++ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ esac
++ ;;
+
+-# Format of library name prefix.
+-libname_spec=$lt_libname_spec
++ sunos4*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++ wlarc=
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# List of archive names. First name is the real one, the rest are links.
+-# The last name is the one that the linker finds with -lNAME.
+-library_names_spec=$lt_library_names_spec
++ *)
++ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ esac
+
+-# The coded name of the library, if different from the real name.
+-soname_spec=$lt_soname_spec
++ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
++ runpath_var=
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=
++ fi
++ else
++ # PORTME fill in a description of your system's linker (not GNU ld)
++ case $host_os in
++ aix3*)
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ _LT_TAGVAR(always_export_symbols, $1)=yes
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
++ # Note: this linker hardcodes the directories in LIBPATH if there
++ # are no directories specified by -L.
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
++ # Neither direct hardcoding nor static linking is supported with a
++ # broken collect2.
++ _LT_TAGVAR(hardcode_direct, $1)=unsupported
++ fi
++ ;;
+
+-# Commands used to build and install an old-style archive.
+-RANLIB=$lt_RANLIB
+-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+-old_postinstall_cmds=$lt_old_postinstall_cmds
+-old_postuninstall_cmds=$lt_old_postuninstall_cmds
++ aix[[4-9]]*)
++ if test "$host_cpu" = ia64; then
++ # On IA64, the linker does run time linking by default, so we don't
++ # have to do anything special.
++ aix_use_runtimelinking=no
++ exp_sym_flag='-Bexport'
++ no_entry_flag=""
++ else
++ # If we're using GNU nm, then we don't want the "-C" option.
++ # -C means demangle to AIX nm, but means don't demangle with GNU nm
++ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ else
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ fi
++ aix_use_runtimelinking=no
+
+-# Create an old-style archive from a shared archive.
+-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
++ # Test if we are trying to use run time linking or normal
++ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
++ # need to do runtime linking.
++ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
++ for ld_flag in $LDFLAGS; do
++ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
++ aix_use_runtimelinking=yes
++ break
++ fi
++ done
++ ;;
++ esac
+
+-# Create a temporary old-style archive to link instead of a shared archive.
+-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
++ exp_sym_flag='-bexport'
++ no_entry_flag='-bnoentry'
++ fi
+
+-# Commands used to build and install a shared archive.
+-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+-postinstall_cmds=$lt_postinstall_cmds
+-postuninstall_cmds=$lt_postuninstall_cmds
++ # When large executables or shared objects are built, AIX ld can
++ # have problems creating the table of contents. If linking a library
++ # or program results in "error TOC overflow" add -mminimal-toc to
++ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
++ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+-# Commands used to build a loadable module (assumed same as above if empty)
+-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
++ _LT_TAGVAR(archive_cmds, $1)=''
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+-# Commands to strip libraries.
+-old_striplib=$lt_old_striplib
+-striplib=$lt_striplib
++ if test "$GCC" = yes; then
++ case $host_os in aix4.[[012]]|aix4.[[012]].*)
++ # We only want to do this on AIX 4.2 and lower, the check
++ # below for broken collect2 doesn't work under 4.3+
++ collect2name=`${CC} -print-prog-name=collect2`
++ if test -f "$collect2name" &&
++ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
++ then
++ # We have reworked collect2
++ :
++ else
++ # We have old collect2
++ _LT_TAGVAR(hardcode_direct, $1)=unsupported
++ # It fails to find uninstalled libraries when the uninstalled
++ # path is not listed in the libpath. Setting hardcode_minus_L
++ # to unsupported forces relinking
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=
++ fi
++ ;;
++ esac
++ shared_flag='-shared'
++ if test "$aix_use_runtimelinking" = yes; then
++ shared_flag="$shared_flag "'${wl}-G'
++ fi
++ else
++ # not using gcc
++ if test "$host_cpu" = ia64; then
++ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
++ # chokes on -Wl,-G. The following line is correct:
++ shared_flag='-G'
++ else
++ if test "$aix_use_runtimelinking" = yes; then
++ shared_flag='${wl}-G'
++ else
++ shared_flag='${wl}-bM:SRE'
++ fi
++ fi
++ fi
+
+-# Dependencies to place before the objects being linked to create a
+-# shared library.
+-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
++ # It seems that -bexpall does not export symbols beginning with
++ # underscore (_), so it is better to generate a list of symbols to export.
++ _LT_TAGVAR(always_export_symbols, $1)=yes
++ if test "$aix_use_runtimelinking" = yes; then
++ # Warning - without using the other runtime loading flags (-brtl),
++ # -berok will link without error, but may produce a broken library.
++ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++ _LT_SYS_MODULE_PATH_AIX
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ else
++ if test "$host_cpu" = ia64; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
++ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
++ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
++ else
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++ _LT_SYS_MODULE_PATH_AIX
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++ # Warning - without using the other run time loading flags,
++ # -berok will link without error, but may produce a broken library.
++ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
++ # Exported symbols can be pulled into shared objects from archives
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
++ # This is similar to how AIX traditionally builds its shared libraries.
++ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
++ fi
++ fi
++ ;;
+
+-# Dependencies to place after the objects being linked to create a
+-# shared library.
+-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
++ amigaos*)
++ case $host_cpu in
++ powerpc)
++ # see comment about AmigaOS4 .so support
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)=''
++ ;;
++ m68k)
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ ;;
++ esac
++ ;;
+
+-# Dependencies to place before the objects being linked to create a
+-# shared library.
+-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
++ bsdi[[45]]*)
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
++ ;;
+
+-# Dependencies to place after the objects being linked to create a
+-# shared library.
+-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
++ cygwin* | mingw* | pw32*)
++ # When not using gcc, we currently assume that we are using
++ # Microsoft Visual C++.
++ # hardcode_libdir_flag_spec is actually meaningless, as there is
++ # no search path for DLLs.
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ # Tell ltmain to make .lib files, not .a files.
++ libext=lib
++ # Tell ltmain to make .dll files, not .so files.
++ shrext_cmds=".dll"
++ # FIXME: Setting linknames here is a bad hack.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
++ # The linker will automatically build a .lib file if we build a DLL.
++ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
++ # FIXME: Should let the user specify the lib program.
++ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
++ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
++ ;;
+
+-# The library search path used internally by the compiler when linking
+-# a shared library.
+-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
++ darwin* | rhapsody*)
++ _LT_DARWIN_LINKER_FEATURES($1)
++ ;;
+
+-# Method to check whether dependent libraries are shared objects.
+-deplibs_check_method=$lt_deplibs_check_method
++ dgux*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Command to use when deplibs_check_method == file_magic.
+-file_magic_cmd=$lt_file_magic_cmd
++ freebsd1*)
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
+
+-# Flag that allows shared libraries with undefined symbols to be built.
+-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
++ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
++ # support. Future versions do this automatically, but an explicit c++rt0.o
++ # does not break anything, and helps significantly (at the cost of a little
++ # extra space).
++ freebsd2.2*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Flag that forces no undefined symbols.
+-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
++ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
++ freebsd2*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Commands used to finish a libtool library installation in a directory.
+-finish_cmds=$lt_finish_cmds
++ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
++ freebsd* | dragonfly*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Same as above, but a single script fragment to be evaled but not shown.
+-finish_eval=$lt_finish_eval
++ hpux9*)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++ fi
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+-# Take the output of nm and produce a listing of raw symbols and C names.
+-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ ;;
+
+-# Transform the output of nm in a proper C declaration
+-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
++ hpux10*)
++ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
++ fi
++ if test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ fi
++ ;;
+
+-# Transform the output of nm in a C name address pair
+-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
++ hpux11*)
++ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
++ case $host_cpu in
++ hppa*64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ ia64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ esac
++ else
++ case $host_cpu in
++ hppa*64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ ia64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ esac
++ fi
++ if test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+-# This is the shared library runtime path variable.
+-runpath_var=$runpath_var
++ case $host_cpu in
++ hppa*64*|ia64*)
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
++ *)
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+-# This is the shared library path variable.
+-shlibpath_var=$shlibpath_var
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ ;;
++ esac
++ fi
++ ;;
+
+-# Is shlibpath searched before the hard-coded library search path?
+-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
++ irix5* | irix6* | nonstopux*)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ # Try to use the -exported_symbol ld option, if it does not
++ # work, assume that -exports_file does not work either and
++ # implicitly export all symbols.
++ save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
++ AC_LINK_IFELSE(int foo(void) {},
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
++ )
++ LDFLAGS="$save_LDFLAGS"
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
++ fi
++ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(inherit_rpath, $1)=yes
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ ;;
+
+-# How to hardcode a shared library path into an executable.
+-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
++ netbsd*)
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
++ fi
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Whether we should hardcode library paths into libraries.
+-hardcode_into_libs=$hardcode_into_libs
++ newsos6)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Flag to hardcode \$libdir into a binary during linking.
+-# This must work even if \$libdir does not exist.
+-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
++ *nto* | *qnx*)
++ ;;
+
+-# If ld is used when linking, flag to hardcode \$libdir into
+-# a binary during linking. This must work even if \$libdir does
+-# not exist.
+-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
++ openbsd*)
++ if test -f /usr/libexec/ld.so; then
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ else
++ case $host_os in
++ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ ;;
++ esac
++ fi
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Whether we need a single -rpath flag with a separated argument.
+-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
++ os2*)
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
++ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
++ ;;
+
+-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+-# resulting binary.
+-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
++ osf3*)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ else
++ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ fi
++ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ ;;
+
+-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+-# resulting binary.
+-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
++ osf4* | osf5*) # as osf3* with the addition of -msym flag
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ else
++ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
++ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+-# the resulting binary.
+-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
++ # Both c and cxx compiler support -rpath directly
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
++ fi
++ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ ;;
+
+-# Set to yes if building a shared library automatically hardcodes DIR into the library
+-# and all subsequent libraries and executables linked against it.
+-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
++ solaris*)
++ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
++ if test "$GCC" = yes; then
++ wlarc='${wl}'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
++ else
++ case `$CC -V 2>&1` in
++ *"Compilers 5.0"*)
++ wlarc=''
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
++ ;;
++ *)
++ wlarc='${wl}'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
++ ;;
++ esac
++ fi
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ case $host_os in
++ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ *)
++ # The compiler driver will combine and reorder linker options,
++ # but understands `-z linker_flag'. GCC discards it without `$wl',
++ # but is careful enough not to reorder.
++ # Supported since Solaris 2.6 (maybe 2.5.1?)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++ else
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
++ fi
++ ;;
++ esac
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ ;;
+
+-# Variables whose values should be saved in libtool wrapper scripts and
+-# restored at relink time.
+-variables_saved_for_relink="$variables_saved_for_relink"
++ sunos4*)
++ if test "x$host_vendor" = xsequent; then
++ # Use $CC to link under sequent, because it throws in some extra .o
++ # files that make .init and .fini sections work.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
++ fi
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Whether libtool must link a program against all its dependency libraries.
+-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
++ sysv4)
++ case $host_vendor in
++ sni)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
++ ;;
++ siemens)
++ ## LD is ld it makes a PLAMLIB
++ ## CC just makes a GrossModule.
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ ;;
++ motorola)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
++ ;;
++ esac
++ runpath_var='LD_RUN_PATH'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Compile-time system search path for libraries
+-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
++ sysv4.3*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
++ ;;
+
+-# Run-time system search path for libraries
+-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
++ sysv4*MP*)
++ if test -d /usr/nec; then
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ runpath_var=LD_RUN_PATH
++ hardcode_runpath_var=yes
++ _LT_TAGVAR(ld_shlibs, $1)=yes
++ fi
++ ;;
+
+-# Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path=$lt_fix_srcfile_path
++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
++ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ runpath_var='LD_RUN_PATH'
+
+-# Set to yes if exported symbols are required.
+-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ fi
++ ;;
+
+-# The commands to list exported symbols.
+-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
++ sysv5* | sco3.2v5* | sco5v6*)
++ # Note: We can NOT use -z defs as we might desire, because we do not
++ # link with -lc, and that would cause any symbols used from libc to
++ # always be unresolved, which means just about no library would
++ # ever link correctly. If we're not using GNU ld we use -z text
++ # though, which does catch some bad symbols but isn't as heavy-handed
++ # as -z defs.
++ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
++ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
++ runpath_var='LD_RUN_PATH'
+
+-# The commands to extract the exported symbol list from a shared archive.
+-extract_expsyms_cmds=$lt_extract_expsyms_cmds
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ fi
++ ;;
+
+-# Symbols that should not be listed in the preloaded symbols.
+-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
++ uts4*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Symbols that must always be exported.
+-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
++ *)
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
+
+-ifelse([$1],[],
+-[# ### END LIBTOOL CONFIG],
+-[# ### END LIBTOOL TAG CONFIG: $tagname])
++ if test x$host_vendor = xsni; then
++ case $host in
++ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
++ ;;
++ esac
++ fi
++ fi
++])
++AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
++test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+-__EOF__
++_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+-ifelse([$1],[], [
+- case $host_os in
+- aix3*)
+- cat <<\EOF >> "$cfgfile"
++_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
++_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
++_LT_DECL([], [extract_expsyms_cmds], [2],
++ [The commands to extract the exported symbol list from a shared archive])
+
+-# AIX sometimes has problems with the GCC collect2 program. For some
+-# reason, if we set the COLLECT_NAMES environment variable, the problems
+-# vanish in a puff of smoke.
+-if test "X${COLLECT_NAMES+set}" != Xset; then
+- COLLECT_NAMES=
+- export COLLECT_NAMES
+-fi
+-EOF
+- ;;
+- esac
++#
++# Do we need to explicitly link libc?
++#
++case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
++x|xyes)
++ # Assume -lc should be added
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+- # We use sed instead of cat because bash on DJGPP gets confused if
+- # if finds mixed CR/LF and LF-only lines. Since sed operates in
+- # text mode, it properly converts lines to CR/LF. This bash problem
+- # is reportedly fixed, but why not run on old versions too?
+- sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
++ if test "$enable_shared" = yes && test "$GCC" = yes; then
++ case $_LT_TAGVAR(archive_cmds, $1) in
++ *'~'*)
++ # FIXME: we may have to deal with multi-command sequences.
++ ;;
++ '$CC '*)
++ # Test whether the compiler implicitly links with -lc since on some
++ # systems, -lgcc has to come before -lc. If gcc already passes -lc
++ # to ld, don't add -lc before -lgcc.
++ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
++ $RM conftest*
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+- mv -f "$cfgfile" "$ofile" || \
+- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+- chmod +x "$ofile"
+-])
+-else
+- # If there is no Makefile yet, we rely on a make rule to execute
+- # `config.status --recheck' to rerun these tests and create the
+- # libtool script then.
+- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+- if test -f "$ltmain_in"; then
+- test -f Makefile && make "$ltmain"
++ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
++ soname=conftest
++ lib=conftest
++ libobjs=conftest.$ac_objext
++ deplibs=
++ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
++ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
++ compiler_flags=-v
++ linker_flags=-v
++ verstring=
++ output_objdir=.
++ libname=conftest
++ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
++ _LT_TAGVAR(allow_undefined_flag, $1)=
++ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
++ then
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ else
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
++ fi
++ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
++ else
++ cat conftest.err 1>&5
++ fi
++ $RM conftest*
++ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
++ ;;
++ esac
+ fi
+-fi
+-])# AC_LIBTOOL_CONFIG
+-
+-
+-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+-# -------------------------------------------
+-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
++ ;;
++esac
+
+-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
++_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
++ [Whether or not to add -lc for building shared libraries])
++_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
++ [enable_shared_with_static_runtimes], [0],
++ [Whether or not to disallow shared libs when runtime libs are static])
++_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
++ [Compiler flag to allow reflexive dlopens])
++_LT_TAGDECL([], [whole_archive_flag_spec], [1],
++ [Compiler flag to generate shared objects directly from archives])
++_LT_TAGDECL([], [compiler_needs_object], [1],
++ [Whether the compiler copes with passing no objects directly])
++_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
++ [Create an old-style archive from a shared archive])
++_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
++ [Create a temporary old-style archive to link instead of a shared archive])
++_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
++_LT_TAGDECL([], [archive_expsym_cmds], [2])
++_LT_TAGDECL([], [module_cmds], [2],
++ [Commands used to build a loadable module if different from building
++ a shared archive.])
++_LT_TAGDECL([], [module_expsym_cmds], [2])
++_LT_TAGDECL([], [with_gnu_ld], [1],
++ [Whether we are building with GNU ld or not])
++_LT_TAGDECL([], [allow_undefined_flag], [1],
++ [Flag that allows shared libraries with undefined symbols to be built])
++_LT_TAGDECL([], [no_undefined_flag], [1],
++ [Flag that enforces no undefined symbols])
++_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
++ [Flag to hardcode $libdir into a binary during linking.
++ This must work even if $libdir does not exist])
++_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
++ [[If ld is used when linking, flag to hardcode $libdir into a binary
++ during linking. This must work even if $libdir does not exist]])
++_LT_TAGDECL([], [hardcode_libdir_separator], [1],
++ [Whether we need a single "-rpath" flag with a separated argument])
++_LT_TAGDECL([], [hardcode_direct], [0],
++ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
++ DIR into the resulting binary])
++_LT_TAGDECL([], [hardcode_direct_absolute], [0],
++ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
++ DIR into the resulting binary and the resulting library dependency is
++ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
++ library is relocated])
++_LT_TAGDECL([], [hardcode_minus_L], [0],
++ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
++ into the resulting binary])
++_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
++ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
++ into the resulting binary])
++_LT_TAGDECL([], [hardcode_automatic], [0],
++ [Set to "yes" if building a shared library automatically hardcodes DIR
++ into the library and all subsequent libraries and executables linked
++ against it])
++_LT_TAGDECL([], [inherit_rpath], [0],
++ [Set to yes if linker adds runtime paths of dependent libraries
++ to runtime path list])
++_LT_TAGDECL([], [link_all_deplibs], [0],
++ [Whether libtool must link a program against all its dependency libraries])
++_LT_TAGDECL([], [fix_srcfile_path], [1],
++ [Fix the shell variable $srcfile for the compiler])
++_LT_TAGDECL([], [always_export_symbols], [0],
++ [Set to "yes" if exported symbols are required])
++_LT_TAGDECL([], [export_symbols_cmds], [2],
++ [The commands to list exported symbols])
++_LT_TAGDECL([], [exclude_expsyms], [1],
++ [Symbols that should not be listed in the preloaded symbols])
++_LT_TAGDECL([], [include_expsyms], [1],
++ [Symbols that must always be exported])
++_LT_TAGDECL([], [prelink_cmds], [2],
++ [Commands necessary for linking programs (against libraries) with templates])
++_LT_TAGDECL([], [file_list_spec], [1],
++ [Specify filename containing input files])
++dnl FIXME: Not yet implemented
++dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
++dnl [Compiler flag to generate thread safe objects])
++])# _LT_LINKER_SHLIBS
+
+-if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+- lt_cv_prog_compiler_rtti_exceptions,
+- [-fno-rtti -fno-exceptions], [],
+- [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+-fi
+-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
++# _LT_LANG_C_CONFIG([TAG])
++# ------------------------
++# Ensure that the configuration variables for a C compiler are suitably
++# defined. These variables are subsequently used by _LT_CONFIG to write
++# the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_C_CONFIG],
++[m4_require([_LT_DECL_EGREP])dnl
++lt_save_CC="$CC"
++AC_LANG_PUSH(C)
+
++# Source file extension for C test sources.
++ac_ext=c
+
+-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+-# ---------------------------------
+-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+-[AC_REQUIRE([AC_CANONICAL_HOST])
+-AC_REQUIRE([LT_AC_PROG_SED])
+-AC_REQUIRE([AC_PROG_NM])
+-AC_REQUIRE([AC_OBJEXT])
+-# Check for command to grab the raw symbol name followed by C symbol from nm.
+-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+-[
+-# These are sane defaults that work on at least a few old systems.
+-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
++# Object file extension for compiled C test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+-# Character class describing NM global symbol codes.
+-symcode='[[BCDEGRST]]'
++# Code to be used in simple compile tests
++lt_simple_compile_test_code="int some_variable = 0;"
+
+-# Regexp to match symbols that can be accessed directly from C.
+-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
++# Code to be used in simple link tests
++lt_simple_link_test_code='int main(){return(0);}'
+
+-# Transform an extracted symbol line into a proper C declaration
+-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
++_LT_TAG_COMPILER
++# Save the default compiler, since it gets overwritten when the other
++# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
++compiler_DEFAULT=$CC
+
+-# Transform an extracted symbol line into symbol name and symbol address
+-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
++# save warnings/boilerplate of simple test code
++_LT_COMPILER_BOILERPLATE
++_LT_LINKER_BOILERPLATE
+
+-# Define system-specific variables.
+-case $host_os in
+-aix*)
+- symcode='[[BCDT]]'
+- ;;
+-cygwin* | mingw* | pw32*)
+- symcode='[[ABCDGISTW]]'
+- ;;
+-hpux*) # Its linker distinguishes data from code symbols
+- if test "$host_cpu" = ia64; then
+- symcode='[[ABCDEGRST]]'
+- fi
+- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+- ;;
+-linux* | k*bsd*-gnu)
+- if test "$host_cpu" = ia64; then
+- symcode='[[ABCDGIRSTW]]'
+- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+- fi
+- ;;
+-irix* | nonstopux*)
+- symcode='[[BCDEGRST]]'
+- ;;
+-osf*)
+- symcode='[[BCDEGQRST]]'
+- ;;
+-solaris*)
+- symcode='[[BDRT]]'
+- ;;
+-sco3.2v5*)
+- symcode='[[DT]]'
+- ;;
+-sysv4.2uw2*)
+- symcode='[[DT]]'
+- ;;
+-sysv5* | sco5v6* | unixware* | OpenUNIX*)
+- symcode='[[ABDT]]'
+- ;;
+-sysv4)
+- symcode='[[DFNSTU]]'
+- ;;
+-esac
++## CAVEAT EMPTOR:
++## There is no encapsulation within the following macros, do not change
++## the running order or otherwise move them around unless you know exactly
++## what you are doing...
++if test -n "$compiler"; then
++ _LT_COMPILER_NO_RTTI($1)
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_SYS_DYNAMIC_LINKER($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
++ LT_SYS_DLOPEN_SELF
++ _LT_CMD_STRIPLIB
++
++ # Report which library types will actually be built
++ AC_MSG_CHECKING([if libtool supports shared libraries])
++ AC_MSG_RESULT([$can_build_shared])
+
+-# Handle CRLF in mingw tool chain
+-opt_cr=
+-case $build_os in
+-mingw*)
+- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+- ;;
+-esac
++ AC_MSG_CHECKING([whether to build shared libraries])
++ test "$can_build_shared" = "no" && enable_shared=no
+
+-# If we're using GNU nm, then use its standard symbol codes.
+-case `$NM -V 2>&1` in
+-*GNU* | *'with BFD'*)
+- symcode='[[ABCDGIRSTW]]' ;;
+-esac
++ # On AIX, shared libraries and static libraries use the same namespace, and
++ # are all built from PIC.
++ case $host_os in
++ aix3*)
++ test "$enable_shared" = yes && enable_static=no
++ if test -n "$RANLIB"; then
++ archive_cmds="$archive_cmds~\$RANLIB \$lib"
++ postinstall_cmds='$RANLIB $lib'
++ fi
++ ;;
+
+-# Try without a prefix undercore, then with it.
+-for ac_symprfx in "" "_"; do
++ aix[[4-9]]*)
++ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
++ test "$enable_shared" = yes && enable_static=no
++ fi
++ ;;
++ esac
++ AC_MSG_RESULT([$enable_shared])
+
+- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+- symxfrm="\\1 $ac_symprfx\\2 \\2"
++ AC_MSG_CHECKING([whether to build static libraries])
++ # Make sure either enable_shared or enable_static is yes.
++ test "$enable_shared" = yes || enable_static=yes
++ AC_MSG_RESULT([$enable_static])
+
+- # Write the raw and C identifiers.
+- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
++ _LT_CONFIG($1)
++fi
++AC_LANG_POP
++CC="$lt_save_CC"
++])# _LT_LANG_C_CONFIG
+
+- # Check to see that the pipe works correctly.
+- pipe_works=no
+
+- rm -f conftest*
+- cat > conftest.$ac_ext <<EOF
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-char nm_test_var;
+-void nm_test_func(){}
+-#ifdef __cplusplus
+-}
+-#endif
+-int main(){nm_test_var='a';nm_test_func();return(0);}
+-EOF
++# _LT_PROG_CXX
++# ------------
++# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
++# compiler, we have our own version here.
++m4_defun([_LT_PROG_CXX],
++[
++pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
++AC_PROG_CXX
++if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
++ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
++ (test "X$CXX" != "Xg++"))) ; then
++ AC_PROG_CXXCPP
++else
++ _lt_caught_CXX_error=yes
++fi
++popdef([AC_MSG_ERROR])
++])# _LT_PROG_CXX
+
+- if AC_TRY_EVAL(ac_compile); then
+- # Now try to grab the symbols.
+- nlist=conftest.nm
+- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+- # Try sorting and uniquifying the output.
+- if sort "$nlist" | uniq > "$nlist"T; then
+- mv -f "$nlist"T "$nlist"
+- else
+- rm -f "$nlist"T
+- fi
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+- # Make sure that we snagged all the symbols we need.
+- if grep ' nm_test_var$' "$nlist" >/dev/null; then
+- if grep ' nm_test_func$' "$nlist" >/dev/null; then
+- cat <<EOF > conftest.$ac_ext
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+
+-EOF
+- # Now generate the symbol file.
+- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
++# _LT_LANG_CXX_CONFIG([TAG])
++# --------------------------
++# Ensure that the configuration variables for a C++ compiler are suitably
++# defined. These variables are subsequently used by _LT_CONFIG to write
++# the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_CXX_CONFIG],
++[AC_REQUIRE([_LT_PROG_CXX])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_EGREP])dnl
++
++AC_LANG_PUSH(C++)
++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
++_LT_TAGVAR(allow_undefined_flag, $1)=
++_LT_TAGVAR(always_export_symbols, $1)=no
++_LT_TAGVAR(archive_expsym_cmds, $1)=
++_LT_TAGVAR(compiler_needs_object, $1)=no
++_LT_TAGVAR(export_dynamic_flag_spec, $1)=
++_LT_TAGVAR(hardcode_direct, $1)=no
++_LT_TAGVAR(hardcode_direct_absolute, $1)=no
++_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++_LT_TAGVAR(hardcode_libdir_separator, $1)=
++_LT_TAGVAR(hardcode_minus_L, $1)=no
++_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
++_LT_TAGVAR(hardcode_automatic, $1)=no
++_LT_TAGVAR(inherit_rpath, $1)=no
++_LT_TAGVAR(module_cmds, $1)=
++_LT_TAGVAR(module_expsym_cmds, $1)=
++_LT_TAGVAR(link_all_deplibs, $1)=unknown
++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
++_LT_TAGVAR(no_undefined_flag, $1)=
++_LT_TAGVAR(whole_archive_flag_spec, $1)=
++_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+- cat <<EOF >> conftest.$ac_ext
+-#if defined (__STDC__) && __STDC__
+-# define lt_ptr_t void *
+-#else
+-# define lt_ptr_t char *
+-# define const
+-#endif
++# Source file extension for C++ test sources.
++ac_ext=cpp
+
+-/* The mapping between symbol names and symbols. */
+-const struct {
+- const char *name;
+- lt_ptr_t address;
+-}
+-lt_preloaded_symbols[[]] =
+-{
+-EOF
+- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+- cat <<\EOF >> conftest.$ac_ext
+- {0, (lt_ptr_t) 0}
+-};
++# Object file extension for compiled C++ test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+-#ifdef __cplusplus
+-}
+-#endif
+-EOF
+- # Now try linking the two files.
+- mv conftest.$ac_objext conftstm.$ac_objext
+- lt_save_LIBS="$LIBS"
+- lt_save_CFLAGS="$CFLAGS"
+- LIBS="conftstm.$ac_objext"
+- CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+- pipe_works=yes
+- fi
+- LIBS="$lt_save_LIBS"
+- CFLAGS="$lt_save_CFLAGS"
+- else
+- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+- fi
+- else
+- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+- fi
+- else
+- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+- fi
++# No sense in running all these tests if we already determined that
++# the CXX compiler isn't working. Some variables (like enable_shared)
++# are currently assumed to apply to all compilers on this platform,
++# and will be corrupted by setting them based on a non-working compiler.
++if test "$_lt_caught_CXX_error" != yes; then
++ # Code to be used in simple compile tests
++ lt_simple_compile_test_code="int some_variable = 0;"
++
++ # Code to be used in simple link tests
++ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
++
++ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
++ _LT_TAG_COMPILER
++
++ # save warnings/boilerplate of simple test code
++ _LT_COMPILER_BOILERPLATE
++ _LT_LINKER_BOILERPLATE
++
++ # Allow CC to be a program name with arguments.
++ lt_save_CC=$CC
++ lt_save_LD=$LD
++ lt_save_GCC=$GCC
++ GCC=$GXX
++ lt_save_with_gnu_ld=$with_gnu_ld
++ lt_save_path_LD=$lt_cv_path_LD
++ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
++ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+- cat conftest.$ac_ext >&5
++ $as_unset lt_cv_prog_gnu_ld
+ fi
+- rm -f conftest* conftst*
+-
+- # Do not use the global_symbol_pipe unless it works.
+- if test "$pipe_works" = yes; then
+- break
++ if test -n "${lt_cv_path_LDCXX+set}"; then
++ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+- lt_cv_sys_global_symbol_pipe=
++ $as_unset lt_cv_path_LD
+ fi
+-done
+-])
+-if test -z "$lt_cv_sys_global_symbol_pipe"; then
+- lt_cv_sys_global_symbol_to_cdecl=
+-fi
+-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+- AC_MSG_RESULT(failed)
+-else
+- AC_MSG_RESULT(ok)
+-fi
+-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
++ test -z "${LDCXX+set}" || LD=$LDCXX
++ CC=${CXX-"c++"}
++ compiler=$CC
++ _LT_TAGVAR(compiler, $1)=$CC
++ _LT_CC_BASENAME([$compiler])
+
++ if test -n "$compiler"; then
++ # We don't want -fno-exception when compiling C++ code, so set the
++ # no_builtin_flag separately
++ if test "$GXX" = yes; then
++ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
++ else
++ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
++ fi
+
+-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+-# ---------------------------------------
+-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
++ if test "$GXX" = yes; then
++ # Set up default GNU C++ configuration
+
+-AC_MSG_CHECKING([for $compiler option to produce PIC])
+- ifelse([$1],[CXX],[
+- # C++ specific cases for pic, static, wl, etc.
+- if test "$GXX" = yes; then
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
++ LT_PATH_LD
+
+- case $host_os in
+- aix*)
+- # All AIX code is PIC.
+- if test "$host_cpu" = ia64; then
+- # AIX 5 now supports IA64 processor
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- fi
+- ;;
+- amigaos*)
+- # FIXME: we need at least 68020 code to build shared libraries, but
+- # adding the `-m68020' flag to GCC prevents building anything better,
+- # like `-m68040'.
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+- ;;
+- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+- # PIC is the default for these OSes.
+- ;;
+- mingw* | cygwin* | os2* | pw32*)
+- # This hack is so that the source file can tell whether it is being
+- # built for inclusion in a dll (and should export symbols for example).
+- # Although the cygwin gcc ignores -fPIC, still need this for old-style
+- # (--disable-auto-import) libraries
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+- ;;
+- darwin* | rhapsody*)
+- # PIC is the default on this platform
+- # Common symbols not allowed in MH_DYLIB files
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+- ;;
+- *djgpp*)
+- # DJGPP does not support shared libraries at all
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- ;;
+- interix[[3-9]]*)
+- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+- # Instead, we relocate shared libraries at runtime.
+- ;;
+- sysv4*MP*)
+- if test -d /usr/nec; then
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
++ # Check if GNU C++ uses GNU ld as the underlying linker, since the
++ # archiving commands below assume that GNU ld is being used.
++ if test "$with_gnu_ld" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++
++ # If archive_cmds runs LD, not CC, wlarc should be empty
++ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
++ # investigate it a little bit more. (MM)
++ wlarc='${wl}'
++
++ # ancient GNU ld didn't support --whole-archive et. al.
++ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
++ $GREP 'no-whole-archive' > /dev/null; then
++ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++ else
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=
++ fi
++ else
++ with_gnu_ld=no
++ wlarc=
++
++ # A generic and very simple default shared library creation
++ # command for GNU C++ for the case where it uses the native
++ # linker, instead of GNU ld. If possible, this setting should
++ # overridden to take advantage of the native linker features on
++ # the platform it is being used on.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+- ;;
+- hpux*)
+- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+- # not for PA HP-UX.
+- case $host_cpu in
+- hppa*64*|ia64*)
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+- ;;
+- esac
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+- ;;
+- esac
+- else
++
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
++
++ else
++ GXX=no
++ with_gnu_ld=no
++ wlarc=
++ fi
++
++ # PORTME: fill in a description of your system's C++ link characteristics
++ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
++ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+- aix4* | aix5*)
+- # All AIX code is PIC.
+- if test "$host_cpu" = ia64; then
+- # AIX 5 now supports IA64 processor
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ aix3*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ aix[[4-9]]*)
++ if test "$host_cpu" = ia64; then
++ # On IA64, the linker does run time linking by default, so we don't
++ # have to do anything special.
++ aix_use_runtimelinking=no
++ exp_sym_flag='-Bexport'
++ no_entry_flag=""
++ else
++ aix_use_runtimelinking=no
++
++ # Test if we are trying to use run time linking or normal
++ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
++ # need to do runtime linking.
++ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
++ for ld_flag in $LDFLAGS; do
++ case $ld_flag in
++ *-brtl*)
++ aix_use_runtimelinking=yes
++ break
++ ;;
++ esac
++ done
++ ;;
++ esac
++
++ exp_sym_flag='-bexport'
++ no_entry_flag='-bnoentry'
++ fi
++
++ # When large executables or shared objects are built, AIX ld can
++ # have problems creating the table of contents. If linking a library
++ # or program results in "error TOC overflow" add -mminimal-toc to
++ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
++ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
++
++ _LT_TAGVAR(archive_cmds, $1)=''
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
++
++ if test "$GXX" = yes; then
++ case $host_os in aix4.[[012]]|aix4.[[012]].*)
++ # We only want to do this on AIX 4.2 and lower, the check
++ # below for broken collect2 doesn't work under 4.3+
++ collect2name=`${CC} -print-prog-name=collect2`
++ if test -f "$collect2name" &&
++ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
++ then
++ # We have reworked collect2
++ :
++ else
++ # We have old collect2
++ _LT_TAGVAR(hardcode_direct, $1)=unsupported
++ # It fails to find uninstalled libraries when the uninstalled
++ # path is not listed in the libpath. Setting hardcode_minus_L
++ # to unsupported forces relinking
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=
++ fi
++ esac
++ shared_flag='-shared'
++ if test "$aix_use_runtimelinking" = yes; then
++ shared_flag="$shared_flag "'${wl}-G'
++ fi
++ else
++ # not using gcc
++ if test "$host_cpu" = ia64; then
++ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
++ # chokes on -Wl,-G. The following line is correct:
++ shared_flag='-G'
++ else
++ if test "$aix_use_runtimelinking" = yes; then
++ shared_flag='${wl}-G'
++ else
++ shared_flag='${wl}-bM:SRE'
++ fi
++ fi
++ fi
++
++ # It seems that -bexpall does not export symbols beginning with
++ # underscore (_), so it is better to generate a list of symbols to
++ # export.
++ _LT_TAGVAR(always_export_symbols, $1)=yes
++ if test "$aix_use_runtimelinking" = yes; then
++ # Warning - without using the other runtime loading flags (-brtl),
++ # -berok will link without error, but may produce a broken library.
++ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
++ # Determine the default libpath from the value encoded in an empty
++ # executable.
++ _LT_SYS_MODULE_PATH_AIX
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ else
++ if test "$host_cpu" = ia64; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
++ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
++ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
++ else
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++ _LT_SYS_MODULE_PATH_AIX
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++ # Warning - without using the other run time loading flags,
++ # -berok will link without error, but may produce a broken library.
++ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
++ # Exported symbols can be pulled into shared objects from archives
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
++ # This is similar to how AIX traditionally builds its shared
++ # libraries.
++ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
++ fi
++ fi
++ ;;
++
++ beos*)
++ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
++ # support --undefined. This deserves some investigation. FIXME
++ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
++
+ chorus*)
+- case $cc_basename in
+- cxch68*)
+- # Green Hills C++ Compiler
+- # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
++ case $cc_basename in
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- esac
++ esac
++ ;;
++
++ cygwin* | mingw* | pw32*)
++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
++ # as there is no search path for DLLs.
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ _LT_TAGVAR(always_export_symbols, $1)=no
++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
++
++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++ # If the export-symbols file already is a .def file (1st line
++ # is EXPORTS), use it as is; otherwise, prepend...
++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
++ cp $export_symbols $output_objdir/$soname.def;
++ else
++ echo EXPORTS > $output_objdir/$soname.def;
++ cat $export_symbols >> $output_objdir/$soname.def;
++ fi~
++ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ darwin* | rhapsody*)
++ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+- darwin*)
+- # PIC is the default on this platform
+- # Common symbols not allowed in MH_DYLIB files
+- case $cc_basename in
+- xlc*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- ;;
+- esac
+- ;;
++
+ dgux*)
+- case $cc_basename in
+- ec++*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ case $cc_basename in
++ ec++*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- ghcx*)
++ ghcx*)
+ # Green Hills C++ Compiler
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- *)
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- esac
+- ;;
++ esac
++ ;;
++
++ freebsd[[12]]*)
++ # C++ shared libraries reported to be fairly broken before
++ # switch to ELF
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++
++ freebsd-elf*)
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ ;;
++
+ freebsd* | dragonfly*)
+- # FreeBSD uses GNU C++
+- ;;
+- hpux9* | hpux10* | hpux11*)
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+- if test "$host_cpu" != ia64; then
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+- fi
++ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
++ # conventions
++ _LT_TAGVAR(ld_shlibs, $1)=yes
++ ;;
++
++ gnu*)
++ ;;
++
++ hpux9*)
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
++ # but as the default
++ # location of the library.
++
++ case $cc_basename in
++ CC*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ aCC*)
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
++ ;;
++ *)
++ if test "$GXX" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++ else
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ esac
++ ;;
++
++ hpux10*|hpux11*)
++ if test $with_gnu_ld = no; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++
++ case $host_cpu in
++ hppa*64*|ia64*)
++ ;;
++ *)
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ ;;
++ esac
++ fi
++ case $host_cpu in
++ hppa*64*|ia64*)
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
++ *)
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
++ # but as the default
++ # location of the library.
++ ;;
++ esac
++
++ case $cc_basename in
++ CC*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- aCC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
++ aCC*)
+ case $host_cpu in
+- hppa*64*|ia64*)
+- # +Z the default
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+- ;;
++ hppa*64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ ia64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
+ esac
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+- *)
++ *)
++ if test "$GXX" = yes; then
++ if test $with_gnu_ld = no; then
++ case $host_cpu in
++ hppa*64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ ia64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ esac
++ fi
++ else
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
+ ;;
+- esac
+- ;;
+- interix*)
+- # This is c89, which is MS Visual C++ (no shared libs)
+- # Anyone wants to do a port?
+- ;;
+- irix5* | irix6* | nonstopux*)
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+- # CC pic flag -KPIC is the default.
++ esac
++ ;;
++
++ interix[[3-9]]*)
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
++ # Instead, shared libraries are loaded at an image base (0x10000000 by
++ # default) and relocated if they conflict, which is a slow very memory
++ # consuming and fragmenting process. To avoid this, we pick a random,
++ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
++ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++ ;;
++ irix5* | irix6*)
++ case $cc_basename in
++ CC*)
++ # SGI C++
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++
++ # Archives containing C++ object files must be created using
++ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
++ # necessary to make sure instantiated templates are included
++ # in the archive.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+- *)
++ *)
++ if test "$GXX" = yes; then
++ if test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
++ fi
++ fi
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+- esac
+- ;;
++ esac
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(inherit_rpath, $1)=yes
++ ;;
++
+ linux* | k*bsd*-gnu)
+- case $cc_basename in
+- KCC*)
+- # KAI C++ Compiler
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ case $cc_basename in
++ KCC*)
++ # Kuck and Associates, Inc. (KAI) C++ Compiler
++
++ # KCC will only create a shared library if the output file
++ # ends with ".so" (or ".sl" for HP-UX), so rename the library
++ # to its proper name (with version) after linking.
++ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++
++ # Archives containing C++ object files must be created using
++ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+- icpc* | ecpc*)
++ icpc* | ecpc* )
+ # Intel C++
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+- ;;
+- pgCC*)
+- # Portland Group C++ compiler.
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
+- cxx*)
+- # Compaq C++
+- # Make sure the PIC flag is empty. It appears that all Alpha
+- # Linux and Compaq Tru64 Unix objects are PIC.
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ with_gnu_ld=yes
++ # version 8.0 and above of icpc choke on multiply defined symbols
++ # if we add $predep_objects and $postdep_objects, however 7.1 and
++ # earlier do not add the objects themselves.
++ case `$CC -V 2>&1` in
++ *"Version 7."*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ ;;
++ *) # Version 8.0 or newer
++ tmp_idyn=
++ case $host_cpu in
++ ia64*) tmp_idyn=' -i_dynamic';;
++ esac
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ ;;
++ esac
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+- *)
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*)
+- # Sun C++ 5.9
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++ pgCC* | pgcpp*)
++ # Portland Group C++ compiler
++ case `$CC -V` in
++ *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
++ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
++ rm -rf $tpldir~
++ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
++ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
++ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
++ rm -rf $tpldir~
++ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
++ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
++ $RANLIB $oldlib'
++ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
++ rm -rf $tpldir~
++ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
++ rm -rf $tpldir~
++ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
++ ;;
++ *) # Version 6 will use weak symbols
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+- ;;
+- esac
+- ;;
+- lynxos*)
+- ;;
+- m88k*)
+- ;;
+- mvs*)
+- case $cc_basename in
+- cxx*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- netbsd*)
+- ;;
+- osf3* | osf4* | osf5*)
+- case $cc_basename in
+- KCC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+- ;;
+- RCC*)
+- # Rational C++ 2.4.1
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+- ;;
+- cxx*)
+- # Digital/Compaq C++
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # Make sure the PIC flag is empty. It appears that all Alpha
+- # Linux and Compaq Tru64 Unix objects are PIC.
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- psos*)
+- ;;
+- solaris*)
+- case $cc_basename in
+- CC*)
+- # Sun C++ 4.2, 5.x and Centerline C++
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+- ;;
+- gcx*)
+- # Green Hills C++ Compiler
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- sunos4*)
+- case $cc_basename in
+- CC*)
+- # Sun C++ 4.x
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
+- lcc*)
+- # Lucid
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- tandem*)
+- case $cc_basename in
+- NCC*)
+- # NonStop-UX NCC 3.20
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
+- esac
+- ;;
+- vxworks*)
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+- ;;
+- esac
+- fi
+-],
+-[
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+-
+- case $host_os in
+- aix*)
+- # All AIX code is PIC.
+- if test "$host_cpu" = ia64; then
+- # AIX 5 now supports IA64 processor
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- fi
+- ;;
+-
+- amigaos*)
+- # FIXME: we need at least 68020 code to build shared libraries, but
+- # adding the `-m68020' flag to GCC prevents building anything better,
+- # like `-m68040'.
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+- ;;
+-
+- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+- # PIC is the default for these OSes.
+- ;;
+-
+- mingw* | cygwin* | pw32* | os2*)
+- # This hack is so that the source file can tell whether it is being
+- # built for inclusion in a dll (and should export symbols for example).
+- # Although the cygwin gcc ignores -fPIC, still need this for old-style
+- # (--disable-auto-import) libraries
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+- ;;
+-
+- darwin* | rhapsody*)
+- # PIC is the default on this platform
+- # Common symbols not allowed in MH_DYLIB files
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+- ;;
+
+- interix[[3-9]]*)
+- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+- # Instead, we relocate shared libraries at runtime.
+- ;;
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ ;;
++ cxx*)
++ # Compaq C++
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+- msdosdjgpp*)
+- # Just because we use GCC doesn't mean we suddenly get shared libraries
+- # on systems that don't support them.
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+- enable_shared=no
+- ;;
++ runpath_var=LD_RUN_PATH
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+- sysv4*MP*)
+- if test -d /usr/nec; then
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+- fi
+- ;;
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
++ ;;
++ xl*)
++ # IBM XL 8.0 on PPC, with GNU ld
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ if test "x$supports_anon_versioning" = xyes; then
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
++ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
++ echo "local: *; };" >> $output_objdir/$libname.ver~
++ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++ fi
++ ;;
++ *)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ # Sun C++ 5.9
++ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ _LT_TAGVAR(compiler_needs_object, $1)=yes
++
++ # Not sure whether something based on
++ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
++ # would be better.
++ output_verbose_link_cmd='echo'
++
++ # Archives containing C++ object files must be created using
++ # "CC -xar", where "CC" is the Sun C++ compiler. This is
++ # necessary to make sure instantiated templates are included
++ # in the archive.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
++ ;;
++ esac
++ ;;
++ esac
++ ;;
+
+- hpux*)
+- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+- # not for PA HP-UX.
+- case $host_cpu in
+- hppa*64*|ia64*)
+- # +Z the default
++ lynxos*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++
++ m88k*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- esac
+- ;;
+
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+- ;;
+- esac
+- else
+- # PORTME Check for flag to pass linker flags through the system compiler.
+- case $host_os in
+- aix*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- if test "$host_cpu" = ia64; then
+- # AIX 5 now supports IA64 processor
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- else
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+- fi
+- ;;
+- darwin*)
+- # PIC is the default on this platform
+- # Common symbols not allowed in MH_DYLIB files
+- case $cc_basename in
+- xlc*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- ;;
+- esac
+- ;;
++ mvs*)
++ case $cc_basename in
++ cxx*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
++ ;;
+
+- mingw* | cygwin* | pw32* | os2*)
+- # This hack is so that the source file can tell whether it is being
+- # built for inclusion in a dll (and should export symbols for example).
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+- ;;
++ netbsd*)
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
++ wlarc=
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ fi
++ # Workaround some broken pre-1.5 toolchains
++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
++ ;;
+
+- hpux9* | hpux10* | hpux11*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+- # not for PA HP-UX.
+- case $host_cpu in
+- hppa*64*|ia64*)
+- # +Z the default
++ *nto* | *qnx*)
++ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
++
++ openbsd2*)
++ # C++ shared libraries are fairly broken
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++
++ openbsd*)
++ if test -f /usr/libexec/ld.so; then
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++ fi
++ output_verbose_link_cmd=echo
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
+ ;;
+- esac
+- # Is there a better lt_prog_compiler_static that works with the bundled CC?
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+- ;;
+
+- irix5* | irix6* | nonstopux*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # PIC (with -KPIC) is the default.
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+- ;;
++ osf3* | osf4* | osf5*)
++ case $cc_basename in
++ KCC*)
++ # Kuck and Associates, Inc. (KAI) C++ Compiler
++
++ # KCC will only create a shared library if the output file
++ # ends with ".so" (or ".sl" for HP-UX), so rename the library
++ # to its proper name (with version) after linking.
++ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++
++ # Archives containing C++ object files must be created using
++ # the KAI C++ compiler.
++ case $host in
++ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
++ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
++ esac
++ ;;
++ RCC*)
++ # Rational C++ 2.4.1
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ cxx*)
++ case $host in
++ osf3*)
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ ;;
++ *)
++ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
++ echo "-hidden">> $lib.exp~
++ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
++ $RM $lib.exp'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
++ ;;
++ esac
+
+- newsos6)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+- linux* | k*bsd*-gnu)
+- case $cc_basename in
+- icc* | ecc*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
++ ;;
++ *)
++ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
++ case $host in
++ osf3*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ ;;
++ esac
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
++
++ else
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ esac
+ ;;
+- pgcc* | pgf77* | pgf90* | pgf95*)
+- # Portland Group compilers (*not* the Pentium gcc compiler,
+- # which looks to be a dead project)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++
++ psos*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- ccc*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # All Alpha code is PIC.
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++
++ sunos4*)
++ case $cc_basename in
++ CC*)
++ # Sun C++ 4.x
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ lcc*)
++ # Lucid
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
+ ;;
+- como)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-lopt='
++
++ solaris*)
++ case $cc_basename in
++ CC*)
++ # Sun C++ 4.2, 5.x and Centerline C++
++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
++ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ case $host_os in
++ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ *)
++ # The compiler driver will combine and reorder linker options,
++ # but understands `-z linker_flag'.
++ # Supported since Solaris 2.6 (maybe 2.5.1?)
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
++ ;;
++ esac
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++
++ output_verbose_link_cmd='echo'
++
++ # Archives containing C++ object files must be created using
++ # "CC -xar", where "CC" is the Sun C++ compiler. This is
++ # necessary to make sure instantiated templates are included
++ # in the archive.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
++ ;;
++ gcx*)
++ # Green Hills C++ Compiler
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
++
++ # The C++ compiler must be used to create the archive.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
++ ;;
++ *)
++ # GNU C++ compiler with Solaris linker
++ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
++ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
++
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
++ else
++ # g++ 2.7 appears to require `-G' NOT `-shared' on this
++ # platform.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
++
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
++ fi
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
++ case $host_os in
++ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ *)
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++ ;;
++ esac
++ fi
++ ;;
++ esac
+ ;;
+- *)
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*)
+- # Sun C 5.9
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++
++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
++ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ runpath_var='LD_RUN_PATH'
++
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+- *Sun\ F*)
+- # Sun Fortran 8.3 passes all unrecognized flags to the linker
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+- esac
+- ;;
+ esac
+ ;;
+
+- osf3* | osf4* | osf5*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # All OSF/1 code is PIC.
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+- ;;
++ sysv5* | sco3.2v5* | sco5v6*)
++ # Note: We can NOT use -z defs as we might desire, because we do not
++ # link with -lc, and that would cause any symbols used from libc to
++ # always be unresolved, which means just about no library would
++ # ever link correctly. If we're not using GNU ld we use -z text
++ # though, which does catch some bad symbols but isn't as heavy-handed
++ # as -z defs.
++ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
++ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
++ runpath_var='LD_RUN_PATH'
+
+- rdos*)
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ esac
+ ;;
+
+- solaris*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- case $cc_basename in
+- f77* | f90* | f95*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
++ tandem*)
++ case $cc_basename in
++ NCC*)
++ # NonStop-UX NCC 3.20
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
++ ;;
++
++ vxworks*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++
+ *)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+- esac
+- ;;
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
+
+- sunos4*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
++ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+- sysv4 | sysv4.2uw2* | sysv4.3*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++ _LT_TAGVAR(GCC, $1)="$GXX"
++ _LT_TAGVAR(LD, $1)="$LD"
+
+- sysv4*MP*)
+- if test -d /usr/nec ;then
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- fi
+- ;;
++ ## CAVEAT EMPTOR:
++ ## There is no encapsulation within the following macros, do not change
++ ## the running order or otherwise move them around unless you know exactly
++ ## what you are doing...
++ _LT_SYS_HIDDEN_LIBDEPS($1)
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_SYS_DYNAMIC_LINKER($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
++
++ _LT_CONFIG($1)
++ fi # test -n "$compiler"
++
++ CC=$lt_save_CC
++ LDCXX=$LD
++ LD=$lt_save_LD
++ GCC=$lt_save_GCC
++ with_gnu_ld=$lt_save_with_gnu_ld
++ lt_cv_path_LDCXX=$lt_cv_path_LD
++ lt_cv_path_LD=$lt_save_path_LD
++ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
++ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
++fi # test "$_lt_caught_CXX_error" != yes
+
+- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++AC_LANG_POP
++])# _LT_LANG_CXX_CONFIG
+
+- unicos*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+- ;;
+
+- uts4*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
++# ---------------------------------
++# Figure out "hidden" library dependencies from verbose
++# compiler output when linking a shared library.
++# Parse the compiler output and extract the necessary
++# objects, libraries and library flags.
++m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
++[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++# Dependencies to place before and after the object being linked:
++_LT_TAGVAR(predep_objects, $1)=
++_LT_TAGVAR(postdep_objects, $1)=
++_LT_TAGVAR(predeps, $1)=
++_LT_TAGVAR(postdeps, $1)=
++_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+- ;;
+- esac
+- fi
++dnl we can't use the lt_simple_compile_test_code here,
++dnl because it contains code intended for an executable,
++dnl not a library. It's possible we should let each
++dnl tag define a new lt_????_link_test_code variable,
++dnl but it's only used here...
++m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
++int a;
++void foo (void) { a = 0; }
++_LT_EOF
++], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
++class Foo
++{
++public:
++ Foo (void) { a = 0; }
++private:
++ int a;
++};
++_LT_EOF
++], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
++ subroutine foo
++ implicit none
++ integer*4 a
++ a=0
++ return
++ end
++_LT_EOF
++], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
++ subroutine foo
++ implicit none
++ integer a
++ a=0
++ return
++ end
++_LT_EOF
++], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
++public class foo {
++ private int a;
++ public void bar (void) {
++ a = 0;
++ }
++};
++_LT_EOF
+ ])
+-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
++dnl Parse the compiler output and extract the necessary
++dnl objects, libraries and library flags.
++if AC_TRY_EVAL(ac_compile); then
++ # Parse the compiler output and extract the necessary
++ # objects, libraries and library flags.
+
+-#
+-# Check to make sure the PIC flag actually works.
+-#
+-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+- _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+- [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+- [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+- "" | " "*) ;;
+- *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+- esac],
+- [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+-fi
+-case $host_os in
+- # For platforms which do not support PIC, -DPIC is meaningless:
+- *djgpp*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+- ;;
+-esac
++ # Sentinel used to keep track of whether or not we are before
++ # the conftest object file.
++ pre_test_object_deps_done=no
+
+-#
+-# Check to make sure the static flag actually works.
+-#
+-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+- $lt_tmp_static_flag,
+- [],
+- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+-])
++ for p in `eval "$output_verbose_link_cmd"`; do
++ case $p in
++
++ -L* | -R* | -l*)
++ # Some compilers place space between "-{L,R}" and the path.
++ # Remove the space.
++ if test $p = "-L" ||
++ test $p = "-R"; then
++ prev=$p
++ continue
++ else
++ prev=
++ fi
+
++ if test "$pre_test_object_deps_done" = no; then
++ case $p in
++ -L* | -R*)
++ # Internal compiler library paths should come after those
++ # provided the user. The postdeps already come after the
++ # user supplied libs so there is no need to process them.
++ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
++ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
++ else
++ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
++ fi
++ ;;
++ # The "-l" case would never come before the object being
++ # linked, so don't bother handling this case.
++ esac
++ else
++ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
++ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
++ else
++ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
++ fi
++ fi
++ ;;
+
+-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+-# ------------------------------------
+-# See if the linker supports building shared libraries.
+-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+-ifelse([$1],[CXX],[
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+- case $host_os in
+- aix4* | aix5*)
+- # If we're using GNU nm, then we don't want the "-C" option.
+- # -C means demangle to AIX nm, but means don't demangle with GNU nm
+- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+- else
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+- fi
+- ;;
+- pw32*)
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+- ;;
+- cygwin* | mingw*)
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+- ;;
+- *)
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+- ;;
+- esac
+-],[
+- runpath_var=
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+- _LT_AC_TAGVAR(archive_cmds, $1)=
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+- _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+- _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+- _LT_AC_TAGVAR(module_cmds, $1)=
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+- _LT_AC_TAGVAR(always_export_symbols, $1)=no
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+- # include_expsyms should be a list of space-separated symbols to be *always*
+- # included in the symbol list
+- _LT_AC_TAGVAR(include_expsyms, $1)=
+- # exclude_expsyms can be an extended regexp of symbols to exclude
+- # it will be wrapped by ` (' and `)$', so one must not match beginning or
+- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+- # as well as any symbol that contains `d'.
+- _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+- # platforms (ab)use it in PIC code, but their linkers get confused if
+- # the symbol is explicitly referenced. Since portable code cannot
+- # rely on this symbol name, it's probably fine to never include it in
+- # preloaded symbol tables.
+- extract_expsyms_cmds=
+- # Just being paranoid about ensuring that cc_basename is set.
+- _LT_CC_BASENAME([$compiler])
+- case $host_os in
+- cygwin* | mingw* | pw32*)
+- # FIXME: the MSVC++ port hasn't been tested in a loooong time
+- # When not using gcc, we currently assume that we are using
+- # Microsoft Visual C++.
+- if test "$GCC" != yes; then
+- with_gnu_ld=no
+- fi
+- ;;
+- interix*)
+- # we just hope/assume this is gcc and not c89 (= MSVC++)
+- with_gnu_ld=yes
+- ;;
+- openbsd*)
+- with_gnu_ld=no
+- ;;
+- esac
++ *.$objext)
++ # This assumes that the test object file only shows up
++ # once in the compiler output.
++ if test "$p" = "conftest.$objext"; then
++ pre_test_object_deps_done=yes
++ continue
++ fi
+
+- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+- if test "$with_gnu_ld" = yes; then
+- # If archive_cmds runs LD, not CC, wlarc should be empty
+- wlarc='${wl}'
++ if test "$pre_test_object_deps_done" = no; then
++ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
++ _LT_TAGVAR(predep_objects, $1)="$p"
++ else
++ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
++ fi
++ else
++ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
++ _LT_TAGVAR(postdep_objects, $1)="$p"
++ else
++ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
++ fi
++ fi
++ ;;
++
++ *) ;; # Ignore the rest.
+
+- # Set some defaults for GNU ld with shared library support. These
+- # are reset later if shared libraries are not supported. Putting them
+- # here allows them to be overridden if necessary.
+- runpath_var=LD_RUN_PATH
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+- # ancient GNU ld didn't support --whole-archive et. al.
+- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+- else
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+- fi
+- supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
+- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+- *\ 2.11.*) ;; # other 2.11 versions
+- *) supports_anon_versioning=yes ;;
+ esac
++ done
+
+- # See if GNU ld supports shared libraries.
+- case $host_os in
+- aix3* | aix4* | aix5*)
+- # On AIX/PPC, the GNU linker is very broken
+- if test "$host_cpu" != ia64; then
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- cat <<EOF 1>&2
++ # Clean up.
++ rm -f a.out a.exe
++else
++ echo "libtool.m4: error: problem compiling $1 test program"
++fi
+
+-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+-*** to be unable to reliably create shared libraries on AIX.
+-*** Therefore, libtool is disabling shared libraries support. If you
+-*** really care for shared libraries, you may want to modify your PATH
+-*** so that a non-GNU linker is found, and then restart.
++$RM -f confest.$objext
+
+-EOF
+- fi
+- ;;
++# PORTME: override above test on systems where it is broken
++m4_if([$1], [CXX],
++[case $host_os in
++interix[[3-9]]*)
++ # Interix 3.5 installs completely hosed .la files for C++, so rather than
++ # hack all around it, let's just trust "g++" to DTRT.
++ _LT_TAGVAR(predep_objects,$1)=
++ _LT_TAGVAR(postdep_objects,$1)=
++ _LT_TAGVAR(postdeps,$1)=
++ ;;
+
+- amigaos*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+-
+- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+- # that the semantics of dynamic libraries on AmigaOS, at least up
+- # to version 4, is to share data among multiple programs linked
+- # with the same dynamic library. Since this doesn't match the
+- # behavior of shared libraries on other platforms, we can't use
+- # them.
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
++linux*)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ # Sun C++ 5.9
+
+- beos*)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+- # support --undefined. This deserves some investigation. FIXME
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
++ # The more standards-conforming stlport4 library is
++ # incompatible with the Cstd library. Avoid specifying
++ # it if it's in CXXFLAGS. Ignore libCrun as
++ # -library=stlport4 depends on it.
++ case " $CXX $CXXFLAGS " in
++ *" -library=stlport4 "*)
++ solaris_use_stlport4=yes
+ ;;
++ esac
+
+- cygwin* | mingw* | pw32*)
+- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+- # as there is no search path for DLLs.
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- _LT_AC_TAGVAR(always_export_symbols, $1)=no
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
++ if test "$solaris_use_stlport4" != yes; then
++ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
++ fi
++ ;;
++ esac
++ ;;
+
+- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+- # If the export-symbols file already is a .def file (1st line
+- # is EXPORTS), use it as is; otherwise, prepend...
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+- cp $export_symbols $output_objdir/$soname.def;
+- else
+- echo EXPORTS > $output_objdir/$soname.def;
+- cat $export_symbols >> $output_objdir/$soname.def;
+- fi~
+- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
++solaris*)
++ case $cc_basename in
++ CC*)
++ # The more standards-conforming stlport4 library is
++ # incompatible with the Cstd library. Avoid specifying
++ # it if it's in CXXFLAGS. Ignore libCrun as
++ # -library=stlport4 depends on it.
++ case " $CXX $CXXFLAGS " in
++ *" -library=stlport4 "*)
++ solaris_use_stlport4=yes
+ ;;
++ esac
+
+- interix[[3-9]]*)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+- # Instead, shared libraries are loaded at an image base (0x10000000 by
+- # default) and relocated if they conflict, which is a slow very memory
+- # consuming and fragmenting process. To avoid this, we pick a random,
+- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+- ;;
++ # Adding this requires a known-good setup of shared libraries for
++ # Sun compiler versions before 5.6, else PIC objects from an old
++ # archive will be linked into the output, leading to subtle bugs.
++ if test "$solaris_use_stlport4" != yes; then
++ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
++ fi
++ ;;
++ esac
++ ;;
++esac
++])
+
+- gnu* | linux* | k*bsd*-gnu)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- tmp_addflag=
+- case $cc_basename,$host_cpu in
+- pgcc*) # Portland Group C compiler
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+- tmp_addflag=' $pic_flag'
+- ;;
+- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+- tmp_addflag=' $pic_flag -Mnomain' ;;
+- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+- tmp_addflag=' -i_dynamic' ;;
+- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+- tmp_addflag=' -i_dynamic -nofor_main' ;;
+- ifc* | ifort*) # Intel Fortran compiler
+- tmp_addflag=' -nofor_main' ;;
+- esac
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*) # Sun C 5.9
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+- tmp_sharedflag='-G' ;;
+- *Sun\ F*) # Sun Fortran 8.3
+- tmp_sharedflag='-G' ;;
+- *)
+- tmp_sharedflag='-shared' ;;
+- esac
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++case " $_LT_TAGVAR(postdeps, $1) " in
++*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
++esac
++ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
++if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
++ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
++fi
++_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
++ [The directories searched by this compiler when creating a shared library])
++_LT_TAGDECL([], [predep_objects], [1],
++ [Dependencies to place before and after the objects being linked to
++ create a shared library])
++_LT_TAGDECL([], [postdep_objects], [1])
++_LT_TAGDECL([], [predeps], [1])
++_LT_TAGDECL([], [postdeps], [1])
++_LT_TAGDECL([], [compiler_lib_search_path], [1],
++ [The library search path used internally by the compiler when linking
++ a shared library])
++])# _LT_SYS_HIDDEN_LIBDEPS
++
++
++# _LT_PROG_F77
++# ------------
++# Since AC_PROG_F77 is broken, in that it returns the empty string
++# if there is no fortran compiler, we have our own version here.
++m4_defun([_LT_PROG_F77],
++[
++pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
++AC_PROG_F77
++if test -z "$F77" || test "X$F77" = "Xno"; then
++ _lt_disable_F77=yes
++fi
++popdef([AC_MSG_ERROR])
++])# _LT_PROG_F77
+
+- if test $supports_anon_versioning = yes; then
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+- $echo "local: *; };" >> $output_objdir/$libname.ver~
+- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+- fi
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([_LT_PROG_F77], [])
+
+- netbsd*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+- wlarc=
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- fi
+- ;;
+
+- solaris*)
+- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- cat <<EOF 1>&2
++# _LT_LANG_F77_CONFIG([TAG])
++# --------------------------
++# Ensure that the configuration variables for a Fortran 77 compiler are
++# suitably defined. These variables are subsequently used by _LT_CONFIG
++# to write the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_F77_CONFIG],
++[AC_REQUIRE([_LT_PROG_F77])dnl
++AC_LANG_PUSH(Fortran 77)
+
+-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+-*** create shared libraries on Solaris systems. Therefore, libtool
+-*** is disabling shared libraries support. We urge you to upgrade GNU
+-*** binutils to release 2.9.1 or newer. Another option is to modify
+-*** your PATH or compiler configuration so that the native linker is
+-*** used, and then restart.
++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
++_LT_TAGVAR(allow_undefined_flag, $1)=
++_LT_TAGVAR(always_export_symbols, $1)=no
++_LT_TAGVAR(archive_expsym_cmds, $1)=
++_LT_TAGVAR(export_dynamic_flag_spec, $1)=
++_LT_TAGVAR(hardcode_direct, $1)=no
++_LT_TAGVAR(hardcode_direct_absolute, $1)=no
++_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++_LT_TAGVAR(hardcode_libdir_separator, $1)=
++_LT_TAGVAR(hardcode_minus_L, $1)=no
++_LT_TAGVAR(hardcode_automatic, $1)=no
++_LT_TAGVAR(inherit_rpath, $1)=no
++_LT_TAGVAR(module_cmds, $1)=
++_LT_TAGVAR(module_expsym_cmds, $1)=
++_LT_TAGVAR(link_all_deplibs, $1)=unknown
++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
++_LT_TAGVAR(no_undefined_flag, $1)=
++_LT_TAGVAR(whole_archive_flag_spec, $1)=
++_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+-EOF
+- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
++# Source file extension for f77 test sources.
++ac_ext=f
+
+- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+- case `$LD -v 2>&1` in
+- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- cat <<_LT_EOF 1>&2
++# Object file extension for compiled f77 test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+-*** reliably create shared libraries on SCO systems. Therefore, libtool
+-*** is disabling shared libraries support. We urge you to upgrade GNU
+-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+-*** your PATH or compiler configuration so that the native linker is
+-*** used, and then restart.
++# No sense in running all these tests if we already determined that
++# the F77 compiler isn't working. Some variables (like enable_shared)
++# are currently assumed to apply to all compilers on this platform,
++# and will be corrupted by setting them based on a non-working compiler.
++if test "$_lt_disable_F77" != yes; then
++ # Code to be used in simple compile tests
++ lt_simple_compile_test_code="\
++ subroutine t
++ return
++ end
++"
+
+-_LT_EOF
+- ;;
+- *)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- esac
+- ;;
++ # Code to be used in simple link tests
++ lt_simple_link_test_code="\
++ program t
++ end
++"
+
+- sunos4*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+- wlarc=
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
++ _LT_TAG_COMPILER
+
+- *)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- esac
++ # save warnings/boilerplate of simple test code
++ _LT_COMPILER_BOILERPLATE
++ _LT_LINKER_BOILERPLATE
++
++ # Allow CC to be a program name with arguments.
++ lt_save_CC="$CC"
++ lt_save_GCC=$GCC
++ CC=${F77-"f77"}
++ compiler=$CC
++ _LT_TAGVAR(compiler, $1)=$CC
++ _LT_CC_BASENAME([$compiler])
++ GCC=$G77
++ if test -n "$compiler"; then
++ AC_MSG_CHECKING([if libtool supports shared libraries])
++ AC_MSG_RESULT([$can_build_shared])
+
+- if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+- runpath_var=
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+- fi
+- else
+- # PORTME fill in a description of your system's linker (not GNU ld)
+- case $host_os in
+- aix3*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+- # Note: this linker hardcodes the directories in LIBPATH if there
+- # are no directories specified by -L.
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+- # Neither direct hardcoding nor static linking is supported with a
+- # broken collect2.
+- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+- fi
+- ;;
++ AC_MSG_CHECKING([whether to build shared libraries])
++ test "$can_build_shared" = "no" && enable_shared=no
+
+- aix4* | aix5*)
+- if test "$host_cpu" = ia64; then
+- # On IA64, the linker does run time linking by default, so we don't
+- # have to do anything special.
+- aix_use_runtimelinking=no
+- exp_sym_flag='-Bexport'
+- no_entry_flag=""
+- else
+- # If we're using GNU nm, then we don't want the "-C" option.
+- # -C means demangle to AIX nm, but means don't demangle with GNU nm
+- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+- else
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
++ # On AIX, shared libraries and static libraries use the same namespace, and
++ # are all built from PIC.
++ case $host_os in
++ aix3*)
++ test "$enable_shared" = yes && enable_static=no
++ if test -n "$RANLIB"; then
++ archive_cmds="$archive_cmds~\$RANLIB \$lib"
++ postinstall_cmds='$RANLIB $lib'
++ fi
++ ;;
++ aix[[4-9]]*)
++ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
++ test "$enable_shared" = yes && enable_static=no
+ fi
+- aix_use_runtimelinking=no
+-
+- # Test if we are trying to use run time linking or normal
+- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+- # need to do runtime linking.
+- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+- for ld_flag in $LDFLAGS; do
+- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+- aix_use_runtimelinking=yes
+- break
+- fi
+- done
+- ;;
+- esac
++ ;;
++ esac
++ AC_MSG_RESULT([$enable_shared])
+
+- exp_sym_flag='-bexport'
+- no_entry_flag='-bnoentry'
+- fi
++ AC_MSG_CHECKING([whether to build static libraries])
++ # Make sure either enable_shared or enable_static is yes.
++ test "$enable_shared" = yes || enable_static=yes
++ AC_MSG_RESULT([$enable_static])
++
++ _LT_TAGVAR(GCC, $1)="$G77"
++ _LT_TAGVAR(LD, $1)="$LD"
++
++ ## CAVEAT EMPTOR:
++ ## There is no encapsulation within the following macros, do not change
++ ## the running order or otherwise move them around unless you know exactly
++ ## what you are doing...
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_SYS_DYNAMIC_LINKER($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
++
++ _LT_CONFIG($1)
++ fi # test -n "$compiler"
++
++ GCC=$lt_save_GCC
++ CC="$lt_save_CC"
++fi # test "$_lt_disable_F77" != yes
+
+- # When large executables or shared objects are built, AIX ld can
+- # have problems creating the table of contents. If linking a library
+- # or program results in "error TOC overflow" add -mminimal-toc to
+- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
++AC_LANG_POP
++])# _LT_LANG_F77_CONFIG
+
+- _LT_AC_TAGVAR(archive_cmds, $1)=''
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+- if test "$GCC" = yes; then
+- case $host_os in aix4.[[012]]|aix4.[[012]].*)
+- # We only want to do this on AIX 4.2 and lower, the check
+- # below for broken collect2 doesn't work under 4.3+
+- collect2name=`${CC} -print-prog-name=collect2`
+- if test -f "$collect2name" && \
+- strings "$collect2name" | grep resolve_lib_name >/dev/null
+- then
+- # We have reworked collect2
+- :
+- else
+- # We have old collect2
+- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+- # It fails to find uninstalled libraries when the uninstalled
+- # path is not listed in the libpath. Setting hardcode_minus_L
+- # to unsupported forces relinking
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+- fi
+- ;;
+- esac
+- shared_flag='-shared'
+- if test "$aix_use_runtimelinking" = yes; then
+- shared_flag="$shared_flag "'${wl}-G'
+- fi
+- else
+- # not using gcc
+- if test "$host_cpu" = ia64; then
+- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+- # chokes on -Wl,-G. The following line is correct:
+- shared_flag='-G'
+- else
+- if test "$aix_use_runtimelinking" = yes; then
+- shared_flag='${wl}-G'
+- else
+- shared_flag='${wl}-bM:SRE'
+- fi
+- fi
+- fi
++# _LT_PROG_FC
++# -----------
++# Since AC_PROG_FC is broken, in that it returns the empty string
++# if there is no fortran compiler, we have our own version here.
++m4_defun([_LT_PROG_FC],
++[
++pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
++AC_PROG_FC
++if test -z "$FC" || test "X$FC" = "Xno"; then
++ _lt_disable_FC=yes
++fi
++popdef([AC_MSG_ERROR])
++])# _LT_PROG_FC
+
+- # It seems that -bexpall does not export symbols beginning with
+- # underscore (_), so it is better to generate a list of symbols to export.
+- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+- if test "$aix_use_runtimelinking" = yes; then
+- # Warning - without using the other runtime loading flags (-brtl),
+- # -berok will link without error, but may produce a broken library.
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+- # Determine the default libpath from the value encoded in an empty executable.
+- _LT_AC_SYS_LIBPATH_AIX
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+- else
+- if test "$host_cpu" = ia64; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+- else
+- # Determine the default libpath from the value encoded in an empty executable.
+- _LT_AC_SYS_LIBPATH_AIX
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+- # Warning - without using the other run time loading flags,
+- # -berok will link without error, but may produce a broken library.
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+- # Exported symbols can be pulled into shared objects from archives
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+- # This is similar to how AIX traditionally builds its shared libraries.
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+- fi
+- fi
+- ;;
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([_LT_PROG_FC], [])
+
+- amigaos*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- # see comment about different semantics on the GNU ld section
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+
+- bsdi[[45]]*)
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+- ;;
++# _LT_LANG_FC_CONFIG([TAG])
++# -------------------------
++# Ensure that the configuration variables for a Fortran compiler are
++# suitably defined. These variables are subsequently used by _LT_CONFIG
++# to write the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_FC_CONFIG],
++[AC_REQUIRE([_LT_PROG_FC])dnl
++AC_LANG_PUSH(Fortran)
++
++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
++_LT_TAGVAR(allow_undefined_flag, $1)=
++_LT_TAGVAR(always_export_symbols, $1)=no
++_LT_TAGVAR(archive_expsym_cmds, $1)=
++_LT_TAGVAR(export_dynamic_flag_spec, $1)=
++_LT_TAGVAR(hardcode_direct, $1)=no
++_LT_TAGVAR(hardcode_direct_absolute, $1)=no
++_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++_LT_TAGVAR(hardcode_libdir_separator, $1)=
++_LT_TAGVAR(hardcode_minus_L, $1)=no
++_LT_TAGVAR(hardcode_automatic, $1)=no
++_LT_TAGVAR(inherit_rpath, $1)=no
++_LT_TAGVAR(module_cmds, $1)=
++_LT_TAGVAR(module_expsym_cmds, $1)=
++_LT_TAGVAR(link_all_deplibs, $1)=unknown
++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
++_LT_TAGVAR(no_undefined_flag, $1)=
++_LT_TAGVAR(whole_archive_flag_spec, $1)=
++_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+- cygwin* | mingw* | pw32*)
+- # When not using gcc, we currently assume that we are using
+- # Microsoft Visual C++.
+- # hardcode_libdir_flag_spec is actually meaningless, as there is
+- # no search path for DLLs.
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- # Tell ltmain to make .lib files, not .a files.
+- libext=lib
+- # Tell ltmain to make .dll files, not .so files.
+- shrext_cmds=".dll"
+- # FIXME: Setting linknames here is a bad hack.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+- # The linker will automatically build a .lib file if we build a DLL.
+- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+- # FIXME: Should let the user specify the lib program.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+- _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+- ;;
++# Source file extension for fc test sources.
++ac_ext=${ac_fc_srcext-f}
+
+- darwin* | rhapsody*)
+- case $host_os in
+- rhapsody* | darwin1.[[012]])
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+- ;;
+- *) # Darwin 1.3 on
+- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+- else
+- case ${MACOSX_DEPLOYMENT_TARGET} in
+- 10.[[012]])
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+- ;;
+- 10.*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+- ;;
+- esac
+- fi
+- ;;
+- esac
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- if test "$GCC" = yes ; then
+- output_verbose_link_cmd='echo'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- else
+- case $cc_basename in
+- xlc*)
+- output_verbose_link_cmd='echo'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- ;;
+- *)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- fi
+- ;;
++# Object file extension for compiled fc test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+- dgux*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++# No sense in running all these tests if we already determined that
++# the FC compiler isn't working. Some variables (like enable_shared)
++# are currently assumed to apply to all compilers on this platform,
++# and will be corrupted by setting them based on a non-working compiler.
++if test "$_lt_disable_FC" != yes; then
++ # Code to be used in simple compile tests
++ lt_simple_compile_test_code="\
++ subroutine t
++ return
++ end
++"
+
+- freebsd1*)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
++ # Code to be used in simple link tests
++ lt_simple_link_test_code="\
++ program t
++ end
++"
+
+- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+- # support. Future versions do this automatically, but an explicit c++rt0.o
+- # does not break anything, and helps significantly (at the cost of a little
+- # extra space).
+- freebsd2.2*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
++ _LT_TAG_COMPILER
+
+- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ # save warnings/boilerplate of simple test code
++ _LT_COMPILER_BOILERPLATE
++ _LT_LINKER_BOILERPLATE
++
++ # Allow CC to be a program name with arguments.
++ lt_save_CC="$CC"
++ lt_save_GCC=$GCC
++ CC=${FC-"f95"}
++ compiler=$CC
++ GCC=$ac_cv_fc_compiler_gnu
+
+- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+- freebsd* | dragonfly*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ _LT_TAGVAR(compiler, $1)=$CC
++ _LT_CC_BASENAME([$compiler])
+
+- hpux9*)
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++ if test -n "$compiler"; then
++ AC_MSG_CHECKING([if libtool supports shared libraries])
++ AC_MSG_RESULT([$can_build_shared])
+
+- # hardcode_minus_L: Not really in the search PATH,
+- # but as the default location of the library.
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- ;;
++ AC_MSG_CHECKING([whether to build shared libraries])
++ test "$can_build_shared" = "no" && enable_shared=no
+
+- hpux10*)
+- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+- fi
+- if test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
++ # On AIX, shared libraries and static libraries use the same namespace, and
++ # are all built from PIC.
++ case $host_os in
++ aix3*)
++ test "$enable_shared" = yes && enable_static=no
++ if test -n "$RANLIB"; then
++ archive_cmds="$archive_cmds~\$RANLIB \$lib"
++ postinstall_cmds='$RANLIB $lib'
++ fi
++ ;;
++ aix[[4-9]]*)
++ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
++ test "$enable_shared" = yes && enable_static=no
++ fi
++ ;;
++ esac
++ AC_MSG_RESULT([$enable_shared])
+
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ AC_MSG_CHECKING([whether to build static libraries])
++ # Make sure either enable_shared or enable_static is yes.
++ test "$enable_shared" = yes || enable_static=yes
++ AC_MSG_RESULT([$enable_static])
++
++ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
++ _LT_TAGVAR(LD, $1)="$LD"
++
++ ## CAVEAT EMPTOR:
++ ## There is no encapsulation within the following macros, do not change
++ ## the running order or otherwise move them around unless you know exactly
++ ## what you are doing...
++ _LT_SYS_HIDDEN_LIBDEPS($1)
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_SYS_DYNAMIC_LINKER($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
++
++ _LT_CONFIG($1)
++ fi # test -n "$compiler"
++
++ GCC=$lt_save_GCC
++ CC="$lt_save_CC"
++fi # test "$_lt_disable_FC" != yes
+
+- # hardcode_minus_L: Not really in the search PATH,
+- # but as the default location of the library.
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- fi
+- ;;
++AC_LANG_POP
++])# _LT_LANG_FC_CONFIG
+
+- hpux11*)
+- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+- case $host_cpu in
+- hppa*64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- ia64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- esac
+- else
+- case $host_cpu in
+- hppa*64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- ia64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- esac
+- fi
+- if test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+- case $host_cpu in
+- hppa*64*|ia64*)
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
+- *)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++# _LT_LANG_GCJ_CONFIG([TAG])
++# --------------------------
++# Ensure that the configuration variables for the GNU Java Compiler compiler
++# are suitably defined. These variables are subsequently used by _LT_CONFIG
++# to write the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_GCJ_CONFIG],
++[AC_REQUIRE([LT_PROG_GCJ])dnl
++AC_LANG_SAVE
+
+- # hardcode_minus_L: Not really in the search PATH,
+- # but as the default location of the library.
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- ;;
+- esac
+- fi
+- ;;
++# Source file extension for Java test sources.
++ac_ext=java
+
+- irix5* | irix6* | nonstopux*)
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- ;;
++# Object file extension for compiled Java test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+- netbsd*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++# Code to be used in simple compile tests
++lt_simple_compile_test_code="class foo {}"
+
+- newsos6)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++# Code to be used in simple link tests
++lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+- openbsd*)
+- if test -f /usr/libexec/ld.so; then
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- else
+- case $host_os in
+- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- ;;
+- esac
+- fi
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
++# ltmain only uses $CC for tagged configurations so make sure $CC is set.
++_LT_TAG_COMPILER
+
+- os2*)
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+- ;;
++# save warnings/boilerplate of simple test code
++_LT_COMPILER_BOILERPLATE
++_LT_LINKER_BOILERPLATE
+
+- osf3*)
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+- else
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- ;;
++# Allow CC to be a program name with arguments.
++lt_save_CC="$CC"
++lt_save_GCC=$GCC
++GCC=yes
++CC=${GCJ-"gcj"}
++compiler=$CC
++_LT_TAGVAR(compiler, $1)=$CC
++_LT_TAGVAR(LD, $1)="$LD"
++_LT_CC_BASENAME([$compiler])
+
+- osf4* | osf5*) # as osf3* with the addition of -msym flag
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- else
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
++# GCJ did not exist at the time GCC didn't implicitly link libc in.
++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+- # Both c and cxx compiler support -rpath directly
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- ;;
++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+- solaris*)
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+- if test "$GCC" = yes; then
+- wlarc='${wl}'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+- else
+- wlarc=''
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- case $host_os in
+- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+- *)
+- # The compiler driver will combine and reorder linker options,
+- # but understands `-z linker_flag'. GCC discards it without `$wl',
+- # but is careful enough not to reorder.
+- # Supported since Solaris 2.6 (maybe 2.5.1?)
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+- else
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+- fi
+- ;;
+- esac
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- ;;
++## CAVEAT EMPTOR:
++## There is no encapsulation within the following macros, do not change
++## the running order or otherwise move them around unless you know exactly
++## what you are doing...
++if test -n "$compiler"; then
++ _LT_COMPILER_NO_RTTI($1)
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+- sunos4*)
+- if test "x$host_vendor" = xsequent; then
+- # Use $CC to link under sequent, because it throws in some extra .o
+- # files that make .init and .fini sections work.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ _LT_CONFIG($1)
++fi
+
+- sysv4)
+- case $host_vendor in
+- sni)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+- ;;
+- siemens)
+- ## LD is ld it makes a PLAMLIB
+- ## CC just makes a GrossModule.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- ;;
+- motorola)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+- ;;
+- esac
+- runpath_var='LD_RUN_PATH'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++AC_LANG_RESTORE
+
+- sysv4.3*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+- ;;
++GCC=$lt_save_GCC
++CC="$lt_save_CC"
++])# _LT_LANG_GCJ_CONFIG
+
+- sysv4*MP*)
+- if test -d /usr/nec; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- runpath_var=LD_RUN_PATH
+- hardcode_runpath_var=yes
+- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+- fi
+- ;;
+
+- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- runpath_var='LD_RUN_PATH'
++# _LT_LANG_RC_CONFIG([TAG])
++# -------------------------
++# Ensure that the configuration variables for the Windows resource compiler
++# are suitably defined. These variables are subsequently used by _LT_CONFIG
++# to write the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_RC_CONFIG],
++[AC_REQUIRE([LT_PROG_RC])dnl
++AC_LANG_SAVE
+
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- fi
+- ;;
++# Source file extension for RC test sources.
++ac_ext=rc
+
+- sysv5* | sco3.2v5* | sco5v6*)
+- # Note: We can NOT use -z defs as we might desire, because we do not
+- # link with -lc, and that would cause any symbols used from libc to
+- # always be unresolved, which means just about no library would
+- # ever link correctly. If we're not using GNU ld we use -z text
+- # though, which does catch some bad symbols but isn't as heavy-handed
+- # as -z defs.
+- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+- runpath_var='LD_RUN_PATH'
++# Object file extension for compiled RC test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- fi
+- ;;
++# Code to be used in simple compile tests
++lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+- uts4*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++# Code to be used in simple link tests
++lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+- *)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- fi
+-])
+-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
++# ltmain only uses $CC for tagged configurations so make sure $CC is set.
++_LT_TAG_COMPILER
+
+-#
+-# Do we need to explicitly link libc?
+-#
+-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+-x|xyes)
+- # Assume -lc should be added
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
++# save warnings/boilerplate of simple test code
++_LT_COMPILER_BOILERPLATE
++_LT_LINKER_BOILERPLATE
+
+- if test "$enable_shared" = yes && test "$GCC" = yes; then
+- case $_LT_AC_TAGVAR(archive_cmds, $1) in
+- *'~'*)
+- # FIXME: we may have to deal with multi-command sequences.
+- ;;
+- '$CC '*)
+- # Test whether the compiler implicitly links with -lc since on some
+- # systems, -lgcc has to come before -lc. If gcc already passes -lc
+- # to ld, don't add -lc before -lgcc.
+- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+- $rm conftest*
+- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++# Allow CC to be a program name with arguments.
++lt_save_CC="$CC"
++lt_save_GCC=$GCC
++GCC=
++CC=${RC-"windres"}
++compiler=$CC
++_LT_TAGVAR(compiler, $1)=$CC
++_LT_CC_BASENAME([$compiler])
++_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+- soname=conftest
+- lib=conftest
+- libobjs=conftest.$ac_objext
+- deplibs=
+- wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+- pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+- compiler_flags=-v
+- linker_flags=-v
+- verstring=
+- output_objdir=.
+- libname=conftest
+- lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+- if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+- then
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- else
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+- fi
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+- else
+- cat conftest.err 1>&5
+- fi
+- $rm conftest*
+- AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+- ;;
+- esac
+- fi
+- ;;
+-esac
+-])# AC_LIBTOOL_PROG_LD_SHLIBS
++if test -n "$compiler"; then
++ :
++ _LT_CONFIG($1)
++fi
+
++GCC=$lt_save_GCC
++AC_LANG_RESTORE
++CC="$lt_save_CC"
++])# _LT_LANG_RC_CONFIG
+
+-# _LT_AC_FILE_LTDLL_C
+-# -------------------
+-# Be careful that the start marker always follows a newline.
+-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+-# /* ltdll.c starts here */
+-# #define WIN32_LEAN_AND_MEAN
+-# #include <windows.h>
+-# #undef WIN32_LEAN_AND_MEAN
+-# #include <stdio.h>
+-#
+-# #ifndef __CYGWIN__
+-# # ifdef __CYGWIN32__
+-# # define __CYGWIN__ __CYGWIN32__
+-# # endif
+-# #endif
+-#
+-# #ifdef __cplusplus
+-# extern "C" {
+-# #endif
+-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+-# #ifdef __cplusplus
+-# }
+-# #endif
+-#
+-# #ifdef __CYGWIN__
+-# #include <cygwin/cygwin_dll.h>
+-# DECLARE_CYGWIN_DLL( DllMain );
+-# #endif
+-# HINSTANCE __hDllInstance_base;
+-#
+-# BOOL APIENTRY
+-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+-# {
+-# __hDllInstance_base = hInst;
+-# return TRUE;
+-# }
+-# /* ltdll.c ends here */
+-])# _LT_AC_FILE_LTDLL_C
+
++# LT_PROG_GCJ
++# -----------
++AC_DEFUN([LT_PROG_GCJ],
++[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
++ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
++ [AC_CHECK_TOOL(GCJ, gcj,)
++ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
++ AC_SUBST(GCJFLAGS)])])[]dnl
++])
+
+-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+-# ---------------------------------
+-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
++# Old name:
++AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+-# old names
+-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
+-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
+-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
+-
+-# This is just to silence aclocal about the macro not being used
+-ifelse([AC_DISABLE_FAST_INSTALL])
+-
+-AC_DEFUN([LT_AC_PROG_GCJ],
+-[AC_CHECK_TOOL(GCJ, gcj, no)
+- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+- AC_SUBST(GCJFLAGS)
++# LT_PROG_RC
++# ----------
++AC_DEFUN([LT_PROG_RC],
++[AC_CHECK_TOOL(RC, windres,)
+ ])
+
+-AC_DEFUN([LT_AC_PROG_RC],
+-[AC_CHECK_TOOL(RC, windres, no)
+-])
++# Old name:
++AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+-# Cheap backport of AS_EXECUTABLE_P and required macros
+-# from Autoconf 2.59; we should not use $as_executable_p directly.
++# _LT_DECL_EGREP
++# --------------
++# If we don't have a new enough Autoconf to choose the best grep
++# available, choose the one first in the user's PATH.
++m4_defun([_LT_DECL_EGREP],
++[AC_REQUIRE([AC_PROG_EGREP])dnl
++AC_REQUIRE([AC_PROG_FGREP])dnl
++test -z "$GREP" && GREP=grep
++_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
++_LT_DECL([], [EGREP], [1], [An ERE matcher])
++_LT_DECL([], [FGREP], [1], [A literal string matcher])
++dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
++AC_SUBST([GREP])
++])
+
+-# _AS_TEST_PREPARE
+-# ----------------
+-m4_ifndef([_AS_TEST_PREPARE],
+-[m4_defun([_AS_TEST_PREPARE],
+-[if test -x / >/dev/null 2>&1; then
+- as_executable_p='test -x'
+-else
+- as_executable_p='test -f'
+-fi
+-])])# _AS_TEST_PREPARE
+
+-# AS_EXECUTABLE_P
+-# ---------------
+-# Check whether a file is executable.
+-m4_ifndef([AS_EXECUTABLE_P],
+-[m4_defun([AS_EXECUTABLE_P],
+-[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+-$as_executable_p $1[]dnl
+-])])# AS_EXECUTABLE_P
++# _LT_DECL_SED
++# ------------
++# Check for a fully-functional sed program, that truncates
++# as few characters as possible. Prefer GNU sed if found.
++m4_defun([_LT_DECL_SED],
++[AC_PROG_SED
++test -z "$SED" && SED=sed
++Xsed="$SED -e 1s/^X//"
++_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
++_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
++ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
++])# _LT_DECL_SED
+
++m4_ifndef([AC_PROG_SED], [
+ ############################################################
+ # NOTE: This macro has been submitted for inclusion into #
+ # GNU Autoconf as AC_PROG_SED. When it is available in #
+ # a released version of Autoconf we should remove this #
+ # macro and use it instead. #
+ ############################################################
+-# LT_AC_PROG_SED
+-# --------------
+-# Check for a fully-functional sed program, that truncates
+-# as few characters as possible. Prefer GNU sed if found.
+-AC_DEFUN([LT_AC_PROG_SED],
++
++m4_defun([AC_PROG_SED],
+ [AC_MSG_CHECKING([for a sed that does not truncate output])
+ AC_CACHE_VAL(lt_cv_path_SED,
+ [# Loop through the user's path and test for sed and gsed.
+@@ -6544,7 +7004,7 @@
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
++ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+@@ -6585,4 +7045,266 @@
+ SED=$lt_cv_path_SED
+ AC_SUBST([SED])
+ AC_MSG_RESULT([$SED])
++])#AC_PROG_SED
++])#m4_ifndef
++
++# Old name:
++AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([LT_AC_PROG_SED], [])
++
++
++# _LT_CHECK_SHELL_FEATURES
++# ------------------------
++# Find out whether the shell is Bourne or XSI compatible,
++# or has some other useful features.
++m4_defun([_LT_CHECK_SHELL_FEATURES],
++[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
++# Try some XSI features
++xsi_shell=no
++( _lt_dummy="a/b/c"
++ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
++ = c,a/b,, \
++ && eval 'test $(( 1 + 1 )) -eq 2 \
++ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
++ && xsi_shell=yes
++AC_MSG_RESULT([$xsi_shell])
++_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
++
++AC_MSG_CHECKING([whether the shell understands "+="])
++lt_shell_append=no
++( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
++ >/dev/null 2>&1 \
++ && lt_shell_append=yes
++AC_MSG_RESULT([$lt_shell_append])
++_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
++
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++ lt_unset=unset
++else
++ lt_unset=false
++fi
++_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
++
++# test EBCDIC or ASCII
++case `echo X|tr X '\101'` in
++ A) # ASCII based system
++ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
++ lt_SP2NL='tr \040 \012'
++ lt_NL2SP='tr \015\012 \040\040'
++ ;;
++ *) # EBCDIC based system
++ lt_SP2NL='tr \100 \n'
++ lt_NL2SP='tr \r\n \100\100'
++ ;;
++esac
++_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
++_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
++])# _LT_CHECK_SHELL_FEATURES
++
++
++# _LT_PROG_XSI_SHELLFNS
++# ---------------------
++# Bourne and XSI compatible variants of some useful shell functions.
++m4_defun([_LT_PROG_XSI_SHELLFNS],
++[case $xsi_shell in
++ yes)
++ cat << \_LT_EOF >> "$cfgfile"
++
++# func_dirname file append nondir_replacement
++# Compute the dirname of FILE. If nonempty, add APPEND to the result,
++# otherwise set result to NONDIR_REPLACEMENT.
++func_dirname ()
++{
++ case ${1} in
++ */*) func_dirname_result="${1%/*}${2}" ;;
++ * ) func_dirname_result="${3}" ;;
++ esac
++}
++
++# func_basename file
++func_basename ()
++{
++ func_basename_result="${1##*/}"
++}
++
++# func_dirname_and_basename file append nondir_replacement
++# perform func_basename and func_dirname in a single function
++# call:
++# dirname: Compute the dirname of FILE. If nonempty,
++# add APPEND to the result, otherwise set result
++# to NONDIR_REPLACEMENT.
++# value returned in "$func_dirname_result"
++# basename: Compute filename of FILE.
++# value retuned in "$func_basename_result"
++# Implementation must be kept synchronized with func_dirname
++# and func_basename. For efficiency, we do not delegate to
++# those functions but instead duplicate the functionality here.
++func_dirname_and_basename ()
++{
++ case ${1} in
++ */*) func_dirname_result="${1%/*}${2}" ;;
++ * ) func_dirname_result="${3}" ;;
++ esac
++ func_basename_result="${1##*/}"
++}
++
++# func_stripname prefix suffix name
++# strip PREFIX and SUFFIX off of NAME.
++# PREFIX and SUFFIX must not contain globbing or regex special
++# characters, hashes, percent signs, but SUFFIX may contain a leading
++# dot (in which case that matches only a dot).
++func_stripname ()
++{
++ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
++ # positional parameters, so assign one to ordinary parameter first.
++ func_stripname_result=${3}
++ func_stripname_result=${func_stripname_result#"${1}"}
++ func_stripname_result=${func_stripname_result%"${2}"}
++}
++
++# func_opt_split
++func_opt_split ()
++{
++ func_opt_split_opt=${1%%=*}
++ func_opt_split_arg=${1#*=}
++}
++
++# func_lo2o object
++func_lo2o ()
++{
++ case ${1} in
++ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
++ *) func_lo2o_result=${1} ;;
++ esac
++}
++
++# func_xform libobj-or-source
++func_xform ()
++{
++ func_xform_result=${1%.*}.lo
++}
++
++# func_arith arithmetic-term...
++func_arith ()
++{
++ func_arith_result=$(( $[*] ))
++}
++
++# func_len string
++# STRING may not start with a hyphen.
++func_len ()
++{
++ func_len_result=${#1}
++}
++
++_LT_EOF
++ ;;
++ *) # Bourne compatible functions.
++ cat << \_LT_EOF >> "$cfgfile"
++
++# func_dirname file append nondir_replacement
++# Compute the dirname of FILE. If nonempty, add APPEND to the result,
++# otherwise set result to NONDIR_REPLACEMENT.
++func_dirname ()
++{
++ # Extract subdirectory from the argument.
++ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
++ if test "X$func_dirname_result" = "X${1}"; then
++ func_dirname_result="${3}"
++ else
++ func_dirname_result="$func_dirname_result${2}"
++ fi
++}
++
++# func_basename file
++func_basename ()
++{
++ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
++}
++
++dnl func_dirname_and_basename
++dnl A portable version of this function is already defined in general.m4sh
++dnl so there is no need for it here.
++
++# func_stripname prefix suffix name
++# strip PREFIX and SUFFIX off of NAME.
++# PREFIX and SUFFIX must not contain globbing or regex special
++# characters, hashes, percent signs, but SUFFIX may contain a leading
++# dot (in which case that matches only a dot).
++# func_strip_suffix prefix name
++func_stripname ()
++{
++ case ${2} in
++ .*) func_stripname_result=`$ECHO "X${3}" \
++ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
++ *) func_stripname_result=`$ECHO "X${3}" \
++ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
++ esac
++}
++
++# sed scripts:
++my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
++my_sed_long_arg='1s/^-[[^=]]*=//'
++
++# func_opt_split
++func_opt_split ()
++{
++ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
++ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
++}
++
++# func_lo2o object
++func_lo2o ()
++{
++ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
++}
++
++# func_xform libobj-or-source
++func_xform ()
++{
++ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
++}
++
++# func_arith arithmetic-term...
++func_arith ()
++{
++ func_arith_result=`expr "$[@]"`
++}
++
++# func_len string
++# STRING may not start with a hyphen.
++func_len ()
++{
++ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
++}
++
++_LT_EOF
++esac
++
++case $lt_shell_append in
++ yes)
++ cat << \_LT_EOF >> "$cfgfile"
++
++# func_append var value
++# Append VALUE to the end of shell variable VAR.
++func_append ()
++{
++ eval "$[1]+=\$[2]"
++}
++_LT_EOF
++ ;;
++ *)
++ cat << \_LT_EOF >> "$cfgfile"
++
++# func_append var value
++# Append VALUE to the end of shell variable VAR.
++func_append ()
++{
++ eval "$[1]=\$$[1]\$[2]"
++}
++
++_LT_EOF
++ ;;
++ esac
+ ])
+Index: libiconv-1.12/m4/libtool.m4
+===================================================================
+--- libiconv-1.12.orig/m4/libtool.m4 2007-10-27 02:46:10.000000000 +0200
++++ libiconv-1.12/m4/libtool.m4 2008-06-06 23:00:22.883921710 +0200
+@@ -1,107 +1,186 @@
+ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+-## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007
+-## Free Software Foundation, Inc.
+-## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+-##
+-## This file is free software; the Free Software Foundation gives
+-## unlimited permission to copy and/or distribute it, with or without
+-## modifications, as long as this notice is preserved.
+-
+-# serial 51 AC_PROG_LIBTOOL
+-
+-
+-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+-# -----------------------------------------------------------
+-# If this macro is not defined by Autoconf, define it here.
+-m4_ifdef([AC_PROVIDE_IFELSE],
+- [],
+- [m4_define([AC_PROVIDE_IFELSE],
+- [m4_ifdef([AC_PROVIDE_$1],
+- [$2], [$3])])])
++#
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
++# 2006, 2007, 2008 Free Software Foundation, Inc.
++# Written by Gordon Matzigkeit, 1996
++#
++# This file is free software; the Free Software Foundation gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++
++m4_define([_LT_COPYING], [dnl
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
++# 2006, 2007, 2008 Free Software Foundation, Inc.
++# Written by Gordon Matzigkeit, 1996
++#
++# This file is part of GNU Libtool.
++#
++# GNU Libtool 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.
++#
++# As a special exception to the GNU General Public License,
++# if you distribute this file as part of a program or library that
++# is built using GNU Libtool, you may include this file under the
++# same distribution terms that you use for the rest of that program.
++#
++# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
++# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
++# obtained by writing to the Free Software Foundation, Inc.,
++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++])
+
++# serial 56 LT_INIT
+
+-# AC_PROG_LIBTOOL
+-# ---------------
+-AC_DEFUN([AC_PROG_LIBTOOL],
+-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+- AC_PROVIDE_IFELSE([AC_PROG_CXX],
+- [AC_LIBTOOL_CXX],
+- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+- ])])
+-dnl And a similar setup for Fortran 77 support
+- AC_PROVIDE_IFELSE([AC_PROG_F77],
+- [AC_LIBTOOL_F77],
+- [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+-])])
+-
+-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+- [AC_LIBTOOL_GCJ],
+- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+- [AC_LIBTOOL_GCJ],
+- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+- [AC_LIBTOOL_GCJ],
+- [ifdef([AC_PROG_GCJ],
+- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+- ifdef([A][M_PROG_GCJ],
+- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+- ifdef([LT_AC_PROG_GCJ],
+- [define([LT_AC_PROG_GCJ],
+- defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+-])])# AC_PROG_LIBTOOL
+
++# LT_PREREQ(VERSION)
++# ------------------
++# Complain and exit if this libtool version is less that VERSION.
++m4_defun([LT_PREREQ],
++[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
++ [m4_default([$3],
++ [m4_fatal([Libtool version $1 or higher is required],
++ 63)])],
++ [$2])])
+
+-# _AC_PROG_LIBTOOL
+-# ----------------
+-AC_DEFUN([_AC_PROG_LIBTOOL],
+-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
++
++# _LT_CHECK_BUILDDIR
++# ------------------
++# Complain if the absolute build directory name contains unusual characters
++m4_defun([_LT_CHECK_BUILDDIR],
++[case `pwd` in
++ *\ * | *\ *)
++ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
++esac
++])
++
++
++# LT_INIT([OPTIONS])
++# ------------------
++AC_DEFUN([LT_INIT],
++[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
++AC_BEFORE([$0], [LT_LANG])dnl
++AC_BEFORE([$0], [LT_OUTPUT])dnl
++AC_BEFORE([$0], [LTDL_INIT])dnl
++m4_require([_LT_CHECK_BUILDDIR])dnl
++
++dnl Autoconf doesn't catch unexpanded LT_ macros by default:
++m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
++m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
++dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
++dnl unless we require an AC_DEFUNed macro:
++AC_REQUIRE([LTOPTIONS_VERSION])dnl
++AC_REQUIRE([LTSUGAR_VERSION])dnl
++AC_REQUIRE([LTVERSION_VERSION])dnl
++AC_REQUIRE([LTOBSOLETE_VERSION])dnl
++m4_require([_LT_PROG_LTMAIN])dnl
++
++dnl Parse OPTIONS
++_LT_SET_OPTIONS([$0], [$1])
+
+ # This can be used to rebuild libtool when needed
+-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++LIBTOOL_DEPS="$ltmain"
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(SHELL) $(top_builddir)'
++LIBTOOL="$LIBTOOL/$host_alias-libtool"
+ AC_SUBST(LIBTOOL)dnl
+
+-# Prevent multiple expansion
+-define([AC_PROG_LIBTOOL], [])
+-])# _AC_PROG_LIBTOOL
++_LT_SETUP
+
++# Only expand once:
++m4_define([LT_INIT])
++])# LT_INIT
++
++# Old names:
++AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
++AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
++dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+-# AC_LIBTOOL_SETUP
+-# ----------------
+-AC_DEFUN([AC_LIBTOOL_SETUP],
+-[AC_PREREQ(2.50)dnl
+-AC_REQUIRE([AC_ENABLE_SHARED])dnl
+-AC_REQUIRE([AC_ENABLE_STATIC])dnl
+-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+-AC_REQUIRE([AC_CANONICAL_HOST])dnl
++
++# _LT_CC_BASENAME(CC)
++# -------------------
++# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
++m4_defun([_LT_CC_BASENAME],
++[for cc_temp in $1""; do
++ case $cc_temp in
++ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
++ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
++ \-*) ;;
++ *) break;;
++ esac
++done
++cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
++])
++
++
++# _LT_FILEUTILS_DEFAULTS
++# ----------------------
++# It is okay to use these file commands and assume they have been set
++# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
++m4_defun([_LT_FILEUTILS_DEFAULTS],
++[: ${CP="cp -f"}
++: ${MV="mv -f"}
++: ${RM="rm -f"}
++])# _LT_FILEUTILS_DEFAULTS
++
++
++# _LT_SETUP
++# ---------
++m4_defun([_LT_SETUP],
++[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
++_LT_DECL([], [host_alias], [0], [The host system])dnl
++_LT_DECL([], [host], [0])dnl
++_LT_DECL([], [host_os], [0])dnl
++dnl
++_LT_DECL([], [build_alias], [0], [The build system])dnl
++_LT_DECL([], [build], [0])dnl
++_LT_DECL([], [build_os], [0])dnl
++dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+-AC_REQUIRE([AC_PROG_LD])dnl
+-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+-AC_REQUIRE([AC_PROG_NM])dnl
+-
++AC_REQUIRE([LT_PATH_LD])dnl
++AC_REQUIRE([LT_PATH_NM])dnl
++dnl
+ AC_REQUIRE([AC_PROG_LN_S])dnl
+-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+-AC_REQUIRE([AC_OBJEXT])dnl
+-AC_REQUIRE([AC_EXEEXT])dnl
++test -z "$LN_S" && LN_S="ln -s"
++_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+ dnl
++AC_REQUIRE([LT_CMD_MAX_LEN])dnl
++_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
++_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
++dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_CHECK_SHELL_FEATURES])dnl
++m4_require([_LT_CMD_RELOAD])dnl
++m4_require([_LT_CHECK_MAGIC_METHOD])dnl
++m4_require([_LT_CMD_OLD_ARCHIVE])dnl
++m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
++
++_LT_CONFIG_LIBTOOL_INIT([
++# See if we are running on zsh, and set the options which allow our
++# commands through without removal of \ escapes INIT.
++if test -n "\${ZSH_VERSION+set}" ; then
++ setopt NO_GLOB_SUBST
++fi
++])
++if test -n "${ZSH_VERSION+set}" ; then
++ setopt NO_GLOB_SUBST
++fi
+
+-AC_LIBTOOL_SYS_MAX_CMD_LEN
+-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+-AC_LIBTOOL_OBJDIR
++_LT_CHECK_OBJDIR
+
+-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+-_LT_AC_PROG_ECHO_BACKSLASH
++m4_require([_LT_TAG_COMPILER])dnl
++_LT_PROG_ECHO_BACKSLASH
+
+ case $host_os in
+ aix3*)
+@@ -117,1977 +196,2538 @@
+
+ # Sed substitution that helps us do robust quoting. It backslashifies
+ # metacharacters that are still active within double-quoted strings.
+-Xsed='sed -e 1s/^X//'
+-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
++sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+ # Same as above, but do not quote variable references.
+-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
++double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+ # Sed substitution to delay expansion of an escaped shell variable in a
+ # double_quote_subst'ed string.
+ delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
++# Sed substitution to delay expansion of an escaped single quote.
++delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
++
+ # Sed substitution to avoid accidental globbing in evaled expressions
+ no_glob_subst='s/\*/\\\*/g'
+
+-# Constants:
+-rm="rm -f"
+-
+ # Global variables:
+-default_ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+
+ # All known linkers require a `.a' archive for static linking (except MSVC,
+ # which needs '.lib').
+ libext=a
+-ltmain="$ac_aux_dir/ltmain.sh"
+-ofile="$default_ofile"
+-with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+-AC_CHECK_TOOL(AR, ar, false)
+-AC_CHECK_TOOL(RANLIB, ranlib, :)
+-AC_CHECK_TOOL(STRIP, strip, :)
++with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+ old_CC="$CC"
+ old_CFLAGS="$CFLAGS"
+
+ # Set sane defaults for various variables
+-test -z "$AR" && AR=ar
+-test -z "$AR_FLAGS" && AR_FLAGS=cru
+-test -z "$AS" && AS=as
+ test -z "$CC" && CC=cc
+ test -z "$LTCC" && LTCC=$CC
+ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+-test -z "$DLLTOOL" && DLLTOOL=dlltool
+ test -z "$LD" && LD=ld
+-test -z "$LN_S" && LN_S="ln -s"
+-test -z "$MAGIC_CMD" && MAGIC_CMD=file
+-test -z "$NM" && NM=nm
+-test -z "$SED" && SED=sed
+-test -z "$OBJDUMP" && OBJDUMP=objdump
+-test -z "$RANLIB" && RANLIB=:
+-test -z "$STRIP" && STRIP=:
+ test -z "$ac_objext" && ac_objext=o
+
+-# Determine commands to create old-style static archives.
+-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+-old_postinstall_cmds='chmod 644 $oldlib'
+-old_postuninstall_cmds=
+-
+-if test -n "$RANLIB"; then
+- case $host_os in
+- openbsd*)
+- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+- ;;
+- *)
+- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+- ;;
+- esac
+- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+-fi
+-
+ _LT_CC_BASENAME([$compiler])
+
+ # Only perform the check for file, if the check method requires it
++test -z "$MAGIC_CMD" && MAGIC_CMD=file
+ case $deplibs_check_method in
+ file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+- AC_PATH_MAGIC
++ _LT_PATH_MAGIC
+ fi
+ ;;
+ esac
+
+-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+-enable_win32_dll=yes, enable_win32_dll=no)
+-
+-AC_ARG_ENABLE([libtool-lock],
+- [AC_HELP_STRING([--disable-libtool-lock],
+- [avoid locking (might break parallel builds)])])
+-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
++# Use C for the default configuration in the libtool script
++LT_SUPPORTED_TAG([CC])
++_LT_LANG_C_CONFIG
++_LT_LANG_DEFAULT_CONFIG
++_LT_CONFIG_COMMANDS
++])# _LT_SETUP
+
+-AC_ARG_WITH([pic],
+- [AC_HELP_STRING([--with-pic],
+- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+- [pic_mode="$withval"],
+- [pic_mode=default])
+-test -z "$pic_mode" && pic_mode=default
+
+-# Use C for the default configuration in the libtool script
+-tagname=
+-AC_LIBTOOL_LANG_C_CONFIG
+-_LT_AC_TAGCONFIG
+-])# AC_LIBTOOL_SETUP
++# _LT_PROG_LTMAIN
++# ---------------
++# Note that this code is called both from `configure', and `config.status'
++# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
++# `config.status' has no value for ac_aux_dir unless we are using Automake,
++# so we pass a copy along to make sure it has a sensible value anyway.
++m4_defun([_LT_PROG_LTMAIN],
++[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
++_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
++ltmain="$ac_aux_dir/ltmain.sh"
++])# _LT_PROG_LTMAIN
+
+
+-# _LT_AC_SYS_COMPILER
+-# -------------------
+-AC_DEFUN([_LT_AC_SYS_COMPILER],
+-[AC_REQUIRE([AC_PROG_CC])dnl
++## ------------------------------------- ##
++## Accumulate code for creating libtool. ##
++## ------------------------------------- ##
++
++# So that we can recreate a full libtool script including additional
++# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
++# in macros and then make a single call at the end using the `libtool'
++# label.
++
++
++# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
++# ----------------------------------------
++# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
++m4_define([_LT_CONFIG_LIBTOOL_INIT],
++[m4_ifval([$1],
++ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
++ [$1
++])])])
++
++# Initialize.
++m4_define([_LT_OUTPUT_LIBTOOL_INIT])
++
++
++# _LT_CONFIG_LIBTOOL([COMMANDS])
++# ------------------------------
++# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
++m4_define([_LT_CONFIG_LIBTOOL],
++[m4_ifval([$1],
++ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
++ [$1
++])])])
++
++# Initialize.
++m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
++
++
++# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
++# -----------------------------------------------------
++m4_defun([_LT_CONFIG_SAVE_COMMANDS],
++[_LT_CONFIG_LIBTOOL([$1])
++_LT_CONFIG_LIBTOOL_INIT([$2])
++])
+
+-# If no C compiler was specified, use CC.
+-LTCC=${LTCC-"$CC"}
+
+-# If no C compiler flags were specified, use CFLAGS.
+-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
++# _LT_FORMAT_COMMENT([COMMENT])
++# -----------------------------
++# Add leading comment marks to the start of each line, and a trailing
++# full-stop to the whole comment if one is not present already.
++m4_define([_LT_FORMAT_COMMENT],
++[m4_ifval([$1], [
++m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
++ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
++)])
+
+-# Allow CC to be a program name with arguments.
+-compiler=$CC
+-])# _LT_AC_SYS_COMPILER
+
+
+-# _LT_CC_BASENAME(CC)
+-# -------------------
+-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+-AC_DEFUN([_LT_CC_BASENAME],
+-[for cc_temp in $1""; do
+- case $cc_temp in
+- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+- \-*) ;;
+- *) break;;
+- esac
+-done
+-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
++## ------------------------ ##
++## FIXME: Eliminate VARNAME ##
++## ------------------------ ##
++
++
++# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
++# -------------------------------------------------------------------
++# CONFIGNAME is the name given to the value in the libtool script.
++# VARNAME is the (base) name used in the configure script.
++# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
++# VARNAME. Any other value will be used directly.
++m4_define([_LT_DECL],
++[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
++ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
++ [m4_ifval([$1], [$1], [$2])])
++ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
++ m4_ifval([$4],
++ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
++ lt_dict_add_subkey([lt_decl_dict], [$2],
++ [tagged?], [m4_ifval([$5], [yes], [no])])])
+ ])
+
+
+-# _LT_COMPILER_BOILERPLATE
+-# ------------------------
+-# Check for compiler boilerplate output or warnings with
+-# the simple compiler test code.
+-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-ac_outfile=conftest.$ac_objext
+-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+-_lt_compiler_boilerplate=`cat conftest.err`
+-$rm conftest*
+-])# _LT_COMPILER_BOILERPLATE
+-
++# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
++# --------------------------------------------------------
++m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
++
++
++# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
++# ------------------------------------------------
++m4_define([lt_decl_tag_varnames],
++[_lt_decl_filter([tagged?], [yes], $@)])
++
++
++# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
++# ---------------------------------------------------------
++m4_define([_lt_decl_filter],
++[m4_case([$#],
++ [0], [m4_fatal([$0: too few arguments: $#])],
++ [1], [m4_fatal([$0: too few arguments: $#: $1])],
++ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
++ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
++ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
++])
+
+-# _LT_LINKER_BOILERPLATE
+-# ----------------------
+-# Check for linker boilerplate output or warnings with
+-# the simple link test code.
+-AC_DEFUN([_LT_LINKER_BOILERPLATE],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-ac_outfile=conftest.$ac_objext
+-echo "$lt_simple_link_test_code" >conftest.$ac_ext
+-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+-_lt_linker_boilerplate=`cat conftest.err`
+-$rm conftest*
+-])# _LT_LINKER_BOILERPLATE
+
++# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
++# --------------------------------------------------
++m4_define([lt_decl_quote_varnames],
++[_lt_decl_filter([value], [1], $@)])
++
++
++# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
++# ---------------------------------------------------
++m4_define([lt_decl_dquote_varnames],
++[_lt_decl_filter([value], [2], $@)])
++
++
++# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
++# ---------------------------------------------------
++m4_define([lt_decl_varnames_tagged],
++[_$0(m4_quote(m4_default([$1], [[, ]])),
++ m4_quote(m4_if([$2], [],
++ m4_quote(lt_decl_tag_varnames),
++ m4_quote(m4_shift($@)))),
++ m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
++m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
++
++
++# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
++# ------------------------------------------------
++m4_define([lt_decl_all_varnames],
++[_$0(m4_quote(m4_default([$1], [[, ]])),
++ m4_if([$2], [],
++ m4_quote(lt_decl_varnames),
++ m4_quote(m4_shift($@))))[]dnl
++])
++m4_define([_lt_decl_all_varnames],
++[lt_join($@, lt_decl_varnames_tagged([$1],
++ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
++])
+
+-# _LT_AC_SYS_LIBPATH_AIX
+-# ----------------------
+-# Links a minimal program and checks the executable
+-# for the system default hardcoded library path. In most cases,
+-# this is /usr/lib:/lib, but when the MPI compilers are used
+-# the location of the communication and MPI libs are included too.
+-# If we don't find anything, use the default library path according
+-# to the aix ld manual.
+-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+-lt_aix_libpath_sed='
+- /Import File Strings/,/^$/ {
+- /^0/ {
+- s/^0 *\(.*\)$/\1/
+- p
+- }
+- }'
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-# Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then
+- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-fi],[])
+-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+-])# _LT_AC_SYS_LIBPATH_AIX
+
++# _LT_CONFIG_STATUS_DECLARE([VARNAME])
++# ------------------------------------
++# Quote a variable value, and forward it to `config.status' so that its
++# declaration there will have the same value as in `configure'. VARNAME
++# must have a single quote delimited value for this to work.
++m4_define([_LT_CONFIG_STATUS_DECLARE],
++[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+-# _LT_AC_SHELL_INIT(ARG)
+-# ----------------------
+-AC_DEFUN([_LT_AC_SHELL_INIT],
+-[ifdef([AC_DIVERSION_NOTICE],
+- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+- [AC_DIVERT_PUSH(NOTICE)])
+-$1
+-AC_DIVERT_POP
+-])# _LT_AC_SHELL_INIT
+
++# _LT_CONFIG_STATUS_DECLARATIONS
++# ------------------------------
++# We delimit libtool config variables with single quotes, so when
++# we write them to config.status, we have to be sure to quote all
++# embedded single quotes properly. In configure, this macro expands
++# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
++#
++# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
++m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
++[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
++ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+-# _LT_AC_PROG_ECHO_BACKSLASH
+-# --------------------------
+-# Add some code to the start of the generated configure script which
+-# will find an echo command which doesn't interpret backslashes.
+-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+-[_LT_AC_SHELL_INIT([
+-# Check that we are running under the correct shell.
+-SHELL=${CONFIG_SHELL-/bin/sh}
+
+-case X$ECHO in
+-X*--fallback-echo)
+- # Remove one level of quotation (which was required for Make).
+- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+- ;;
+-esac
++# _LT_LIBTOOL_TAGS
++# ----------------
++# Output comment and list of tags supported by the script
++m4_defun([_LT_LIBTOOL_TAGS],
++[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
++available_tags="_LT_TAGS"dnl
++])
+
+-echo=${ECHO-echo}
+-if test "X[$]1" = X--no-reexec; then
+- # Discard the --no-reexec flag, and continue.
+- shift
+-elif test "X[$]1" = X--fallback-echo; then
+- # Avoid inline document here, it may be left over
+- :
+-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+- # Yippee, $echo works!
+- :
+-else
+- # Restart under the correct shell.
+- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+-fi
+
+-if test "X[$]1" = X--fallback-echo; then
+- # used as fallback echo
+- shift
+- cat <<EOF
+-[$]*
+-EOF
+- exit 0
+-fi
++# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
++# -----------------------------------
++# Extract the dictionary values for VARNAME (optionally with TAG) and
++# expand to a commented shell variable setting:
++#
++# # Some comment about what VAR is for.
++# visible_name=$lt_internal_name
++m4_define([_LT_LIBTOOL_DECLARE],
++[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
++ [description])))[]dnl
++m4_pushdef([_libtool_name],
++ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
++m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
++ [0], [_libtool_name=[$]$1],
++ [1], [_libtool_name=$lt_[]$1],
++ [2], [_libtool_name=$lt_[]$1],
++ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
++m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
++])
+
+-# The HP-UX ksh and POSIX shell print the target directory to stdout
+-# if CDPATH is set.
+-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+-if test -z "$ECHO"; then
+-if test "X${echo_test_string+set}" != Xset; then
+-# find a string as large as possible, as long as the shell can cope with it
+- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+- if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+- echo_test_string=`eval $cmd` &&
+- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+- then
+- break
+- fi
+- done
+-fi
++# _LT_LIBTOOL_CONFIG_VARS
++# -----------------------
++# Produce commented declarations of non-tagged libtool config variables
++# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
++# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
++# section) are produced by _LT_LIBTOOL_TAG_VARS.
++m4_defun([_LT_LIBTOOL_CONFIG_VARS],
++[m4_foreach([_lt_var],
++ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
++ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- :
+-else
+- # The Solaris, AIX, and Digital Unix default echo programs unquote
+- # backslashes. This makes it impossible to quote backslashes using
+- # echo "$something" | sed 's/\\/\\\\/g'
+- #
+- # So, first we look for a working echo in the user's PATH.
+
+- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+- for dir in $PATH /usr/ucb; do
+- IFS="$lt_save_ifs"
+- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- echo="$dir/echo"
+- break
+- fi
+- done
+- IFS="$lt_save_ifs"
++# _LT_LIBTOOL_TAG_VARS(TAG)
++# -------------------------
++m4_define([_LT_LIBTOOL_TAG_VARS],
++[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
++ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+- if test "X$echo" = Xecho; then
+- # We didn't find a better echo, so look for alternatives.
+- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- # This shell has a builtin print -r that does the trick.
+- echo='print -r'
+- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+- test "X$CONFIG_SHELL" != X/bin/ksh; then
+- # If we have ksh, try running configure again with it.
+- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+- export ORIGINAL_CONFIG_SHELL
+- CONFIG_SHELL=/bin/ksh
+- export CONFIG_SHELL
+- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+- else
+- # Try using printf.
+- echo='printf %s\n'
+- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- # Cool, printf works
+- :
+- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+- test "X$echo_testing_string" = 'X\t' &&
+- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+- export CONFIG_SHELL
+- SHELL="$CONFIG_SHELL"
+- export SHELL
+- echo="$CONFIG_SHELL [$]0 --fallback-echo"
+- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+- test "X$echo_testing_string" = 'X\t' &&
+- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+- test "X$echo_testing_string" = "X$echo_test_string"; then
+- echo="$CONFIG_SHELL [$]0 --fallback-echo"
+- else
+- # maybe with a smaller string...
+- prev=:
+
+- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+- then
+- break
+- fi
+- prev="$cmd"
+- done
++# _LT_TAGVAR(VARNAME, [TAGNAME])
++# ------------------------------
++m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+- if test "$prev" != 'sed 50q "[$]0"'; then
+- echo_test_string=`eval $prev`
+- export echo_test_string
+- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+- else
+- # Oops. We lost completely, so just stick with echo.
+- echo=echo
+- fi
+- fi
+- fi
+- fi
+-fi
+-fi
+
+-# Copy echo and quote the copy suitably for passing to libtool from
+-# the Makefile, instead of quoting the original, which is used later.
+-ECHO=$echo
+-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+- ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+-fi
++# _LT_CONFIG_COMMANDS
++# -------------------
++# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
++# variables for single and double quote escaping we saved from calls
++# to _LT_DECL, we can put quote escaped variables declarations
++# into `config.status', and then the shell code to quote escape them in
++# for loops in `config.status'. Finally, any additional code accumulated
++# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
++m4_defun([_LT_CONFIG_COMMANDS],
++[AC_PROVIDE_IFELSE([LT_OUTPUT],
++ dnl If the libtool generation code has been placed in $CONFIG_LT,
++ dnl instead of duplicating it all over again into config.status,
++ dnl then we will have config.status run $CONFIG_LT later, so it
++ dnl needs to know what name is stored there:
++ [AC_CONFIG_COMMANDS([libtool],
++ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
++ dnl If the libtool generation code is destined for config.status,
++ dnl expand the accumulated commands and init code now:
++ [AC_CONFIG_COMMANDS([libtool],
++ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
++])#_LT_CONFIG_COMMANDS
+
+-AC_SUBST(ECHO)
+-])])# _LT_AC_PROG_ECHO_BACKSLASH
+
++# Initialize.
++m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
++[
+
+-# _LT_AC_LOCK
+-# -----------
+-AC_DEFUN([_LT_AC_LOCK],
+-[AC_ARG_ENABLE([libtool-lock],
+- [AC_HELP_STRING([--disable-libtool-lock],
+- [avoid locking (might break parallel builds)])])
+-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
++# The HP-UX ksh and POSIX shell print the target directory to stdout
++# if CDPATH is set.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+-# Some flags need to be propagated to the compiler or linker for good
+-# libtool support.
+-case $host in
+-ia64-*-hpux*)
+- # Find out which ABI we are using.
+- echo 'int i;' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- case `/usr/bin/file conftest.$ac_objext` in
+- *ELF-32*)
+- HPUX_IA64_MODE="32"
++sed_quote_subst='$sed_quote_subst'
++double_quote_subst='$double_quote_subst'
++delay_variable_subst='$delay_variable_subst'
++_LT_CONFIG_STATUS_DECLARATIONS
++LTCC='$LTCC'
++LTCFLAGS='$LTCFLAGS'
++compiler='$compiler_DEFAULT'
++
++# Quote evaled strings.
++for var in lt_decl_all_varnames([[ \
++]], lt_decl_quote_varnames); do
++ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
++ *[[\\\\\\\`\\"\\\$]]*)
++ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+- *ELF-64*)
+- HPUX_IA64_MODE="64"
++ *)
++ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+- fi
+- rm -rf conftest*
+- ;;
+-*-*-irix6*)
+- # Find out which ABI we are using.
+- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- if test "$lt_cv_prog_gnu_ld" = yes; then
+- case `/usr/bin/file conftest.$ac_objext` in
+- *32-bit*)
+- LD="${LD-ld} -melf32bsmip"
+- ;;
+- *N32*)
+- LD="${LD-ld} -melf32bmipn32"
++done
++
++# Double-quote double-evaled strings.
++for var in lt_decl_all_varnames([[ \
++]], lt_decl_dquote_varnames); do
++ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
++ *[[\\\\\\\`\\"\\\$]]*)
++ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+- *64-bit*)
+- LD="${LD-ld} -melf64bmip"
++ *)
++ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+- else
+- case `/usr/bin/file conftest.$ac_objext` in
+- *32-bit*)
+- LD="${LD-ld} -32"
+- ;;
+- *N32*)
+- LD="${LD-ld} -n32"
+- ;;
+- *64-bit*)
+- LD="${LD-ld} -64"
+- ;;
+- esac
+- fi
+- fi
+- rm -rf conftest*
+- ;;
+-
+-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+-s390*-*linux*|sparc*-*linux*)
+- # Find out which ABI we are using.
+- echo 'int i;' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- case `/usr/bin/file conftest.o` in
+- *32-bit*)
+- case $host in
+- x86_64-*kfreebsd*-gnu)
+- LD="${LD-ld} -m elf_i386_fbsd"
+- ;;
+- x86_64-*linux*)
+- LD="${LD-ld} -m elf_i386"
+- ;;
+- ppc64-*linux*|powerpc64-*linux*)
+- LD="${LD-ld} -m elf32ppclinux"
+- ;;
+- s390x-*linux*)
+- LD="${LD-ld} -m elf_s390"
+- ;;
+- sparc64-*linux*)
+- LD="${LD-ld} -m elf32_sparc"
+- ;;
+- esac
+- ;;
+- *64-bit*)
+- case $host in
+- x86_64-*kfreebsd*-gnu)
+- LD="${LD-ld} -m elf_x86_64_fbsd"
+- ;;
+- x86_64-*linux*)
+- LD="${LD-ld} -m elf_x86_64"
+- ;;
+- ppc*-*linux*|powerpc*-*linux*)
+- LD="${LD-ld} -m elf64ppc"
+- ;;
+- s390*-*linux*)
+- LD="${LD-ld} -m elf64_s390"
+- ;;
+- sparc*-*linux*)
+- LD="${LD-ld} -m elf64_sparc"
+- ;;
+- esac
+- ;;
+- esac
+- fi
+- rm -rf conftest*
+- ;;
+-
+-*-*-sco3.2v5*)
+- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+- SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -belf"
+- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+- [AC_LANG_PUSH(C)
+- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+- AC_LANG_POP])
+- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+- CFLAGS="$SAVE_CFLAGS"
+- fi
+- ;;
+-sparc*-*solaris*)
+- # Find out which ABI we are using.
+- echo 'int i;' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- case `/usr/bin/file conftest.o` in
+- *64-bit*)
+- case $lt_cv_prog_gnu_ld in
+- yes*) LD="${LD-ld} -m elf64_sparc" ;;
+- *) LD="${LD-ld} -64" ;;
+- esac
+- ;;
+- esac
+- fi
+- rm -rf conftest*
+- ;;
++done
+
+-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+- AC_CHECK_TOOL(AS, as, false)
+- AC_CHECK_TOOL(OBJDUMP, objdump, false)
++# Fix-up fallback echo if it was mangled by the above quoting rules.
++case \$lt_ECHO in
++*'\\\[$]0 --fallback-echo"')dnl "
++ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+- ])
+ esac
+
+-need_locks="$enable_libtool_lock"
++_LT_OUTPUT_LIBTOOL_INIT
++])
+
+-])# _LT_AC_LOCK
+
++# LT_OUTPUT
++# ---------
++# This macro allows early generation of the libtool script (before
++# AC_OUTPUT is called), incase it is used in configure for compilation
++# tests.
++AC_DEFUN([LT_OUTPUT],
++[: ${CONFIG_LT=./config.lt}
++AC_MSG_NOTICE([creating $CONFIG_LT])
++cat >"$CONFIG_LT" <<_LTEOF
++#! $SHELL
++# Generated by $as_me.
++# Run this file to recreate a libtool stub with the current configuration.
++
++lt_cl_silent=false
++SHELL=\${CONFIG_SHELL-$SHELL}
++_LTEOF
++
++cat >>"$CONFIG_LT" <<\_LTEOF
++AS_SHELL_SANITIZE
++_AS_PREPARE
+
+-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+-# ----------------------------------------------------------------
+-# Check whether the given compiler option works
+-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+-[AC_REQUIRE([LT_AC_PROG_SED])
+-AC_CACHE_CHECK([$1], [$2],
+- [$2=no
+- ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+- lt_compiler_flag="$3"
+- # Insert the option either (1) after the last *FLAGS variable, or
+- # (2) before a word containing "conftest.", or (3) at the end.
+- # Note that $ac_compile itself does not contain backslashes and begins
+- # with a dollar sign (not a hyphen), so the echo should work correctly.
+- # The option is referenced via a variable to avoid confusing sed.
+- lt_compile=`echo "$ac_compile" | $SED \
+- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+- -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+- (eval "$lt_compile" 2>conftest.err)
+- ac_status=$?
+- cat conftest.err >&AS_MESSAGE_LOG_FD
+- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+- if (exit $ac_status) && test -s "$ac_outfile"; then
+- # The compiler can only warn and ignore the option if not recognized
+- # So say no if there are warnings other than the usual output.
+- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+- $2=yes
+- fi
+- fi
+- $rm conftest*
+-])
++exec AS_MESSAGE_FD>&1
++exec AS_MESSAGE_LOG_FD>>config.log
++{
++ echo
++ AS_BOX([Running $as_me.])
++} >&AS_MESSAGE_LOG_FD
++
++lt_cl_help="\
++\`$as_me' creates a local libtool stub from the current configuration,
++for use in further configure time tests before the real libtool is
++generated.
++
++Usage: $[0] [[OPTIONS]]
++
++ -h, --help print this help, then exit
++ -V, --version print version number, then exit
++ -q, --quiet do not print progress messages
++ -d, --debug don't remove temporary files
++
++Report bugs to <bug-libtool@gnu.org>."
++
++lt_cl_version="\
++m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
++m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
++configured by $[0], generated by m4_PACKAGE_STRING.
++
++Copyright (C) 2008 Free Software Foundation, Inc.
++This config.lt script is free software; the Free Software Foundation
++gives unlimited permision to copy, distribute and modify it."
+
+-if test x"[$]$2" = xyes; then
+- ifelse([$5], , :, [$5])
+-else
+- ifelse([$6], , :, [$6])
+-fi
+-])# AC_LIBTOOL_COMPILER_OPTION
++while test $[#] != 0
++do
++ case $[1] in
++ --version | --v* | -V )
++ echo "$lt_cl_version"; exit 0 ;;
++ --help | --h* | -h )
++ echo "$lt_cl_help"; exit 0 ;;
++ --debug | --d* | -d )
++ debug=: ;;
++ --quiet | --q* | --silent | --s* | -q )
++ lt_cl_silent=: ;;
+
++ -*) AC_MSG_ERROR([unrecognized option: $[1]
++Try \`$[0] --help' for more information.]) ;;
+
+-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+-# [ACTION-SUCCESS], [ACTION-FAILURE])
+-# ------------------------------------------------------------
+-# Check whether the given compiler option works
+-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_CACHE_CHECK([$1], [$2],
+- [$2=no
+- save_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$LDFLAGS $3"
+- echo "$lt_simple_link_test_code" > conftest.$ac_ext
+- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+- # The linker can only warn and ignore the option if not recognized
+- # So say no if there are warnings
+- if test -s conftest.err; then
+- # Append any errors to the config.log.
+- cat conftest.err 1>&AS_MESSAGE_LOG_FD
+- $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+- if diff conftest.exp conftest.er2 >/dev/null; then
+- $2=yes
+- fi
+- else
+- $2=yes
+- fi
+- fi
+- $rm conftest*
+- LDFLAGS="$save_LDFLAGS"
+-])
++ *) AC_MSG_ERROR([unrecognized argument: $[1]
++Try \`$[0] --help' for more information.]) ;;
++ esac
++ shift
++done
+
+-if test x"[$]$2" = xyes; then
+- ifelse([$4], , :, [$4])
+-else
+- ifelse([$5], , :, [$5])
++if $lt_cl_silent; then
++ exec AS_MESSAGE_FD>/dev/null
+ fi
+-])# AC_LIBTOOL_LINKER_OPTION
++_LTEOF
+
++cat >>"$CONFIG_LT" <<_LTEOF
++_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
++_LTEOF
++
++cat >>"$CONFIG_LT" <<\_LTEOF
++AC_MSG_NOTICE([creating $ofile])
++_LT_OUTPUT_LIBTOOL_COMMANDS
++AS_EXIT(0)
++_LTEOF
++chmod +x "$CONFIG_LT"
++
++# configure is writing to config.log, but config.lt does its own redirection,
++# appending to config.log, which fails on DOS, as config.log is still kept
++# open by configure. Here we exec the FD to /dev/null, effectively closing
++# config.log, so it can be properly (re)opened and appended to by config.lt.
++if test "$no_create" != yes; then
++ lt_cl_success=:
++ test "$silent" = yes &&
++ lt_config_lt_args="$lt_config_lt_args --quiet"
++ exec AS_MESSAGE_LOG_FD>/dev/null
++ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
++ exec AS_MESSAGE_LOG_FD>>config.log
++ $lt_cl_success || AS_EXIT(1)
++fi
++])# LT_OUTPUT
+
+-# AC_LIBTOOL_SYS_MAX_CMD_LEN
+-# --------------------------
+-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+-[# find the maximum length of command line arguments
+-AC_MSG_CHECKING([the maximum length of command line arguments])
+-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+- i=0
+- teststring="ABCD"
+
+- case $build_os in
+- msdosdjgpp*)
+- # On DJGPP, this test can blow up pretty badly due to problems in libc
+- # (any single argument exceeding 2000 bytes causes a buffer overrun
+- # during glob expansion). Even if it were fixed, the result of this
+- # check would be larger than it should be.
+- lt_cv_sys_max_cmd_len=12288; # 12K is about right
+- ;;
++# _LT_CONFIG(TAG)
++# ---------------
++# If TAG is the built-in tag, create an initial libtool script with a
++# default configuration from the untagged config vars. Otherwise add code
++# to config.status for appending the configuration named by TAG from the
++# matching tagged config vars.
++m4_defun([_LT_CONFIG],
++[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++_LT_CONFIG_SAVE_COMMANDS([
++ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
++ m4_if(_LT_TAG, [C], [
++ # See if we are running on zsh, and set the options which allow our
++ # commands through without removal of \ escapes.
++ if test -n "${ZSH_VERSION+set}" ; then
++ setopt NO_GLOB_SUBST
++ fi
+
+- gnu*)
+- # Under GNU Hurd, this test is not required because there is
+- # no limit to the length of command line arguments.
+- # Libtool will interpret -1 as no limit whatsoever
+- lt_cv_sys_max_cmd_len=-1;
+- ;;
++ cfgfile="${ofile}T"
++ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
++ $RM "$cfgfile"
+
+- cygwin* | mingw*)
+- # On Win9x/ME, this test blows up -- it succeeds, but takes
+- # about 5 minutes as the teststring grows exponentially.
+- # Worse, since 9x/ME are not pre-emptively multitasking,
+- # you end up with a "frozen" computer, even though with patience
+- # the test eventually succeeds (with a max line length of 256k).
+- # Instead, let's just punt: use the minimum linelength reported by
+- # all of the supported platforms: 8192 (on NT/2K/XP).
+- lt_cv_sys_max_cmd_len=8192;
+- ;;
++ cat <<_LT_EOF >> "$cfgfile"
++#! $SHELL
+
+- amigaos*)
+- # On AmigaOS with pdksh, this test takes hours, literally.
+- # So we just punt and use a minimum line length of 8192.
+- lt_cv_sys_max_cmd_len=8192;
+- ;;
++# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
++# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
++# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
++# NOTE: Changes made to this file will be lost: look at ltmain.sh.
++#
++_LT_COPYING
++_LT_LIBTOOL_TAGS
+
+- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+- # This has been around since 386BSD, at least. Likely further.
+- if test -x /sbin/sysctl; then
+- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+- elif test -x /usr/sbin/sysctl; then
+- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+- else
+- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+- fi
+- # And add a safety zone
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+- ;;
++# ### BEGIN LIBTOOL CONFIG
++_LT_LIBTOOL_CONFIG_VARS
++_LT_LIBTOOL_TAG_VARS
++# ### END LIBTOOL CONFIG
+
+- interix*)
+- # We know the value 262144 and hardcode it with a safety zone (like BSD)
+- lt_cv_sys_max_cmd_len=196608
+- ;;
++_LT_EOF
+
+- osf*)
+- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+- # nice to cause kernel panics so lets avoid the loop below.
+- # First set a reasonable default.
+- lt_cv_sys_max_cmd_len=16384
+- #
+- if test -x /sbin/sysconfig; then
+- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+- *1*) lt_cv_sys_max_cmd_len=-1 ;;
+- esac
+- fi
+- ;;
+- sco3.2v5*)
+- lt_cv_sys_max_cmd_len=102400
+- ;;
+- sysv5* | sco5v6* | sysv4.2uw2*)
+- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+- if test -n "$kargmax"; then
+- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+- else
+- lt_cv_sys_max_cmd_len=32768
+- fi
+- ;;
+- *)
+- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+- if test -n "$lt_cv_sys_max_cmd_len"; then
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+- else
+- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+- = "XX$teststring") >/dev/null 2>&1 &&
+- new_result=`expr "X$teststring" : ".*" 2>&1` &&
+- lt_cv_sys_max_cmd_len=$new_result &&
+- test $i != 17 # 1/2 MB should be enough
+- do
+- i=`expr $i + 1`
+- teststring=$teststring$teststring
+- done
+- teststring=
+- # Add a significant safety factor because C++ compilers can tack on massive
+- # amounts of additional arguments before passing them to the linker.
+- # It appears as though 1/2 is a usable value.
+- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+- fi
++ case $host_os in
++ aix3*)
++ cat <<\_LT_EOF >> "$cfgfile"
++# AIX sometimes has problems with the GCC collect2 program. For some
++# reason, if we set the COLLECT_NAMES environment variable, the problems
++# vanish in a puff of smoke.
++if test "X${COLLECT_NAMES+set}" != Xset; then
++ COLLECT_NAMES=
++ export COLLECT_NAMES
++fi
++_LT_EOF
+ ;;
+ esac
+-])
+-if test -n $lt_cv_sys_max_cmd_len ; then
+- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+-else
+- AC_MSG_RESULT(none)
+-fi
+-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
++ _LT_PROG_LTMAIN
+
+-# _LT_AC_CHECK_DLFCN
+-# ------------------
+-AC_DEFUN([_LT_AC_CHECK_DLFCN],
+-[AC_CHECK_HEADERS(dlfcn.h)dnl
+-])# _LT_AC_CHECK_DLFCN
++ # We use sed instead of cat because bash on DJGPP gets confused if
++ # if finds mixed CR/LF and LF-only lines. Since sed operates in
++ # text mode, it properly converts lines to CR/LF. This bash problem
++ # is reportedly fixed, but why not run on old versions too?
++ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
++ || (rm -f "$cfgfile"; exit 1)
+
++ _LT_PROG_XSI_SHELLFNS
+
+-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+-# ---------------------------------------------------------------------
+-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+-if test "$cross_compiling" = yes; then :
+- [$4]
+-else
+- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+- lt_status=$lt_dlunknown
+- cat > conftest.$ac_ext <<EOF
+-[#line __oline__ "configure"
+-#include "confdefs.h"
++ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
++ || (rm -f "$cfgfile"; exit 1)
+
+-#if HAVE_DLFCN_H
+-#include <dlfcn.h>
+-#endif
++ mv -f "$cfgfile" "$ofile" ||
++ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
++ chmod +x "$ofile"
++],
++[cat <<_LT_EOF >> "$ofile"
+
+-#include <stdio.h>
++dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
++dnl in a comment (ie after a #).
++# ### BEGIN LIBTOOL TAG CONFIG: $1
++_LT_LIBTOOL_TAG_VARS(_LT_TAG)
++# ### END LIBTOOL TAG CONFIG: $1
++_LT_EOF
++])dnl /m4_if
++],
++[m4_if([$1], [], [
++ PACKAGE='$PACKAGE'
++ VERSION='$VERSION'
++ TIMESTAMP='$TIMESTAMP'
++ RM='$RM'
++ ofile='$ofile'], [])
++])dnl /_LT_CONFIG_SAVE_COMMANDS
++])# _LT_CONFIG
++
++
++# LT_SUPPORTED_TAG(TAG)
++# ---------------------
++# Trace this macro to discover what tags are supported by the libtool
++# --tag option, using:
++# autoconf --trace 'LT_SUPPORTED_TAG:$1'
++AC_DEFUN([LT_SUPPORTED_TAG], [])
++
++
++# C support is built-in for now
++m4_define([_LT_LANG_C_enabled], [])
++m4_define([_LT_TAGS], [])
+
+-#ifdef RTLD_GLOBAL
+-# define LT_DLGLOBAL RTLD_GLOBAL
+-#else
+-# ifdef DL_GLOBAL
+-# define LT_DLGLOBAL DL_GLOBAL
+-# else
+-# define LT_DLGLOBAL 0
+-# endif
+-#endif
+
+-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+- find out it does not work in some platform. */
+-#ifndef LT_DLLAZY_OR_NOW
+-# ifdef RTLD_LAZY
+-# define LT_DLLAZY_OR_NOW RTLD_LAZY
+-# else
+-# ifdef DL_LAZY
+-# define LT_DLLAZY_OR_NOW DL_LAZY
+-# else
+-# ifdef RTLD_NOW
+-# define LT_DLLAZY_OR_NOW RTLD_NOW
+-# else
+-# ifdef DL_NOW
+-# define LT_DLLAZY_OR_NOW DL_NOW
+-# else
+-# define LT_DLLAZY_OR_NOW 0
+-# endif
+-# endif
+-# endif
+-# endif
+-#endif
++# LT_LANG(LANG)
++# -------------
++# Enable libtool support for the given language if not already enabled.
++AC_DEFUN([LT_LANG],
++[AC_BEFORE([$0], [LT_OUTPUT])dnl
++m4_case([$1],
++ [C], [_LT_LANG(C)],
++ [C++], [_LT_LANG(CXX)],
++ [Java], [_LT_LANG(GCJ)],
++ [Fortran 77], [_LT_LANG(F77)],
++ [Fortran], [_LT_LANG(FC)],
++ [Windows Resource], [_LT_LANG(RC)],
++ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
++ [_LT_LANG($1)],
++ [m4_fatal([$0: unsupported language: "$1"])])])dnl
++])# LT_LANG
+
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+
+-void fnord() { int i=42;}
+-int main ()
+-{
+- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+- int status = $lt_dlunknown;
++# _LT_LANG(LANGNAME)
++# ------------------
++m4_defun([_LT_LANG],
++[m4_ifdef([_LT_LANG_]$1[_enabled], [],
++ [LT_SUPPORTED_TAG([$1])dnl
++ m4_append([_LT_TAGS], [$1 ])dnl
++ m4_define([_LT_LANG_]$1[_enabled], [])dnl
++ _LT_LANG_$1_CONFIG($1)])dnl
++])# _LT_LANG
+
+- if (self)
+- {
+- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+- /* dlclose (self); */
+- }
+- else
+- puts (dlerror ());
+
+- exit (status);
+-}]
+-EOF
+- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+- lt_status=$?
+- case x$lt_status in
+- x$lt_dlno_uscore) $1 ;;
+- x$lt_dlneed_uscore) $2 ;;
+- x$lt_dlunknown|x*) $3 ;;
+- esac
+- else :
+- # compilation failed
+- $3
+- fi
+-fi
+-rm -fr conftest*
+-])# _LT_AC_TRY_DLOPEN_SELF
++# _LT_LANG_DEFAULT_CONFIG
++# -----------------------
++m4_defun([_LT_LANG_DEFAULT_CONFIG],
++[AC_PROVIDE_IFELSE([AC_PROG_CXX],
++ [LT_LANG(CXX)],
++ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
++
++AC_PROVIDE_IFELSE([AC_PROG_F77],
++ [LT_LANG(F77)],
++ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
++
++AC_PROVIDE_IFELSE([AC_PROG_FC],
++ [LT_LANG(FC)],
++ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
++
++dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
++dnl pulling things in needlessly.
++AC_PROVIDE_IFELSE([AC_PROG_GCJ],
++ [LT_LANG(GCJ)],
++ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
++ [LT_LANG(GCJ)],
++ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
++ [LT_LANG(GCJ)],
++ [m4_ifdef([AC_PROG_GCJ],
++ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
++ m4_ifdef([A][M_PROG_GCJ],
++ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
++ m4_ifdef([LT_PROG_GCJ],
++ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
++
++AC_PROVIDE_IFELSE([LT_PROG_RC],
++ [LT_LANG(RC)],
++ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
++])# _LT_LANG_DEFAULT_CONFIG
++
++# Obsolete macros:
++AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
++AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
++AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
++AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
++dnl AC_DEFUN([AC_LIBTOOL_F77], [])
++dnl AC_DEFUN([AC_LIBTOOL_FC], [])
++dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+-# AC_LIBTOOL_DLOPEN_SELF
+-# ----------------------
+-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+-if test "x$enable_dlopen" != xyes; then
+- enable_dlopen=unknown
+- enable_dlopen_self=unknown
+- enable_dlopen_self_static=unknown
+-else
+- lt_cv_dlopen=no
+- lt_cv_dlopen_libs=
++# _LT_TAG_COMPILER
++# ----------------
++m4_defun([_LT_TAG_COMPILER],
++[AC_REQUIRE([AC_PROG_CC])dnl
+
+- case $host_os in
+- beos*)
+- lt_cv_dlopen="load_add_on"
+- lt_cv_dlopen_libs=
+- lt_cv_dlopen_self=yes
+- ;;
++_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
++_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
++_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
++_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+- mingw* | pw32*)
+- lt_cv_dlopen="LoadLibrary"
+- lt_cv_dlopen_libs=
+- ;;
++# If no C compiler was specified, use CC.
++LTCC=${LTCC-"$CC"}
+
+- cygwin*)
+- lt_cv_dlopen="dlopen"
+- lt_cv_dlopen_libs=
+- ;;
++# If no C compiler flags were specified, use CFLAGS.
++LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+- darwin*)
+- # if libdl is installed we need to link against it
+- AC_CHECK_LIB([dl], [dlopen],
+- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+- lt_cv_dlopen="dyld"
+- lt_cv_dlopen_libs=
+- lt_cv_dlopen_self=yes
+- ])
+- ;;
++# Allow CC to be a program name with arguments.
++compiler=$CC
++])# _LT_TAG_COMPILER
+
+- *)
+- AC_CHECK_FUNC([shl_load],
+- [lt_cv_dlopen="shl_load"],
+- [AC_CHECK_LIB([dld], [shl_load],
+- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+- [AC_CHECK_FUNC([dlopen],
+- [lt_cv_dlopen="dlopen"],
+- [AC_CHECK_LIB([dl], [dlopen],
+- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+- [AC_CHECK_LIB([svld], [dlopen],
+- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+- [AC_CHECK_LIB([dld], [dld_link],
+- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+- ])
+- ])
+- ])
+- ])
+- ])
++
++# _LT_COMPILER_BOILERPLATE
++# ------------------------
++# Check for compiler boilerplate output or warnings with
++# the simple compiler test code.
++m4_defun([_LT_COMPILER_BOILERPLATE],
++[m4_require([_LT_DECL_SED])dnl
++ac_outfile=conftest.$ac_objext
++echo "$lt_simple_compile_test_code" >conftest.$ac_ext
++eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
++_lt_compiler_boilerplate=`cat conftest.err`
++$RM conftest*
++])# _LT_COMPILER_BOILERPLATE
++
++
++# _LT_LINKER_BOILERPLATE
++# ----------------------
++# Check for linker boilerplate output or warnings with
++# the simple link test code.
++m4_defun([_LT_LINKER_BOILERPLATE],
++[m4_require([_LT_DECL_SED])dnl
++ac_outfile=conftest.$ac_objext
++echo "$lt_simple_link_test_code" >conftest.$ac_ext
++eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
++_lt_linker_boilerplate=`cat conftest.err`
++$RM -r conftest*
++])# _LT_LINKER_BOILERPLATE
++
++# _LT_REQUIRED_DARWIN_CHECKS
++# -------------------------
++m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
++ case $host_os in
++ rhapsody* | darwin*)
++ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
++ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
++ AC_CHECK_TOOL([LIPO], [lipo], [:])
++ AC_CHECK_TOOL([OTOOL], [otool], [:])
++ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
++ _LT_DECL([], [DSYMUTIL], [1],
++ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
++ _LT_DECL([], [NMEDIT], [1],
++ [Tool to change global to local symbols on Mac OS X])
++ _LT_DECL([], [LIPO], [1],
++ [Tool to manipulate fat objects and archives on Mac OS X])
++ _LT_DECL([], [OTOOL], [1],
++ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
++ _LT_DECL([], [OTOOL64], [1],
++ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
++
++ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
++ [lt_cv_apple_cc_single_mod=no
++ if test -z "${LT_MULTI_MODULE}"; then
++ # By default we will add the -single_module flag. You can override
++ # by either setting the environment variable LT_MULTI_MODULE
++ # non-empty at configure time, or by adding -multi_module to the
++ # link flags.
++ rm -rf libconftest.dylib*
++ echo "int foo(void){return 1;}" > conftest.c
++ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
++-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
++ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
++ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
++ _lt_result=$?
++ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
++ lt_cv_apple_cc_single_mod=yes
++ else
++ cat conftest.err >&AS_MESSAGE_LOG_FD
++ fi
++ rm -rf libconftest.dylib*
++ rm -f conftest.*
++ fi])
++ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
++ [lt_cv_ld_exported_symbols_list],
++ [lt_cv_ld_exported_symbols_list=no
++ save_LDFLAGS=$LDFLAGS
++ echo "_main" > conftest.sym
++ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
++ [lt_cv_ld_exported_symbols_list=yes],
++ [lt_cv_ld_exported_symbols_list=no])
++ LDFLAGS="$save_LDFLAGS"
++ ])
++ case $host_os in
++ rhapsody* | darwin1.[[012]])
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
++ darwin1.*)
++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++ darwin*) # darwin 5.x on
++ # if running on 10.5 or later, the deployment target defaults
++ # to the OS version, if on x86, and 10.4, the deployment
++ # target defaults to 10.4. Don't you love it?
++ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
++ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++ 10.[[012]]*)
++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++ 10.*)
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++ esac
++ ;;
++ esac
++ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
++ _lt_dar_single_mod='$single_module'
++ fi
++ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
++ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
++ else
++ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
++ fi
++ if test "$DSYMUTIL" != ":"; then
++ _lt_dsymutil='~$DSYMUTIL $lib || :'
++ else
++ _lt_dsymutil=
++ fi
+ ;;
+ esac
++])
+
+- if test "x$lt_cv_dlopen" != xno; then
+- enable_dlopen=yes
++
++# _LT_DARWIN_LINKER_FEATURES
++# --------------------------
++# Checks for linker and compiler features on darwin
++m4_defun([_LT_DARWIN_LINKER_FEATURES],
++[
++ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_automatic, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
++ if test "$GCC" = "yes"; then
++ output_verbose_link_cmd=echo
++ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++ m4_if([$1], [CXX],
++[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
++ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
++ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
++ fi
++],[])
+ else
+- enable_dlopen=no
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
++])
+
+- case $lt_cv_dlopen in
+- dlopen)
+- save_CPPFLAGS="$CPPFLAGS"
+- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
++# _LT_SYS_MODULE_PATH_AIX
++# -----------------------
++# Links a minimal program and checks the executable
++# for the system default hardcoded library path. In most cases,
++# this is /usr/lib:/lib, but when the MPI compilers are used
++# the location of the communication and MPI libs are included too.
++# If we don't find anything, use the default library path according
++# to the aix ld manual.
++m4_defun([_LT_SYS_MODULE_PATH_AIX],
++[m4_require([_LT_DECL_SED])dnl
++AC_LINK_IFELSE(AC_LANG_PROGRAM,[
++lt_aix_libpath_sed='
++ /Import File Strings/,/^$/ {
++ /^0/ {
++ s/^0 *\(.*\)$/\1/
++ p
++ }
++ }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++# Check for a 64-bit object if we didn't find anything.
++if test -z "$aix_libpath"; then
++ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi],[])
++if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
++])# _LT_SYS_MODULE_PATH_AIX
+
+- save_LDFLAGS="$LDFLAGS"
+- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+- save_LIBS="$LIBS"
+- LIBS="$lt_cv_dlopen_libs $LIBS"
++# _LT_SHELL_INIT(ARG)
++# -------------------
++m4_define([_LT_SHELL_INIT],
++[ifdef([AC_DIVERSION_NOTICE],
++ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
++ [AC_DIVERT_PUSH(NOTICE)])
++$1
++AC_DIVERT_POP
++])# _LT_SHELL_INIT
+
+- AC_CACHE_CHECK([whether a program can dlopen itself],
+- lt_cv_dlopen_self, [dnl
+- _LT_AC_TRY_DLOPEN_SELF(
+- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+- ])
+
+- if test "x$lt_cv_dlopen_self" = xyes; then
+- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+- lt_cv_dlopen_self_static, [dnl
+- _LT_AC_TRY_DLOPEN_SELF(
+- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+- ])
+- fi
++# _LT_PROG_ECHO_BACKSLASH
++# -----------------------
++# Add some code to the start of the generated configure script which
++# will find an echo command which doesn't interpret backslashes.
++m4_defun([_LT_PROG_ECHO_BACKSLASH],
++[_LT_SHELL_INIT([
++# Check that we are running under the correct shell.
++SHELL=${CONFIG_SHELL-/bin/sh}
+
+- CPPFLAGS="$save_CPPFLAGS"
+- LDFLAGS="$save_LDFLAGS"
+- LIBS="$save_LIBS"
+- ;;
+- esac
++case X$lt_ECHO in
++X*--fallback-echo)
++ # Remove one level of quotation (which was required for Make).
++ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
++ ;;
++esac
+
+- case $lt_cv_dlopen_self in
+- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+- *) enable_dlopen_self=unknown ;;
+- esac
++ECHO=${lt_ECHO-echo}
++if test "X[$]1" = X--no-reexec; then
++ # Discard the --no-reexec flag, and continue.
++ shift
++elif test "X[$]1" = X--fallback-echo; then
++ # Avoid inline document here, it may be left over
++ :
++elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
++ # Yippee, $ECHO works!
++ :
++else
++ # Restart under the correct shell.
++ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
++fi
+
+- case $lt_cv_dlopen_self_static in
+- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+- *) enable_dlopen_self_static=unknown ;;
+- esac
++if test "X[$]1" = X--fallback-echo; then
++ # used as fallback echo
++ shift
++ cat <<_LT_EOF
++[$]*
++_LT_EOF
++ exit 0
+ fi
+-])# AC_LIBTOOL_DLOPEN_SELF
+
++# The HP-UX ksh and POSIX shell print the target directory to stdout
++# if CDPATH is set.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+-# ---------------------------------
+-# Check to see if options -c and -o are simultaneously supported by compiler
+-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+- $rm -r conftest 2>/dev/null
+- mkdir conftest
+- cd conftest
+- mkdir out
+- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++if test -z "$lt_ECHO"; then
++ if test "X${echo_test_string+set}" != Xset; then
++ # find a string as large as possible, as long as the shell can cope with it
++ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
++ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
++ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
++ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
++ then
++ break
++ fi
++ done
++ fi
+
+- lt_compiler_flag="-o out/conftest2.$ac_objext"
++ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
++ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ :
++ else
++ # The Solaris, AIX, and Digital Unix default echo programs unquote
++ # backslashes. This makes it impossible to quote backslashes using
++ # echo "$something" | sed 's/\\/\\\\/g'
++ #
++ # So, first we look for a working echo in the user's PATH.
++
++ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
++ for dir in $PATH /usr/ucb; do
++ IFS="$lt_save_ifs"
++ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
++ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
++ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ ECHO="$dir/echo"
++ break
++ fi
++ done
++ IFS="$lt_save_ifs"
++
++ if test "X$ECHO" = Xecho; then
++ # We didn't find a better echo, so look for alternatives.
++ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
++ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ # This shell has a builtin print -r that does the trick.
++ ECHO='print -r'
++ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
++ test "X$CONFIG_SHELL" != X/bin/ksh; then
++ # If we have ksh, try running configure again with it.
++ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
++ export ORIGINAL_CONFIG_SHELL
++ CONFIG_SHELL=/bin/ksh
++ export CONFIG_SHELL
++ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
++ else
++ # Try using printf.
++ ECHO='printf %s\n'
++ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
++ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ # Cool, printf works
++ :
++ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
++ test "X$echo_testing_string" = 'X\t' &&
++ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
++ export CONFIG_SHELL
++ SHELL="$CONFIG_SHELL"
++ export SHELL
++ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
++ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
++ test "X$echo_testing_string" = 'X\t' &&
++ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
++ test "X$echo_testing_string" = "X$echo_test_string"; then
++ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
++ else
++ # maybe with a smaller string...
++ prev=:
++
++ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
++ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
++ then
++ break
++ fi
++ prev="$cmd"
++ done
++
++ if test "$prev" != 'sed 50q "[$]0"'; then
++ echo_test_string=`eval $prev`
++ export echo_test_string
++ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
++ else
++ # Oops. We lost completely, so just stick with echo.
++ ECHO=echo
++ fi
++ fi
++ fi
++ fi
++ fi
++fi
++
++# Copy echo and quote the copy suitably for passing to libtool from
++# the Makefile, instead of quoting the original, which is used later.
++lt_ECHO=$ECHO
++if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
++ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
++fi
++
++AC_SUBST(lt_ECHO)
++])
++_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
++_LT_DECL([], [ECHO], [1],
++ [An echo program that does not interpret backslashes])
++])# _LT_PROG_ECHO_BACKSLASH
++
++
++# _LT_ENABLE_LOCK
++# ---------------
++m4_defun([_LT_ENABLE_LOCK],
++[AC_ARG_ENABLE([libtool-lock],
++ [AS_HELP_STRING([--disable-libtool-lock],
++ [avoid locking (might break parallel builds)])])
++test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
++
++# Some flags need to be propagated to the compiler or linker for good
++# libtool support.
++case $host in
++ia64-*-hpux*)
++ # Find out which ABI we are using.
++ echo 'int i;' > conftest.$ac_ext
++ if AC_TRY_EVAL(ac_compile); then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *ELF-32*)
++ HPUX_IA64_MODE="32"
++ ;;
++ *ELF-64*)
++ HPUX_IA64_MODE="64"
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++*-*-irix6*)
++ # Find out which ABI we are using.
++ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
++ if AC_TRY_EVAL(ac_compile); then
++ if test "$lt_cv_prog_gnu_ld" = yes; then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *32-bit*)
++ LD="${LD-ld} -melf32bsmip"
++ ;;
++ *N32*)
++ LD="${LD-ld} -melf32bmipn32"
++ ;;
++ *64-bit*)
++ LD="${LD-ld} -melf64bmip"
++ ;;
++ esac
++ else
++ case `/usr/bin/file conftest.$ac_objext` in
++ *32-bit*)
++ LD="${LD-ld} -32"
++ ;;
++ *N32*)
++ LD="${LD-ld} -n32"
++ ;;
++ *64-bit*)
++ LD="${LD-ld} -64"
++ ;;
++ esac
++ fi
++ fi
++ rm -rf conftest*
++ ;;
++
++x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
++ # Find out which ABI we are using.
++ echo 'int i;' > conftest.$ac_ext
++ if AC_TRY_EVAL(ac_compile); then
++ case `/usr/bin/file conftest.o` in
++ *32-bit*)
++ case $host in
++ x86_64-*kfreebsd*-gnu)
++ LD="${LD-ld} -m elf_i386_fbsd"
++ ;;
++ x86_64-*linux*)
++ LD="${LD-ld} -m elf_i386"
++ ;;
++ ppc64-*linux*|powerpc64-*linux*)
++ LD="${LD-ld} -m elf32ppclinux"
++ ;;
++ s390x-*linux*)
++ LD="${LD-ld} -m elf_s390"
++ ;;
++ sparc64-*linux*)
++ LD="${LD-ld} -m elf32_sparc"
++ ;;
++ esac
++ ;;
++ *64-bit*)
++ case $host in
++ x86_64-*kfreebsd*-gnu)
++ LD="${LD-ld} -m elf_x86_64_fbsd"
++ ;;
++ x86_64-*linux*)
++ LD="${LD-ld} -m elf_x86_64"
++ ;;
++ ppc*-*linux*|powerpc*-*linux*)
++ LD="${LD-ld} -m elf64ppc"
++ ;;
++ s390*-*linux*|s390*-*tpf*)
++ LD="${LD-ld} -m elf64_s390"
++ ;;
++ sparc*-*linux*)
++ LD="${LD-ld} -m elf64_sparc"
++ ;;
++ esac
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++
++*-*-sco3.2v5*)
++ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
++ SAVE_CFLAGS="$CFLAGS"
++ CFLAGS="$CFLAGS -belf"
++ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
++ [AC_LANG_PUSH(C)
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
++ AC_LANG_POP])
++ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
++ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
++ CFLAGS="$SAVE_CFLAGS"
++ fi
++ ;;
++sparc*-*solaris*)
++ # Find out which ABI we are using.
++ echo 'int i;' > conftest.$ac_ext
++ if AC_TRY_EVAL(ac_compile); then
++ case `/usr/bin/file conftest.o` in
++ *64-bit*)
++ case $lt_cv_prog_gnu_ld in
++ yes*) LD="${LD-ld} -m elf64_sparc" ;;
++ *)
++ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
++ LD="${LD-ld} -64"
++ fi
++ ;;
++ esac
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++esac
++
++need_locks="$enable_libtool_lock"
++])# _LT_ENABLE_LOCK
++
++
++# _LT_CMD_OLD_ARCHIVE
++# -------------------
++m4_defun([_LT_CMD_OLD_ARCHIVE],
++[AC_CHECK_TOOL(AR, ar, false)
++test -z "$AR" && AR=ar
++test -z "$AR_FLAGS" && AR_FLAGS=cru
++_LT_DECL([], [AR], [1], [The archiver])
++_LT_DECL([], [AR_FLAGS], [1])
++
++AC_CHECK_TOOL(STRIP, strip, :)
++test -z "$STRIP" && STRIP=:
++_LT_DECL([], [STRIP], [1], [A symbol stripping program])
++
++AC_CHECK_TOOL(RANLIB, ranlib, :)
++test -z "$RANLIB" && RANLIB=:
++_LT_DECL([], [RANLIB], [1],
++ [Commands used to install an old-style archive])
++
++# Determine commands to create old-style static archives.
++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
++old_postinstall_cmds='chmod 644 $oldlib'
++old_postuninstall_cmds=
++
++if test -n "$RANLIB"; then
++ case $host_os in
++ openbsd*)
++ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
++ ;;
++ *)
++ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
++ ;;
++ esac
++ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
++fi
++_LT_DECL([], [old_postinstall_cmds], [2])
++_LT_DECL([], [old_postuninstall_cmds], [2])
++_LT_TAGDECL([], [old_archive_cmds], [2],
++ [Commands used to build an old-style archive])
++])# _LT_CMD_OLD_ARCHIVE
++
++
++# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
++# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
++# ----------------------------------------------------------------
++# Check whether the given compiler option works
++AC_DEFUN([_LT_COMPILER_OPTION],
++[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_SED])dnl
++AC_CACHE_CHECK([$1], [$2],
++ [$2=no
++ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
++ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+- (eval "$lt_compile" 2>out/conftest.err)
++ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+- cat out/conftest.err >&AS_MESSAGE_LOG_FD
++ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+- if (exit $ac_status) && test -s out/conftest2.$ac_objext
+- then
++ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+- # So say no if there are warnings
+- $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
++ # So say no if there are warnings other than the usual output.
++ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
++ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
++ $2=yes
+ fi
+ fi
+- chmod u+w . 2>&AS_MESSAGE_LOG_FD
+- $rm conftest*
+- # SGI C++ compiler will create directory out/ii_files/ for
+- # template instantiation
+- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+- $rm out/* && rmdir out
+- cd ..
+- rmdir conftest
+- $rm conftest*
++ $RM conftest*
+ ])
+-])# AC_LIBTOOL_PROG_CC_C_O
+-
+-
+-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+-# -----------------------------------------
+-# Check to see if we can do hard links to lock some files if needed
+-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+-[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+-hard_links="nottested"
+-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+- # do not overwrite the value of need_locks provided by the user
+- AC_MSG_CHECKING([if we can lock with hard links])
+- hard_links=yes
+- $rm conftest*
+- ln conftest.a conftest.b 2>/dev/null && hard_links=no
+- touch conftest.a
+- ln conftest.a conftest.b 2>&5 || hard_links=no
+- ln conftest.a conftest.b 2>/dev/null && hard_links=no
+- AC_MSG_RESULT([$hard_links])
+- if test "$hard_links" = no; then
+- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+- need_locks=warn
+- fi
++if test x"[$]$2" = xyes; then
++ m4_if([$5], , :, [$5])
+ else
+- need_locks=no
++ m4_if([$6], , :, [$6])
+ fi
+-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+-
++])# _LT_COMPILER_OPTION
+
+-# AC_LIBTOOL_OBJDIR
+-# -----------------
+-AC_DEFUN([AC_LIBTOOL_OBJDIR],
+-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+-[rm -f .libs 2>/dev/null
+-mkdir .libs 2>/dev/null
+-if test -d .libs; then
+- lt_cv_objdir=.libs
+-else
+- # MS-DOS does not allow filenames that begin with a dot.
+- lt_cv_objdir=_libs
+-fi
+-rmdir .libs 2>/dev/null])
+-objdir=$lt_cv_objdir
+-])# AC_LIBTOOL_OBJDIR
++# Old name:
++AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+-# ----------------------------------------------
+-# Check hardcoding attributes.
+-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+-[AC_MSG_CHECKING([how to hardcode library paths into programs])
+-_LT_AC_TAGVAR(hardcode_action, $1)=
+-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+- test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+- test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
++# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
++# [ACTION-SUCCESS], [ACTION-FAILURE])
++# ----------------------------------------------------
++# Check whether the given linker option works
++AC_DEFUN([_LT_LINKER_OPTION],
++[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_SED])dnl
++AC_CACHE_CHECK([$1], [$2],
++ [$2=no
++ save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS $3"
++ echo "$lt_simple_link_test_code" > conftest.$ac_ext
++ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
++ # The linker can only warn and ignore the option if not recognized
++ # So say no if there are warnings
++ if test -s conftest.err; then
++ # Append any errors to the config.log.
++ cat conftest.err 1>&AS_MESSAGE_LOG_FD
++ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
++ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++ if diff conftest.exp conftest.er2 >/dev/null; then
++ $2=yes
++ fi
++ else
++ $2=yes
++ fi
++ fi
++ $RM -r conftest*
++ LDFLAGS="$save_LDFLAGS"
++])
+
+- # We can hardcode non-existant directories.
+- if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+- # If the only mechanism to avoid hardcoding is shlibpath_var, we
+- # have to relink, otherwise we might link with an installed library
+- # when we should be linking with a yet-to-be-installed one
+- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+- test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+- # Linking always hardcodes the temporary library directory.
+- _LT_AC_TAGVAR(hardcode_action, $1)=relink
+- else
+- # We can link without hardcoding, and we can hardcode nonexisting dirs.
+- _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+- fi
++if test x"[$]$2" = xyes; then
++ m4_if([$4], , :, [$4])
+ else
+- # We cannot hardcode anything, or else we can only hardcode existing
+- # directories.
+- _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
++ m4_if([$5], , :, [$5])
+ fi
+-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
++])# _LT_LINKER_OPTION
+
+-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+- # Fast installation is not supported
+- enable_fast_install=no
+-elif test "$shlibpath_overrides_runpath" = yes ||
+- test "$enable_shared" = no; then
+- # Fast installation is not necessary
+- enable_fast_install=needless
+-fi
+-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
++# Old name:
++AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+-# AC_LIBTOOL_SYS_LIB_STRIP
+-# ------------------------
+-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+-[striplib=
+-old_striplib=
+-AC_MSG_CHECKING([whether stripping libraries is possible])
+-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+- AC_MSG_RESULT([yes])
+-else
+-# FIXME - insert some real tests, host_os isn't really good enough
+- case $host_os in
+- darwin*)
+- if test -n "$STRIP" ; then
+- striplib="$STRIP -x"
+- old_striplib="$STRIP -S"
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_RESULT([no])
+-fi
+- ;;
+- *)
+- AC_MSG_RESULT([no])
++# LT_CMD_MAX_LEN
++#---------------
++AC_DEFUN([LT_CMD_MAX_LEN],
++[AC_REQUIRE([AC_CANONICAL_HOST])dnl
++# find the maximum length of command line arguments
++AC_MSG_CHECKING([the maximum length of command line arguments])
++AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
++ i=0
++ teststring="ABCD"
++
++ case $build_os in
++ msdosdjgpp*)
++ # On DJGPP, this test can blow up pretty badly due to problems in libc
++ # (any single argument exceeding 2000 bytes causes a buffer overrun
++ # during glob expansion). Even if it were fixed, the result of this
++ # check would be larger than it should be.
++ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+- esac
+-fi
+-])# AC_LIBTOOL_SYS_LIB_STRIP
+
++ gnu*)
++ # Under GNU Hurd, this test is not required because there is
++ # no limit to the length of command line arguments.
++ # Libtool will interpret -1 as no limit whatsoever
++ lt_cv_sys_max_cmd_len=-1;
++ ;;
+
+-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+-# -----------------------------
+-# PORTME Fill in your ld.so characteristics
+-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_MSG_CHECKING([dynamic linker characteristics])
+-library_names_spec=
+-libname_spec='lib$name'
+-soname_spec=
+-shrext_cmds=".so"
+-postinstall_cmds=
+-postuninstall_cmds=
+-finish_cmds=
+-finish_eval=
+-shlibpath_var=
+-shlibpath_overrides_runpath=unknown
+-version_type=none
+-dynamic_linker="$host_os ld.so"
+-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+-m4_if($1,[],[
+-if test "$GCC" = yes; then
+- case $host_os in
+- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+- *) lt_awk_arg="/^libraries:/" ;;
+- esac
+- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+- # if the path contains ";" then we assume it to be the separator
+- # otherwise default to the standard path separator (i.e. ":") - it is
+- # assumed that no part of a normal pathname contains ";" but that should
+- # okay in the real world where ";" in dirpaths is itself problematic.
+- lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+- else
+- lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+- fi
+- # Ok, now we have the path, separated by spaces, we can step through it
+- # and add multilib dir if necessary.
+- lt_tmp_lt_search_path_spec=
+- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+- for lt_sys_path in $lt_search_path_spec; do
+- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+- else
+- test -d "$lt_sys_path" && \
+- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+- fi
+- done
+- lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+-BEGIN {RS=" "; FS="/|\n";} {
+- lt_foo="";
+- lt_count=0;
+- for (lt_i = NF; lt_i > 0; lt_i--) {
+- if ($lt_i != "" && $lt_i != ".") {
+- if ($lt_i == "..") {
+- lt_count++;
+- } else {
+- if (lt_count == 0) {
+- lt_foo="/" $lt_i lt_foo;
+- } else {
+- lt_count--;
+- }
+- }
+- }
+- }
+- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+-}'`
+- sys_lib_search_path_spec=`echo $lt_search_path_spec`
+-else
+- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+-fi])
+-need_lib_prefix=unknown
+-hardcode_into_libs=no
++ cygwin* | mingw*)
++ # On Win9x/ME, this test blows up -- it succeeds, but takes
++ # about 5 minutes as the teststring grows exponentially.
++ # Worse, since 9x/ME are not pre-emptively multitasking,
++ # you end up with a "frozen" computer, even though with patience
++ # the test eventually succeeds (with a max line length of 256k).
++ # Instead, let's just punt: use the minimum linelength reported by
++ # all of the supported platforms: 8192 (on NT/2K/XP).
++ lt_cv_sys_max_cmd_len=8192;
++ ;;
+
+-# when you set need_version to no, make sure it does not cause -set_version
+-# flags to be left without arguments
+-need_version=unknown
++ amigaos*)
++ # On AmigaOS with pdksh, this test takes hours, literally.
++ # So we just punt and use a minimum line length of 8192.
++ lt_cv_sys_max_cmd_len=8192;
++ ;;
+
+-case $host_os in
+-aix3*)
+- version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+- shlibpath_var=LIBPATH
++ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
++ # This has been around since 386BSD, at least. Likely further.
++ if test -x /sbin/sysctl; then
++ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
++ elif test -x /usr/sbin/sysctl; then
++ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
++ else
++ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
++ fi
++ # And add a safety zone
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
++ ;;
+
+- # AIX 3 has no versioning support, so we append a major version to the name.
+- soname_spec='${libname}${release}${shared_ext}$major'
+- ;;
++ interix*)
++ # We know the value 262144 and hardcode it with a safety zone (like BSD)
++ lt_cv_sys_max_cmd_len=196608
++ ;;
+
+-aix4* | aix5*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- hardcode_into_libs=yes
+- if test "$host_cpu" = ia64; then
+- # AIX 5 supports IA64
+- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+- shlibpath_var=LD_LIBRARY_PATH
+- else
+- # With GCC up to 2.95.x, collect2 would create an import file
+- # for dependence libraries. The import file would start with
+- # the line `#! .'. This would cause the generated library to
+- # depend on `.', always an invalid library. This was fixed in
+- # development snapshots of GCC prior to 3.0.
+- case $host_os in
+- aix4 | aix4.[[01]] | aix4.[[01]].*)
+- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+- echo ' yes '
+- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+- :
+- else
+- can_build_shared=no
+- fi
+- ;;
+- esac
+- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+- # soname into executable. Probably we can add versioning support to
+- # collect2, so additional links can be useful in future.
+- if test "$aix_use_runtimelinking" = yes; then
+- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+- # instead of lib<name>.a to let people know that these are not
+- # typical AIX shared libraries.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ osf*)
++ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
++ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
++ # nice to cause kernel panics so lets avoid the loop below.
++ # First set a reasonable default.
++ lt_cv_sys_max_cmd_len=16384
++ #
++ if test -x /sbin/sysconfig; then
++ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
++ *1*) lt_cv_sys_max_cmd_len=-1 ;;
++ esac
++ fi
++ ;;
++ sco3.2v5*)
++ lt_cv_sys_max_cmd_len=102400
++ ;;
++ sysv5* | sco5v6* | sysv4.2uw2*)
++ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
++ if test -n "$kargmax"; then
++ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+- # We preserve .a as extension for shared libraries through AIX4.2
+- # and later when we are not doing run time linking.
+- library_names_spec='${libname}${release}.a $libname.a'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ lt_cv_sys_max_cmd_len=32768
+ fi
+- shlibpath_var=LIBPATH
+- fi
+- ;;
++ ;;
++ *)
++ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
++ if test -n "$lt_cv_sys_max_cmd_len"; then
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
++ else
++ # Make teststring a little bigger before we do anything with it.
++ # a 1K string should be a reasonable start.
++ for i in 1 2 3 4 5 6 7 8 ; do
++ teststring=$teststring$teststring
++ done
++ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
++ # If test is not a shell built-in, we'll probably end up computing a
++ # maximum length that is only half of the actual maximum length, but
++ # we can't tell.
++ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
++ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
++ test $i != 17 # 1/2 MB should be enough
++ do
++ i=`expr $i + 1`
++ teststring=$teststring$teststring
++ done
++ # Only check the string length outside the loop.
++ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
++ teststring=
++ # Add a significant safety factor because C++ compilers can tack on
++ # massive amounts of additional arguments before passing them to the
++ # linker. It appears as though 1/2 is a usable value.
++ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
++ fi
++ ;;
++ esac
++])
++if test -n $lt_cv_sys_max_cmd_len ; then
++ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
++else
++ AC_MSG_RESULT(none)
++fi
++max_cmd_len=$lt_cv_sys_max_cmd_len
++_LT_DECL([], [max_cmd_len], [0],
++ [What is the maximum length of a command?])
++])# LT_CMD_MAX_LEN
+
+-amigaos*)
+- library_names_spec='$libname.ixlibrary $libname.a'
+- # Create ${libname}_ixlibrary.a entries in /sys/libs.
+- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+- ;;
++# Old name:
++AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+-beos*)
+- library_names_spec='${libname}${shared_ext}'
+- dynamic_linker="$host_os ld.so"
+- shlibpath_var=LIBRARY_PATH
+- ;;
+
+-bsdi[[45]]*)
+- version_type=linux
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+- shlibpath_var=LD_LIBRARY_PATH
+- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+- # the default ld.so.conf also contains /usr/contrib/lib and
+- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+- # libtool to hard-code these into programs
+- ;;
++# _LT_HEADER_DLFCN
++# ----------------
++m4_defun([_LT_HEADER_DLFCN],
++[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
++])# _LT_HEADER_DLFCN
+
+-cygwin* | mingw* | pw32*)
+- version_type=windows
+- shrext_cmds=".dll"
+- need_version=no
+- need_lib_prefix=no
+
+- case $GCC,$host_os in
+- yes,cygwin* | yes,mingw* | yes,pw32*)
+- library_names_spec='$libname.dll.a'
+- # DLL is installed to $(libdir)/../bin by postinstall_cmds
+- postinstall_cmds='base_file=`basename \${file}`~
+- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+- dldir=$destdir/`dirname \$dlpath`~
+- test -d \$dldir || mkdir -p \$dldir~
+- $install_prog $dir/$dlname \$dldir/$dlname~
+- chmod a+x \$dldir/$dlname'
+- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+- dlpath=$dir/\$dldll~
+- $rm \$dlpath'
+- shlibpath_overrides_runpath=yes
++# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
++# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
++# ----------------------------------------------------------------
++m4_defun([_LT_TRY_DLOPEN_SELF],
++[m4_require([_LT_HEADER_DLFCN])dnl
++if test "$cross_compiling" = yes; then :
++ [$4]
++else
++ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
++ lt_status=$lt_dlunknown
++ cat > conftest.$ac_ext <<_LT_EOF
++[#line __oline__ "configure"
++#include "confdefs.h"
+
+- case $host_os in
+- cygwin*)
+- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+- ;;
+- mingw*)
+- # MinGW DLLs use traditional 'lib' prefix
+- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+- # It is most probably a Windows format PATH printed by
+- # mingw gcc, but we are running on Cygwin. Gcc prints its search
+- # path with ; separators, and with drive letters. We can handle the
+- # drive letters (cygwin fileutils understands them), so leave them,
+- # especially as we might pass files found there to a mingw objdump,
+- # which wouldn't understand a cygwinified path. Ahh.
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+- else
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+- fi
+- ;;
+- pw32*)
+- # pw32 DLLs use 'pw' prefix rather than 'lib'
+- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+- ;;
+- esac
+- ;;
++#if HAVE_DLFCN_H
++#include <dlfcn.h>
++#endif
+
+- *)
+- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+- ;;
+- esac
+- dynamic_linker='Win32 ld.exe'
+- # FIXME: first we should search . and the directory the executable is in
+- shlibpath_var=PATH
+- ;;
++#include <stdio.h>
+
+-darwin* | rhapsody*)
+- dynamic_linker="$host_os dyld"
+- version_type=darwin
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+- soname_spec='${libname}${release}${major}$shared_ext'
+- shlibpath_overrides_runpath=yes
+- shlibpath_var=DYLD_LIBRARY_PATH
+- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+- m4_if([$1], [],[
+- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+- ;;
++#ifdef RTLD_GLOBAL
++# define LT_DLGLOBAL RTLD_GLOBAL
++#else
++# ifdef DL_GLOBAL
++# define LT_DLGLOBAL DL_GLOBAL
++# else
++# define LT_DLGLOBAL 0
++# endif
++#endif
+
+-dgux*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- ;;
++/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
++ find out it does not work in some platform. */
++#ifndef LT_DLLAZY_OR_NOW
++# ifdef RTLD_LAZY
++# define LT_DLLAZY_OR_NOW RTLD_LAZY
++# else
++# ifdef DL_LAZY
++# define LT_DLLAZY_OR_NOW DL_LAZY
++# else
++# ifdef RTLD_NOW
++# define LT_DLLAZY_OR_NOW RTLD_NOW
++# else
++# ifdef DL_NOW
++# define LT_DLLAZY_OR_NOW DL_NOW
++# else
++# define LT_DLLAZY_OR_NOW 0
++# endif
++# endif
++# endif
++# endif
++#endif
+
+-freebsd1*)
+- dynamic_linker=no
+- ;;
++#ifdef __cplusplus
++extern "C" void exit (int);
++#endif
+
+-freebsd* | dragonfly*)
+- # DragonFly does not have aout. When/if they implement a new
+- # versioning mechanism, adjust this.
+- if test -x /usr/bin/objformat; then
+- objformat=`/usr/bin/objformat`
++void fnord() { int i=42;}
++int main ()
++{
++ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
++ int status = $lt_dlunknown;
++
++ if (self)
++ {
++ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
++ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
++ /* dlclose (self); */
++ }
+ else
+- case $host_os in
+- freebsd[[123]]*) objformat=aout ;;
+- *) objformat=elf ;;
++ puts (dlerror ());
++
++ exit (status);
++}]
++_LT_EOF
++ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
++ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
++ lt_status=$?
++ case x$lt_status in
++ x$lt_dlno_uscore) $1 ;;
++ x$lt_dlneed_uscore) $2 ;;
++ x$lt_dlunknown|x*) $3 ;;
+ esac
++ else :
++ # compilation failed
++ $3
+ fi
+- version_type=freebsd-$objformat
+- case $version_type in
+- freebsd-elf*)
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+- need_version=no
+- need_lib_prefix=no
+- ;;
+- freebsd-*)
+- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+- need_version=yes
+- ;;
+- esac
+- shlibpath_var=LD_LIBRARY_PATH
++fi
++rm -fr conftest*
++])# _LT_TRY_DLOPEN_SELF
++
++
++# LT_SYS_DLOPEN_SELF
++# ------------------
++AC_DEFUN([LT_SYS_DLOPEN_SELF],
++[m4_require([_LT_HEADER_DLFCN])dnl
++if test "x$enable_dlopen" != xyes; then
++ enable_dlopen=unknown
++ enable_dlopen_self=unknown
++ enable_dlopen_self_static=unknown
++else
++ lt_cv_dlopen=no
++ lt_cv_dlopen_libs=
++
+ case $host_os in
+- freebsd2*)
+- shlibpath_overrides_runpath=yes
+- ;;
+- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+- shlibpath_overrides_runpath=yes
+- hardcode_into_libs=yes
+- ;;
+- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+- shlibpath_overrides_runpath=no
+- hardcode_into_libs=yes
++ beos*)
++ lt_cv_dlopen="load_add_on"
++ lt_cv_dlopen_libs=
++ lt_cv_dlopen_self=yes
+ ;;
+- *) # from 4.6 on, and DragonFly
+- shlibpath_overrides_runpath=yes
+- hardcode_into_libs=yes
++
++ mingw* | pw32*)
++ lt_cv_dlopen="LoadLibrary"
++ lt_cv_dlopen_libs=
+ ;;
+- esac
+- ;;
+
+-gnu*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- hardcode_into_libs=yes
+- ;;
++ cygwin*)
++ lt_cv_dlopen="dlopen"
++ lt_cv_dlopen_libs=
++ ;;
+
+-hpux9* | hpux10* | hpux11*)
+- # Give a soname corresponding to the major version so that dld.sl refuses to
+- # link against other versions.
+- version_type=sunos
+- need_lib_prefix=no
+- need_version=no
+- case $host_cpu in
+- ia64*)
+- shrext_cmds='.so'
+- hardcode_into_libs=yes
+- dynamic_linker="$host_os dld.so"
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- if test "X$HPUX_IA64_MODE" = X32; then
+- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+- else
+- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+- fi
+- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
++ darwin*)
++ # if libdl is installed we need to link against it
++ AC_CHECK_LIB([dl], [dlopen],
++ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
++ lt_cv_dlopen="dyld"
++ lt_cv_dlopen_libs=
++ lt_cv_dlopen_self=yes
++ ])
+ ;;
+- hppa*64*)
+- shrext_cmds='.sl'
+- hardcode_into_libs=yes
+- dynamic_linker="$host_os dld.sl"
+- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+- ;;
+- *)
+- shrext_cmds='.sl'
+- dynamic_linker="$host_os dld.sl"
+- shlibpath_var=SHLIB_PATH
+- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++
++ *)
++ AC_CHECK_FUNC([shl_load],
++ [lt_cv_dlopen="shl_load"],
++ [AC_CHECK_LIB([dld], [shl_load],
++ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
++ [AC_CHECK_FUNC([dlopen],
++ [lt_cv_dlopen="dlopen"],
++ [AC_CHECK_LIB([dl], [dlopen],
++ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
++ [AC_CHECK_LIB([svld], [dlopen],
++ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
++ [AC_CHECK_LIB([dld], [dld_link],
++ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
++ ])
++ ])
++ ])
++ ])
++ ])
+ ;;
+ esac
+- # HP-UX runs *really* slowly unless shared libraries are mode 555.
+- postinstall_cmds='chmod 555 $lib'
+- ;;
+
+-interix[[3-9]]*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=no
+- hardcode_into_libs=yes
+- ;;
++ if test "x$lt_cv_dlopen" != xno; then
++ enable_dlopen=yes
++ else
++ enable_dlopen=no
++ fi
+
+-irix5* | irix6* | nonstopux*)
+- case $host_os in
+- nonstopux*) version_type=nonstopux ;;
+- *)
+- if test "$lt_cv_prog_gnu_ld" = yes; then
+- version_type=linux
+- else
+- version_type=irix
+- fi ;;
+- esac
+- need_lib_prefix=no
+- need_version=no
+- soname_spec='${libname}${release}${shared_ext}$major'
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+- case $host_os in
+- irix5* | nonstopux*)
+- libsuff= shlibsuff=
+- ;;
+- *)
+- case $LD in # libtool.m4 will add one of these switches to LD
+- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+- libsuff= shlibsuff= libmagic=32-bit;;
+- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+- libsuff=32 shlibsuff=N32 libmagic=N32;;
+- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+- libsuff=64 shlibsuff=64 libmagic=64-bit;;
+- *) libsuff= shlibsuff= libmagic=never-match;;
+- esac
++ case $lt_cv_dlopen in
++ dlopen)
++ save_CPPFLAGS="$CPPFLAGS"
++ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
++
++ save_LDFLAGS="$LDFLAGS"
++ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
++
++ save_LIBS="$LIBS"
++ LIBS="$lt_cv_dlopen_libs $LIBS"
++
++ AC_CACHE_CHECK([whether a program can dlopen itself],
++ lt_cv_dlopen_self, [dnl
++ _LT_TRY_DLOPEN_SELF(
++ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
++ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
++ ])
++
++ if test "x$lt_cv_dlopen_self" = xyes; then
++ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
++ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
++ lt_cv_dlopen_self_static, [dnl
++ _LT_TRY_DLOPEN_SELF(
++ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
++ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
++ ])
++ fi
++
++ CPPFLAGS="$save_CPPFLAGS"
++ LDFLAGS="$save_LDFLAGS"
++ LIBS="$save_LIBS"
+ ;;
+ esac
+- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+- shlibpath_overrides_runpath=no
+- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+- hardcode_into_libs=yes
+- ;;
+
+-# No shared lib support for Linux oldld, aout, or coff.
+-linux*oldld* | linux*aout* | linux*coff*)
+- dynamic_linker=no
+- ;;
++ case $lt_cv_dlopen_self in
++ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
++ *) enable_dlopen_self=unknown ;;
++ esac
+
+-# This must be Linux ELF.
+-linux* | k*bsd*-gnu)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=no
+- # This implies no fast_install, which is unacceptable.
+- # Some rework will be needed to allow for fast_install
+- # before this can be enabled.
+- hardcode_into_libs=yes
++ case $lt_cv_dlopen_self_static in
++ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
++ *) enable_dlopen_self_static=unknown ;;
++ esac
++fi
++_LT_DECL([dlopen_support], [enable_dlopen], [0],
++ [Whether dlopen is supported])
++_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
++ [Whether dlopen of programs is supported])
++_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
++ [Whether dlopen of statically linked programs is supported])
++])# LT_SYS_DLOPEN_SELF
++
++# Old name:
++AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+- # Append ld.so.conf contents to the search path
+- if test -f /etc/ld.so.conf; then
+- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+- fi
+
+- # We used to test for /lib/ld.so.1 and disable shared libraries on
+- # powerpc, because MkLinux only supported shared libraries with the
+- # GNU dynamic linker. Since this was broken with cross compilers,
+- # most powerpc-linux boxes support dynamic linking these days and
+- # people can always --disable-shared, the test was removed, and we
+- # assume the GNU/Linux dynamic linker is in use.
+- dynamic_linker='GNU/Linux ld.so'
+- ;;
++# _LT_COMPILER_C_O([TAGNAME])
++# ---------------------------
++# Check to see if options -c and -o are simultaneously supported by compiler.
++# This macro does not hard code the compiler like AC_PROG_CC_C_O.
++m4_defun([_LT_COMPILER_C_O],
++[m4_require([_LT_DECL_SED])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_TAG_COMPILER])dnl
++AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
++ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
++ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
++ $RM -r conftest 2>/dev/null
++ mkdir conftest
++ cd conftest
++ mkdir out
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+-netbsd*)
+- version_type=sunos
+- need_lib_prefix=no
+- need_version=no
+- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+- dynamic_linker='NetBSD (a.out) ld.so'
+- else
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- dynamic_linker='NetBSD ld.elf_so'
+- fi
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- hardcode_into_libs=yes
+- ;;
++ lt_compiler_flag="-o out/conftest2.$ac_objext"
++ # Insert the option either (1) after the last *FLAGS variable, or
++ # (2) before a word containing "conftest.", or (3) at the end.
++ # Note that $ac_compile itself does not contain backslashes and begins
++ # with a dollar sign (not a hyphen), so the echo should work correctly.
++ lt_compile=`echo "$ac_compile" | $SED \
++ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
++ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
++ -e 's:$: $lt_compiler_flag:'`
++ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
++ (eval "$lt_compile" 2>out/conftest.err)
++ ac_status=$?
++ cat out/conftest.err >&AS_MESSAGE_LOG_FD
++ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
++ if (exit $ac_status) && test -s out/conftest2.$ac_objext
++ then
++ # The compiler can only warn and ignore the option if not recognized
++ # So say no if there are warnings
++ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
++ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
++ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
++ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
++ fi
++ fi
++ chmod u+w . 2>&AS_MESSAGE_LOG_FD
++ $RM conftest*
++ # SGI C++ compiler will create directory out/ii_files/ for
++ # template instantiation
++ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
++ $RM out/* && rmdir out
++ cd ..
++ $RM -r conftest
++ $RM conftest*
++])
++_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
++ [Does compiler simultaneously support -c and -o options?])
++])# _LT_COMPILER_C_O
+
+-newsos6)
+- version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- ;;
+
+-nto-qnx*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- ;;
++# _LT_COMPILER_FILE_LOCKS([TAGNAME])
++# ----------------------------------
++# Check to see if we can do hard links to lock some files if needed
++m4_defun([_LT_COMPILER_FILE_LOCKS],
++[m4_require([_LT_ENABLE_LOCK])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++_LT_COMPILER_C_O([$1])
+
+-openbsd*)
+- version_type=sunos
+- sys_lib_dlsearch_path_spec="/usr/lib"
+- need_lib_prefix=no
+- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+- case $host_os in
+- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+- *) need_version=no ;;
+- esac
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+- shlibpath_var=LD_LIBRARY_PATH
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- case $host_os in
+- openbsd2.[[89]] | openbsd2.[[89]].*)
+- shlibpath_overrides_runpath=no
+- ;;
+- *)
+- shlibpath_overrides_runpath=yes
+- ;;
+- esac
+- else
+- shlibpath_overrides_runpath=yes
++hard_links="nottested"
++if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
++ # do not overwrite the value of need_locks provided by the user
++ AC_MSG_CHECKING([if we can lock with hard links])
++ hard_links=yes
++ $RM conftest*
++ ln conftest.a conftest.b 2>/dev/null && hard_links=no
++ touch conftest.a
++ ln conftest.a conftest.b 2>&5 || hard_links=no
++ ln conftest.a conftest.b 2>/dev/null && hard_links=no
++ AC_MSG_RESULT([$hard_links])
++ if test "$hard_links" = no; then
++ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
++ need_locks=warn
+ fi
+- ;;
++else
++ need_locks=no
++fi
++_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
++])# _LT_COMPILER_FILE_LOCKS
+
+-os2*)
+- libname_spec='$name'
+- shrext_cmds=".dll"
+- need_lib_prefix=no
+- library_names_spec='$libname${shared_ext} $libname.a'
+- dynamic_linker='OS/2 ld.exe'
+- shlibpath_var=LIBPATH
+- ;;
+
+-osf3* | osf4* | osf5*)
+- version_type=osf
+- need_lib_prefix=no
+- need_version=no
+- soname_spec='${libname}${release}${shared_ext}$major'
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- shlibpath_var=LD_LIBRARY_PATH
+- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+- ;;
++# _LT_CHECK_OBJDIR
++# ----------------
++m4_defun([_LT_CHECK_OBJDIR],
++[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
++[rm -f .libs 2>/dev/null
++mkdir .libs 2>/dev/null
++if test -d .libs; then
++ lt_cv_objdir=.libs
++else
++ # MS-DOS does not allow filenames that begin with a dot.
++ lt_cv_objdir=_libs
++fi
++rmdir .libs 2>/dev/null])
++objdir=$lt_cv_objdir
++_LT_DECL([], [objdir], [0],
++ [The name of the directory that contains temporary libtool files])dnl
++m4_pattern_allow([LT_OBJDIR])dnl
++AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
++ [Define to the sub-directory in which libtool stores uninstalled libraries.])
++])# _LT_CHECK_OBJDIR
+
+-rdos*)
+- dynamic_linker=no
+- ;;
+
+-solaris*)
+- version_type=linux
+- need_lib_prefix=no
+- need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- hardcode_into_libs=yes
+- # ldd complains unless libraries are executable
+- postinstall_cmds='chmod +x $lib'
+- ;;
++# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
++# --------------------------------------
++# Check hardcoding attributes.
++m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
++[AC_MSG_CHECKING([how to hardcode library paths into programs])
++_LT_TAGVAR(hardcode_action, $1)=
++if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
++ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
++ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+-sunos4*)
+- version_type=sunos
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+- shlibpath_var=LD_LIBRARY_PATH
+- shlibpath_overrides_runpath=yes
+- if test "$with_gnu_ld" = yes; then
+- need_lib_prefix=no
++ # We can hardcode non-existent directories.
++ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
++ # If the only mechanism to avoid hardcoding is shlibpath_var, we
++ # have to relink, otherwise we might link with an installed library
++ # when we should be linking with a yet-to-be-installed one
++ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
++ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
++ # Linking always hardcodes the temporary library directory.
++ _LT_TAGVAR(hardcode_action, $1)=relink
++ else
++ # We can link without hardcoding, and we can hardcode nonexisting dirs.
++ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+- need_version=yes
+- ;;
++else
++ # We cannot hardcode anything, or else we can only hardcode existing
++ # directories.
++ _LT_TAGVAR(hardcode_action, $1)=unsupported
++fi
++AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+-sysv4 | sysv4.3*)
+- version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+- case $host_vendor in
+- sni)
+- shlibpath_overrides_runpath=no
+- need_lib_prefix=no
+- export_dynamic_flag_spec='${wl}-Blargedynsym'
+- runpath_var=LD_RUN_PATH
+- ;;
+- siemens)
+- need_lib_prefix=no
+- ;;
+- motorola)
+- need_lib_prefix=no
+- need_version=no
+- shlibpath_overrides_runpath=no
+- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+- ;;
++if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
++ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
++ # Fast installation is not supported
++ enable_fast_install=no
++elif test "$shlibpath_overrides_runpath" = yes ||
++ test "$enable_shared" = no; then
++ # Fast installation is not necessary
++ enable_fast_install=needless
++fi
++_LT_TAGDECL([], [hardcode_action], [0],
++ [How to hardcode a shared library path into an executable])
++])# _LT_LINKER_HARDCODE_LIBPATH
++
++
++# _LT_CMD_STRIPLIB
++# ----------------
++m4_defun([_LT_CMD_STRIPLIB],
++[m4_require([_LT_DECL_EGREP])
++striplib=
++old_striplib=
++AC_MSG_CHECKING([whether stripping libraries is possible])
++if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
++ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
++ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
++ AC_MSG_RESULT([yes])
++else
++# FIXME - insert some real tests, host_os isn't really good enough
++ case $host_os in
++ darwin*)
++ if test -n "$STRIP" ; then
++ striplib="$STRIP -x"
++ old_striplib="$STRIP -S"
++ AC_MSG_RESULT([yes])
++ else
++ AC_MSG_RESULT([no])
++ fi
++ ;;
++ *)
++ AC_MSG_RESULT([no])
++ ;;
+ esac
+- ;;
++fi
++_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
++_LT_DECL([], [striplib], [1])
++])# _LT_CMD_STRIPLIB
+
+-sysv4*MP*)
+- if test -d /usr/nec ;then
+- version_type=linux
+- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+- soname_spec='$libname${shared_ext}.$major'
+- shlibpath_var=LD_LIBRARY_PATH
++
++# _LT_SYS_DYNAMIC_LINKER([TAG])
++# -----------------------------
++# PORTME Fill in your ld.so characteristics
++m4_defun([_LT_SYS_DYNAMIC_LINKER],
++[AC_REQUIRE([AC_CANONICAL_HOST])dnl
++m4_require([_LT_DECL_EGREP])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_SED])dnl
++AC_MSG_CHECKING([dynamic linker characteristics])
++m4_if([$1],
++ [], [
++if test "$GCC" = yes; then
++ case $host_os in
++ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
++ *) lt_awk_arg="/^libraries:/" ;;
++ esac
++ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
++ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
++ # if the path contains ";" then we assume it to be the separator
++ # otherwise default to the standard path separator (i.e. ":") - it is
++ # assumed that no part of a normal pathname contains ";" but that should
++ # okay in the real world where ";" in dirpaths is itself problematic.
++ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
++ else
++ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
++ # Ok, now we have the path, separated by spaces, we can step through it
++ # and add multilib dir if necessary.
++ lt_tmp_lt_search_path_spec=
++ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
++ for lt_sys_path in $lt_search_path_spec; do
++ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
++ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
++ else
++ test -d "$lt_sys_path" && \
++ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
++ fi
++ done
++ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
++BEGIN {RS=" "; FS="/|\n";} {
++ lt_foo="";
++ lt_count=0;
++ for (lt_i = NF; lt_i > 0; lt_i--) {
++ if ($lt_i != "" && $lt_i != ".") {
++ if ($lt_i == "..") {
++ lt_count++;
++ } else {
++ if (lt_count == 0) {
++ lt_foo="/" $lt_i lt_foo;
++ } else {
++ lt_count--;
++ }
++ }
++ }
++ }
++ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
++ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
++}'`
++ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
++else
++ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
++fi])
++library_names_spec=
++libname_spec='lib$name'
++soname_spec=
++shrext_cmds=".so"
++postinstall_cmds=
++postuninstall_cmds=
++finish_cmds=
++finish_eval=
++shlibpath_var=
++shlibpath_overrides_runpath=unknown
++version_type=none
++dynamic_linker="$host_os ld.so"
++sys_lib_dlsearch_path_spec="/lib /usr/lib"
++need_lib_prefix=unknown
++hardcode_into_libs=no
++
++# when you set need_version to no, make sure it does not cause -set_version
++# flags to be left without arguments
++need_version=unknown
++
++case $host_os in
++aix3*)
++ version_type=linux
++ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
++ shlibpath_var=LIBPATH
++
++ # AIX 3 has no versioning support, so we append a major version to the name.
++ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+- version_type=freebsd-elf
++aix[[4-9]]*)
++ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
+- shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+- if test "$with_gnu_ld" = yes; then
+- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+- shlibpath_overrides_runpath=no
++ if test "$host_cpu" = ia64; then
++ # AIX 5 supports IA64
++ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
++ shlibpath_var=LD_LIBRARY_PATH
+ else
+- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+- shlibpath_overrides_runpath=yes
++ # With GCC up to 2.95.x, collect2 would create an import file
++ # for dependence libraries. The import file would start with
++ # the line `#! .'. This would cause the generated library to
++ # depend on `.', always an invalid library. This was fixed in
++ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+- sco3.2v5*)
+- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+- ;;
++ aix4 | aix4.[[01]] | aix4.[[01]].*)
++ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
++ echo ' yes '
++ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
++ :
++ else
++ can_build_shared=no
++ fi
++ ;;
+ esac
++ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
++ # soname into executable. Probably we can add versioning support to
++ # collect2, so additional links can be useful in future.
++ if test "$aix_use_runtimelinking" = yes; then
++ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
++ # instead of lib<name>.a to let people know that these are not
++ # typical AIX shared libraries.
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ else
++ # We preserve .a as extension for shared libraries through AIX4.2
++ # and later when we are not doing run time linking.
++ library_names_spec='${libname}${release}.a $libname.a'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ fi
++ shlibpath_var=LIBPATH
+ fi
+- sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+-uts4*)
++amigaos*)
++ case $host_cpu in
++ powerpc)
++ # Since July 2007 AmigaOS4 officially supports .so libraries.
++ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ ;;
++ m68k)
++ library_names_spec='$libname.ixlibrary $libname.a'
++ # Create ${libname}_ixlibrary.a entries in /sys/libs.
++ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
++ ;;
++ esac
++ ;;
++
++beos*)
++ library_names_spec='${libname}${shared_ext}'
++ dynamic_linker="$host_os ld.so"
++ shlibpath_var=LIBRARY_PATH
++ ;;
++
++bsdi[[45]]*)
+ version_type=linux
++ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
++ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
++ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
++ # the default ld.so.conf also contains /usr/contrib/lib and
++ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
++ # libtool to hard-code these into programs
+ ;;
+
+-*)
+- dynamic_linker=no
+- ;;
+-esac
+-AC_MSG_RESULT([$dynamic_linker])
+-test "$dynamic_linker" = no && can_build_shared=no
+-
+-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+-if test "$GCC" = yes; then
+- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+-fi
+-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
++cygwin* | mingw* | pw32*)
++ version_type=windows
++ shrext_cmds=".dll"
++ need_version=no
++ need_lib_prefix=no
+
++ case $GCC,$host_os in
++ yes,cygwin* | yes,mingw* | yes,pw32*)
++ library_names_spec='$libname.dll.a'
++ # DLL is installed to $(libdir)/../bin by postinstall_cmds
++ postinstall_cmds='base_file=`basename \${file}`~
++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
++ dldir=$destdir/`dirname \$dlpath`~
++ test -d \$dldir || mkdir -p \$dldir~
++ $install_prog $dir/$dlname \$dldir/$dlname~
++ chmod a+x \$dldir/$dlname~
++ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
++ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
++ fi'
++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
++ dlpath=$dir/\$dldll~
++ $RM \$dlpath'
++ shlibpath_overrides_runpath=yes
+
+-# _LT_AC_TAGCONFIG
+-# ----------------
+-AC_DEFUN([_LT_AC_TAGCONFIG],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_ARG_WITH([tags],
+- [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+- [include additional configurations @<:@automatic@:>@])],
+- [tagnames="$withval"])
+-
+-if test -f "$ltmain" && test -n "$tagnames"; then
+- if test ! -f "${ofile}"; then
+- AC_MSG_WARN([output file `$ofile' does not exist])
+- fi
+-
+- if test -z "$LTCC"; then
+- eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+- if test -z "$LTCC"; then
+- AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+- else
+- AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+- fi
+- fi
+- if test -z "$LTCFLAGS"; then
+- eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+- fi
+-
+- # Extract list of available tagged configurations in $ofile.
+- # Note that this assumes the entire list is on one line.
+- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+-
+- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+- for tagname in $tagnames; do
+- IFS="$lt_save_ifs"
+- # Check whether tagname contains only valid characters
+- case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+- "") ;;
+- *) AC_MSG_ERROR([invalid tag name: $tagname])
+- ;;
++ case $host_os in
++ cygwin*)
++ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
++ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
++ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
++ ;;
++ mingw*)
++ # MinGW DLLs use traditional 'lib' prefix
++ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
++ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
++ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
++ # It is most probably a Windows format PATH printed by
++ # mingw gcc, but we are running on Cygwin. Gcc prints its search
++ # path with ; separators, and with drive letters. We can handle the
++ # drive letters (cygwin fileutils understands them), so leave them,
++ # especially as we might pass files found there to a mingw objdump,
++ # which wouldn't understand a cygwinified path. Ahh.
++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
++ else
++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
++ fi
++ ;;
++ pw32*)
++ # pw32 DLLs use 'pw' prefix rather than 'lib'
++ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
++ ;;
+ esac
++ ;;
+
+- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+- then
+- AC_MSG_ERROR([tag name \"$tagname\" already exists])
+- fi
+-
+- # Update the list of available tags.
+- if test -n "$tagname"; then
+- echo appending configuration tag \"$tagname\" to $ofile
+-
+- case $tagname in
+- CXX)
+- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+- (test "X$CXX" != "Xg++"))) ; then
+- AC_LIBTOOL_LANG_CXX_CONFIG
+- else
+- tagname=""
+- fi
+- ;;
+-
+- F77)
+- if test -n "$F77" && test "X$F77" != "Xno"; then
+- AC_LIBTOOL_LANG_F77_CONFIG
+- else
+- tagname=""
+- fi
+- ;;
+-
+- GCJ)
+- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+- AC_LIBTOOL_LANG_GCJ_CONFIG
+- else
+- tagname=""
+- fi
+- ;;
++ *)
++ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
++ ;;
++ esac
++ dynamic_linker='Win32 ld.exe'
++ # FIXME: first we should search . and the directory the executable is in
++ shlibpath_var=PATH
++ ;;
+
+- RC)
+- AC_LIBTOOL_LANG_RC_CONFIG
+- ;;
++darwin* | rhapsody*)
++ dynamic_linker="$host_os dyld"
++ version_type=darwin
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
++ soname_spec='${libname}${release}${major}$shared_ext'
++ shlibpath_overrides_runpath=yes
++ shlibpath_var=DYLD_LIBRARY_PATH
++ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
++m4_if([$1], [],[
++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
++ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
++ ;;
+
+- *)
+- AC_MSG_ERROR([Unsupported tag name: $tagname])
+- ;;
+- esac
++dgux*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ ;;
+
+- # Append the new tag name to the list of available tags.
+- if test -n "$tagname" ; then
+- available_tags="$available_tags $tagname"
+- fi
+- fi
+- done
+- IFS="$lt_save_ifs"
++freebsd1*)
++ dynamic_linker=no
++ ;;
+
+- # Now substitute the updated list of available tags.
+- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+- mv "${ofile}T" "$ofile"
+- chmod +x "$ofile"
++freebsd* | dragonfly*)
++ # DragonFly does not have aout. When/if they implement a new
++ # versioning mechanism, adjust this.
++ if test -x /usr/bin/objformat; then
++ objformat=`/usr/bin/objformat`
+ else
+- rm -f "${ofile}T"
+- AC_MSG_ERROR([unable to update list of available tagged configurations.])
++ case $host_os in
++ freebsd[[123]]*) objformat=aout ;;
++ *) objformat=elf ;;
++ esac
+ fi
+-fi
+-])# _LT_AC_TAGCONFIG
+-
+-
+-# AC_LIBTOOL_DLOPEN
+-# -----------------
+-# enable checks for dlopen support
+-AC_DEFUN([AC_LIBTOOL_DLOPEN],
+- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+-])# AC_LIBTOOL_DLOPEN
+-
+-
+-# AC_LIBTOOL_WIN32_DLL
+-# --------------------
+-# declare package support for building win32 DLLs
+-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+-])# AC_LIBTOOL_WIN32_DLL
+-
+-
+-# AC_ENABLE_SHARED([DEFAULT])
+-# ---------------------------
+-# implement the --enable-shared flag
+-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+-AC_DEFUN([AC_ENABLE_SHARED],
+-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+-AC_ARG_ENABLE([shared],
+- [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+- [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+- [p=${PACKAGE-default}
+- case $enableval in
+- yes) enable_shared=yes ;;
+- no) enable_shared=no ;;
+- *)
+- enable_shared=no
+- # Look at the argument we got. We use all the common list separators.
+- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+- for pkg in $enableval; do
+- IFS="$lt_save_ifs"
+- if test "X$pkg" = "X$p"; then
+- enable_shared=yes
+- fi
+- done
+- IFS="$lt_save_ifs"
++ version_type=freebsd-$objformat
++ case $version_type in
++ freebsd-elf*)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++ need_version=no
++ need_lib_prefix=no
++ ;;
++ freebsd-*)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
++ need_version=yes
+ ;;
+- esac],
+- [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+-])# AC_ENABLE_SHARED
++ esac
++ shlibpath_var=LD_LIBRARY_PATH
++ case $host_os in
++ freebsd2*)
++ shlibpath_overrides_runpath=yes
++ ;;
++ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ ;;
++ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
++ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
++ shlibpath_overrides_runpath=no
++ hardcode_into_libs=yes
++ ;;
++ *) # from 4.6 on, and DragonFly
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ ;;
++ esac
++ ;;
+
++gnu*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ hardcode_into_libs=yes
++ ;;
+
+-# AC_DISABLE_SHARED
+-# -----------------
+-# set the default shared flag to --disable-shared
+-AC_DEFUN([AC_DISABLE_SHARED],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-AC_ENABLE_SHARED(no)
+-])# AC_DISABLE_SHARED
++hpux9* | hpux10* | hpux11*)
++ # Give a soname corresponding to the major version so that dld.sl refuses to
++ # link against other versions.
++ version_type=sunos
++ need_lib_prefix=no
++ need_version=no
++ case $host_cpu in
++ ia64*)
++ shrext_cmds='.so'
++ hardcode_into_libs=yes
++ dynamic_linker="$host_os dld.so"
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ if test "X$HPUX_IA64_MODE" = X32; then
++ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
++ else
++ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
++ fi
++ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
++ ;;
++ hppa*64*)
++ shrext_cmds='.sl'
++ hardcode_into_libs=yes
++ dynamic_linker="$host_os dld.sl"
++ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
++ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
++ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
++ ;;
++ *)
++ shrext_cmds='.sl'
++ dynamic_linker="$host_os dld.sl"
++ shlibpath_var=SHLIB_PATH
++ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ ;;
++ esac
++ # HP-UX runs *really* slowly unless shared libraries are mode 555.
++ postinstall_cmds='chmod 555 $lib'
++ ;;
+
++interix[[3-9]]*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ hardcode_into_libs=yes
++ ;;
+
+-# AC_ENABLE_STATIC([DEFAULT])
+-# ---------------------------
+-# implement the --enable-static flag
+-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+-AC_DEFUN([AC_ENABLE_STATIC],
+-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+-AC_ARG_ENABLE([static],
+- [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+- [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+- [p=${PACKAGE-default}
+- case $enableval in
+- yes) enable_static=yes ;;
+- no) enable_static=no ;;
++irix5* | irix6* | nonstopux*)
++ case $host_os in
++ nonstopux*) version_type=nonstopux ;;
+ *)
+- enable_static=no
+- # Look at the argument we got. We use all the common list separators.
+- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+- for pkg in $enableval; do
+- IFS="$lt_save_ifs"
+- if test "X$pkg" = "X$p"; then
+- enable_static=yes
+- fi
+- done
+- IFS="$lt_save_ifs"
+- ;;
+- esac],
+- [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+-])# AC_ENABLE_STATIC
++ if test "$lt_cv_prog_gnu_ld" = yes; then
++ version_type=linux
++ else
++ version_type=irix
++ fi ;;
++ esac
++ need_lib_prefix=no
++ need_version=no
++ soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
++ case $host_os in
++ irix5* | nonstopux*)
++ libsuff= shlibsuff=
++ ;;
++ *)
++ case $LD in # libtool.m4 will add one of these switches to LD
++ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
++ libsuff= shlibsuff= libmagic=32-bit;;
++ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
++ libsuff=32 shlibsuff=N32 libmagic=N32;;
++ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
++ libsuff=64 shlibsuff=64 libmagic=64-bit;;
++ *) libsuff= shlibsuff= libmagic=never-match;;
++ esac
++ ;;
++ esac
++ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
++ shlibpath_overrides_runpath=no
++ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
++ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
++ hardcode_into_libs=yes
++ ;;
+
++# No shared lib support for Linux oldld, aout, or coff.
++linux*oldld* | linux*aout* | linux*coff*)
++ dynamic_linker=no
++ ;;
+
+-# AC_DISABLE_STATIC
+-# -----------------
+-# set the default static flag to --disable-static
+-AC_DEFUN([AC_DISABLE_STATIC],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-AC_ENABLE_STATIC(no)
+-])# AC_DISABLE_STATIC
++# This must be Linux ELF.
++linux* | k*bsd*-gnu)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ # Some binutils ld are patched to set DT_RUNPATH
++ save_LDFLAGS=$LDFLAGS
++ save_libdir=$libdir
++ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
++ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
++ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
++ [shlibpath_overrides_runpath=yes])])
++ LDFLAGS=$save_LDFLAGS
++ libdir=$save_libdir
+
++ # This implies no fast_install, which is unacceptable.
++ # Some rework will be needed to allow for fast_install
++ # before this can be enabled.
++ hardcode_into_libs=yes
+
+-# AC_ENABLE_FAST_INSTALL([DEFAULT])
+-# ---------------------------------
+-# implement the --enable-fast-install flag
+-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+-AC_ARG_ENABLE([fast-install],
+- [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+- [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+- [p=${PACKAGE-default}
+- case $enableval in
+- yes) enable_fast_install=yes ;;
+- no) enable_fast_install=no ;;
+- *)
+- enable_fast_install=no
+- # Look at the argument we got. We use all the common list separators.
+- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+- for pkg in $enableval; do
+- IFS="$lt_save_ifs"
+- if test "X$pkg" = "X$p"; then
+- enable_fast_install=yes
+- fi
+- done
+- IFS="$lt_save_ifs"
++ # Append ld.so.conf contents to the search path
++ if test -f /etc/ld.so.conf; then
++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ fi
++
++ # We used to test for /lib/ld.so.1 and disable shared libraries on
++ # powerpc, because MkLinux only supported shared libraries with the
++ # GNU dynamic linker. Since this was broken with cross compilers,
++ # most powerpc-linux boxes support dynamic linking these days and
++ # people can always --disable-shared, the test was removed, and we
++ # assume the GNU/Linux dynamic linker is in use.
++ dynamic_linker='GNU/Linux ld.so'
++ ;;
++
++netbsd*)
++ version_type=sunos
++ need_lib_prefix=no
++ need_version=no
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++ dynamic_linker='NetBSD (a.out) ld.so'
++ else
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ dynamic_linker='NetBSD ld.elf_so'
++ fi
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ ;;
++
++newsos6)
++ version_type=linux
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ ;;
++
++*nto* | *qnx*)
++ version_type=qnx
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ hardcode_into_libs=yes
++ dynamic_linker='ldqnx.so'
++ ;;
++
++openbsd*)
++ version_type=sunos
++ sys_lib_dlsearch_path_spec="/usr/lib"
++ need_lib_prefix=no
++ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
++ case $host_os in
++ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
++ *) need_version=no ;;
++ esac
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ case $host_os in
++ openbsd2.[[89]] | openbsd2.[[89]].*)
++ shlibpath_overrides_runpath=no
++ ;;
++ *)
++ shlibpath_overrides_runpath=yes
++ ;;
++ esac
++ else
++ shlibpath_overrides_runpath=yes
++ fi
++ ;;
++
++os2*)
++ libname_spec='$name'
++ shrext_cmds=".dll"
++ need_lib_prefix=no
++ library_names_spec='$libname${shared_ext} $libname.a'
++ dynamic_linker='OS/2 ld.exe'
++ shlibpath_var=LIBPATH
++ ;;
++
++osf3* | osf4* | osf5*)
++ version_type=osf
++ need_lib_prefix=no
++ need_version=no
++ soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ shlibpath_var=LD_LIBRARY_PATH
++ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
++ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
++ ;;
++
++rdos*)
++ dynamic_linker=no
++ ;;
++
++solaris*)
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ # ldd complains unless libraries are executable
++ postinstall_cmds='chmod +x $lib'
++ ;;
++
++sunos4*)
++ version_type=sunos
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ if test "$with_gnu_ld" = yes; then
++ need_lib_prefix=no
++ fi
++ need_version=yes
++ ;;
++
++sysv4 | sysv4.3*)
++ version_type=linux
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ case $host_vendor in
++ sni)
++ shlibpath_overrides_runpath=no
++ need_lib_prefix=no
++ runpath_var=LD_RUN_PATH
++ ;;
++ siemens)
++ need_lib_prefix=no
++ ;;
++ motorola)
++ need_lib_prefix=no
++ need_version=no
++ shlibpath_overrides_runpath=no
++ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+- esac],
+- [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+-])# AC_ENABLE_FAST_INSTALL
++ esac
++ ;;
+
++sysv4*MP*)
++ if test -d /usr/nec ;then
++ version_type=linux
++ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
++ soname_spec='$libname${shared_ext}.$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ fi
++ ;;
+
+-# AC_DISABLE_FAST_INSTALL
+-# -----------------------
+-# set the default to --disable-fast-install
+-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-AC_ENABLE_FAST_INSTALL(no)
+-])# AC_DISABLE_FAST_INSTALL
++sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++ version_type=freebsd-elf
++ need_lib_prefix=no
++ need_version=no
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=yes
++ hardcode_into_libs=yes
++ if test "$with_gnu_ld" = yes; then
++ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
++ else
++ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
++ case $host_os in
++ sco3.2v5*)
++ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
++ ;;
++ esac
++ fi
++ sys_lib_dlsearch_path_spec='/usr/lib'
++ ;;
++
++tpf*)
++ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
++ version_type=linux
++ need_lib_prefix=no
++ need_version=no
++ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ shlibpath_var=LD_LIBRARY_PATH
++ shlibpath_overrides_runpath=no
++ hardcode_into_libs=yes
++ ;;
+
++uts4*)
++ version_type=linux
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ shlibpath_var=LD_LIBRARY_PATH
++ ;;
+
+-# AC_LIBTOOL_PICMODE([MODE])
+-# --------------------------
+-# implement the --with-pic flag
+-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+-AC_DEFUN([AC_LIBTOOL_PICMODE],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+-pic_mode=ifelse($#,1,$1,default)
+-])# AC_LIBTOOL_PICMODE
++*)
++ dynamic_linker=no
++ ;;
++esac
++AC_MSG_RESULT([$dynamic_linker])
++test "$dynamic_linker" = no && can_build_shared=no
+
++variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
++if test "$GCC" = yes; then
++ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
++fi
++
++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
++ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
++fi
++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
++ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
++fi
+
+-# AC_PROG_EGREP
+-# -------------
+-# This is predefined starting with Autoconf 2.54, so this conditional
+-# definition can be removed once we require Autoconf 2.54 or later.
+-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+- [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+- then ac_cv_prog_egrep='grep -E'
+- else ac_cv_prog_egrep='egrep'
+- fi])
+- EGREP=$ac_cv_prog_egrep
+- AC_SUBST([EGREP])
+-])])
++_LT_DECL([], [variables_saved_for_relink], [1],
++ [Variables whose values should be saved in libtool wrapper scripts and
++ restored at link time])
++_LT_DECL([], [need_lib_prefix], [0],
++ [Do we need the "lib" prefix for modules?])
++_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
++_LT_DECL([], [version_type], [0], [Library versioning type])
++_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
++_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
++_LT_DECL([], [shlibpath_overrides_runpath], [0],
++ [Is shlibpath searched before the hard-coded library search path?])
++_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
++_LT_DECL([], [library_names_spec], [1],
++ [[List of archive names. First name is the real one, the rest are links.
++ The last name is the one that the linker finds with -lNAME]])
++_LT_DECL([], [soname_spec], [1],
++ [[The coded name of the library, if different from the real name]])
++_LT_DECL([], [postinstall_cmds], [2],
++ [Command to use after installation of a shared archive])
++_LT_DECL([], [postuninstall_cmds], [2],
++ [Command to use after uninstallation of a shared archive])
++_LT_DECL([], [finish_cmds], [2],
++ [Commands used to finish a libtool library installation in a directory])
++_LT_DECL([], [finish_eval], [1],
++ [[As "finish_cmds", except a single script fragment to be evaled but
++ not shown]])
++_LT_DECL([], [hardcode_into_libs], [0],
++ [Whether we should hardcode library paths into libraries])
++_LT_DECL([], [sys_lib_search_path_spec], [2],
++ [Compile-time system search path for libraries])
++_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
++ [Run-time system search path for libraries])
++])# _LT_SYS_DYNAMIC_LINKER
+
+
+-# AC_PATH_TOOL_PREFIX
+-# -------------------
++# _LT_PATH_TOOL_PREFIX(TOOL)
++# --------------------------
+ # find a file program which can recognize shared library
+-AC_DEFUN([AC_PATH_TOOL_PREFIX],
+-[AC_REQUIRE([AC_PROG_EGREP])dnl
++AC_DEFUN([_LT_PATH_TOOL_PREFIX],
++[m4_require([_LT_DECL_EGREP])dnl
+ AC_MSG_CHECKING([for $1])
+ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+ [case $MAGIC_CMD in
+@@ -2100,7 +2740,7 @@
+ dnl $ac_dummy forces splitting on constant user-supplied paths.
+ dnl POSIX.2 word splitting is done only on the output of word expansions,
+ dnl not every word. This closes a longstanding sh security hole.
+- ac_dummy="ifelse([$2], , $PATH, [$2])"
++ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+@@ -2115,7 +2755,7 @@
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+- cat <<EOF 1>&2
++ cat <<_LT_EOF 1>&2
+
+ *** Warning: the command libtool uses to detect shared libraries,
+ *** $file_magic_cmd, produces output that libtool cannot recognize.
+@@ -2126,7 +2766,7 @@
+ *** may want to report the problem to your system manager and/or to
+ *** bug-libtool@gnu.org
+
+-EOF
++_LT_EOF
+ fi ;;
+ esac
+ fi
+@@ -2143,37 +2783,47 @@
+ else
+ AC_MSG_RESULT(no)
+ fi
+-])# AC_PATH_TOOL_PREFIX
++_LT_DECL([], [MAGIC_CMD], [0],
++ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
++])# _LT_PATH_TOOL_PREFIX
+
++# Old name:
++AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+-# AC_PATH_MAGIC
+-# -------------
++
++# _LT_PATH_MAGIC
++# --------------
+ # find a file program which can recognize a shared library
+-AC_DEFUN([AC_PATH_MAGIC],
+-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
++m4_defun([_LT_PATH_MAGIC],
++[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+ if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+- AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
++ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+ fi
+-])# AC_PATH_MAGIC
++])# _LT_PATH_MAGIC
+
+
+-# AC_PROG_LD
++# LT_PATH_LD
+ # ----------
+ # find the pathname to the GNU or non-GNU linker
+-AC_DEFUN([AC_PROG_LD],
+-[AC_ARG_WITH([gnu-ld],
+- [AC_HELP_STRING([--with-gnu-ld],
+- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+- [test "$withval" = no || with_gnu_ld=yes],
+- [with_gnu_ld=no])
+-AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_REQUIRE([AC_PROG_CC])dnl
++AC_DEFUN([LT_PATH_LD],
++[AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
++m4_require([_LT_DECL_SED])dnl
++m4_require([_LT_DECL_EGREP])dnl
++
++AC_ARG_WITH([gnu-ld],
++ [AS_HELP_STRING([--with-gnu-ld],
++ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
++ [test "$withval" = no || with_gnu_ld=yes],
++ [with_gnu_ld=no])dnl
++
+ ac_prog=ld
+ if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+@@ -2190,9 +2840,9 @@
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
++ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
++ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
++ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+@@ -2242,15 +2892,24 @@
+ AC_MSG_RESULT(no)
+ fi
+ test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+-AC_PROG_LD_GNU
+-])# AC_PROG_LD
++_LT_PATH_LD_GNU
++AC_SUBST([LD])
+
++_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
++])# LT_PATH_LD
+
+-# AC_PROG_LD_GNU
+-# --------------
+-AC_DEFUN([AC_PROG_LD_GNU],
+-[AC_REQUIRE([AC_PROG_EGREP])dnl
+-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
++# Old names:
++AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
++AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AM_PROG_LD], [])
++dnl AC_DEFUN([AC_PROG_LD], [])
++
++
++# _LT_PATH_LD_GNU
++#- --------------
++m4_defun([_LT_PATH_LD_GNU],
++[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+ [# I'd rather use --version here, but apparently some GNU lds only accept -v.
+ case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+@@ -2261,14 +2920,14 @@
+ ;;
+ esac])
+ with_gnu_ld=$lt_cv_prog_gnu_ld
+-])# AC_PROG_LD_GNU
++])# _LT_PATH_LD_GNU
+
+
+-# AC_PROG_LD_RELOAD_FLAG
+-# ----------------------
++# _LT_CMD_RELOAD
++# --------------
+ # find reload flag for linker
+ # -- PORTME Some linkers may need a different reload flag.
+-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
++m4_defun([_LT_CMD_RELOAD],
+ [AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+@@ -2287,15 +2946,18 @@
+ fi
+ ;;
+ esac
+-])# AC_PROG_LD_RELOAD_FLAG
++_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
++_LT_DECL([], [reload_cmds], [2])dnl
++])# _LT_CMD_RELOAD
+
+
+-# AC_DEPLIBS_CHECK_METHOD
+-# -----------------------
++# _LT_CHECK_MAGIC_METHOD
++# ----------------------
+ # how to check for library dependencies
+ # -- PORTME fill in with the dynamic library characteristics
+-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+-[AC_CACHE_CHECK([how to recognize dependent libraries],
++m4_defun([_LT_CHECK_MAGIC_METHOD],
++[m4_require([_LT_DECL_EGREP])
++AC_CACHE_CHECK([how to recognize dependent libraries],
+ lt_cv_deplibs_check_method,
+ [lt_cv_file_magic_cmd='$MAGIC_CMD'
+ lt_cv_file_magic_test_file=
+@@ -2312,7 +2974,7 @@
+ # whether `pass_all' will *always* work, you probably want this one.
+
+ case $host_os in
+-aix4* | aix5*)
++aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+@@ -2350,7 +3012,7 @@
+ ;;
+
+ freebsd* | dragonfly*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+@@ -2408,7 +3070,7 @@
+ ;;
+
+ netbsd*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+@@ -2421,12 +3083,12 @@
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+-nto-qnx*)
+- lt_cv_deplibs_check_method=unknown
++*nto* | *qnx*)
++ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+ openbsd*)
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+@@ -2445,6 +3107,10 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++ lt_cv_deplibs_check_method=pass_all
++ ;;
++
+ sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+@@ -2472,7 +3138,7 @@
+ esac
+ ;;
+
+-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
++tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+@@ -2480,14 +3146,20 @@
+ file_magic_cmd=$lt_cv_file_magic_cmd
+ deplibs_check_method=$lt_cv_deplibs_check_method
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+-])# AC_DEPLIBS_CHECK_METHOD
+
++_LT_DECL([], [deplibs_check_method], [1],
++ [Method to check whether dependent libraries are shared objects])
++_LT_DECL([], [file_magic_cmd], [1],
++ [Command to use when deplibs_check_method == "file_magic"])
++])# _LT_CHECK_MAGIC_METHOD
+
+-# AC_PROG_NM
++
++# LT_PATH_NM
+ # ----------
+-# find the pathname to a BSD-compatible name lister
+-AC_DEFUN([AC_PROG_NM],
+-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
++# find the pathname to a BSD- or MS-compatible name lister
++AC_DEFUN([LT_PATH_NM],
++[AC_REQUIRE([AC_PROG_CC])dnl
++AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+ [if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+@@ -2529,16 +3201,51 @@
+ done
+ IFS="$lt_save_ifs"
+ done
+- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
++ : ${lt_cv_path_NM=no}
+ fi])
+-NM="$lt_cv_path_NM"
+-])# AC_PROG_NM
++if test "$lt_cv_path_NM" != "no"; then
++ NM="$lt_cv_path_NM"
++else
++ # Didn't find any BSD compatible name lister, look for dumpbin.
++ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
++ AC_SUBST([DUMPBIN])
++ if test "$DUMPBIN" != ":"; then
++ NM="$DUMPBIN"
++ fi
++fi
++test -z "$NM" && NM=nm
++AC_SUBST([NM])
++_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
++AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
++ [lt_cv_nm_interface="BSD nm"
++ echo "int some_variable = 0;" > conftest.$ac_ext
++ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
++ (eval "$ac_compile" 2>conftest.err)
++ cat conftest.err >&AS_MESSAGE_LOG_FD
++ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
++ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
++ cat conftest.err >&AS_MESSAGE_LOG_FD
++ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
++ cat conftest.out >&AS_MESSAGE_LOG_FD
++ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
++ lt_cv_nm_interface="MS dumpbin"
++ fi
++ rm -f conftest*])
++])# LT_PATH_NM
++
++# Old names:
++AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
++AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AM_PROG_NM], [])
++dnl AC_DEFUN([AC_PROG_NM], [])
+
+-# AC_CHECK_LIBM
+-# -------------
++
++# LT_LIB_M
++# --------
+ # check for math library
+-AC_DEFUN([AC_CHECK_LIBM],
++AC_DEFUN([LT_LIB_M],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ LIBM=
+ case $host in
+@@ -2553,3986 +3260,3739 @@
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+ esac
+-])# AC_CHECK_LIBM
++AC_SUBST([LIBM])
++])# LT_LIB_M
+
++# Old name:
++AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+-# -----------------------------------
+-# sets LIBLTDL to the link flags for the libltdl convenience library and
+-# LTDLINCL to the include flags for the libltdl header and adds
+-# --enable-ltdl-convenience to the configure arguments. Note that
+-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
+-# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
+-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+-# (note the single quotes!). If your package is not flat and you're not
+-# using automake, define top_builddir and top_srcdir appropriately in
+-# the Makefiles.
+-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+- case $enable_ltdl_convenience in
+- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+- "") enable_ltdl_convenience=yes
+- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+- esac
+- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+- # For backwards non-gettext consistent compatibility...
+- INCLTDL="$LTDLINCL"
+-])# AC_LIBLTDL_CONVENIENCE
+
++# _LT_COMPILER_NO_RTTI([TAGNAME])
++# -------------------------------
++m4_defun([_LT_COMPILER_NO_RTTI],
++[m4_require([_LT_TAG_COMPILER])dnl
+
+-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+-# -----------------------------------
+-# sets LIBLTDL to the link flags for the libltdl installable library and
+-# LTDLINCL to the include flags for the libltdl header and adds
+-# --enable-ltdl-install to the configure arguments. Note that
+-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
+-# and an installed libltdl is not found, it is assumed to be `libltdl'.
+-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+-# '${top_srcdir}/' (note the single quotes!). If your package is not
+-# flat and you're not using automake, define top_builddir and top_srcdir
+-# appropriately in the Makefiles.
+-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+- AC_CHECK_LIB(ltdl, lt_dlinit,
+- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+- [if test x"$enable_ltdl_install" = xno; then
+- AC_MSG_WARN([libltdl not installed, but installation disabled])
+- else
+- enable_ltdl_install=yes
+- fi
+- ])
+- if test x"$enable_ltdl_install" = x"yes"; then
+- ac_configure_args="$ac_configure_args --enable-ltdl-install"
+- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+- else
+- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+- LIBLTDL="-lltdl"
+- LTDLINCL=
+- fi
+- # For backwards non-gettext consistent compatibility...
+- INCLTDL="$LTDLINCL"
+-])# AC_LIBLTDL_INSTALLABLE
++_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
++if test "$GCC" = yes; then
++ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+-# AC_LIBTOOL_CXX
+-# --------------
+-# enable support for C++ libraries
+-AC_DEFUN([AC_LIBTOOL_CXX],
+-[AC_REQUIRE([_LT_AC_LANG_CXX])
+-])# AC_LIBTOOL_CXX
++ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
++ lt_cv_prog_compiler_rtti_exceptions,
++ [-fno-rtti -fno-exceptions], [],
++ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
++fi
++_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
++ [Compiler flag to turn off builtin functions])
++])# _LT_COMPILER_NO_RTTI
+
+
+-# _LT_AC_LANG_CXX
+-# ---------------
+-AC_DEFUN([_LT_AC_LANG_CXX],
+-[AC_REQUIRE([AC_PROG_CXX])
+-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+-])# _LT_AC_LANG_CXX
++# _LT_CMD_GLOBAL_SYMBOLS
++# ----------------------
++m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
++[AC_REQUIRE([AC_CANONICAL_HOST])dnl
++AC_REQUIRE([AC_PROG_CC])dnl
++AC_REQUIRE([LT_PATH_NM])dnl
++AC_REQUIRE([LT_PATH_LD])dnl
++m4_require([_LT_DECL_SED])dnl
++m4_require([_LT_DECL_EGREP])dnl
++m4_require([_LT_TAG_COMPILER])dnl
+
+-# _LT_AC_PROG_CXXCPP
+-# ------------------
+-AC_DEFUN([_LT_AC_PROG_CXXCPP],
++# Check for command to grab the raw symbol name followed by C symbol from nm.
++AC_MSG_CHECKING([command to parse $NM output from $compiler object])
++AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+ [
+-AC_REQUIRE([AC_PROG_CXX])
+-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+- (test "X$CXX" != "Xg++"))) ; then
+- AC_PROG_CXXCPP
+-fi
+-])# _LT_AC_PROG_CXXCPP
+-
+-# AC_LIBTOOL_F77
+-# --------------
+-# enable support for Fortran 77 libraries
+-AC_DEFUN([AC_LIBTOOL_F77],
+-[AC_REQUIRE([_LT_AC_LANG_F77])
+-])# AC_LIBTOOL_F77
+-
+-
+-# _LT_AC_LANG_F77
+-# ---------------
+-AC_DEFUN([_LT_AC_LANG_F77],
+-[AC_REQUIRE([AC_PROG_F77])
+-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+-])# _LT_AC_LANG_F77
+-
+-
+-# AC_LIBTOOL_GCJ
+-# --------------
+-# enable support for GCJ libraries
+-AC_DEFUN([AC_LIBTOOL_GCJ],
+-[AC_REQUIRE([_LT_AC_LANG_GCJ])
+-])# AC_LIBTOOL_GCJ
+-
+-
+-# _LT_AC_LANG_GCJ
+-# ---------------
+-AC_DEFUN([_LT_AC_LANG_GCJ],
+-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+-])# _LT_AC_LANG_GCJ
+-
+-
+-# AC_LIBTOOL_RC
+-# -------------
+-# enable support for Windows resource files
+-AC_DEFUN([AC_LIBTOOL_RC],
+-[AC_REQUIRE([LT_AC_PROG_RC])
+-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+-])# AC_LIBTOOL_RC
+-
+-
+-# AC_LIBTOOL_LANG_C_CONFIG
+-# ------------------------
+-# Ensure that the configuration vars for the C compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+-[lt_save_CC="$CC"
+-AC_LANG_PUSH(C)
+-
+-# Source file extension for C test sources.
+-ac_ext=c
+-
+-# Object file extension for compiled C test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
+-
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;"
+-
+-# Code to be used in simple link tests
+-lt_simple_link_test_code='int main(){return(0);}'
+-
+-_LT_AC_SYS_COMPILER
+-
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
++# These are sane defaults that work on at least a few old systems.
++# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+-## CAVEAT EMPTOR:
+-## There is no encapsulation within the following macros, do not change
+-## the running order or otherwise move them around unless you know exactly
+-## what you are doing...
+-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+-AC_LIBTOOL_PROG_COMPILER_PIC($1)
+-AC_LIBTOOL_PROG_CC_C_O($1)
+-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+-AC_LIBTOOL_PROG_LD_SHLIBS($1)
+-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+-AC_LIBTOOL_SYS_LIB_STRIP
+-AC_LIBTOOL_DLOPEN_SELF
+-
+-# Report which library types will actually be built
+-AC_MSG_CHECKING([if libtool supports shared libraries])
+-AC_MSG_RESULT([$can_build_shared])
++# Character class describing NM global symbol codes.
++symcode='[[BCDEGRST]]'
+
+-AC_MSG_CHECKING([whether to build shared libraries])
+-test "$can_build_shared" = "no" && enable_shared=no
++# Regexp to match symbols that can be accessed directly from C.
++sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+-# On AIX, shared libraries and static libraries use the same namespace, and
+-# are all built from PIC.
++# Define system-specific variables.
+ case $host_os in
+-aix3*)
+- test "$enable_shared" = yes && enable_static=no
+- if test -n "$RANLIB"; then
+- archive_cmds="$archive_cmds~\$RANLIB \$lib"
+- postinstall_cmds='$RANLIB $lib'
+- fi
++aix*)
++ symcode='[[BCDT]]'
+ ;;
+-
+-aix4* | aix5*)
+- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+- test "$enable_shared" = yes && enable_static=no
++cygwin* | mingw* | pw32*)
++ symcode='[[ABCDGISTW]]'
++ ;;
++hpux*)
++ if test "$host_cpu" = ia64; then
++ symcode='[[ABCDEGRST]]'
+ fi
+- ;;
++ ;;
++irix* | nonstopux*)
++ symcode='[[BCDEGRST]]'
++ ;;
++osf*)
++ symcode='[[BCDEGQRST]]'
++ ;;
++solaris*)
++ symcode='[[BDRT]]'
++ ;;
++sco3.2v5*)
++ symcode='[[DT]]'
++ ;;
++sysv4.2uw2*)
++ symcode='[[DT]]'
++ ;;
++sysv5* | sco5v6* | unixware* | OpenUNIX*)
++ symcode='[[ABDT]]'
++ ;;
++sysv4)
++ symcode='[[DFNSTU]]'
++ ;;
+ esac
+-AC_MSG_RESULT([$enable_shared])
+-
+-AC_MSG_CHECKING([whether to build static libraries])
+-# Make sure either enable_shared or enable_static is yes.
+-test "$enable_shared" = yes || enable_static=yes
+-AC_MSG_RESULT([$enable_static])
+-
+-AC_LIBTOOL_CONFIG($1)
+-
+-AC_LANG_POP
+-CC="$lt_save_CC"
+-])# AC_LIBTOOL_LANG_C_CONFIG
+-
+
+-# AC_LIBTOOL_LANG_CXX_CONFIG
+-# --------------------------
+-# Ensure that the configuration vars for the C compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+-[AC_LANG_PUSH(C++)
+-AC_REQUIRE([AC_PROG_CXX])
+-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+-
+-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+-_LT_AC_TAGVAR(always_export_symbols, $1)=no
+-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+-_LT_AC_TAGVAR(hardcode_direct, $1)=no
+-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+-_LT_AC_TAGVAR(module_cmds, $1)=
+-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+-_LT_AC_TAGVAR(no_undefined_flag, $1)=
+-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
++# If we're using GNU nm, then use its standard symbol codes.
++case `$NM -V 2>&1` in
++*GNU* | *'with BFD'*)
++ symcode='[[ABCDGIRSTW]]' ;;
++esac
+
+-# Dependencies to place before and after the object being linked:
+-_LT_AC_TAGVAR(predep_objects, $1)=
+-_LT_AC_TAGVAR(postdep_objects, $1)=
+-_LT_AC_TAGVAR(predeps, $1)=
+-_LT_AC_TAGVAR(postdeps, $1)=
+-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
++# Transform an extracted symbol line into a proper C declaration.
++# Some systems (esp. on ia64) link data and code symbols differently,
++# so use this general approach.
++lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+-# Source file extension for C++ test sources.
+-ac_ext=cpp
++# Transform an extracted symbol line into symbol name and symbol address
++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+-# Object file extension for compiled C++ test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
++# Handle CRLF in mingw tool chain
++opt_cr=
++case $build_os in
++mingw*)
++ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
++ ;;
++esac
+
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;"
++# Try without a prefix underscore, then with it.
++for ac_symprfx in "" "_"; do
+
+-# Code to be used in simple link tests
+-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
++ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
++ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+-_LT_AC_SYS_COMPILER
++ # Write the raw and C identifiers.
++ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
++ # Fake it for dumpbin and say T for any non-static function
++ # and D for any global variable.
++ # Also find C++ and __fastcall symbols from MSVC++,
++ # which start with @ or ?.
++ lt_cv_sys_global_symbol_pipe="$AWK ['"\
++" {last_section=section; section=\$ 3};"\
++" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
++" \$ 0!~/External *\|/{next};"\
++" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
++" {if(hide[section]) next};"\
++" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
++" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
++" s[1]~/^[@?]/{print s[1], s[1]; next};"\
++" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
++" ' prfx=^$ac_symprfx]"
++ else
++ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
++ fi
+
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
++ # Check to see that the pipe works correctly.
++ pipe_works=no
+
+-# Allow CC to be a program name with arguments.
+-lt_save_CC=$CC
+-lt_save_LD=$LD
+-lt_save_GCC=$GCC
+-GCC=$GXX
+-lt_save_with_gnu_ld=$with_gnu_ld
+-lt_save_path_LD=$lt_cv_path_LD
+-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+-else
+- $as_unset lt_cv_prog_gnu_ld
+-fi
+-if test -n "${lt_cv_path_LDCXX+set}"; then
+- lt_cv_path_LD=$lt_cv_path_LDCXX
+-else
+- $as_unset lt_cv_path_LD
+-fi
+-test -z "${LDCXX+set}" || LD=$LDCXX
+-CC=${CXX-"c++"}
+-compiler=$CC
+-_LT_AC_TAGVAR(compiler, $1)=$CC
+-_LT_CC_BASENAME([$compiler])
++ rm -f conftest*
++ cat > conftest.$ac_ext <<_LT_EOF
++#ifdef __cplusplus
++extern "C" {
++#endif
++char nm_test_var;
++void nm_test_func(void);
++void nm_test_func(void){}
++#ifdef __cplusplus
++}
++#endif
++int main(){nm_test_var='a';nm_test_func();return(0);}
++_LT_EOF
+
+-# We don't want -fno-exception wen compiling C++ code, so set the
+-# no_builtin_flag separately
+-if test "$GXX" = yes; then
+- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+-else
+- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+-fi
++ if AC_TRY_EVAL(ac_compile); then
++ # Now try to grab the symbols.
++ nlist=conftest.nm
++ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
++ # Try sorting and uniquifying the output.
++ if sort "$nlist" | uniq > "$nlist"T; then
++ mv -f "$nlist"T "$nlist"
++ else
++ rm -f "$nlist"T
++ fi
+
+-if test "$GXX" = yes; then
+- # Set up default GNU C++ configuration
++ # Make sure that we snagged all the symbols we need.
++ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
++ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
++ cat <<_LT_EOF > conftest.$ac_ext
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+- AC_PROG_LD
++_LT_EOF
++ # Now generate the symbol file.
++ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+- # Check if GNU C++ uses GNU ld as the underlying linker, since the
+- # archiving commands below assume that GNU ld is being used.
+- if test "$with_gnu_ld" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ cat <<_LT_EOF >> conftest.$ac_ext
+
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++/* The mapping between symbol names and symbols. */
++const struct {
++ const char *name;
++ void *address;
++}
++lt__PROGRAM__LTX_preloaded_symbols[[]] =
++{
++ { "@PROGRAM@", (void *) 0 },
++_LT_EOF
++ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
++ cat <<\_LT_EOF >> conftest.$ac_ext
++ {0, (void *) 0}
++};
+
+- # If archive_cmds runs LD, not CC, wlarc should be empty
+- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+- # investigate it a little bit more. (MM)
+- wlarc='${wl}'
++/* This works around a problem in FreeBSD linker */
++#ifdef FREEBSD_WORKAROUND
++static const void *lt_preloaded_setup() {
++ return lt__PROGRAM__LTX_preloaded_symbols;
++}
++#endif
+
+- # ancient GNU ld didn't support --whole-archive et. al.
+- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+- grep 'no-whole-archive' > /dev/null; then
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++#ifdef __cplusplus
++}
++#endif
++_LT_EOF
++ # Now try linking the two files.
++ mv conftest.$ac_objext conftstm.$ac_objext
++ lt_save_LIBS="$LIBS"
++ lt_save_CFLAGS="$CFLAGS"
++ LIBS="conftstm.$ac_objext"
++ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
++ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
++ pipe_works=yes
++ fi
++ LIBS="$lt_save_LIBS"
++ CFLAGS="$lt_save_CFLAGS"
++ else
++ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
++ fi
++ else
++ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
++ fi
+ else
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
++ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+- with_gnu_ld=no
+- wlarc=
+-
+- # A generic and very simple default shared library creation
+- # command for GNU C++ for the case where it uses the native
+- # linker, instead of GNU ld. If possible, this setting should
+- # overridden to take advantage of the native linker features on
+- # the platform it is being used on.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
++ cat conftest.$ac_ext >&5
+ fi
++ rm -rf conftest* conftst*
+
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+-
++ # Do not use the global_symbol_pipe unless it works.
++ if test "$pipe_works" = yes; then
++ break
++ else
++ lt_cv_sys_global_symbol_pipe=
++ fi
++done
++])
++if test -z "$lt_cv_sys_global_symbol_pipe"; then
++ lt_cv_sys_global_symbol_to_cdecl=
++fi
++if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
++ AC_MSG_RESULT(failed)
+ else
+- GXX=no
+- with_gnu_ld=no
+- wlarc=
++ AC_MSG_RESULT(ok)
+ fi
+
+-# PORTME: fill in a description of your system's C++ link characteristics
+-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+-case $host_os in
+- aix3*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- aix4* | aix5*)
+- if test "$host_cpu" = ia64; then
+- # On IA64, the linker does run time linking by default, so we don't
+- # have to do anything special.
+- aix_use_runtimelinking=no
+- exp_sym_flag='-Bexport'
+- no_entry_flag=""
+- else
+- aix_use_runtimelinking=no
++_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
++ [Take the output of nm and produce a listing of raw symbols and C names])
++_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
++ [Transform the output of nm in a proper C declaration])
++_LT_DECL([global_symbol_to_c_name_address],
++ [lt_cv_sys_global_symbol_to_c_name_address], [1],
++ [Transform the output of nm in a C name address pair])
++_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
++ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
++ [Transform the output of nm in a C name address pair when lib prefix is needed])
++]) # _LT_CMD_GLOBAL_SYMBOLS
+
+- # Test if we are trying to use run time linking or normal
+- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+- # need to do runtime linking.
+- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+- for ld_flag in $LDFLAGS; do
+- case $ld_flag in
+- *-brtl*)
+- aix_use_runtimelinking=yes
+- break
+- ;;
+- esac
+- done
+- ;;
+- esac
+
+- exp_sym_flag='-bexport'
+- no_entry_flag='-bnoentry'
+- fi
++# _LT_COMPILER_PIC([TAGNAME])
++# ---------------------------
++m4_defun([_LT_COMPILER_PIC],
++[m4_require([_LT_TAG_COMPILER])dnl
++_LT_TAGVAR(lt_prog_compiler_wl, $1)=
++_LT_TAGVAR(lt_prog_compiler_pic, $1)=
++_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+- # When large executables or shared objects are built, AIX ld can
+- # have problems creating the table of contents. If linking a library
+- # or program results in "error TOC overflow" add -mminimal-toc to
+- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+-
+- _LT_AC_TAGVAR(archive_cmds, $1)=''
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
++AC_MSG_CHECKING([for $compiler option to produce PIC])
++m4_if([$1], [CXX], [
++ # C++ specific cases for pic, static, wl, etc.
++ if test "$GXX" = yes; then
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+- if test "$GXX" = yes; then
+- case $host_os in aix4.[[012]]|aix4.[[012]].*)
+- # We only want to do this on AIX 4.2 and lower, the check
+- # below for broken collect2 doesn't work under 4.3+
+- collect2name=`${CC} -print-prog-name=collect2`
+- if test -f "$collect2name" && \
+- strings "$collect2name" | grep resolve_lib_name >/dev/null
+- then
+- # We have reworked collect2
+- :
+- else
+- # We have old collect2
+- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+- # It fails to find uninstalled libraries when the uninstalled
+- # path is not listed in the libpath. Setting hardcode_minus_L
+- # to unsupported forces relinking
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+- fi
+- ;;
+- esac
+- shared_flag='-shared'
+- if test "$aix_use_runtimelinking" = yes; then
+- shared_flag="$shared_flag "'${wl}-G'
+- fi
+- else
+- # not using gcc
++ case $host_os in
++ aix*)
++ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+- # chokes on -Wl,-G. The following line is correct:
+- shared_flag='-G'
+- else
+- if test "$aix_use_runtimelinking" = yes; then
+- shared_flag='${wl}-G'
+- else
+- shared_flag='${wl}-bM:SRE'
+- fi
++ # AIX 5 now supports IA64 processor
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+- fi
+-
+- # It seems that -bexpall does not export symbols beginning with
+- # underscore (_), so it is better to generate a list of symbols to export.
+- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+- if test "$aix_use_runtimelinking" = yes; then
+- # Warning - without using the other runtime loading flags (-brtl),
+- # -berok will link without error, but may produce a broken library.
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+- # Determine the default libpath from the value encoded in an empty executable.
+- _LT_AC_SYS_LIBPATH_AIX
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++ ;;
+
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+- else
+- if test "$host_cpu" = ia64; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+- else
+- # Determine the default libpath from the value encoded in an empty executable.
+- _LT_AC_SYS_LIBPATH_AIX
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+- # Warning - without using the other run time loading flags,
+- # -berok will link without error, but may produce a broken library.
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+- # Exported symbols can be pulled into shared objects from archives
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+- # This is similar to how AIX traditionally builds its shared libraries.
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+- fi
+- fi
+- ;;
+-
+- beos*)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+- # support --undefined. This deserves some investigation. FIXME
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+-
+- chorus*)
+- case $cc_basename in
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- ;;
+-
+- cygwin* | mingw* | pw32*)
+- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+- # as there is no search path for DLLs.
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- _LT_AC_TAGVAR(always_export_symbols, $1)=no
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+-
+- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+- # If the export-symbols file already is a .def file (1st line
+- # is EXPORTS), use it as is; otherwise, prepend...
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+- cp $export_symbols $output_objdir/$soname.def;
+- else
+- echo EXPORTS > $output_objdir/$soname.def;
+- cat $export_symbols >> $output_objdir/$soname.def;
+- fi~
+- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- darwin* | rhapsody*)
+- case $host_os in
+- rhapsody* | darwin1.[[012]])
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+- ;;
+- *) # Darwin 1.3 on
+- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+- else
+- case ${MACOSX_DEPLOYMENT_TARGET} in
+- 10.[[012]])
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+- ;;
+- 10.*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+- ;;
+- esac
+- fi
+- ;;
+- esac
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+-
+- if test "$GXX" = yes ; then
+- lt_int_apple_cc_single_mod=no
+- output_verbose_link_cmd='echo'
+- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+- lt_int_apple_cc_single_mod=yes
+- fi
+- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+- fi
+- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- else
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- fi
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- else
+- case $cc_basename in
+- xlc*)
+- output_verbose_link_cmd='echo'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- ;;
+- *)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- fi
++ amigaos*)
++ case $host_cpu in
++ powerpc)
++ # see comment about AmigaOS4 .so support
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ m68k)
++ # FIXME: we need at least 68020 code to build shared libraries, but
++ # adding the `-m68020' flag to GCC prevents building anything better,
++ # like `-m68040'.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
++ esac
++ ;;
+
+- dgux*)
+- case $cc_basename in
+- ec++*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- ghcx*)
+- # Green Hills C++ Compiler
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- ;;
+- freebsd[[12]]*)
+- # C++ shared libraries reported to be fairly broken before switch to ELF
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- freebsd-elf*)
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- ;;
+- freebsd* | dragonfly*)
+- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+- # conventions
+- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+- ;;
+- gnu*)
+- ;;
+- hpux9*)
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+- # but as the default
+- # location of the library.
+-
+- case $cc_basename in
+- CC*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ # PIC is the default for these OSes.
+ ;;
+- aCC*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
++ mingw* | cygwin* | os2* | pw32*)
++ # This hack is so that the source file can tell whether it is being
++ # built for inclusion in a dll (and should export symbols for example).
++ # Although the cygwin gcc ignores -fPIC, still need this for old-style
++ # (--disable-auto-import) libraries
++ m4_if([$1], [GCJ], [],
++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+- *)
+- if test "$GXX" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+- else
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ darwin* | rhapsody*)
++ # PIC is the default on this platform
++ # Common symbols not allowed in MH_DYLIB files
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
++ ;;
++ *djgpp*)
++ # DJGPP does not support shared libraries at all
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
++ ;;
++ interix[[3-9]]*)
++ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
++ # Instead, we relocate shared libraries at runtime.
++ ;;
++ sysv4*MP*)
++ if test -d /usr/nec; then
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+- esac
+- ;;
+- hpux10*|hpux11*)
+- if test $with_gnu_ld = no; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
++ hpux*)
++ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
++ # not for PA HP-UX.
+ case $host_cpu in
+- hppa*64*|ia64*) ;;
++ hppa*64*|ia64*)
++ ;;
+ *)
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- ;;
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
+ esac
+- fi
+- case $host_cpu in
+- hppa*64*|ia64*)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
++ *qnx* | *nto*)
++ # QNX uses GNU C++, but need to define -shared option too, otherwise
++ # it will coredump.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+- # but as the default
+- # location of the library.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+-
+- case $cc_basename in
+- CC*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ else
++ case $host_os in
++ aix[[4-9]]*)
++ # All AIX code is PIC.
++ if test "$host_cpu" = ia64; then
++ # AIX 5 now supports IA64 processor
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ else
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
++ fi
+ ;;
+- aCC*)
+- case $host_cpu in
+- hppa*64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- ;;
+- ia64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ chorus*)
++ case $cc_basename in
++ cxch68*)
++ # Green Hills C++ Compiler
++ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+- *)
+- if test "$GXX" = yes; then
+- if test $with_gnu_ld = no; then
++ dgux*)
++ case $cc_basename in
++ ec++*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ ;;
++ ghcx*)
++ # Green Hills C++ Compiler
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ ;;
++ *)
++ ;;
++ esac
++ ;;
++ freebsd* | dragonfly*)
++ # FreeBSD uses GNU C++
++ ;;
++ hpux9* | hpux10* | hpux11*)
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
++ if test "$host_cpu" != ia64; then
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
++ fi
++ ;;
++ aCC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+- hppa*64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- ;;
+- ia64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ hppa*64*|ia64*)
++ # +Z the default
+ ;;
+ *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+- fi
+- else
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- esac
+- ;;
+- interix[[3-9]]*)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+- # Instead, shared libraries are loaded at an image base (0x10000000 by
+- # default) and relocated if they conflict, which is a slow very memory
+- # consuming and fragmenting process. To avoid this, we pick a random,
+- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+- ;;
+- irix5* | irix6*)
+- case $cc_basename in
+- CC*)
+- # SGI C++
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+-
+- # Archives containing C++ object files must be created using
+- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+- # necessary to make sure instantiated templates are included
+- # in the archive.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
++ ;;
++ *)
++ ;;
++ esac
+ ;;
+- *)
+- if test "$GXX" = yes; then
+- if test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+- fi
+- fi
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
++ interix*)
++ # This is c89, which is MS Visual C++ (no shared libs)
++ # Anyone wants to do a port?
+ ;;
+- esac
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- ;;
+- linux* | k*bsd*-gnu)
+- case $cc_basename in
+- KCC*)
+- # Kuck and Associates, Inc. (KAI) C++ Compiler
+-
+- # KCC will only create a shared library if the output file
+- # ends with ".so" (or ".sl" for HP-UX), so rename the library
+- # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+-
+- # Archives containing C++ object files must be created using
+- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+- ;;
+- icpc*)
+- # Intel C++
+- with_gnu_ld=yes
+- # version 8.0 and above of icpc choke on multiply defined symbols
+- # if we add $predep_objects and $postdep_objects, however 7.1 and
+- # earlier do not add the objects themselves.
+- case `$CC -V 2>&1` in
+- *"Version 7."*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- ;;
+- *) # Version 8.0 or newer
+- tmp_idyn=
+- case $host_cpu in
+- ia64*) tmp_idyn=' -i_dynamic';;
+- esac
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- ;;
++ irix5* | irix6* | nonstopux*)
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ # CC pic flag -KPIC is the default.
++ ;;
++ *)
++ ;;
+ esac
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+- ;;
+- pgCC*)
+- # Portland Group C++ compiler
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+- ;;
+- cxx*)
+- # Compaq C++
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+-
+- runpath_var=LD_RUN_PATH
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+- *)
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*)
+- # Sun C++ 5.9
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+-
+- # Not sure whether something based on
+- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+- # would be better.
+- output_verbose_link_cmd='echo'
+-
+- # Archives containing C++ object files must be created using
+- # "CC -xar", where "CC" is the Sun C++ compiler. This is
+- # necessary to make sure instantiated templates are included
+- # in the archive.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+- ;;
++ linux* | k*bsd*-gnu)
++ case $cc_basename in
++ KCC*)
++ # KAI C++ Compiler
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ icpc* | ecpc* )
++ # Intel C++
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
++ ;;
++ pgCC* | pgcpp*)
++ # Portland Group C++ compiler
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
++ cxx*)
++ # Compaq C++
++ # Make sure the PIC flag is empty. It appears that all Alpha
++ # Linux and Compaq Tru64 Unix objects are PIC.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
++ xlc* | xlC*)
++ # IBM XL 8.0 on PPC
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
++ ;;
++ *)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ # Sun C++ 5.9
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++ ;;
++ esac
++ ;;
+ esac
+ ;;
+- esac
+- ;;
+- lynxos*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- m88k*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- mvs*)
+- case $cc_basename in
+- cxx*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- ;;
+- netbsd*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+- wlarc=
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- fi
+- # Workaround some broken pre-1.5 toolchains
+- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+- ;;
+- openbsd2*)
+- # C++ shared libraries are fairly broken
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- openbsd*)
+- if test -f /usr/libexec/ld.so; then
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+- fi
+- output_verbose_link_cmd='echo'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- osf3*)
+- case $cc_basename in
+- KCC*)
+- # Kuck and Associates, Inc. (KAI) C++ Compiler
+-
+- # KCC will only create a shared library if the output file
+- # ends with ".so" (or ".sl" for HP-UX), so rename the library
+- # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Archives containing C++ object files must be created using
+- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+-
+- ;;
+- RCC*)
+- # Rational C++ 2.4.1
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- cxx*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
++ lynxos*)
+ ;;
+- *)
+- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+-
+- else
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
++ m88k*)
+ ;;
+- esac
+- ;;
+- osf4* | osf5*)
+- case $cc_basename in
+- KCC*)
+- # Kuck and Associates, Inc. (KAI) C++ Compiler
+-
+- # KCC will only create a shared library if the output file
+- # ends with ".so" (or ".sl" for HP-UX), so rename the library
+- # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Archives containing C++ object files must be created using
+- # the KAI C++ compiler.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+- ;;
+- RCC*)
+- # Rational C++ 2.4.1
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- cxx*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+- echo "-hidden">> $lib.exp~
+- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+- $rm $lib.exp'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- #
+- # There doesn't appear to be a way to prevent this compiler from
+- # explicitly linking system object files so we need to strip them
+- # from the output so that they don't get included in the library
+- # dependencies.
+- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
++ mvs*)
++ case $cc_basename in
++ cxx*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
++ ;;
++ *)
++ ;;
++ esac
+ ;;
+- *)
+- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+-
+- else
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
++ netbsd*)
+ ;;
+- esac
+- ;;
+- psos*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- sunos4*)
+- case $cc_basename in
+- CC*)
+- # Sun C++ 4.x
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- lcc*)
+- # Lucid
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ *qnx* | *nto*)
++ # QNX uses GNU C++, but need to define -shared option too, otherwise
++ # it will coredump.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
++ ;;
++ osf3* | osf4* | osf5*)
++ case $cc_basename in
++ KCC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
++ ;;
++ RCC*)
++ # Rational C++ 2.4.1
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ ;;
++ cxx*)
++ # Digital/Compaq C++
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # Make sure the PIC flag is empty. It appears that all Alpha
++ # Linux and Compaq Tru64 Unix objects are PIC.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
++ *)
++ ;;
++ esac
+ ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ psos*)
+ ;;
+- esac
+- ;;
+- solaris*)
+- case $cc_basename in
+- CC*)
+- # Sun C++ 4.2, 5.x and Centerline C++
+- _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- case $host_os in
+- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ solaris*)
++ case $cc_basename in
++ CC*)
++ # Sun C++ 4.2, 5.x and Centerline C++
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++ ;;
++ gcx*)
++ # Green Hills C++ Compiler
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
++ ;;
+ *)
+- # The compiler driver will combine and reorder linker options,
+- # but understands `-z linker_flag'.
+- # Supported since Solaris 2.6 (maybe 2.5.1?)
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+-
+- output_verbose_link_cmd='echo'
+-
+- # Archives containing C++ object files must be created using
+- # "CC -xar", where "CC" is the Sun C++ compiler. This is
+- # necessary to make sure instantiated templates are included
+- # in the archive.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+- ;;
+- gcx*)
+- # Green Hills C++ Compiler
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+-
+- # The C++ compiler must be used to create the archive.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+- *)
+- # GNU C++ compiler with Solaris linker
+- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+- if $CC --version | grep -v '^2\.7' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+- else
+- # g++ 2.7 appears to require `-G' NOT `-shared' on this
+- # platform.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+-
+- # Commands to make compiler produce verbose output that lists
+- # what "hidden" libraries, object files and flags are used when
+- # linking a shared library.
+- output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+- fi
+-
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+- case $host_os in
+- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ sunos4*)
++ case $cc_basename in
++ CC*)
++ # Sun C++ 4.x
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
++ lcc*)
++ # Lucid
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ ;;
+ *)
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+- esac
+- fi
+- ;;
+- esac
+- ;;
+- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- runpath_var='LD_RUN_PATH'
+-
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- esac
+- ;;
+- sysv5* | sco3.2v5* | sco5v6*)
+- # Note: We can NOT use -z defs as we might desire, because we do not
+- # link with -lc, and that would cause any symbols used from libc to
+- # always be unresolved, which means just about no library would
+- # ever link correctly. If we're not using GNU ld we use -z text
+- # though, which does catch some bad symbols but isn't as heavy-handed
+- # as -z defs.
+- # For security reasons, it is highly recommended that you always
+- # use absolute paths for naming shared libraries, and exclude the
+- # DT_RUNPATH tag from executables and libraries. But doing so
+- # requires that you compile everything twice, which is a pain.
+- # So that behaviour is only enabled if SCOABSPATH is set to a
+- # non-empty value in the environment. Most likely only useful for
+- # creating official distributions of packages.
+- # This is a hack until libtool officially supports absolute path
+- # names for shared libraries.
+- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+- runpath_var='LD_RUN_PATH'
+-
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ esac
+ ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
++ esac
+ ;;
+- esac
+- ;;
+- tandem*)
+- case $cc_basename in
+- NCC*)
+- # NonStop-UX NCC 3.20
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ tandem*)
++ case $cc_basename in
++ NCC*)
++ # NonStop-UX NCC 3.20
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ ;;
++ *)
++ ;;
++ esac
+ ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
++ vxworks*)
+ ;;
+- esac
+- ;;
+- vxworks*)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- *)
+- # FIXME: insert proper C++ library support
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+-esac
+-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+-
+-_LT_AC_TAGVAR(GCC, $1)="$GXX"
+-_LT_AC_TAGVAR(LD, $1)="$LD"
+-
+-## CAVEAT EMPTOR:
+-## There is no encapsulation within the following macros, do not change
+-## the running order or otherwise move them around unless you know exactly
+-## what you are doing...
+-AC_LIBTOOL_POSTDEP_PREDEP($1)
+-AC_LIBTOOL_PROG_COMPILER_PIC($1)
+-AC_LIBTOOL_PROG_CC_C_O($1)
+-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+-AC_LIBTOOL_PROG_LD_SHLIBS($1)
+-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+-
+-AC_LIBTOOL_CONFIG($1)
+-
+-AC_LANG_POP
+-CC=$lt_save_CC
+-LDCXX=$LD
+-LD=$lt_save_LD
+-GCC=$lt_save_GCC
+-with_gnu_ldcxx=$with_gnu_ld
+-with_gnu_ld=$lt_save_with_gnu_ld
+-lt_cv_path_LDCXX=$lt_cv_path_LD
+-lt_cv_path_LD=$lt_save_path_LD
+-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+-])# AC_LIBTOOL_LANG_CXX_CONFIG
+-
+-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+-# ------------------------------------
+-# Figure out "hidden" library dependencies from verbose
+-# compiler output when linking a shared library.
+-# Parse the compiler output and extract the necessary
+-# objects, libraries and library flags.
+-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+-dnl we can't use the lt_simple_compile_test_code here,
+-dnl because it contains code intended for an executable,
+-dnl not a library. It's possible we should let each
+-dnl tag define a new lt_????_link_test_code variable,
+-dnl but it's only used here...
+-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+-int a;
+-void foo (void) { a = 0; }
+-EOF
+-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+-class Foo
+-{
+-public:
+- Foo (void) { a = 0; }
+-private:
+- int a;
+-};
+-EOF
+-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+- subroutine foo
+- implicit none
+- integer*4 a
+- a=0
+- return
+- end
+-EOF
+-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+-public class foo {
+- private int a;
+- public void bar (void) {
+- a = 0;
+- }
+-};
+-EOF
+-])
+-dnl Parse the compiler output and extract the necessary
+-dnl objects, libraries and library flags.
+-if AC_TRY_EVAL(ac_compile); then
+- # Parse the compiler output and extract the necessary
+- # objects, libraries and library flags.
+-
+- # Sentinel used to keep track of whether or not we are before
+- # the conftest object file.
+- pre_test_object_deps_done=no
+-
+- # The `*' in the case matches for architectures that use `case' in
+- # $output_verbose_cmd can trigger glob expansion during the loop
+- # eval without this substitution.
+- output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+-
+- for p in `eval $output_verbose_link_cmd`; do
+- case $p in
+-
+- -L* | -R* | -l*)
+- # Some compilers place space between "-{L,R}" and the path.
+- # Remove the space.
+- if test $p = "-L" \
+- || test $p = "-R"; then
+- prev=$p
+- continue
+- else
+- prev=
+- fi
+-
+- if test "$pre_test_object_deps_done" = no; then
+- case $p in
+- -L* | -R*)
+- # Internal compiler library paths should come after those
+- # provided the user. The postdeps already come after the
+- # user supplied libs so there is no need to process them.
+- if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+- else
+- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+- fi
+- ;;
+- # The "-l" case would never come before the object being
+- # linked, so don't bother handling this case.
+- esac
+- else
+- if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+- _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+- else
+- _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+- fi
+- fi
+- ;;
+-
+- *.$objext)
+- # This assumes that the test object file only shows up
+- # once in the compiler output.
+- if test "$p" = "conftest.$objext"; then
+- pre_test_object_deps_done=yes
+- continue
+- fi
+-
+- if test "$pre_test_object_deps_done" = no; then
+- if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+- _LT_AC_TAGVAR(predep_objects, $1)="$p"
+- else
+- _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+- fi
+- else
+- if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+- _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+- else
+- _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+- fi
+- fi
+- ;;
+-
+- *) ;; # Ignore the rest.
+-
+- esac
+- done
+-
+- # Clean up.
+- rm -f a.out a.exe
+-else
+- echo "libtool.m4: error: problem compiling $1 test program"
+-fi
+-
+-$rm -f confest.$objext
+-
+-# PORTME: override above test on systems where it is broken
+-ifelse([$1],[CXX],
+-[case $host_os in
+-interix[[3-9]]*)
+- # Interix 3.5 installs completely hosed .la files for C++, so rather than
+- # hack all around it, let's just trust "g++" to DTRT.
+- _LT_AC_TAGVAR(predep_objects,$1)=
+- _LT_AC_TAGVAR(postdep_objects,$1)=
+- _LT_AC_TAGVAR(postdeps,$1)=
+- ;;
+-
+-linux*)
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*)
+- # Sun C++ 5.9
+- #
+- # The more standards-conforming stlport4 library is
+- # incompatible with the Cstd library. Avoid specifying
+- # it if it's in CXXFLAGS. Ignore libCrun as
+- # -library=stlport4 depends on it.
+- case " $CXX $CXXFLAGS " in
+- *" -library=stlport4 "*)
+- solaris_use_stlport4=yes
+- ;;
+- esac
+- if test "$solaris_use_stlport4" != yes; then
+- _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+- fi
+- ;;
+- esac
+- ;;
+-
+-solaris*)
+- case $cc_basename in
+- CC*)
+- # The more standards-conforming stlport4 library is
+- # incompatible with the Cstd library. Avoid specifying
+- # it if it's in CXXFLAGS. Ignore libCrun as
+- # -library=stlport4 depends on it.
+- case " $CXX $CXXFLAGS " in
+- *" -library=stlport4 "*)
+- solaris_use_stlport4=yes
+- ;;
+- esac
+-
+- # Adding this requires a known-good setup of shared libraries for
+- # Sun compiler versions before 5.6, else PIC objects from an old
+- # archive will be linked into the output, leading to subtle bugs.
+- if test "$solaris_use_stlport4" != yes; then
+- _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+- fi
+- ;;
+- esac
+- ;;
+-esac
+-])
+-
+-case " $_LT_AC_TAGVAR(postdeps, $1) " in
+-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+-esac
+-])# AC_LIBTOOL_POSTDEP_PREDEP
+-
+-# AC_LIBTOOL_LANG_F77_CONFIG
+-# --------------------------
+-# Ensure that the configuration vars for the C compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+-[AC_REQUIRE([AC_PROG_F77])
+-AC_LANG_PUSH(Fortran 77)
+-
+-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+-_LT_AC_TAGVAR(always_export_symbols, $1)=no
+-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+-_LT_AC_TAGVAR(hardcode_direct, $1)=no
+-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+-_LT_AC_TAGVAR(module_cmds, $1)=
+-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+-_LT_AC_TAGVAR(no_undefined_flag, $1)=
+-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+-
+-# Source file extension for f77 test sources.
+-ac_ext=f
+-
+-# Object file extension for compiled f77 test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
+-
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code="\
+- subroutine t
+- return
+- end
+-"
+-
+-# Code to be used in simple link tests
+-lt_simple_link_test_code="\
+- program t
+- end
+-"
+-
+-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+-_LT_AC_SYS_COMPILER
+-
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
+-
+-# Allow CC to be a program name with arguments.
+-lt_save_CC="$CC"
+-CC=${F77-"f77"}
+-compiler=$CC
+-_LT_AC_TAGVAR(compiler, $1)=$CC
+-_LT_CC_BASENAME([$compiler])
+-
+-AC_MSG_CHECKING([if libtool supports shared libraries])
+-AC_MSG_RESULT([$can_build_shared])
+-
+-AC_MSG_CHECKING([whether to build shared libraries])
+-test "$can_build_shared" = "no" && enable_shared=no
+-
+-# On AIX, shared libraries and static libraries use the same namespace, and
+-# are all built from PIC.
+-case $host_os in
+-aix3*)
+- test "$enable_shared" = yes && enable_static=no
+- if test -n "$RANLIB"; then
+- archive_cmds="$archive_cmds~\$RANLIB \$lib"
+- postinstall_cmds='$RANLIB $lib'
+- fi
+- ;;
+-aix4* | aix5*)
+- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+- test "$enable_shared" = yes && enable_static=no
+- fi
+- ;;
+-esac
+-AC_MSG_RESULT([$enable_shared])
+-
+-AC_MSG_CHECKING([whether to build static libraries])
+-# Make sure either enable_shared or enable_static is yes.
+-test "$enable_shared" = yes || enable_static=yes
+-AC_MSG_RESULT([$enable_static])
+-
+-_LT_AC_TAGVAR(GCC, $1)="$G77"
+-_LT_AC_TAGVAR(LD, $1)="$LD"
+-
+-AC_LIBTOOL_PROG_COMPILER_PIC($1)
+-AC_LIBTOOL_PROG_CC_C_O($1)
+-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+-AC_LIBTOOL_PROG_LD_SHLIBS($1)
+-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+-
+-AC_LIBTOOL_CONFIG($1)
+-
+-AC_LANG_POP
+-CC="$lt_save_CC"
+-])# AC_LIBTOOL_LANG_F77_CONFIG
+-
++ *)
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
++ ;;
++ esac
++ fi
++],
++[
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+-# AC_LIBTOOL_LANG_GCJ_CONFIG
+-# --------------------------
+-# Ensure that the configuration vars for the C compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+-[AC_LANG_SAVE
++ case $host_os in
++ aix*)
++ # All AIX code is PIC.
++ if test "$host_cpu" = ia64; then
++ # AIX 5 now supports IA64 processor
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ fi
++ ;;
+
+-# Source file extension for Java test sources.
+-ac_ext=java
++ amigaos*)
++ case $host_cpu in
++ powerpc)
++ # see comment about AmigaOS4 .so support
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ m68k)
++ # FIXME: we need at least 68020 code to build shared libraries, but
++ # adding the `-m68020' flag to GCC prevents building anything better,
++ # like `-m68040'.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
++ ;;
++ esac
++ ;;
+
+-# Object file extension for compiled Java test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ # PIC is the default for these OSes.
++ ;;
+
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code="class foo {}"
++ mingw* | cygwin* | pw32* | os2*)
++ # This hack is so that the source file can tell whether it is being
++ # built for inclusion in a dll (and should export symbols for example).
++ # Although the cygwin gcc ignores -fPIC, still need this for old-style
++ # (--disable-auto-import) libraries
++ m4_if([$1], [GCJ], [],
++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
++ ;;
+
+-# Code to be used in simple link tests
+-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
++ darwin* | rhapsody*)
++ # PIC is the default on this platform
++ # Common symbols not allowed in MH_DYLIB files
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
++ ;;
+
+-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+-_LT_AC_SYS_COMPILER
++ hpux*)
++ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
++ # not for PA HP-UX.
++ case $host_cpu in
++ hppa*64*|ia64*)
++ # +Z the default
++ ;;
++ *)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ esac
++ ;;
+
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
++ interix[[3-9]]*)
++ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
++ # Instead, we relocate shared libraries at runtime.
++ ;;
+
+-# Allow CC to be a program name with arguments.
+-lt_save_CC="$CC"
+-CC=${GCJ-"gcj"}
+-compiler=$CC
+-_LT_AC_TAGVAR(compiler, $1)=$CC
+-_LT_CC_BASENAME([$compiler])
++ msdosdjgpp*)
++ # Just because we use GCC doesn't mean we suddenly get shared libraries
++ # on systems that don't support them.
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
++ enable_shared=no
++ ;;
+
+-# GCJ did not exist at the time GCC didn't implicitly link libc in.
+-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
++ *nto* | *qnx*)
++ # QNX uses GNU C++, but need to define -shared option too, otherwise
++ # it will coredump.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
++ ;;
+
+-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
++ sysv4*MP*)
++ if test -d /usr/nec; then
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
++ fi
++ ;;
+
+-## CAVEAT EMPTOR:
+-## There is no encapsulation within the following macros, do not change
+-## the running order or otherwise move them around unless you know exactly
+-## what you are doing...
+-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+-AC_LIBTOOL_PROG_COMPILER_PIC($1)
+-AC_LIBTOOL_PROG_CC_C_O($1)
+-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+-AC_LIBTOOL_PROG_LD_SHLIBS($1)
+-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
++ *)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ ;;
++ esac
++ else
++ # PORTME Check for flag to pass linker flags through the system compiler.
++ case $host_os in
++ aix*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ if test "$host_cpu" = ia64; then
++ # AIX 5 now supports IA64 processor
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ else
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
++ fi
++ ;;
+
+-AC_LIBTOOL_CONFIG($1)
++ mingw* | cygwin* | pw32* | os2*)
++ # This hack is so that the source file can tell whether it is being
++ # built for inclusion in a dll (and should export symbols for example).
++ m4_if([$1], [GCJ], [],
++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
++ ;;
+
+-AC_LANG_RESTORE
+-CC="$lt_save_CC"
+-])# AC_LIBTOOL_LANG_GCJ_CONFIG
++ hpux9* | hpux10* | hpux11*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
++ # not for PA HP-UX.
++ case $host_cpu in
++ hppa*64*|ia64*)
++ # +Z the default
++ ;;
++ *)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
++ ;;
++ esac
++ # Is there a better lt_prog_compiler_static that works with the bundled CC?
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
++ ;;
+
++ irix5* | irix6* | nonstopux*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # PIC (with -KPIC) is the default.
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
+
+-# AC_LIBTOOL_LANG_RC_CONFIG
+-# -------------------------
+-# Ensure that the configuration vars for the Windows resource compiler are
+-# suitably defined. Those variables are subsequently used by
+-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+-[AC_LANG_SAVE
++ linux* | k*bsd*-gnu)
++ case $cc_basename in
++ icc* | ecc* | ifort*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
++ ;;
++ pgcc* | pgf77* | pgf90* | pgf95*)
++ # Portland Group compilers (*not* the Pentium gcc compiler,
++ # which looks to be a dead project)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
++ ccc*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # All Alpha code is PIC.
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
++ xl*)
++ # IBM XL C 8.0/Fortran 10.1 on PPC
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
++ ;;
++ *)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ # Sun C 5.9
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ ;;
++ *Sun\ F*)
++ # Sun Fortran 8.3 passes all unrecognized flags to the linker
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
++ ;;
++ esac
++ ;;
++ esac
++ ;;
+
+-# Source file extension for RC test sources.
+-ac_ext=rc
++ newsos6)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
+
+-# Object file extension for compiled RC test sources.
+-objext=o
+-_LT_AC_TAGVAR(objext, $1)=$objext
++ *nto* | *qnx*)
++ # QNX uses GNU C++, but need to define -shared option too, otherwise
++ # it will coredump.
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
++ ;;
+
+-# Code to be used in simple compile tests
+-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
++ osf3* | osf4* | osf5*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ # All OSF/1 code is PIC.
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
+
+-# Code to be used in simple link tests
+-lt_simple_link_test_code="$lt_simple_compile_test_code"
++ rdos*)
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ ;;
+
+-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+-_LT_AC_SYS_COMPILER
++ solaris*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ case $cc_basename in
++ f77* | f90* | f95*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
++ *)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
++ esac
++ ;;
+
+-# save warnings/boilerplate of simple test code
+-_LT_COMPILER_BOILERPLATE
+-_LT_LINKER_BOILERPLATE
++ sunos4*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
+
+-# Allow CC to be a program name with arguments.
+-lt_save_CC="$CC"
+-CC=${RC-"windres"}
+-compiler=$CC
+-_LT_AC_TAGVAR(compiler, $1)=$CC
+-_LT_CC_BASENAME([$compiler])
+-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
++ sysv4 | sysv4.2uw2* | sysv4.3*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
+
+-AC_LIBTOOL_CONFIG($1)
++ sysv4*MP*)
++ if test -d /usr/nec ;then
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ fi
++ ;;
+
+-AC_LANG_RESTORE
+-CC="$lt_save_CC"
+-])# AC_LIBTOOL_LANG_RC_CONFIG
++ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ ;;
+
++ unicos*)
++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
++ ;;
+
+-# AC_LIBTOOL_CONFIG([TAGNAME])
+-# ----------------------------
+-# If TAGNAME is not passed, then create an initial libtool script
+-# with a default configuration from the untagged config vars. Otherwise
+-# add code to config.status for appending the configuration named by
+-# TAGNAME from the matching tagged config vars.
+-AC_DEFUN([AC_LIBTOOL_CONFIG],
+-[# The else clause should only fire when bootstrapping the
+-# libtool distribution, otherwise you forgot to ship ltmain.sh
+-# with your package, and you will get complaints that there are
+-# no rules to generate ltmain.sh.
+-if test -f "$ltmain"; then
+- # See if we are running on zsh, and set the options which allow our commands through
+- # without removal of \ escapes.
+- if test -n "${ZSH_VERSION+set}" ; then
+- setopt NO_GLOB_SUBST
+- fi
+- # Now quote all the things that may contain metacharacters while being
+- # careful not to overquote the AC_SUBSTed values. We take copies of the
+- # variables and quote the copies for generation of the libtool script.
+- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+- SED SHELL STRIP \
+- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+- deplibs_check_method reload_flag reload_cmds need_locks \
+- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+- lt_cv_sys_global_symbol_to_c_name_address \
+- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+- old_postinstall_cmds old_postuninstall_cmds \
+- _LT_AC_TAGVAR(compiler, $1) \
+- _LT_AC_TAGVAR(CC, $1) \
+- _LT_AC_TAGVAR(LD, $1) \
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+- _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+- _LT_AC_TAGVAR(old_archive_cmds, $1) \
+- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+- _LT_AC_TAGVAR(predep_objects, $1) \
+- _LT_AC_TAGVAR(postdep_objects, $1) \
+- _LT_AC_TAGVAR(predeps, $1) \
+- _LT_AC_TAGVAR(postdeps, $1) \
+- _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+- _LT_AC_TAGVAR(archive_cmds, $1) \
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+- _LT_AC_TAGVAR(postinstall_cmds, $1) \
+- _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+- _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+- _LT_AC_TAGVAR(no_undefined_flag, $1) \
+- _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+- _LT_AC_TAGVAR(hardcode_automatic, $1) \
+- _LT_AC_TAGVAR(module_cmds, $1) \
+- _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+- _LT_AC_TAGVAR(fix_srcfile_path, $1) \
+- _LT_AC_TAGVAR(exclude_expsyms, $1) \
+- _LT_AC_TAGVAR(include_expsyms, $1); do
+-
+- case $var in
+- _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+- _LT_AC_TAGVAR(archive_cmds, $1) | \
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+- _LT_AC_TAGVAR(module_cmds, $1) | \
+- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+- _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+- extract_expsyms_cmds | reload_cmds | finish_cmds | \
+- postinstall_cmds | postuninstall_cmds | \
+- old_postinstall_cmds | old_postuninstall_cmds | \
+- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+- # Double-quote double-evaled strings.
+- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
++ uts4*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
++
+ *)
+- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+- done
+-
+- case $lt_echo in
+- *'\[$]0 --fallback-echo"')
+- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
++ fi
++])
++case $host_os in
++ # For platforms which do not support PIC, -DPIC is meaningless:
++ *djgpp*)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+- esac
+-
+-ifelse([$1], [],
+- [cfgfile="${ofile}T"
+- trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+- $rm -f "$cfgfile"
+- AC_MSG_NOTICE([creating $ofile])],
+- [cfgfile="$ofile"])
+-
+- cat <<__EOF__ >> "$cfgfile"
+-ifelse([$1], [],
+-[#! $SHELL
++ *)
++ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
++ ;;
++esac
++AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
++_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
++ [How to pass a linker flag through the compiler])
+
+-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+-#
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+-# Free Software Foundation, Inc.
+ #
+-# This file is part of GNU Libtool:
+-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+-#
+-# 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.
++# Check to make sure the PIC flag actually works.
+ #
+-# 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.
++if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
++ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
++ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
++ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
++ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
++ "" | " "*) ;;
++ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
++ esac],
++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
++ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
++fi
++_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
++ [Additional compiler flags for building library objects])
++
+ #
+-# 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.
++# Check to make sure the static flag actually works.
+ #
+-# As a special exception to the GNU General Public License, if you
+-# distribute this file as part of a program that contains a
+-# configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
+-
+-# A sed program that does not truncate output.
+-SED=$lt_SED
+-
+-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+-Xsed="$SED -e 1s/^X//"
+-
+-# The HP-UX ksh and POSIX shell print the target directory to stdout
+-# if CDPATH is set.
+-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+-
+-# The names of the tagged configurations supported by this script.
+-available_tags=
+-
+-# ### BEGIN LIBTOOL CONFIG],
+-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+-
+-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+-
+-# Shell to use when invoking shell scripts.
+-SHELL=$lt_SHELL
+-
+-# Whether or not to build shared libraries.
+-build_libtool_libs=$enable_shared
+-
+-# Whether or not to build static libraries.
+-build_old_libs=$enable_static
+-
+-# Whether or not to add -lc for building shared libraries.
+-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+-
+-# Whether or not to disallow shared libs when runtime libs are static
+-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+-
+-# Whether or not to optimize for fast installation.
+-fast_install=$enable_fast_install
+-
+-# The host system.
+-host_alias=$host_alias
+-host=$host
+-host_os=$host_os
+-
+-# The build system.
+-build_alias=$build_alias
+-build=$build
+-build_os=$build_os
+-
+-# An echo program that does not interpret backslashes.
+-echo=$lt_echo
+-
+-# The archiver.
+-AR=$lt_AR
+-AR_FLAGS=$lt_AR_FLAGS
+-
+-# A C compiler.
+-LTCC=$lt_LTCC
+-
+-# LTCC compiler flags.
+-LTCFLAGS=$lt_LTCFLAGS
+-
+-# A language-specific compiler.
+-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+-
+-# Is the compiler the GNU C compiler?
+-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+-
+-# An ERE matcher.
+-EGREP=$lt_EGREP
+-
+-# The linker used to build libraries.
+-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+-
+-# Whether we need hard or soft links.
+-LN_S=$lt_LN_S
+-
+-# A BSD-compatible nm program.
+-NM=$lt_NM
+-
+-# A symbol stripping program
+-STRIP=$lt_STRIP
+-
+-# Used to examine libraries when file_magic_cmd begins "file"
+-MAGIC_CMD=$MAGIC_CMD
+-
+-# Used on cygwin: DLL creation program.
+-DLLTOOL="$DLLTOOL"
+-
+-# Used on cygwin: object dumper.
+-OBJDUMP="$OBJDUMP"
++wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
++_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
++ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
++ $lt_tmp_static_flag,
++ [],
++ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
++_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
++ [Compiler flag to prevent dynamic linking])
++])# _LT_COMPILER_PIC
+
+-# Used on cygwin: assembler.
+-AS="$AS"
+
+-# The name of the directory that contains temporary libtool files.
+-objdir=$objdir
++# _LT_LINKER_SHLIBS([TAGNAME])
++# ----------------------------
++# See if the linker supports building shared libraries.
++m4_defun([_LT_LINKER_SHLIBS],
++[AC_REQUIRE([LT_PATH_LD])dnl
++AC_REQUIRE([LT_PATH_NM])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_EGREP])dnl
++m4_require([_LT_DECL_SED])dnl
++m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
++m4_require([_LT_TAG_COMPILER])dnl
++AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
++m4_if([$1], [CXX], [
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++ case $host_os in
++ aix[[4-9]]*)
++ # If we're using GNU nm, then we don't want the "-C" option.
++ # -C means demangle to AIX nm, but means don't demangle with GNU nm
++ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ else
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ fi
++ ;;
++ pw32*)
++ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
++ ;;
++ cygwin* | mingw*)
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
++ ;;
++ *)
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++ ;;
++ esac
++ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
++], [
++ runpath_var=
++ _LT_TAGVAR(allow_undefined_flag, $1)=
++ _LT_TAGVAR(always_export_symbols, $1)=no
++ _LT_TAGVAR(archive_cmds, $1)=
++ _LT_TAGVAR(archive_expsym_cmds, $1)=
++ _LT_TAGVAR(compiler_needs_object, $1)=no
++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++ _LT_TAGVAR(hardcode_automatic, $1)=no
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=
++ _LT_TAGVAR(hardcode_minus_L, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
++ _LT_TAGVAR(inherit_rpath, $1)=no
++ _LT_TAGVAR(link_all_deplibs, $1)=unknown
++ _LT_TAGVAR(module_cmds, $1)=
++ _LT_TAGVAR(module_expsym_cmds, $1)=
++ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
++ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
++ _LT_TAGVAR(thread_safe_flag_spec, $1)=
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=
++ # include_expsyms should be a list of space-separated symbols to be *always*
++ # included in the symbol list
++ _LT_TAGVAR(include_expsyms, $1)=
++ # exclude_expsyms can be an extended regexp of symbols to exclude
++ # it will be wrapped by ` (' and `)$', so one must not match beginning or
++ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
++ # as well as any symbol that contains `d'.
++ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
++ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
++ # platforms (ab)use it in PIC code, but their linkers get confused if
++ # the symbol is explicitly referenced. Since portable code cannot
++ # rely on this symbol name, it's probably fine to never include it in
++ # preloaded symbol tables.
++ # Exclude shared library initialization/finalization symbols.
++dnl Note also adjust exclude_expsyms for C++ above.
++ extract_expsyms_cmds=
+
+-# How to create reloadable object files.
+-reload_flag=$lt_reload_flag
+-reload_cmds=$lt_reload_cmds
++ case $host_os in
++ cygwin* | mingw* | pw32*)
++ # FIXME: the MSVC++ port hasn't been tested in a loooong time
++ # When not using gcc, we currently assume that we are using
++ # Microsoft Visual C++.
++ if test "$GCC" != yes; then
++ with_gnu_ld=no
++ fi
++ ;;
++ interix*)
++ # we just hope/assume this is gcc and not c89 (= MSVC++)
++ with_gnu_ld=yes
++ ;;
++ openbsd*)
++ with_gnu_ld=no
++ ;;
++ esac
+
+-# How to pass a linker flag through the compiler.
+-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
++ _LT_TAGVAR(ld_shlibs, $1)=yes
++ if test "$with_gnu_ld" = yes; then
++ # If archive_cmds runs LD, not CC, wlarc should be empty
++ wlarc='${wl}'
+
+-# Object file suffix (normally "o").
+-objext="$ac_objext"
++ # Set some defaults for GNU ld with shared library support. These
++ # are reset later if shared libraries are not supported. Putting them
++ # here allows them to be overridden if necessary.
++ runpath_var=LD_RUN_PATH
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++ # ancient GNU ld didn't support --whole-archive et. al.
++ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
++ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++ else
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=
++ fi
++ supports_anon_versioning=no
++ case `$LD -v 2>&1` in
++ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
++ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
++ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
++ *\ 2.11.*) ;; # other 2.11 versions
++ *) supports_anon_versioning=yes ;;
++ esac
+
+-# Old archive suffix (normally "a").
+-libext="$libext"
++ # See if GNU ld supports shared libraries.
++ case $host_os in
++ aix[[3-9]]*)
++ # On AIX/PPC, the GNU linker is very broken
++ if test "$host_cpu" != ia64; then
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ cat <<_LT_EOF 1>&2
+
+-# Shared library suffix (normally ".so").
+-shrext_cmds='$shrext_cmds'
++*** Warning: the GNU linker, at least up to release 2.9.1, is reported
++*** to be unable to reliably create shared libraries on AIX.
++*** Therefore, libtool is disabling shared libraries support. If you
++*** really care for shared libraries, you may want to modify your PATH
++*** so that a non-GNU linker is found, and then restart.
+
+-# Executable file suffix (normally "").
+-exeext="$exeext"
++_LT_EOF
++ fi
++ ;;
+
+-# Additional compiler flags for building library objects.
+-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+-pic_mode=$pic_mode
++ amigaos*)
++ case $host_cpu in
++ powerpc)
++ # see comment about AmigaOS4 .so support
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)=''
++ ;;
++ m68k)
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ ;;
++ esac
++ ;;
+
+-# What is the maximum length of a command?
+-max_cmd_len=$lt_cv_sys_max_cmd_len
++ beos*)
++ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
++ # support --undefined. This deserves some investigation. FIXME
++ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Does compiler simultaneously support -c and -o options?
+-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
++ cygwin* | mingw* | pw32*)
++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
++ # as there is no search path for DLLs.
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ _LT_TAGVAR(always_export_symbols, $1)=no
++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+-# Must we lock files when doing compilation?
+-need_locks=$lt_need_locks
++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++ # If the export-symbols file already is a .def file (1st line
++ # is EXPORTS), use it as is; otherwise, prepend...
++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
++ cp $export_symbols $output_objdir/$soname.def;
++ else
++ echo EXPORTS > $output_objdir/$soname.def;
++ cat $export_symbols >> $output_objdir/$soname.def;
++ fi~
++ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Do we need the lib prefix for modules?
+-need_lib_prefix=$need_lib_prefix
++ interix[[3-9]]*)
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
++ # Instead, shared libraries are loaded at an image base (0x10000000 by
++ # default) and relocated if they conflict, which is a slow very memory
++ # consuming and fragmenting process. To avoid this, we pick a random,
++ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
++ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++ ;;
+
+-# Do we need a version for libraries?
+-need_version=$need_version
++ gnu* | linux* | tpf* | k*bsd*-gnu)
++ tmp_diet=no
++ if test "$host_os" = linux-dietlibc; then
++ case $cc_basename in
++ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
++ esac
++ fi
++ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
++ && test "$tmp_diet" = no
++ then
++ tmp_addflag=
++ tmp_sharedflag='-shared'
++ case $cc_basename,$host_cpu in
++ pgcc*) # Portland Group C compiler
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ tmp_addflag=' $pic_flag'
++ ;;
++ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ tmp_addflag=' $pic_flag -Mnomain' ;;
++ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
++ tmp_addflag=' -i_dynamic' ;;
++ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
++ tmp_addflag=' -i_dynamic -nofor_main' ;;
++ ifc* | ifort*) # Intel Fortran compiler
++ tmp_addflag=' -nofor_main' ;;
++ xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
++ tmp_sharedflag='-qmkshrobj'
++ tmp_addflag= ;;
++ esac
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*) # Sun C 5.9
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ _LT_TAGVAR(compiler_needs_object, $1)=yes
++ tmp_sharedflag='-G' ;;
++ *Sun\ F*) # Sun Fortran 8.3
++ tmp_sharedflag='-G' ;;
++ esac
++ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+-# Whether dlopen is supported.
+-dlopen_support=$enable_dlopen
++ if test "x$supports_anon_versioning" = xyes; then
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
++ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
++ echo "local: *; };" >> $output_objdir/$libname.ver~
++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++ fi
+
+-# Whether dlopen of programs is supported.
+-dlopen_self=$enable_dlopen_self
++ case $cc_basename in
++ xlf*)
++ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
++ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
++ if test "x$supports_anon_versioning" = xyes; then
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
++ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
++ echo "local: *; };" >> $output_objdir/$libname.ver~
++ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
++ fi
++ ;;
++ esac
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Whether dlopen of statically linked programs is supported.
+-dlopen_self_static=$enable_dlopen_self_static
++ netbsd*)
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
++ wlarc=
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ fi
++ ;;
+
+-# Compiler flag to prevent dynamic linking.
+-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
++ solaris*)
++ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ cat <<_LT_EOF 1>&2
+
+-# Compiler flag to turn off builtin functions.
+-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
++*** Warning: The releases 2.8.* of the GNU linker cannot reliably
++*** create shared libraries on Solaris systems. Therefore, libtool
++*** is disabling shared libraries support. We urge you to upgrade GNU
++*** binutils to release 2.9.1 or newer. Another option is to modify
++*** your PATH or compiler configuration so that the native linker is
++*** used, and then restart.
+
+-# Compiler flag to allow reflexive dlopens.
+-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
++_LT_EOF
++ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Compiler flag to generate shared objects directly from archives.
+-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
++ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
++ case `$LD -v 2>&1` in
++ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ cat <<_LT_EOF 1>&2
+
+-# Compiler flag to generate thread-safe objects.
+-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
++*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
++*** reliably create shared libraries on SCO systems. Therefore, libtool
++*** is disabling shared libraries support. We urge you to upgrade GNU
++*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
++*** your PATH or compiler configuration so that the native linker is
++*** used, and then restart.
+
+-# Library versioning type.
+-version_type=$version_type
++_LT_EOF
++ ;;
++ *)
++ # For security reasons, it is highly recommended that you always
++ # use absolute paths for naming shared libraries, and exclude the
++ # DT_RUNPATH tag from executables and libraries. But doing so
++ # requires that you compile everything twice, which is a pain.
++ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ esac
++ ;;
+
+-# Format of library name prefix.
+-libname_spec=$lt_libname_spec
++ sunos4*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++ wlarc=
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# List of archive names. First name is the real one, the rest are links.
+-# The last name is the one that the linker finds with -lNAME.
+-library_names_spec=$lt_library_names_spec
++ *)
++ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ esac
+
+-# The coded name of the library, if different from the real name.
+-soname_spec=$lt_soname_spec
++ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
++ runpath_var=
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=
++ fi
++ else
++ # PORTME fill in a description of your system's linker (not GNU ld)
++ case $host_os in
++ aix3*)
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ _LT_TAGVAR(always_export_symbols, $1)=yes
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
++ # Note: this linker hardcodes the directories in LIBPATH if there
++ # are no directories specified by -L.
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
++ # Neither direct hardcoding nor static linking is supported with a
++ # broken collect2.
++ _LT_TAGVAR(hardcode_direct, $1)=unsupported
++ fi
++ ;;
+
+-# Commands used to build and install an old-style archive.
+-RANLIB=$lt_RANLIB
+-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+-old_postinstall_cmds=$lt_old_postinstall_cmds
+-old_postuninstall_cmds=$lt_old_postuninstall_cmds
++ aix[[4-9]]*)
++ if test "$host_cpu" = ia64; then
++ # On IA64, the linker does run time linking by default, so we don't
++ # have to do anything special.
++ aix_use_runtimelinking=no
++ exp_sym_flag='-Bexport'
++ no_entry_flag=""
++ else
++ # If we're using GNU nm, then we don't want the "-C" option.
++ # -C means demangle to AIX nm, but means don't demangle with GNU nm
++ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ else
++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ fi
++ aix_use_runtimelinking=no
+
+-# Create an old-style archive from a shared archive.
+-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
++ # Test if we are trying to use run time linking or normal
++ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
++ # need to do runtime linking.
++ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
++ for ld_flag in $LDFLAGS; do
++ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
++ aix_use_runtimelinking=yes
++ break
++ fi
++ done
++ ;;
++ esac
+
+-# Create a temporary old-style archive to link instead of a shared archive.
+-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
++ exp_sym_flag='-bexport'
++ no_entry_flag='-bnoentry'
++ fi
+
+-# Commands used to build and install a shared archive.
+-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+-postinstall_cmds=$lt_postinstall_cmds
+-postuninstall_cmds=$lt_postuninstall_cmds
++ # When large executables or shared objects are built, AIX ld can
++ # have problems creating the table of contents. If linking a library
++ # or program results in "error TOC overflow" add -mminimal-toc to
++ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
++ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+-# Commands used to build a loadable module (assumed same as above if empty)
+-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
++ _LT_TAGVAR(archive_cmds, $1)=''
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+-# Commands to strip libraries.
+-old_striplib=$lt_old_striplib
+-striplib=$lt_striplib
++ if test "$GCC" = yes; then
++ case $host_os in aix4.[[012]]|aix4.[[012]].*)
++ # We only want to do this on AIX 4.2 and lower, the check
++ # below for broken collect2 doesn't work under 4.3+
++ collect2name=`${CC} -print-prog-name=collect2`
++ if test -f "$collect2name" &&
++ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
++ then
++ # We have reworked collect2
++ :
++ else
++ # We have old collect2
++ _LT_TAGVAR(hardcode_direct, $1)=unsupported
++ # It fails to find uninstalled libraries when the uninstalled
++ # path is not listed in the libpath. Setting hardcode_minus_L
++ # to unsupported forces relinking
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=
++ fi
++ ;;
++ esac
++ shared_flag='-shared'
++ if test "$aix_use_runtimelinking" = yes; then
++ shared_flag="$shared_flag "'${wl}-G'
++ fi
++ else
++ # not using gcc
++ if test "$host_cpu" = ia64; then
++ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
++ # chokes on -Wl,-G. The following line is correct:
++ shared_flag='-G'
++ else
++ if test "$aix_use_runtimelinking" = yes; then
++ shared_flag='${wl}-G'
++ else
++ shared_flag='${wl}-bM:SRE'
++ fi
++ fi
++ fi
+
+-# Dependencies to place before the objects being linked to create a
+-# shared library.
+-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
++ # It seems that -bexpall does not export symbols beginning with
++ # underscore (_), so it is better to generate a list of symbols to export.
++ _LT_TAGVAR(always_export_symbols, $1)=yes
++ if test "$aix_use_runtimelinking" = yes; then
++ # Warning - without using the other runtime loading flags (-brtl),
++ # -berok will link without error, but may produce a broken library.
++ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++ _LT_SYS_MODULE_PATH_AIX
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ else
++ if test "$host_cpu" = ia64; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
++ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
++ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
++ else
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++ _LT_SYS_MODULE_PATH_AIX
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++ # Warning - without using the other run time loading flags,
++ # -berok will link without error, but may produce a broken library.
++ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
++ # Exported symbols can be pulled into shared objects from archives
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
++ # This is similar to how AIX traditionally builds its shared libraries.
++ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
++ fi
++ fi
++ ;;
+
+-# Dependencies to place after the objects being linked to create a
+-# shared library.
+-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
++ amigaos*)
++ case $host_cpu in
++ powerpc)
++ # see comment about AmigaOS4 .so support
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)=''
++ ;;
++ m68k)
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ ;;
++ esac
++ ;;
+
+-# Dependencies to place before the objects being linked to create a
+-# shared library.
+-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
++ bsdi[[45]]*)
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
++ ;;
+
+-# Dependencies to place after the objects being linked to create a
+-# shared library.
+-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
++ cygwin* | mingw* | pw32*)
++ # When not using gcc, we currently assume that we are using
++ # Microsoft Visual C++.
++ # hardcode_libdir_flag_spec is actually meaningless, as there is
++ # no search path for DLLs.
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ # Tell ltmain to make .lib files, not .a files.
++ libext=lib
++ # Tell ltmain to make .dll files, not .so files.
++ shrext_cmds=".dll"
++ # FIXME: Setting linknames here is a bad hack.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
++ # The linker will automatically build a .lib file if we build a DLL.
++ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
++ # FIXME: Should let the user specify the lib program.
++ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
++ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
++ ;;
+
+-# The library search path used internally by the compiler when linking
+-# a shared library.
+-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
++ darwin* | rhapsody*)
++ _LT_DARWIN_LINKER_FEATURES($1)
++ ;;
+
+-# Method to check whether dependent libraries are shared objects.
+-deplibs_check_method=$lt_deplibs_check_method
++ dgux*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Command to use when deplibs_check_method == file_magic.
+-file_magic_cmd=$lt_file_magic_cmd
++ freebsd1*)
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
+
+-# Flag that allows shared libraries with undefined symbols to be built.
+-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
++ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
++ # support. Future versions do this automatically, but an explicit c++rt0.o
++ # does not break anything, and helps significantly (at the cost of a little
++ # extra space).
++ freebsd2.2*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Flag that forces no undefined symbols.
+-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
++ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
++ freebsd2*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Commands used to finish a libtool library installation in a directory.
+-finish_cmds=$lt_finish_cmds
++ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
++ freebsd* | dragonfly*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Same as above, but a single script fragment to be evaled but not shown.
+-finish_eval=$lt_finish_eval
++ hpux9*)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++ fi
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+-# Take the output of nm and produce a listing of raw symbols and C names.
+-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ ;;
+
+-# Transform the output of nm in a proper C declaration
+-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
++ hpux10*)
++ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
++ fi
++ if test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ fi
++ ;;
+
+-# Transform the output of nm in a C name address pair
+-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
++ hpux11*)
++ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
++ case $host_cpu in
++ hppa*64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ ia64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ esac
++ else
++ case $host_cpu in
++ hppa*64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ ia64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ esac
++ fi
++ if test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+-# This is the shared library runtime path variable.
+-runpath_var=$runpath_var
++ case $host_cpu in
++ hppa*64*|ia64*)
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
++ *)
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+-# This is the shared library path variable.
+-shlibpath_var=$shlibpath_var
++ # hardcode_minus_L: Not really in the search PATH,
++ # but as the default location of the library.
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ ;;
++ esac
++ fi
++ ;;
+
+-# Is shlibpath searched before the hard-coded library search path?
+-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
++ irix5* | irix6* | nonstopux*)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ # Try to use the -exported_symbol ld option, if it does not
++ # work, assume that -exports_file does not work either and
++ # implicitly export all symbols.
++ save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
++ AC_LINK_IFELSE(int foo(void) {},
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
++ )
++ LDFLAGS="$save_LDFLAGS"
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
++ fi
++ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(inherit_rpath, $1)=yes
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ ;;
+
+-# How to hardcode a shared library path into an executable.
+-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
++ netbsd*)
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
++ fi
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Whether we should hardcode library paths into libraries.
+-hardcode_into_libs=$hardcode_into_libs
++ newsos6)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Flag to hardcode \$libdir into a binary during linking.
+-# This must work even if \$libdir does not exist.
+-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
++ *nto* | *qnx*)
++ ;;
+
+-# If ld is used when linking, flag to hardcode \$libdir into
+-# a binary during linking. This must work even if \$libdir does
+-# not exist.
+-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
++ openbsd*)
++ if test -f /usr/libexec/ld.so; then
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ else
++ case $host_os in
++ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ ;;
++ esac
++ fi
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
+
+-# Whether we need a single -rpath flag with a separated argument.
+-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
++ os2*)
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
++ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
++ ;;
+
+-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+-# resulting binary.
+-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
++ osf3*)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ else
++ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ fi
++ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ ;;
+
+-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+-# resulting binary.
+-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
++ osf4* | osf5*) # as osf3* with the addition of -msym flag
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ else
++ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
++ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+-# the resulting binary.
+-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
++ # Both c and cxx compiler support -rpath directly
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
++ fi
++ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ ;;
+
+-# Set to yes if building a shared library automatically hardcodes DIR into the library
+-# and all subsequent libraries and executables linked against it.
+-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
++ solaris*)
++ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
++ if test "$GCC" = yes; then
++ wlarc='${wl}'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
++ else
++ case `$CC -V 2>&1` in
++ *"Compilers 5.0"*)
++ wlarc=''
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
++ ;;
++ *)
++ wlarc='${wl}'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
++ ;;
++ esac
++ fi
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ case $host_os in
++ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ *)
++ # The compiler driver will combine and reorder linker options,
++ # but understands `-z linker_flag'. GCC discards it without `$wl',
++ # but is careful enough not to reorder.
++ # Supported since Solaris 2.6 (maybe 2.5.1?)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++ else
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
++ fi
++ ;;
++ esac
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ ;;
+
+-# Variables whose values should be saved in libtool wrapper scripts and
+-# restored at relink time.
+-variables_saved_for_relink="$variables_saved_for_relink"
++ sunos4*)
++ if test "x$host_vendor" = xsequent; then
++ # Use $CC to link under sequent, because it throws in some extra .o
++ # files that make .init and .fini sections work.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
++ fi
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Whether libtool must link a program against all its dependency libraries.
+-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
++ sysv4)
++ case $host_vendor in
++ sni)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
++ ;;
++ siemens)
++ ## LD is ld it makes a PLAMLIB
++ ## CC just makes a GrossModule.
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ ;;
++ motorola)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
++ ;;
++ esac
++ runpath_var='LD_RUN_PATH'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Compile-time system search path for libraries
+-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
++ sysv4.3*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
++ ;;
+
+-# Run-time system search path for libraries
+-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
++ sysv4*MP*)
++ if test -d /usr/nec; then
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ runpath_var=LD_RUN_PATH
++ hardcode_runpath_var=yes
++ _LT_TAGVAR(ld_shlibs, $1)=yes
++ fi
++ ;;
+
+-# Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path=$lt_fix_srcfile_path
++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
++ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ runpath_var='LD_RUN_PATH'
+
+-# Set to yes if exported symbols are required.
+-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ fi
++ ;;
+
+-# The commands to list exported symbols.
+-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
++ sysv5* | sco3.2v5* | sco5v6*)
++ # Note: We can NOT use -z defs as we might desire, because we do not
++ # link with -lc, and that would cause any symbols used from libc to
++ # always be unresolved, which means just about no library would
++ # ever link correctly. If we're not using GNU ld we use -z text
++ # though, which does catch some bad symbols but isn't as heavy-handed
++ # as -z defs.
++ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
++ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
++ runpath_var='LD_RUN_PATH'
+
+-# The commands to extract the exported symbol list from a shared archive.
+-extract_expsyms_cmds=$lt_extract_expsyms_cmds
++ if test "$GCC" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ fi
++ ;;
+
+-# Symbols that should not be listed in the preloaded symbols.
+-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
++ uts4*)
++ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
+
+-# Symbols that must always be exported.
+-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
++ *)
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
+
+-ifelse([$1],[],
+-[# ### END LIBTOOL CONFIG],
+-[# ### END LIBTOOL TAG CONFIG: $tagname])
++ if test x$host_vendor = xsni; then
++ case $host in
++ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
++ ;;
++ esac
++ fi
++ fi
++])
++AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
++test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+-__EOF__
++_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+-ifelse([$1],[], [
+- case $host_os in
+- aix3*)
+- cat <<\EOF >> "$cfgfile"
++_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
++_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
++_LT_DECL([], [extract_expsyms_cmds], [2],
++ [The commands to extract the exported symbol list from a shared archive])
+
+-# AIX sometimes has problems with the GCC collect2 program. For some
+-# reason, if we set the COLLECT_NAMES environment variable, the problems
+-# vanish in a puff of smoke.
+-if test "X${COLLECT_NAMES+set}" != Xset; then
+- COLLECT_NAMES=
+- export COLLECT_NAMES
+-fi
+-EOF
+- ;;
+- esac
++#
++# Do we need to explicitly link libc?
++#
++case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
++x|xyes)
++ # Assume -lc should be added
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+- # We use sed instead of cat because bash on DJGPP gets confused if
+- # if finds mixed CR/LF and LF-only lines. Since sed operates in
+- # text mode, it properly converts lines to CR/LF. This bash problem
+- # is reportedly fixed, but why not run on old versions too?
+- sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
++ if test "$enable_shared" = yes && test "$GCC" = yes; then
++ case $_LT_TAGVAR(archive_cmds, $1) in
++ *'~'*)
++ # FIXME: we may have to deal with multi-command sequences.
++ ;;
++ '$CC '*)
++ # Test whether the compiler implicitly links with -lc since on some
++ # systems, -lgcc has to come before -lc. If gcc already passes -lc
++ # to ld, don't add -lc before -lgcc.
++ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
++ $RM conftest*
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+- mv -f "$cfgfile" "$ofile" || \
+- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+- chmod +x "$ofile"
+-])
+-else
+- # If there is no Makefile yet, we rely on a make rule to execute
+- # `config.status --recheck' to rerun these tests and create the
+- # libtool script then.
+- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+- if test -f "$ltmain_in"; then
+- test -f Makefile && make "$ltmain"
++ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
++ soname=conftest
++ lib=conftest
++ libobjs=conftest.$ac_objext
++ deplibs=
++ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
++ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
++ compiler_flags=-v
++ linker_flags=-v
++ verstring=
++ output_objdir=.
++ libname=conftest
++ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
++ _LT_TAGVAR(allow_undefined_flag, $1)=
++ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
++ then
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ else
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
++ fi
++ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
++ else
++ cat conftest.err 1>&5
++ fi
++ $RM conftest*
++ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
++ ;;
++ esac
+ fi
+-fi
+-])# AC_LIBTOOL_CONFIG
+-
+-
+-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+-# -------------------------------------------
+-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
++ ;;
++esac
+
+-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
++_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
++ [Whether or not to add -lc for building shared libraries])
++_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
++ [enable_shared_with_static_runtimes], [0],
++ [Whether or not to disallow shared libs when runtime libs are static])
++_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
++ [Compiler flag to allow reflexive dlopens])
++_LT_TAGDECL([], [whole_archive_flag_spec], [1],
++ [Compiler flag to generate shared objects directly from archives])
++_LT_TAGDECL([], [compiler_needs_object], [1],
++ [Whether the compiler copes with passing no objects directly])
++_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
++ [Create an old-style archive from a shared archive])
++_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
++ [Create a temporary old-style archive to link instead of a shared archive])
++_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
++_LT_TAGDECL([], [archive_expsym_cmds], [2])
++_LT_TAGDECL([], [module_cmds], [2],
++ [Commands used to build a loadable module if different from building
++ a shared archive.])
++_LT_TAGDECL([], [module_expsym_cmds], [2])
++_LT_TAGDECL([], [with_gnu_ld], [1],
++ [Whether we are building with GNU ld or not])
++_LT_TAGDECL([], [allow_undefined_flag], [1],
++ [Flag that allows shared libraries with undefined symbols to be built])
++_LT_TAGDECL([], [no_undefined_flag], [1],
++ [Flag that enforces no undefined symbols])
++_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
++ [Flag to hardcode $libdir into a binary during linking.
++ This must work even if $libdir does not exist])
++_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
++ [[If ld is used when linking, flag to hardcode $libdir into a binary
++ during linking. This must work even if $libdir does not exist]])
++_LT_TAGDECL([], [hardcode_libdir_separator], [1],
++ [Whether we need a single "-rpath" flag with a separated argument])
++_LT_TAGDECL([], [hardcode_direct], [0],
++ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
++ DIR into the resulting binary])
++_LT_TAGDECL([], [hardcode_direct_absolute], [0],
++ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
++ DIR into the resulting binary and the resulting library dependency is
++ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
++ library is relocated])
++_LT_TAGDECL([], [hardcode_minus_L], [0],
++ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
++ into the resulting binary])
++_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
++ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
++ into the resulting binary])
++_LT_TAGDECL([], [hardcode_automatic], [0],
++ [Set to "yes" if building a shared library automatically hardcodes DIR
++ into the library and all subsequent libraries and executables linked
++ against it])
++_LT_TAGDECL([], [inherit_rpath], [0],
++ [Set to yes if linker adds runtime paths of dependent libraries
++ to runtime path list])
++_LT_TAGDECL([], [link_all_deplibs], [0],
++ [Whether libtool must link a program against all its dependency libraries])
++_LT_TAGDECL([], [fix_srcfile_path], [1],
++ [Fix the shell variable $srcfile for the compiler])
++_LT_TAGDECL([], [always_export_symbols], [0],
++ [Set to "yes" if exported symbols are required])
++_LT_TAGDECL([], [export_symbols_cmds], [2],
++ [The commands to list exported symbols])
++_LT_TAGDECL([], [exclude_expsyms], [1],
++ [Symbols that should not be listed in the preloaded symbols])
++_LT_TAGDECL([], [include_expsyms], [1],
++ [Symbols that must always be exported])
++_LT_TAGDECL([], [prelink_cmds], [2],
++ [Commands necessary for linking programs (against libraries) with templates])
++_LT_TAGDECL([], [file_list_spec], [1],
++ [Specify filename containing input files])
++dnl FIXME: Not yet implemented
++dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
++dnl [Compiler flag to generate thread safe objects])
++])# _LT_LINKER_SHLIBS
+
+-if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+- lt_cv_prog_compiler_rtti_exceptions,
+- [-fno-rtti -fno-exceptions], [],
+- [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+-fi
+-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
++# _LT_LANG_C_CONFIG([TAG])
++# ------------------------
++# Ensure that the configuration variables for a C compiler are suitably
++# defined. These variables are subsequently used by _LT_CONFIG to write
++# the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_C_CONFIG],
++[m4_require([_LT_DECL_EGREP])dnl
++lt_save_CC="$CC"
++AC_LANG_PUSH(C)
+
++# Source file extension for C test sources.
++ac_ext=c
+
+-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+-# ---------------------------------
+-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+-[AC_REQUIRE([AC_CANONICAL_HOST])
+-AC_REQUIRE([LT_AC_PROG_SED])
+-AC_REQUIRE([AC_PROG_NM])
+-AC_REQUIRE([AC_OBJEXT])
+-# Check for command to grab the raw symbol name followed by C symbol from nm.
+-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+-[
+-# These are sane defaults that work on at least a few old systems.
+-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
++# Object file extension for compiled C test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+-# Character class describing NM global symbol codes.
+-symcode='[[BCDEGRST]]'
++# Code to be used in simple compile tests
++lt_simple_compile_test_code="int some_variable = 0;"
+
+-# Regexp to match symbols that can be accessed directly from C.
+-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
++# Code to be used in simple link tests
++lt_simple_link_test_code='int main(){return(0);}'
+
+-# Transform an extracted symbol line into a proper C declaration
+-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
++_LT_TAG_COMPILER
++# Save the default compiler, since it gets overwritten when the other
++# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
++compiler_DEFAULT=$CC
+
+-# Transform an extracted symbol line into symbol name and symbol address
+-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
++# save warnings/boilerplate of simple test code
++_LT_COMPILER_BOILERPLATE
++_LT_LINKER_BOILERPLATE
+
+-# Define system-specific variables.
+-case $host_os in
+-aix*)
+- symcode='[[BCDT]]'
+- ;;
+-cygwin* | mingw* | pw32*)
+- symcode='[[ABCDGISTW]]'
+- ;;
+-hpux*) # Its linker distinguishes data from code symbols
+- if test "$host_cpu" = ia64; then
+- symcode='[[ABCDEGRST]]'
+- fi
+- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+- ;;
+-linux* | k*bsd*-gnu)
+- if test "$host_cpu" = ia64; then
+- symcode='[[ABCDGIRSTW]]'
+- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+- fi
+- ;;
+-irix* | nonstopux*)
+- symcode='[[BCDEGRST]]'
+- ;;
+-osf*)
+- symcode='[[BCDEGQRST]]'
+- ;;
+-solaris*)
+- symcode='[[BDRT]]'
+- ;;
+-sco3.2v5*)
+- symcode='[[DT]]'
+- ;;
+-sysv4.2uw2*)
+- symcode='[[DT]]'
+- ;;
+-sysv5* | sco5v6* | unixware* | OpenUNIX*)
+- symcode='[[ABDT]]'
+- ;;
+-sysv4)
+- symcode='[[DFNSTU]]'
+- ;;
+-esac
++## CAVEAT EMPTOR:
++## There is no encapsulation within the following macros, do not change
++## the running order or otherwise move them around unless you know exactly
++## what you are doing...
++if test -n "$compiler"; then
++ _LT_COMPILER_NO_RTTI($1)
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_SYS_DYNAMIC_LINKER($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
++ LT_SYS_DLOPEN_SELF
++ _LT_CMD_STRIPLIB
++
++ # Report which library types will actually be built
++ AC_MSG_CHECKING([if libtool supports shared libraries])
++ AC_MSG_RESULT([$can_build_shared])
+
+-# Handle CRLF in mingw tool chain
+-opt_cr=
+-case $build_os in
+-mingw*)
+- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+- ;;
+-esac
++ AC_MSG_CHECKING([whether to build shared libraries])
++ test "$can_build_shared" = "no" && enable_shared=no
+
+-# If we're using GNU nm, then use its standard symbol codes.
+-case `$NM -V 2>&1` in
+-*GNU* | *'with BFD'*)
+- symcode='[[ABCDGIRSTW]]' ;;
+-esac
++ # On AIX, shared libraries and static libraries use the same namespace, and
++ # are all built from PIC.
++ case $host_os in
++ aix3*)
++ test "$enable_shared" = yes && enable_static=no
++ if test -n "$RANLIB"; then
++ archive_cmds="$archive_cmds~\$RANLIB \$lib"
++ postinstall_cmds='$RANLIB $lib'
++ fi
++ ;;
+
+-# Try without a prefix undercore, then with it.
+-for ac_symprfx in "" "_"; do
++ aix[[4-9]]*)
++ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
++ test "$enable_shared" = yes && enable_static=no
++ fi
++ ;;
++ esac
++ AC_MSG_RESULT([$enable_shared])
+
+- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+- symxfrm="\\1 $ac_symprfx\\2 \\2"
++ AC_MSG_CHECKING([whether to build static libraries])
++ # Make sure either enable_shared or enable_static is yes.
++ test "$enable_shared" = yes || enable_static=yes
++ AC_MSG_RESULT([$enable_static])
+
+- # Write the raw and C identifiers.
+- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
++ _LT_CONFIG($1)
++fi
++AC_LANG_POP
++CC="$lt_save_CC"
++])# _LT_LANG_C_CONFIG
+
+- # Check to see that the pipe works correctly.
+- pipe_works=no
+
+- rm -f conftest*
+- cat > conftest.$ac_ext <<EOF
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-char nm_test_var;
+-void nm_test_func(){}
+-#ifdef __cplusplus
+-}
+-#endif
+-int main(){nm_test_var='a';nm_test_func();return(0);}
+-EOF
++# _LT_PROG_CXX
++# ------------
++# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
++# compiler, we have our own version here.
++m4_defun([_LT_PROG_CXX],
++[
++pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
++AC_PROG_CXX
++if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
++ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
++ (test "X$CXX" != "Xg++"))) ; then
++ AC_PROG_CXXCPP
++else
++ _lt_caught_CXX_error=yes
++fi
++popdef([AC_MSG_ERROR])
++])# _LT_PROG_CXX
+
+- if AC_TRY_EVAL(ac_compile); then
+- # Now try to grab the symbols.
+- nlist=conftest.nm
+- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+- # Try sorting and uniquifying the output.
+- if sort "$nlist" | uniq > "$nlist"T; then
+- mv -f "$nlist"T "$nlist"
+- else
+- rm -f "$nlist"T
+- fi
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+- # Make sure that we snagged all the symbols we need.
+- if grep ' nm_test_var$' "$nlist" >/dev/null; then
+- if grep ' nm_test_func$' "$nlist" >/dev/null; then
+- cat <<EOF > conftest.$ac_ext
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+
+-EOF
+- # Now generate the symbol file.
+- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
++# _LT_LANG_CXX_CONFIG([TAG])
++# --------------------------
++# Ensure that the configuration variables for a C++ compiler are suitably
++# defined. These variables are subsequently used by _LT_CONFIG to write
++# the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_CXX_CONFIG],
++[AC_REQUIRE([_LT_PROG_CXX])dnl
++m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++m4_require([_LT_DECL_EGREP])dnl
++
++AC_LANG_PUSH(C++)
++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
++_LT_TAGVAR(allow_undefined_flag, $1)=
++_LT_TAGVAR(always_export_symbols, $1)=no
++_LT_TAGVAR(archive_expsym_cmds, $1)=
++_LT_TAGVAR(compiler_needs_object, $1)=no
++_LT_TAGVAR(export_dynamic_flag_spec, $1)=
++_LT_TAGVAR(hardcode_direct, $1)=no
++_LT_TAGVAR(hardcode_direct_absolute, $1)=no
++_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++_LT_TAGVAR(hardcode_libdir_separator, $1)=
++_LT_TAGVAR(hardcode_minus_L, $1)=no
++_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
++_LT_TAGVAR(hardcode_automatic, $1)=no
++_LT_TAGVAR(inherit_rpath, $1)=no
++_LT_TAGVAR(module_cmds, $1)=
++_LT_TAGVAR(module_expsym_cmds, $1)=
++_LT_TAGVAR(link_all_deplibs, $1)=unknown
++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
++_LT_TAGVAR(no_undefined_flag, $1)=
++_LT_TAGVAR(whole_archive_flag_spec, $1)=
++_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+- cat <<EOF >> conftest.$ac_ext
+-#if defined (__STDC__) && __STDC__
+-# define lt_ptr_t void *
+-#else
+-# define lt_ptr_t char *
+-# define const
+-#endif
++# Source file extension for C++ test sources.
++ac_ext=cpp
+
+-/* The mapping between symbol names and symbols. */
+-const struct {
+- const char *name;
+- lt_ptr_t address;
+-}
+-lt_preloaded_symbols[[]] =
+-{
+-EOF
+- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+- cat <<\EOF >> conftest.$ac_ext
+- {0, (lt_ptr_t) 0}
+-};
++# Object file extension for compiled C++ test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+-#ifdef __cplusplus
+-}
+-#endif
+-EOF
+- # Now try linking the two files.
+- mv conftest.$ac_objext conftstm.$ac_objext
+- lt_save_LIBS="$LIBS"
+- lt_save_CFLAGS="$CFLAGS"
+- LIBS="conftstm.$ac_objext"
+- CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+- pipe_works=yes
+- fi
+- LIBS="$lt_save_LIBS"
+- CFLAGS="$lt_save_CFLAGS"
+- else
+- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+- fi
+- else
+- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+- fi
+- else
+- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+- fi
++# No sense in running all these tests if we already determined that
++# the CXX compiler isn't working. Some variables (like enable_shared)
++# are currently assumed to apply to all compilers on this platform,
++# and will be corrupted by setting them based on a non-working compiler.
++if test "$_lt_caught_CXX_error" != yes; then
++ # Code to be used in simple compile tests
++ lt_simple_compile_test_code="int some_variable = 0;"
++
++ # Code to be used in simple link tests
++ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
++
++ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
++ _LT_TAG_COMPILER
++
++ # save warnings/boilerplate of simple test code
++ _LT_COMPILER_BOILERPLATE
++ _LT_LINKER_BOILERPLATE
++
++ # Allow CC to be a program name with arguments.
++ lt_save_CC=$CC
++ lt_save_LD=$LD
++ lt_save_GCC=$GCC
++ GCC=$GXX
++ lt_save_with_gnu_ld=$with_gnu_ld
++ lt_save_path_LD=$lt_cv_path_LD
++ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
++ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+- cat conftest.$ac_ext >&5
++ $as_unset lt_cv_prog_gnu_ld
+ fi
+- rm -f conftest* conftst*
+-
+- # Do not use the global_symbol_pipe unless it works.
+- if test "$pipe_works" = yes; then
+- break
++ if test -n "${lt_cv_path_LDCXX+set}"; then
++ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+- lt_cv_sys_global_symbol_pipe=
++ $as_unset lt_cv_path_LD
+ fi
+-done
+-])
+-if test -z "$lt_cv_sys_global_symbol_pipe"; then
+- lt_cv_sys_global_symbol_to_cdecl=
+-fi
+-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+- AC_MSG_RESULT(failed)
+-else
+- AC_MSG_RESULT(ok)
+-fi
+-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
++ test -z "${LDCXX+set}" || LD=$LDCXX
++ CC=${CXX-"c++"}
++ compiler=$CC
++ _LT_TAGVAR(compiler, $1)=$CC
++ _LT_CC_BASENAME([$compiler])
+
++ if test -n "$compiler"; then
++ # We don't want -fno-exception when compiling C++ code, so set the
++ # no_builtin_flag separately
++ if test "$GXX" = yes; then
++ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
++ else
++ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
++ fi
+
+-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+-# ---------------------------------------
+-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
++ if test "$GXX" = yes; then
++ # Set up default GNU C++ configuration
+
+-AC_MSG_CHECKING([for $compiler option to produce PIC])
+- ifelse([$1],[CXX],[
+- # C++ specific cases for pic, static, wl, etc.
+- if test "$GXX" = yes; then
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
++ LT_PATH_LD
+
+- case $host_os in
+- aix*)
+- # All AIX code is PIC.
+- if test "$host_cpu" = ia64; then
+- # AIX 5 now supports IA64 processor
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- fi
+- ;;
+- amigaos*)
+- # FIXME: we need at least 68020 code to build shared libraries, but
+- # adding the `-m68020' flag to GCC prevents building anything better,
+- # like `-m68040'.
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+- ;;
+- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+- # PIC is the default for these OSes.
+- ;;
+- mingw* | cygwin* | os2* | pw32*)
+- # This hack is so that the source file can tell whether it is being
+- # built for inclusion in a dll (and should export symbols for example).
+- # Although the cygwin gcc ignores -fPIC, still need this for old-style
+- # (--disable-auto-import) libraries
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+- ;;
+- darwin* | rhapsody*)
+- # PIC is the default on this platform
+- # Common symbols not allowed in MH_DYLIB files
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+- ;;
+- *djgpp*)
+- # DJGPP does not support shared libraries at all
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- ;;
+- interix[[3-9]]*)
+- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+- # Instead, we relocate shared libraries at runtime.
+- ;;
+- sysv4*MP*)
+- if test -d /usr/nec; then
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
++ # Check if GNU C++ uses GNU ld as the underlying linker, since the
++ # archiving commands below assume that GNU ld is being used.
++ if test "$with_gnu_ld" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++
++ # If archive_cmds runs LD, not CC, wlarc should be empty
++ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
++ # investigate it a little bit more. (MM)
++ wlarc='${wl}'
++
++ # ancient GNU ld didn't support --whole-archive et. al.
++ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
++ $GREP 'no-whole-archive' > /dev/null; then
++ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++ else
++ _LT_TAGVAR(whole_archive_flag_spec, $1)=
++ fi
++ else
++ with_gnu_ld=no
++ wlarc=
++
++ # A generic and very simple default shared library creation
++ # command for GNU C++ for the case where it uses the native
++ # linker, instead of GNU ld. If possible, this setting should
++ # overridden to take advantage of the native linker features on
++ # the platform it is being used on.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+- ;;
+- hpux*)
+- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+- # not for PA HP-UX.
+- case $host_cpu in
+- hppa*64*|ia64*)
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+- ;;
+- esac
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+- ;;
+- esac
+- else
++
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
++
++ else
++ GXX=no
++ with_gnu_ld=no
++ wlarc=
++ fi
++
++ # PORTME: fill in a description of your system's C++ link characteristics
++ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
++ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+- aix4* | aix5*)
+- # All AIX code is PIC.
+- if test "$host_cpu" = ia64; then
+- # AIX 5 now supports IA64 processor
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++ aix3*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ aix[[4-9]]*)
++ if test "$host_cpu" = ia64; then
++ # On IA64, the linker does run time linking by default, so we don't
++ # have to do anything special.
++ aix_use_runtimelinking=no
++ exp_sym_flag='-Bexport'
++ no_entry_flag=""
++ else
++ aix_use_runtimelinking=no
++
++ # Test if we are trying to use run time linking or normal
++ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
++ # need to do runtime linking.
++ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
++ for ld_flag in $LDFLAGS; do
++ case $ld_flag in
++ *-brtl*)
++ aix_use_runtimelinking=yes
++ break
++ ;;
++ esac
++ done
++ ;;
++ esac
++
++ exp_sym_flag='-bexport'
++ no_entry_flag='-bnoentry'
++ fi
++
++ # When large executables or shared objects are built, AIX ld can
++ # have problems creating the table of contents. If linking a library
++ # or program results in "error TOC overflow" add -mminimal-toc to
++ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
++ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
++
++ _LT_TAGVAR(archive_cmds, $1)=''
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
++
++ if test "$GXX" = yes; then
++ case $host_os in aix4.[[012]]|aix4.[[012]].*)
++ # We only want to do this on AIX 4.2 and lower, the check
++ # below for broken collect2 doesn't work under 4.3+
++ collect2name=`${CC} -print-prog-name=collect2`
++ if test -f "$collect2name" &&
++ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
++ then
++ # We have reworked collect2
++ :
++ else
++ # We have old collect2
++ _LT_TAGVAR(hardcode_direct, $1)=unsupported
++ # It fails to find uninstalled libraries when the uninstalled
++ # path is not listed in the libpath. Setting hardcode_minus_L
++ # to unsupported forces relinking
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=
++ fi
++ esac
++ shared_flag='-shared'
++ if test "$aix_use_runtimelinking" = yes; then
++ shared_flag="$shared_flag "'${wl}-G'
++ fi
++ else
++ # not using gcc
++ if test "$host_cpu" = ia64; then
++ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
++ # chokes on -Wl,-G. The following line is correct:
++ shared_flag='-G'
++ else
++ if test "$aix_use_runtimelinking" = yes; then
++ shared_flag='${wl}-G'
++ else
++ shared_flag='${wl}-bM:SRE'
++ fi
++ fi
++ fi
++
++ # It seems that -bexpall does not export symbols beginning with
++ # underscore (_), so it is better to generate a list of symbols to
++ # export.
++ _LT_TAGVAR(always_export_symbols, $1)=yes
++ if test "$aix_use_runtimelinking" = yes; then
++ # Warning - without using the other runtime loading flags (-brtl),
++ # -berok will link without error, but may produce a broken library.
++ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
++ # Determine the default libpath from the value encoded in an empty
++ # executable.
++ _LT_SYS_MODULE_PATH_AIX
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++ else
++ if test "$host_cpu" = ia64; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
++ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
++ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
++ else
++ # Determine the default libpath from the value encoded in an
++ # empty executable.
++ _LT_SYS_MODULE_PATH_AIX
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
++ # Warning - without using the other run time loading flags,
++ # -berok will link without error, but may produce a broken library.
++ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
++ # Exported symbols can be pulled into shared objects from archives
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
++ # This is similar to how AIX traditionally builds its shared
++ # libraries.
++ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
++ fi
++ fi
++ ;;
++
++ beos*)
++ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
++ # support --undefined. This deserves some investigation. FIXME
++ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
++
+ chorus*)
+- case $cc_basename in
+- cxch68*)
+- # Green Hills C++ Compiler
+- # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
++ case $cc_basename in
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- esac
++ esac
++ ;;
++
++ cygwin* | mingw* | pw32*)
++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
++ # as there is no search path for DLLs.
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
++ _LT_TAGVAR(always_export_symbols, $1)=no
++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
++
++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++ # If the export-symbols file already is a .def file (1st line
++ # is EXPORTS), use it as is; otherwise, prepend...
++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
++ cp $export_symbols $output_objdir/$soname.def;
++ else
++ echo EXPORTS > $output_objdir/$soname.def;
++ cat $export_symbols >> $output_objdir/$soname.def;
++ fi~
++ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ darwin* | rhapsody*)
++ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+- darwin*)
+- # PIC is the default on this platform
+- # Common symbols not allowed in MH_DYLIB files
+- case $cc_basename in
+- xlc*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- ;;
+- esac
+- ;;
++
+ dgux*)
+- case $cc_basename in
+- ec++*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++ case $cc_basename in
++ ec++*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- ghcx*)
++ ghcx*)
+ # Green Hills C++ Compiler
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- *)
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- esac
+- ;;
++ esac
++ ;;
++
++ freebsd[[12]]*)
++ # C++ shared libraries reported to be fairly broken before
++ # switch to ELF
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++
++ freebsd-elf*)
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ ;;
++
+ freebsd* | dragonfly*)
+- # FreeBSD uses GNU C++
+- ;;
+- hpux9* | hpux10* | hpux11*)
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+- if test "$host_cpu" != ia64; then
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+- fi
++ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
++ # conventions
++ _LT_TAGVAR(ld_shlibs, $1)=yes
++ ;;
++
++ gnu*)
++ ;;
++
++ hpux9*)
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
++ # but as the default
++ # location of the library.
++
++ case $cc_basename in
++ CC*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ aCC*)
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
++ ;;
++ *)
++ if test "$GXX" = yes; then
++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++ else
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ esac
++ ;;
++
++ hpux10*|hpux11*)
++ if test $with_gnu_ld = no; then
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++
++ case $host_cpu in
++ hppa*64*|ia64*)
++ ;;
++ *)
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ ;;
++ esac
++ fi
++ case $host_cpu in
++ hppa*64*|ia64*)
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ ;;
++ *)
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
++ # but as the default
++ # location of the library.
++ ;;
++ esac
++
++ case $cc_basename in
++ CC*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- aCC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
++ aCC*)
+ case $host_cpu in
+- hppa*64*|ia64*)
+- # +Z the default
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+- ;;
++ hppa*64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ ia64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
+ esac
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+- *)
++ *)
++ if test "$GXX" = yes; then
++ if test $with_gnu_ld = no; then
++ case $host_cpu in
++ hppa*64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ ia64*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ ;;
++ esac
++ fi
++ else
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
+ ;;
+- esac
+- ;;
+- interix*)
+- # This is c89, which is MS Visual C++ (no shared libs)
+- # Anyone wants to do a port?
+- ;;
+- irix5* | irix6* | nonstopux*)
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+- # CC pic flag -KPIC is the default.
++ esac
++ ;;
++
++ interix[[3-9]]*)
++ _LT_TAGVAR(hardcode_direct, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
++ # Instead, shared libraries are loaded at an image base (0x10000000 by
++ # default) and relocated if they conflict, which is a slow very memory
++ # consuming and fragmenting process. To avoid this, we pick a random,
++ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
++ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
++ ;;
++ irix5* | irix6*)
++ case $cc_basename in
++ CC*)
++ # SGI C++
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++
++ # Archives containing C++ object files must be created using
++ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
++ # necessary to make sure instantiated templates are included
++ # in the archive.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+- *)
++ *)
++ if test "$GXX" = yes; then
++ if test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ else
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
++ fi
++ fi
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+- esac
+- ;;
++ esac
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++ _LT_TAGVAR(inherit_rpath, $1)=yes
++ ;;
++
+ linux* | k*bsd*-gnu)
+- case $cc_basename in
+- KCC*)
+- # KAI C++ Compiler
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++ case $cc_basename in
++ KCC*)
++ # Kuck and Associates, Inc. (KAI) C++ Compiler
++
++ # KCC will only create a shared library if the output file
++ # ends with ".so" (or ".sl" for HP-UX), so rename the library
++ # to its proper name (with version) after linking.
++ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++
++ # Archives containing C++ object files must be created using
++ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+- icpc* | ecpc*)
++ icpc* | ecpc* )
+ # Intel C++
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+- ;;
+- pgCC*)
+- # Portland Group C++ compiler.
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
+- cxx*)
+- # Compaq C++
+- # Make sure the PIC flag is empty. It appears that all Alpha
+- # Linux and Compaq Tru64 Unix objects are PIC.
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ with_gnu_ld=yes
++ # version 8.0 and above of icpc choke on multiply defined symbols
++ # if we add $predep_objects and $postdep_objects, however 7.1 and
++ # earlier do not add the objects themselves.
++ case `$CC -V 2>&1` in
++ *"Version 7."*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ ;;
++ *) # Version 8.0 or newer
++ tmp_idyn=
++ case $host_cpu in
++ ia64*) tmp_idyn=' -i_dynamic';;
++ esac
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ ;;
++ esac
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+- *)
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*)
+- # Sun C++ 5.9
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++ pgCC* | pgcpp*)
++ # Portland Group C++ compiler
++ case `$CC -V` in
++ *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
++ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
++ rm -rf $tpldir~
++ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
++ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
++ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
++ rm -rf $tpldir~
++ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
++ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
++ $RANLIB $oldlib'
++ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
++ rm -rf $tpldir~
++ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
++ rm -rf $tpldir~
++ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
++ ;;
++ *) # Version 6 will use weak symbols
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+- ;;
+- esac
+- ;;
+- lynxos*)
+- ;;
+- m88k*)
+- ;;
+- mvs*)
+- case $cc_basename in
+- cxx*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- netbsd*)
+- ;;
+- osf3* | osf4* | osf5*)
+- case $cc_basename in
+- KCC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+- ;;
+- RCC*)
+- # Rational C++ 2.4.1
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+- ;;
+- cxx*)
+- # Digital/Compaq C++
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # Make sure the PIC flag is empty. It appears that all Alpha
+- # Linux and Compaq Tru64 Unix objects are PIC.
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- psos*)
+- ;;
+- solaris*)
+- case $cc_basename in
+- CC*)
+- # Sun C++ 4.2, 5.x and Centerline C++
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+- ;;
+- gcx*)
+- # Green Hills C++ Compiler
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- sunos4*)
+- case $cc_basename in
+- CC*)
+- # Sun C++ 4.x
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
+- lcc*)
+- # Lucid
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- tandem*)
+- case $cc_basename in
+- NCC*)
+- # NonStop-UX NCC 3.20
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- ;;
+- *)
+- ;;
+- esac
+- ;;
+- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+- case $cc_basename in
+- CC*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
+- esac
+- ;;
+- vxworks*)
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+- ;;
+- esac
+- fi
+-],
+-[
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+-
+- case $host_os in
+- aix*)
+- # All AIX code is PIC.
+- if test "$host_cpu" = ia64; then
+- # AIX 5 now supports IA64 processor
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- fi
+- ;;
+-
+- amigaos*)
+- # FIXME: we need at least 68020 code to build shared libraries, but
+- # adding the `-m68020' flag to GCC prevents building anything better,
+- # like `-m68040'.
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+- ;;
+-
+- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+- # PIC is the default for these OSes.
+- ;;
+-
+- mingw* | cygwin* | pw32* | os2*)
+- # This hack is so that the source file can tell whether it is being
+- # built for inclusion in a dll (and should export symbols for example).
+- # Although the cygwin gcc ignores -fPIC, still need this for old-style
+- # (--disable-auto-import) libraries
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+- ;;
+-
+- darwin* | rhapsody*)
+- # PIC is the default on this platform
+- # Common symbols not allowed in MH_DYLIB files
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+- ;;
+
+- interix[[3-9]]*)
+- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+- # Instead, we relocate shared libraries at runtime.
+- ;;
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ ;;
++ cxx*)
++ # Compaq C++
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+- msdosdjgpp*)
+- # Just because we use GCC doesn't mean we suddenly get shared libraries
+- # on systems that don't support them.
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+- enable_shared=no
+- ;;
++ runpath_var=LD_RUN_PATH
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+- sysv4*MP*)
+- if test -d /usr/nec; then
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+- fi
+- ;;
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
++ ;;
++ xl*)
++ # IBM XL 8.0 on PPC, with GNU ld
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ if test "x$supports_anon_versioning" = xyes; then
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
++ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
++ echo "local: *; };" >> $output_objdir/$libname.ver~
++ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++ fi
++ ;;
++ *)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ # Sun C++ 5.9
++ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
++ _LT_TAGVAR(compiler_needs_object, $1)=yes
++
++ # Not sure whether something based on
++ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
++ # would be better.
++ output_verbose_link_cmd='echo'
++
++ # Archives containing C++ object files must be created using
++ # "CC -xar", where "CC" is the Sun C++ compiler. This is
++ # necessary to make sure instantiated templates are included
++ # in the archive.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
++ ;;
++ esac
++ ;;
++ esac
++ ;;
+
+- hpux*)
+- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+- # not for PA HP-UX.
+- case $host_cpu in
+- hppa*64*|ia64*)
+- # +Z the default
++ lynxos*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
++
++ m88k*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- esac
+- ;;
+
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+- ;;
+- esac
+- else
+- # PORTME Check for flag to pass linker flags through the system compiler.
+- case $host_os in
+- aix*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- if test "$host_cpu" = ia64; then
+- # AIX 5 now supports IA64 processor
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- else
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+- fi
+- ;;
+- darwin*)
+- # PIC is the default on this platform
+- # Common symbols not allowed in MH_DYLIB files
+- case $cc_basename in
+- xlc*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- ;;
+- esac
+- ;;
++ mvs*)
++ case $cc_basename in
++ cxx*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
++ ;;
+
+- mingw* | cygwin* | pw32* | os2*)
+- # This hack is so that the source file can tell whether it is being
+- # built for inclusion in a dll (and should export symbols for example).
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+- ;;
++ netbsd*)
++ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
++ wlarc=
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ fi
++ # Workaround some broken pre-1.5 toolchains
++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
++ ;;
+
+- hpux9* | hpux10* | hpux11*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+- # not for PA HP-UX.
+- case $host_cpu in
+- hppa*64*|ia64*)
+- # +Z the default
++ *nto* | *qnx*)
++ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
++
++ openbsd2*)
++ # C++ shared libraries are fairly broken
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++
++ openbsd*)
++ if test -f /usr/libexec/ld.so; then
++ _LT_TAGVAR(hardcode_direct, $1)=yes
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++ fi
++ output_verbose_link_cmd=echo
++ else
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
+ ;;
+- esac
+- # Is there a better lt_prog_compiler_static that works with the bundled CC?
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+- ;;
+
+- irix5* | irix6* | nonstopux*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # PIC (with -KPIC) is the default.
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+- ;;
++ osf3* | osf4* | osf5*)
++ case $cc_basename in
++ KCC*)
++ # Kuck and Associates, Inc. (KAI) C++ Compiler
++
++ # KCC will only create a shared library if the output file
++ # ends with ".so" (or ".sl" for HP-UX), so rename the library
++ # to its proper name (with version) after linking.
++ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++
++ # Archives containing C++ object files must be created using
++ # the KAI C++ compiler.
++ case $host in
++ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
++ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
++ esac
++ ;;
++ RCC*)
++ # Rational C++ 2.4.1
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ cxx*)
++ case $host in
++ osf3*)
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ ;;
++ *)
++ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
++ echo "-hidden">> $lib.exp~
++ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
++ $RM $lib.exp'
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
++ ;;
++ esac
+
+- newsos6)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+- linux* | k*bsd*-gnu)
+- case $cc_basename in
+- icc* | ecc*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ #
++ # There doesn't appear to be a way to prevent this compiler from
++ # explicitly linking system object files so we need to strip them
++ # from the output so that they don't get included in the library
++ # dependencies.
++ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
++ ;;
++ *)
++ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
++ case $host in
++ osf3*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++ ;;
++ esac
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
++
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
++
++ else
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ fi
++ ;;
++ esac
+ ;;
+- pgcc* | pgf77* | pgf90* | pgf95*)
+- # Portland Group compilers (*not* the Pentium gcc compiler,
+- # which looks to be a dead project)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++
++ psos*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- ccc*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # All Alpha code is PIC.
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++
++ sunos4*)
++ case $cc_basename in
++ CC*)
++ # Sun C++ 4.x
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ lcc*)
++ # Lucid
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
+ ;;
+- como)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-lopt='
++
++ solaris*)
++ case $cc_basename in
++ CC*)
++ # Sun C++ 4.2, 5.x and Centerline C++
++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
++ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ case $host_os in
++ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ *)
++ # The compiler driver will combine and reorder linker options,
++ # but understands `-z linker_flag'.
++ # Supported since Solaris 2.6 (maybe 2.5.1?)
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
++ ;;
++ esac
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++
++ output_verbose_link_cmd='echo'
++
++ # Archives containing C++ object files must be created using
++ # "CC -xar", where "CC" is the Sun C++ compiler. This is
++ # necessary to make sure instantiated templates are included
++ # in the archive.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
++ ;;
++ gcx*)
++ # Green Hills C++ Compiler
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
++
++ # The C++ compiler must be used to create the archive.
++ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
++ ;;
++ *)
++ # GNU C++ compiler with Solaris linker
++ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
++ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
++ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
++
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
++ else
++ # g++ 2.7 appears to require `-G' NOT `-shared' on this
++ # platform.
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
++ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
++
++ # Commands to make compiler produce verbose output that lists
++ # what "hidden" libraries, object files and flags are used when
++ # linking a shared library.
++ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
++ fi
++
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
++ case $host_os in
++ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++ *)
++ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++ ;;
++ esac
++ fi
++ ;;
++ esac
+ ;;
+- *)
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*)
+- # Sun C 5.9
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++
++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
++ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ runpath_var='LD_RUN_PATH'
++
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+- *Sun\ F*)
+- # Sun Fortran 8.3 passes all unrecognized flags to the linker
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+- esac
+- ;;
+ esac
+ ;;
+
+- osf3* | osf4* | osf5*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- # All OSF/1 code is PIC.
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+- ;;
++ sysv5* | sco3.2v5* | sco5v6*)
++ # Note: We can NOT use -z defs as we might desire, because we do not
++ # link with -lc, and that would cause any symbols used from libc to
++ # always be unresolved, which means just about no library would
++ # ever link correctly. If we're not using GNU ld we use -z text
++ # though, which does catch some bad symbols but isn't as heavy-handed
++ # as -z defs.
++ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
++ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
++ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
++ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
++ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
++ _LT_TAGVAR(link_all_deplibs, $1)=yes
++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
++ runpath_var='LD_RUN_PATH'
+
+- rdos*)
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++ case $cc_basename in
++ CC*)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ *)
++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
++ ;;
++ esac
+ ;;
+
+- solaris*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- case $cc_basename in
+- f77* | f90* | f95*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
++ tandem*)
++ case $cc_basename in
++ NCC*)
++ # NonStop-UX NCC 3.20
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ *)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
++ ;;
++
++ vxworks*)
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++
+ *)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+- esac
+- ;;
++ # FIXME: insert proper C++ library support
++ _LT_TAGVAR(ld_shlibs, $1)=no
++ ;;
++ esac
+
+- sunos4*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
++ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+- sysv4 | sysv4.2uw2* | sysv4.3*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++ _LT_TAGVAR(GCC, $1)="$GXX"
++ _LT_TAGVAR(LD, $1)="$LD"
+
+- sysv4*MP*)
+- if test -d /usr/nec ;then
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- fi
+- ;;
++ ## CAVEAT EMPTOR:
++ ## There is no encapsulation within the following macros, do not change
++ ## the running order or otherwise move them around unless you know exactly
++ ## what you are doing...
++ _LT_SYS_HIDDEN_LIBDEPS($1)
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_SYS_DYNAMIC_LINKER($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
++
++ _LT_CONFIG($1)
++ fi # test -n "$compiler"
++
++ CC=$lt_save_CC
++ LDCXX=$LD
++ LD=$lt_save_LD
++ GCC=$lt_save_GCC
++ with_gnu_ld=$lt_save_with_gnu_ld
++ lt_cv_path_LDCXX=$lt_cv_path_LD
++ lt_cv_path_LD=$lt_save_path_LD
++ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
++ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
++fi # test "$_lt_caught_CXX_error" != yes
+
+- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++AC_LANG_POP
++])# _LT_LANG_CXX_CONFIG
+
+- unicos*)
+- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+- ;;
+
+- uts4*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+- ;;
++# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
++# ---------------------------------
++# Figure out "hidden" library dependencies from verbose
++# compiler output when linking a shared library.
++# Parse the compiler output and extract the necessary
++# objects, libraries and library flags.
++m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
++[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
++# Dependencies to place before and after the object being linked:
++_LT_TAGVAR(predep_objects, $1)=
++_LT_TAGVAR(postdep_objects, $1)=
++_LT_TAGVAR(predeps, $1)=
++_LT_TAGVAR(postdeps, $1)=
++_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+- ;;
+- esac
+- fi
++dnl we can't use the lt_simple_compile_test_code here,
++dnl because it contains code intended for an executable,
++dnl not a library. It's possible we should let each
++dnl tag define a new lt_????_link_test_code variable,
++dnl but it's only used here...
++m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
++int a;
++void foo (void) { a = 0; }
++_LT_EOF
++], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
++class Foo
++{
++public:
++ Foo (void) { a = 0; }
++private:
++ int a;
++};
++_LT_EOF
++], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
++ subroutine foo
++ implicit none
++ integer*4 a
++ a=0
++ return
++ end
++_LT_EOF
++], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
++ subroutine foo
++ implicit none
++ integer a
++ a=0
++ return
++ end
++_LT_EOF
++], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
++public class foo {
++ private int a;
++ public void bar (void) {
++ a = 0;
++ }
++};
++_LT_EOF
+ ])
+-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
++dnl Parse the compiler output and extract the necessary
++dnl objects, libraries and library flags.
++if AC_TRY_EVAL(ac_compile); then
++ # Parse the compiler output and extract the necessary
++ # objects, libraries and library flags.
+
+-#
+-# Check to make sure the PIC flag actually works.
+-#
+-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+- _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+- [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+- [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+- "" | " "*) ;;
+- *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+- esac],
+- [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+-fi
+-case $host_os in
+- # For platforms which do not support PIC, -DPIC is meaningless:
+- *djgpp*)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+- ;;
+- *)
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+- ;;
+-esac
++ # Sentinel used to keep track of whether or not we are before
++ # the conftest object file.
++ pre_test_object_deps_done=no
+
+-#
+-# Check to make sure the static flag actually works.
+-#
+-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+- $lt_tmp_static_flag,
+- [],
+- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+-])
++ for p in `eval "$output_verbose_link_cmd"`; do
++ case $p in
++
++ -L* | -R* | -l*)
++ # Some compilers place space between "-{L,R}" and the path.
++ # Remove the space.
++ if test $p = "-L" ||
++ test $p = "-R"; then
++ prev=$p
++ continue
++ else
++ prev=
++ fi
+
++ if test "$pre_test_object_deps_done" = no; then
++ case $p in
++ -L* | -R*)
++ # Internal compiler library paths should come after those
++ # provided the user. The postdeps already come after the
++ # user supplied libs so there is no need to process them.
++ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
++ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
++ else
++ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
++ fi
++ ;;
++ # The "-l" case would never come before the object being
++ # linked, so don't bother handling this case.
++ esac
++ else
++ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
++ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
++ else
++ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
++ fi
++ fi
++ ;;
+
+-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+-# ------------------------------------
+-# See if the linker supports building shared libraries.
+-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+-[AC_REQUIRE([LT_AC_PROG_SED])dnl
+-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+-ifelse([$1],[CXX],[
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+- case $host_os in
+- aix4* | aix5*)
+- # If we're using GNU nm, then we don't want the "-C" option.
+- # -C means demangle to AIX nm, but means don't demangle with GNU nm
+- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+- else
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+- fi
+- ;;
+- pw32*)
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+- ;;
+- cygwin* | mingw*)
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+- ;;
+- *)
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+- ;;
+- esac
+-],[
+- runpath_var=
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+- _LT_AC_TAGVAR(archive_cmds, $1)=
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+- _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+- _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+- _LT_AC_TAGVAR(module_cmds, $1)=
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+- _LT_AC_TAGVAR(always_export_symbols, $1)=no
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+- # include_expsyms should be a list of space-separated symbols to be *always*
+- # included in the symbol list
+- _LT_AC_TAGVAR(include_expsyms, $1)=
+- # exclude_expsyms can be an extended regexp of symbols to exclude
+- # it will be wrapped by ` (' and `)$', so one must not match beginning or
+- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+- # as well as any symbol that contains `d'.
+- _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+- # platforms (ab)use it in PIC code, but their linkers get confused if
+- # the symbol is explicitly referenced. Since portable code cannot
+- # rely on this symbol name, it's probably fine to never include it in
+- # preloaded symbol tables.
+- extract_expsyms_cmds=
+- # Just being paranoid about ensuring that cc_basename is set.
+- _LT_CC_BASENAME([$compiler])
+- case $host_os in
+- cygwin* | mingw* | pw32*)
+- # FIXME: the MSVC++ port hasn't been tested in a loooong time
+- # When not using gcc, we currently assume that we are using
+- # Microsoft Visual C++.
+- if test "$GCC" != yes; then
+- with_gnu_ld=no
+- fi
+- ;;
+- interix*)
+- # we just hope/assume this is gcc and not c89 (= MSVC++)
+- with_gnu_ld=yes
+- ;;
+- openbsd*)
+- with_gnu_ld=no
+- ;;
+- esac
++ *.$objext)
++ # This assumes that the test object file only shows up
++ # once in the compiler output.
++ if test "$p" = "conftest.$objext"; then
++ pre_test_object_deps_done=yes
++ continue
++ fi
+
+- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+- if test "$with_gnu_ld" = yes; then
+- # If archive_cmds runs LD, not CC, wlarc should be empty
+- wlarc='${wl}'
++ if test "$pre_test_object_deps_done" = no; then
++ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
++ _LT_TAGVAR(predep_objects, $1)="$p"
++ else
++ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
++ fi
++ else
++ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
++ _LT_TAGVAR(postdep_objects, $1)="$p"
++ else
++ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
++ fi
++ fi
++ ;;
++
++ *) ;; # Ignore the rest.
+
+- # Set some defaults for GNU ld with shared library support. These
+- # are reset later if shared libraries are not supported. Putting them
+- # here allows them to be overridden if necessary.
+- runpath_var=LD_RUN_PATH
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+- # ancient GNU ld didn't support --whole-archive et. al.
+- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+- else
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+- fi
+- supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
+- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+- *\ 2.11.*) ;; # other 2.11 versions
+- *) supports_anon_versioning=yes ;;
+ esac
++ done
+
+- # See if GNU ld supports shared libraries.
+- case $host_os in
+- aix3* | aix4* | aix5*)
+- # On AIX/PPC, the GNU linker is very broken
+- if test "$host_cpu" != ia64; then
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- cat <<EOF 1>&2
++ # Clean up.
++ rm -f a.out a.exe
++else
++ echo "libtool.m4: error: problem compiling $1 test program"
++fi
+
+-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+-*** to be unable to reliably create shared libraries on AIX.
+-*** Therefore, libtool is disabling shared libraries support. If you
+-*** really care for shared libraries, you may want to modify your PATH
+-*** so that a non-GNU linker is found, and then restart.
++$RM -f confest.$objext
+
+-EOF
+- fi
+- ;;
++# PORTME: override above test on systems where it is broken
++m4_if([$1], [CXX],
++[case $host_os in
++interix[[3-9]]*)
++ # Interix 3.5 installs completely hosed .la files for C++, so rather than
++ # hack all around it, let's just trust "g++" to DTRT.
++ _LT_TAGVAR(predep_objects,$1)=
++ _LT_TAGVAR(postdep_objects,$1)=
++ _LT_TAGVAR(postdeps,$1)=
++ ;;
+
+- amigaos*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+-
+- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+- # that the semantics of dynamic libraries on AmigaOS, at least up
+- # to version 4, is to share data among multiple programs linked
+- # with the same dynamic library. Since this doesn't match the
+- # behavior of shared libraries on other platforms, we can't use
+- # them.
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
++linux*)
++ case `$CC -V 2>&1 | sed 5q` in
++ *Sun\ C*)
++ # Sun C++ 5.9
+
+- beos*)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+- # support --undefined. This deserves some investigation. FIXME
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
++ # The more standards-conforming stlport4 library is
++ # incompatible with the Cstd library. Avoid specifying
++ # it if it's in CXXFLAGS. Ignore libCrun as
++ # -library=stlport4 depends on it.
++ case " $CXX $CXXFLAGS " in
++ *" -library=stlport4 "*)
++ solaris_use_stlport4=yes
+ ;;
++ esac
+
+- cygwin* | mingw* | pw32*)
+- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+- # as there is no search path for DLLs.
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- _LT_AC_TAGVAR(always_export_symbols, $1)=no
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
++ if test "$solaris_use_stlport4" != yes; then
++ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
++ fi
++ ;;
++ esac
++ ;;
+
+- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+- # If the export-symbols file already is a .def file (1st line
+- # is EXPORTS), use it as is; otherwise, prepend...
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+- cp $export_symbols $output_objdir/$soname.def;
+- else
+- echo EXPORTS > $output_objdir/$soname.def;
+- cat $export_symbols >> $output_objdir/$soname.def;
+- fi~
+- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
++solaris*)
++ case $cc_basename in
++ CC*)
++ # The more standards-conforming stlport4 library is
++ # incompatible with the Cstd library. Avoid specifying
++ # it if it's in CXXFLAGS. Ignore libCrun as
++ # -library=stlport4 depends on it.
++ case " $CXX $CXXFLAGS " in
++ *" -library=stlport4 "*)
++ solaris_use_stlport4=yes
+ ;;
++ esac
+
+- interix[[3-9]]*)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+- # Instead, shared libraries are loaded at an image base (0x10000000 by
+- # default) and relocated if they conflict, which is a slow very memory
+- # consuming and fragmenting process. To avoid this, we pick a random,
+- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+- ;;
++ # Adding this requires a known-good setup of shared libraries for
++ # Sun compiler versions before 5.6, else PIC objects from an old
++ # archive will be linked into the output, leading to subtle bugs.
++ if test "$solaris_use_stlport4" != yes; then
++ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
++ fi
++ ;;
++ esac
++ ;;
++esac
++])
+
+- gnu* | linux* | k*bsd*-gnu)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- tmp_addflag=
+- case $cc_basename,$host_cpu in
+- pgcc*) # Portland Group C compiler
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+- tmp_addflag=' $pic_flag'
+- ;;
+- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+- tmp_addflag=' $pic_flag -Mnomain' ;;
+- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+- tmp_addflag=' -i_dynamic' ;;
+- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+- tmp_addflag=' -i_dynamic -nofor_main' ;;
+- ifc* | ifort*) # Intel Fortran compiler
+- tmp_addflag=' -nofor_main' ;;
+- esac
+- case `$CC -V 2>&1 | sed 5q` in
+- *Sun\ C*) # Sun C 5.9
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+- tmp_sharedflag='-G' ;;
+- *Sun\ F*) # Sun Fortran 8.3
+- tmp_sharedflag='-G' ;;
+- *)
+- tmp_sharedflag='-shared' ;;
+- esac
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++case " $_LT_TAGVAR(postdeps, $1) " in
++*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
++esac
++ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
++if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
++ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
++fi
++_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
++ [The directories searched by this compiler when creating a shared library])
++_LT_TAGDECL([], [predep_objects], [1],
++ [Dependencies to place before and after the objects being linked to
++ create a shared library])
++_LT_TAGDECL([], [postdep_objects], [1])
++_LT_TAGDECL([], [predeps], [1])
++_LT_TAGDECL([], [postdeps], [1])
++_LT_TAGDECL([], [compiler_lib_search_path], [1],
++ [The library search path used internally by the compiler when linking
++ a shared library])
++])# _LT_SYS_HIDDEN_LIBDEPS
++
++
++# _LT_PROG_F77
++# ------------
++# Since AC_PROG_F77 is broken, in that it returns the empty string
++# if there is no fortran compiler, we have our own version here.
++m4_defun([_LT_PROG_F77],
++[
++pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
++AC_PROG_F77
++if test -z "$F77" || test "X$F77" = "Xno"; then
++ _lt_disable_F77=yes
++fi
++popdef([AC_MSG_ERROR])
++])# _LT_PROG_F77
+
+- if test $supports_anon_versioning = yes; then
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+- $echo "local: *; };" >> $output_objdir/$libname.ver~
+- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+- fi
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([_LT_PROG_F77], [])
+
+- netbsd*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+- wlarc=
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- fi
+- ;;
+
+- solaris*)
+- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- cat <<EOF 1>&2
++# _LT_LANG_F77_CONFIG([TAG])
++# --------------------------
++# Ensure that the configuration variables for a Fortran 77 compiler are
++# suitably defined. These variables are subsequently used by _LT_CONFIG
++# to write the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_F77_CONFIG],
++[AC_REQUIRE([_LT_PROG_F77])dnl
++AC_LANG_PUSH(Fortran 77)
+
+-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+-*** create shared libraries on Solaris systems. Therefore, libtool
+-*** is disabling shared libraries support. We urge you to upgrade GNU
+-*** binutils to release 2.9.1 or newer. Another option is to modify
+-*** your PATH or compiler configuration so that the native linker is
+-*** used, and then restart.
++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
++_LT_TAGVAR(allow_undefined_flag, $1)=
++_LT_TAGVAR(always_export_symbols, $1)=no
++_LT_TAGVAR(archive_expsym_cmds, $1)=
++_LT_TAGVAR(export_dynamic_flag_spec, $1)=
++_LT_TAGVAR(hardcode_direct, $1)=no
++_LT_TAGVAR(hardcode_direct_absolute, $1)=no
++_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++_LT_TAGVAR(hardcode_libdir_separator, $1)=
++_LT_TAGVAR(hardcode_minus_L, $1)=no
++_LT_TAGVAR(hardcode_automatic, $1)=no
++_LT_TAGVAR(inherit_rpath, $1)=no
++_LT_TAGVAR(module_cmds, $1)=
++_LT_TAGVAR(module_expsym_cmds, $1)=
++_LT_TAGVAR(link_all_deplibs, $1)=unknown
++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
++_LT_TAGVAR(no_undefined_flag, $1)=
++_LT_TAGVAR(whole_archive_flag_spec, $1)=
++_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+-EOF
+- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
++# Source file extension for f77 test sources.
++ac_ext=f
+
+- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+- case `$LD -v 2>&1` in
+- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- cat <<_LT_EOF 1>&2
++# Object file extension for compiled f77 test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+-*** reliably create shared libraries on SCO systems. Therefore, libtool
+-*** is disabling shared libraries support. We urge you to upgrade GNU
+-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+-*** your PATH or compiler configuration so that the native linker is
+-*** used, and then restart.
++# No sense in running all these tests if we already determined that
++# the F77 compiler isn't working. Some variables (like enable_shared)
++# are currently assumed to apply to all compilers on this platform,
++# and will be corrupted by setting them based on a non-working compiler.
++if test "$_lt_disable_F77" != yes; then
++ # Code to be used in simple compile tests
++ lt_simple_compile_test_code="\
++ subroutine t
++ return
++ end
++"
+
+-_LT_EOF
+- ;;
+- *)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- esac
+- ;;
++ # Code to be used in simple link tests
++ lt_simple_link_test_code="\
++ program t
++ end
++"
+
+- sunos4*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+- wlarc=
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
++ _LT_TAG_COMPILER
+
+- *)
+- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
+- esac
++ # save warnings/boilerplate of simple test code
++ _LT_COMPILER_BOILERPLATE
++ _LT_LINKER_BOILERPLATE
++
++ # Allow CC to be a program name with arguments.
++ lt_save_CC="$CC"
++ lt_save_GCC=$GCC
++ CC=${F77-"f77"}
++ compiler=$CC
++ _LT_TAGVAR(compiler, $1)=$CC
++ _LT_CC_BASENAME([$compiler])
++ GCC=$G77
++ if test -n "$compiler"; then
++ AC_MSG_CHECKING([if libtool supports shared libraries])
++ AC_MSG_RESULT([$can_build_shared])
+
+- if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+- runpath_var=
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+- fi
+- else
+- # PORTME fill in a description of your system's linker (not GNU ld)
+- case $host_os in
+- aix3*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+- # Note: this linker hardcodes the directories in LIBPATH if there
+- # are no directories specified by -L.
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+- # Neither direct hardcoding nor static linking is supported with a
+- # broken collect2.
+- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+- fi
+- ;;
++ AC_MSG_CHECKING([whether to build shared libraries])
++ test "$can_build_shared" = "no" && enable_shared=no
+
+- aix4* | aix5*)
+- if test "$host_cpu" = ia64; then
+- # On IA64, the linker does run time linking by default, so we don't
+- # have to do anything special.
+- aix_use_runtimelinking=no
+- exp_sym_flag='-Bexport'
+- no_entry_flag=""
+- else
+- # If we're using GNU nm, then we don't want the "-C" option.
+- # -C means demangle to AIX nm, but means don't demangle with GNU nm
+- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+- else
+- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
++ # On AIX, shared libraries and static libraries use the same namespace, and
++ # are all built from PIC.
++ case $host_os in
++ aix3*)
++ test "$enable_shared" = yes && enable_static=no
++ if test -n "$RANLIB"; then
++ archive_cmds="$archive_cmds~\$RANLIB \$lib"
++ postinstall_cmds='$RANLIB $lib'
++ fi
++ ;;
++ aix[[4-9]]*)
++ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
++ test "$enable_shared" = yes && enable_static=no
+ fi
+- aix_use_runtimelinking=no
+-
+- # Test if we are trying to use run time linking or normal
+- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+- # need to do runtime linking.
+- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+- for ld_flag in $LDFLAGS; do
+- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+- aix_use_runtimelinking=yes
+- break
+- fi
+- done
+- ;;
+- esac
++ ;;
++ esac
++ AC_MSG_RESULT([$enable_shared])
+
+- exp_sym_flag='-bexport'
+- no_entry_flag='-bnoentry'
+- fi
++ AC_MSG_CHECKING([whether to build static libraries])
++ # Make sure either enable_shared or enable_static is yes.
++ test "$enable_shared" = yes || enable_static=yes
++ AC_MSG_RESULT([$enable_static])
++
++ _LT_TAGVAR(GCC, $1)="$G77"
++ _LT_TAGVAR(LD, $1)="$LD"
++
++ ## CAVEAT EMPTOR:
++ ## There is no encapsulation within the following macros, do not change
++ ## the running order or otherwise move them around unless you know exactly
++ ## what you are doing...
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_SYS_DYNAMIC_LINKER($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
++
++ _LT_CONFIG($1)
++ fi # test -n "$compiler"
++
++ GCC=$lt_save_GCC
++ CC="$lt_save_CC"
++fi # test "$_lt_disable_F77" != yes
+
+- # When large executables or shared objects are built, AIX ld can
+- # have problems creating the table of contents. If linking a library
+- # or program results in "error TOC overflow" add -mminimal-toc to
+- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
++AC_LANG_POP
++])# _LT_LANG_F77_CONFIG
+
+- _LT_AC_TAGVAR(archive_cmds, $1)=''
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+- if test "$GCC" = yes; then
+- case $host_os in aix4.[[012]]|aix4.[[012]].*)
+- # We only want to do this on AIX 4.2 and lower, the check
+- # below for broken collect2 doesn't work under 4.3+
+- collect2name=`${CC} -print-prog-name=collect2`
+- if test -f "$collect2name" && \
+- strings "$collect2name" | grep resolve_lib_name >/dev/null
+- then
+- # We have reworked collect2
+- :
+- else
+- # We have old collect2
+- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+- # It fails to find uninstalled libraries when the uninstalled
+- # path is not listed in the libpath. Setting hardcode_minus_L
+- # to unsupported forces relinking
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+- fi
+- ;;
+- esac
+- shared_flag='-shared'
+- if test "$aix_use_runtimelinking" = yes; then
+- shared_flag="$shared_flag "'${wl}-G'
+- fi
+- else
+- # not using gcc
+- if test "$host_cpu" = ia64; then
+- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+- # chokes on -Wl,-G. The following line is correct:
+- shared_flag='-G'
+- else
+- if test "$aix_use_runtimelinking" = yes; then
+- shared_flag='${wl}-G'
+- else
+- shared_flag='${wl}-bM:SRE'
+- fi
+- fi
+- fi
++# _LT_PROG_FC
++# -----------
++# Since AC_PROG_FC is broken, in that it returns the empty string
++# if there is no fortran compiler, we have our own version here.
++m4_defun([_LT_PROG_FC],
++[
++pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
++AC_PROG_FC
++if test -z "$FC" || test "X$FC" = "Xno"; then
++ _lt_disable_FC=yes
++fi
++popdef([AC_MSG_ERROR])
++])# _LT_PROG_FC
+
+- # It seems that -bexpall does not export symbols beginning with
+- # underscore (_), so it is better to generate a list of symbols to export.
+- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+- if test "$aix_use_runtimelinking" = yes; then
+- # Warning - without using the other runtime loading flags (-brtl),
+- # -berok will link without error, but may produce a broken library.
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+- # Determine the default libpath from the value encoded in an empty executable.
+- _LT_AC_SYS_LIBPATH_AIX
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+- else
+- if test "$host_cpu" = ia64; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+- else
+- # Determine the default libpath from the value encoded in an empty executable.
+- _LT_AC_SYS_LIBPATH_AIX
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+- # Warning - without using the other run time loading flags,
+- # -berok will link without error, but may produce a broken library.
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+- # Exported symbols can be pulled into shared objects from archives
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+- # This is similar to how AIX traditionally builds its shared libraries.
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+- fi
+- fi
+- ;;
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([_LT_PROG_FC], [])
+
+- amigaos*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- # see comment about different semantics on the GNU ld section
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+
+- bsdi[[45]]*)
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+- ;;
++# _LT_LANG_FC_CONFIG([TAG])
++# -------------------------
++# Ensure that the configuration variables for a Fortran compiler are
++# suitably defined. These variables are subsequently used by _LT_CONFIG
++# to write the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_FC_CONFIG],
++[AC_REQUIRE([_LT_PROG_FC])dnl
++AC_LANG_PUSH(Fortran)
++
++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
++_LT_TAGVAR(allow_undefined_flag, $1)=
++_LT_TAGVAR(always_export_symbols, $1)=no
++_LT_TAGVAR(archive_expsym_cmds, $1)=
++_LT_TAGVAR(export_dynamic_flag_spec, $1)=
++_LT_TAGVAR(hardcode_direct, $1)=no
++_LT_TAGVAR(hardcode_direct_absolute, $1)=no
++_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++_LT_TAGVAR(hardcode_libdir_separator, $1)=
++_LT_TAGVAR(hardcode_minus_L, $1)=no
++_LT_TAGVAR(hardcode_automatic, $1)=no
++_LT_TAGVAR(inherit_rpath, $1)=no
++_LT_TAGVAR(module_cmds, $1)=
++_LT_TAGVAR(module_expsym_cmds, $1)=
++_LT_TAGVAR(link_all_deplibs, $1)=unknown
++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
++_LT_TAGVAR(no_undefined_flag, $1)=
++_LT_TAGVAR(whole_archive_flag_spec, $1)=
++_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+- cygwin* | mingw* | pw32*)
+- # When not using gcc, we currently assume that we are using
+- # Microsoft Visual C++.
+- # hardcode_libdir_flag_spec is actually meaningless, as there is
+- # no search path for DLLs.
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- # Tell ltmain to make .lib files, not .a files.
+- libext=lib
+- # Tell ltmain to make .dll files, not .so files.
+- shrext_cmds=".dll"
+- # FIXME: Setting linknames here is a bad hack.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+- # The linker will automatically build a .lib file if we build a DLL.
+- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+- # FIXME: Should let the user specify the lib program.
+- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+- _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+- ;;
++# Source file extension for fc test sources.
++ac_ext=${ac_fc_srcext-f}
+
+- darwin* | rhapsody*)
+- case $host_os in
+- rhapsody* | darwin1.[[012]])
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+- ;;
+- *) # Darwin 1.3 on
+- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+- else
+- case ${MACOSX_DEPLOYMENT_TARGET} in
+- 10.[[012]])
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+- ;;
+- 10.*)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+- ;;
+- esac
+- fi
+- ;;
+- esac
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- if test "$GCC" = yes ; then
+- output_verbose_link_cmd='echo'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- else
+- case $cc_basename in
+- xlc*)
+- output_verbose_link_cmd='echo'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+- ;;
+- *)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- fi
+- ;;
++# Object file extension for compiled fc test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+- dgux*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++# No sense in running all these tests if we already determined that
++# the FC compiler isn't working. Some variables (like enable_shared)
++# are currently assumed to apply to all compilers on this platform,
++# and will be corrupted by setting them based on a non-working compiler.
++if test "$_lt_disable_FC" != yes; then
++ # Code to be used in simple compile tests
++ lt_simple_compile_test_code="\
++ subroutine t
++ return
++ end
++"
+
+- freebsd1*)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
++ # Code to be used in simple link tests
++ lt_simple_link_test_code="\
++ program t
++ end
++"
+
+- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+- # support. Future versions do this automatically, but an explicit c++rt0.o
+- # does not break anything, and helps significantly (at the cost of a little
+- # extra space).
+- freebsd2.2*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
++ _LT_TAG_COMPILER
+
+- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ # save warnings/boilerplate of simple test code
++ _LT_COMPILER_BOILERPLATE
++ _LT_LINKER_BOILERPLATE
++
++ # Allow CC to be a program name with arguments.
++ lt_save_CC="$CC"
++ lt_save_GCC=$GCC
++ CC=${FC-"f95"}
++ compiler=$CC
++ GCC=$ac_cv_fc_compiler_gnu
+
+- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+- freebsd* | dragonfly*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ _LT_TAGVAR(compiler, $1)=$CC
++ _LT_CC_BASENAME([$compiler])
+
+- hpux9*)
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++ if test -n "$compiler"; then
++ AC_MSG_CHECKING([if libtool supports shared libraries])
++ AC_MSG_RESULT([$can_build_shared])
+
+- # hardcode_minus_L: Not really in the search PATH,
+- # but as the default location of the library.
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- ;;
++ AC_MSG_CHECKING([whether to build shared libraries])
++ test "$can_build_shared" = "no" && enable_shared=no
+
+- hpux10*)
+- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+- fi
+- if test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
++ # On AIX, shared libraries and static libraries use the same namespace, and
++ # are all built from PIC.
++ case $host_os in
++ aix3*)
++ test "$enable_shared" = yes && enable_static=no
++ if test -n "$RANLIB"; then
++ archive_cmds="$archive_cmds~\$RANLIB \$lib"
++ postinstall_cmds='$RANLIB $lib'
++ fi
++ ;;
++ aix[[4-9]]*)
++ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
++ test "$enable_shared" = yes && enable_static=no
++ fi
++ ;;
++ esac
++ AC_MSG_RESULT([$enable_shared])
+
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ AC_MSG_CHECKING([whether to build static libraries])
++ # Make sure either enable_shared or enable_static is yes.
++ test "$enable_shared" = yes || enable_static=yes
++ AC_MSG_RESULT([$enable_static])
++
++ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
++ _LT_TAGVAR(LD, $1)="$LD"
++
++ ## CAVEAT EMPTOR:
++ ## There is no encapsulation within the following macros, do not change
++ ## the running order or otherwise move them around unless you know exactly
++ ## what you are doing...
++ _LT_SYS_HIDDEN_LIBDEPS($1)
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_SYS_DYNAMIC_LINKER($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
++
++ _LT_CONFIG($1)
++ fi # test -n "$compiler"
++
++ GCC=$lt_save_GCC
++ CC="$lt_save_CC"
++fi # test "$_lt_disable_FC" != yes
+
+- # hardcode_minus_L: Not really in the search PATH,
+- # but as the default location of the library.
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- fi
+- ;;
++AC_LANG_POP
++])# _LT_LANG_FC_CONFIG
+
+- hpux11*)
+- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+- case $host_cpu in
+- hppa*64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- ia64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- esac
+- else
+- case $host_cpu in
+- hppa*64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- ia64*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+- ;;
+- esac
+- fi
+- if test "$with_gnu_ld" = no; then
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+- case $host_cpu in
+- hppa*64*|ia64*)
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
+- *)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++# _LT_LANG_GCJ_CONFIG([TAG])
++# --------------------------
++# Ensure that the configuration variables for the GNU Java Compiler compiler
++# are suitably defined. These variables are subsequently used by _LT_CONFIG
++# to write the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_GCJ_CONFIG],
++[AC_REQUIRE([LT_PROG_GCJ])dnl
++AC_LANG_SAVE
+
+- # hardcode_minus_L: Not really in the search PATH,
+- # but as the default location of the library.
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- ;;
+- esac
+- fi
+- ;;
++# Source file extension for Java test sources.
++ac_ext=java
+
+- irix5* | irix6* | nonstopux*)
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- ;;
++# Object file extension for compiled Java test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+- netbsd*)
+- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++# Code to be used in simple compile tests
++lt_simple_compile_test_code="class foo {}"
+
+- newsos6)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++# Code to be used in simple link tests
++lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+- openbsd*)
+- if test -f /usr/libexec/ld.so; then
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- else
+- case $host_os in
+- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- ;;
+- *)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- ;;
+- esac
+- fi
+- else
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- fi
+- ;;
++# ltmain only uses $CC for tagged configurations so make sure $CC is set.
++_LT_TAG_COMPILER
+
+- os2*)
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+- _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+- ;;
++# save warnings/boilerplate of simple test code
++_LT_COMPILER_BOILERPLATE
++_LT_LINKER_BOILERPLATE
+
+- osf3*)
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+- else
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- ;;
++# Allow CC to be a program name with arguments.
++lt_save_CC="$CC"
++lt_save_GCC=$GCC
++GCC=yes
++CC=${GCJ-"gcj"}
++compiler=$CC
++_LT_TAGVAR(compiler, $1)=$CC
++_LT_TAGVAR(LD, $1)="$LD"
++_LT_CC_BASENAME([$compiler])
+
+- osf4* | osf5*) # as osf3* with the addition of -msym flag
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+- else
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
++# GCJ did not exist at the time GCC didn't implicitly link libc in.
++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+- # Both c and cxx compiler support -rpath directly
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+- ;;
++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+- solaris*)
+- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+- if test "$GCC" = yes; then
+- wlarc='${wl}'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+- else
+- wlarc=''
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- case $host_os in
+- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+- *)
+- # The compiler driver will combine and reorder linker options,
+- # but understands `-z linker_flag'. GCC discards it without `$wl',
+- # but is careful enough not to reorder.
+- # Supported since Solaris 2.6 (maybe 2.5.1?)
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+- else
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+- fi
+- ;;
+- esac
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- ;;
++## CAVEAT EMPTOR:
++## There is no encapsulation within the following macros, do not change
++## the running order or otherwise move them around unless you know exactly
++## what you are doing...
++if test -n "$compiler"; then
++ _LT_COMPILER_NO_RTTI($1)
++ _LT_COMPILER_PIC($1)
++ _LT_COMPILER_C_O($1)
++ _LT_COMPILER_FILE_LOCKS($1)
++ _LT_LINKER_SHLIBS($1)
++ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+- sunos4*)
+- if test "x$host_vendor" = xsequent; then
+- # Use $CC to link under sequent, because it throws in some extra .o
+- # files that make .init and .fini sections work.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+- fi
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++ _LT_CONFIG($1)
++fi
+
+- sysv4)
+- case $host_vendor in
+- sni)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+- ;;
+- siemens)
+- ## LD is ld it makes a PLAMLIB
+- ## CC just makes a GrossModule.
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no
+- ;;
+- motorola)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+- ;;
+- esac
+- runpath_var='LD_RUN_PATH'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++AC_LANG_RESTORE
+
+- sysv4.3*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+- ;;
++GCC=$lt_save_GCC
++CC="$lt_save_CC"
++])# _LT_LANG_GCJ_CONFIG
+
+- sysv4*MP*)
+- if test -d /usr/nec; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- runpath_var=LD_RUN_PATH
+- hardcode_runpath_var=yes
+- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+- fi
+- ;;
+
+- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- runpath_var='LD_RUN_PATH'
++# _LT_LANG_RC_CONFIG([TAG])
++# -------------------------
++# Ensure that the configuration variables for the Windows resource compiler
++# are suitably defined. These variables are subsequently used by _LT_CONFIG
++# to write the compiler configuration to `libtool'.
++m4_defun([_LT_LANG_RC_CONFIG],
++[AC_REQUIRE([LT_PROG_RC])dnl
++AC_LANG_SAVE
+
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+- fi
+- ;;
++# Source file extension for RC test sources.
++ac_ext=rc
+
+- sysv5* | sco3.2v5* | sco5v6*)
+- # Note: We can NOT use -z defs as we might desire, because we do not
+- # link with -lc, and that would cause any symbols used from libc to
+- # always be unresolved, which means just about no library would
+- # ever link correctly. If we're not using GNU ld we use -z text
+- # though, which does catch some bad symbols but isn't as heavy-handed
+- # as -z defs.
+- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+- runpath_var='LD_RUN_PATH'
++# Object file extension for compiled RC test sources.
++objext=o
++_LT_TAGVAR(objext, $1)=$objext
+
+- if test "$GCC" = yes; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- else
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+- fi
+- ;;
++# Code to be used in simple compile tests
++lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+- uts4*)
+- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- ;;
++# Code to be used in simple link tests
++lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+- *)
+- _LT_AC_TAGVAR(ld_shlibs, $1)=no
+- ;;
+- esac
+- fi
+-])
+-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
++# ltmain only uses $CC for tagged configurations so make sure $CC is set.
++_LT_TAG_COMPILER
+
+-#
+-# Do we need to explicitly link libc?
+-#
+-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+-x|xyes)
+- # Assume -lc should be added
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
++# save warnings/boilerplate of simple test code
++_LT_COMPILER_BOILERPLATE
++_LT_LINKER_BOILERPLATE
+
+- if test "$enable_shared" = yes && test "$GCC" = yes; then
+- case $_LT_AC_TAGVAR(archive_cmds, $1) in
+- *'~'*)
+- # FIXME: we may have to deal with multi-command sequences.
+- ;;
+- '$CC '*)
+- # Test whether the compiler implicitly links with -lc since on some
+- # systems, -lgcc has to come before -lc. If gcc already passes -lc
+- # to ld, don't add -lc before -lgcc.
+- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+- $rm conftest*
+- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
++# Allow CC to be a program name with arguments.
++lt_save_CC="$CC"
++lt_save_GCC=$GCC
++GCC=
++CC=${RC-"windres"}
++compiler=$CC
++_LT_TAGVAR(compiler, $1)=$CC
++_LT_CC_BASENAME([$compiler])
++_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+- soname=conftest
+- lib=conftest
+- libobjs=conftest.$ac_objext
+- deplibs=
+- wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+- pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+- compiler_flags=-v
+- linker_flags=-v
+- verstring=
+- output_objdir=.
+- libname=conftest
+- lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+- if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+- then
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+- else
+- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+- fi
+- _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+- else
+- cat conftest.err 1>&5
+- fi
+- $rm conftest*
+- AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+- ;;
+- esac
+- fi
+- ;;
+-esac
+-])# AC_LIBTOOL_PROG_LD_SHLIBS
++if test -n "$compiler"; then
++ :
++ _LT_CONFIG($1)
++fi
+
++GCC=$lt_save_GCC
++AC_LANG_RESTORE
++CC="$lt_save_CC"
++])# _LT_LANG_RC_CONFIG
+
+-# _LT_AC_FILE_LTDLL_C
+-# -------------------
+-# Be careful that the start marker always follows a newline.
+-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+-# /* ltdll.c starts here */
+-# #define WIN32_LEAN_AND_MEAN
+-# #include <windows.h>
+-# #undef WIN32_LEAN_AND_MEAN
+-# #include <stdio.h>
+-#
+-# #ifndef __CYGWIN__
+-# # ifdef __CYGWIN32__
+-# # define __CYGWIN__ __CYGWIN32__
+-# # endif
+-# #endif
+-#
+-# #ifdef __cplusplus
+-# extern "C" {
+-# #endif
+-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+-# #ifdef __cplusplus
+-# }
+-# #endif
+-#
+-# #ifdef __CYGWIN__
+-# #include <cygwin/cygwin_dll.h>
+-# DECLARE_CYGWIN_DLL( DllMain );
+-# #endif
+-# HINSTANCE __hDllInstance_base;
+-#
+-# BOOL APIENTRY
+-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+-# {
+-# __hDllInstance_base = hInst;
+-# return TRUE;
+-# }
+-# /* ltdll.c ends here */
+-])# _LT_AC_FILE_LTDLL_C
+
++# LT_PROG_GCJ
++# -----------
++AC_DEFUN([LT_PROG_GCJ],
++[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
++ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
++ [AC_CHECK_TOOL(GCJ, gcj,)
++ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
++ AC_SUBST(GCJFLAGS)])])[]dnl
++])
+
+-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+-# ---------------------------------
+-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
++# Old name:
++AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+-# old names
+-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
+-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
+-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
+-
+-# This is just to silence aclocal about the macro not being used
+-ifelse([AC_DISABLE_FAST_INSTALL])
+-
+-AC_DEFUN([LT_AC_PROG_GCJ],
+-[AC_CHECK_TOOL(GCJ, gcj, no)
+- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+- AC_SUBST(GCJFLAGS)
++# LT_PROG_RC
++# ----------
++AC_DEFUN([LT_PROG_RC],
++[AC_CHECK_TOOL(RC, windres,)
+ ])
+
+-AC_DEFUN([LT_AC_PROG_RC],
+-[AC_CHECK_TOOL(RC, windres, no)
+-])
++# Old name:
++AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+-# Cheap backport of AS_EXECUTABLE_P and required macros
+-# from Autoconf 2.59; we should not use $as_executable_p directly.
++# _LT_DECL_EGREP
++# --------------
++# If we don't have a new enough Autoconf to choose the best grep
++# available, choose the one first in the user's PATH.
++m4_defun([_LT_DECL_EGREP],
++[AC_REQUIRE([AC_PROG_EGREP])dnl
++AC_REQUIRE([AC_PROG_FGREP])dnl
++test -z "$GREP" && GREP=grep
++_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
++_LT_DECL([], [EGREP], [1], [An ERE matcher])
++_LT_DECL([], [FGREP], [1], [A literal string matcher])
++dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
++AC_SUBST([GREP])
++])
+
+-# _AS_TEST_PREPARE
+-# ----------------
+-m4_ifndef([_AS_TEST_PREPARE],
+-[m4_defun([_AS_TEST_PREPARE],
+-[if test -x / >/dev/null 2>&1; then
+- as_executable_p='test -x'
+-else
+- as_executable_p='test -f'
+-fi
+-])])# _AS_TEST_PREPARE
+
+-# AS_EXECUTABLE_P
+-# ---------------
+-# Check whether a file is executable.
+-m4_ifndef([AS_EXECUTABLE_P],
+-[m4_defun([AS_EXECUTABLE_P],
+-[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+-$as_executable_p $1[]dnl
+-])])# AS_EXECUTABLE_P
++# _LT_DECL_SED
++# ------------
++# Check for a fully-functional sed program, that truncates
++# as few characters as possible. Prefer GNU sed if found.
++m4_defun([_LT_DECL_SED],
++[AC_PROG_SED
++test -z "$SED" && SED=sed
++Xsed="$SED -e 1s/^X//"
++_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
++_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
++ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
++])# _LT_DECL_SED
+
++m4_ifndef([AC_PROG_SED], [
+ ############################################################
+ # NOTE: This macro has been submitted for inclusion into #
+ # GNU Autoconf as AC_PROG_SED. When it is available in #
+ # a released version of Autoconf we should remove this #
+ # macro and use it instead. #
+ ############################################################
+-# LT_AC_PROG_SED
+-# --------------
+-# Check for a fully-functional sed program, that truncates
+-# as few characters as possible. Prefer GNU sed if found.
+-AC_DEFUN([LT_AC_PROG_SED],
++
++m4_defun([AC_PROG_SED],
+ [AC_MSG_CHECKING([for a sed that does not truncate output])
+ AC_CACHE_VAL(lt_cv_path_SED,
+ [# Loop through the user's path and test for sed and gsed.
+@@ -6544,7 +7004,7 @@
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
++ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+@@ -6585,4 +7045,266 @@
+ SED=$lt_cv_path_SED
+ AC_SUBST([SED])
+ AC_MSG_RESULT([$SED])
++])#AC_PROG_SED
++])#m4_ifndef
++
++# Old name:
++AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
++dnl aclocal-1.4 backwards compatibility:
++dnl AC_DEFUN([LT_AC_PROG_SED], [])
++
++
++# _LT_CHECK_SHELL_FEATURES
++# ------------------------
++# Find out whether the shell is Bourne or XSI compatible,
++# or has some other useful features.
++m4_defun([_LT_CHECK_SHELL_FEATURES],
++[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
++# Try some XSI features
++xsi_shell=no
++( _lt_dummy="a/b/c"
++ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
++ = c,a/b,, \
++ && eval 'test $(( 1 + 1 )) -eq 2 \
++ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
++ && xsi_shell=yes
++AC_MSG_RESULT([$xsi_shell])
++_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
++
++AC_MSG_CHECKING([whether the shell understands "+="])
++lt_shell_append=no
++( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
++ >/dev/null 2>&1 \
++ && lt_shell_append=yes
++AC_MSG_RESULT([$lt_shell_append])
++_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
++
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++ lt_unset=unset
++else
++ lt_unset=false
++fi
++_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
++
++# test EBCDIC or ASCII
++case `echo X|tr X '\101'` in
++ A) # ASCII based system
++ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
++ lt_SP2NL='tr \040 \012'
++ lt_NL2SP='tr \015\012 \040\040'
++ ;;
++ *) # EBCDIC based system
++ lt_SP2NL='tr \100 \n'
++ lt_NL2SP='tr \r\n \100\100'
++ ;;
++esac
++_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
++_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
++])# _LT_CHECK_SHELL_FEATURES
++
++
++# _LT_PROG_XSI_SHELLFNS
++# ---------------------
++# Bourne and XSI compatible variants of some useful shell functions.
++m4_defun([_LT_PROG_XSI_SHELLFNS],
++[case $xsi_shell in
++ yes)
++ cat << \_LT_EOF >> "$cfgfile"
++
++# func_dirname file append nondir_replacement
++# Compute the dirname of FILE. If nonempty, add APPEND to the result,
++# otherwise set result to NONDIR_REPLACEMENT.
++func_dirname ()
++{
++ case ${1} in
++ */*) func_dirname_result="${1%/*}${2}" ;;
++ * ) func_dirname_result="${3}" ;;
++ esac
++}
++
++# func_basename file
++func_basename ()
++{
++ func_basename_result="${1##*/}"
++}
++
++# func_dirname_and_basename file append nondir_replacement
++# perform func_basename and func_dirname in a single function
++# call:
++# dirname: Compute the dirname of FILE. If nonempty,
++# add APPEND to the result, otherwise set result
++# to NONDIR_REPLACEMENT.
++# value returned in "$func_dirname_result"
++# basename: Compute filename of FILE.
++# value retuned in "$func_basename_result"
++# Implementation must be kept synchronized with func_dirname
++# and func_basename. For efficiency, we do not delegate to
++# those functions but instead duplicate the functionality here.
++func_dirname_and_basename ()
++{
++ case ${1} in
++ */*) func_dirname_result="${1%/*}${2}" ;;
++ * ) func_dirname_result="${3}" ;;
++ esac
++ func_basename_result="${1##*/}"
++}
++
++# func_stripname prefix suffix name
++# strip PREFIX and SUFFIX off of NAME.
++# PREFIX and SUFFIX must not contain globbing or regex special
++# characters, hashes, percent signs, but SUFFIX may contain a leading
++# dot (in which case that matches only a dot).
++func_stripname ()
++{
++ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
++ # positional parameters, so assign one to ordinary parameter first.
++ func_stripname_result=${3}
++ func_stripname_result=${func_stripname_result#"${1}"}
++ func_stripname_result=${func_stripname_result%"${2}"}
++}
++
++# func_opt_split
++func_opt_split ()
++{
++ func_opt_split_opt=${1%%=*}
++ func_opt_split_arg=${1#*=}
++}
++
++# func_lo2o object
++func_lo2o ()
++{
++ case ${1} in
++ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
++ *) func_lo2o_result=${1} ;;
++ esac
++}
++
++# func_xform libobj-or-source
++func_xform ()
++{
++ func_xform_result=${1%.*}.lo
++}
++
++# func_arith arithmetic-term...
++func_arith ()
++{
++ func_arith_result=$(( $[*] ))
++}
++
++# func_len string
++# STRING may not start with a hyphen.
++func_len ()
++{
++ func_len_result=${#1}
++}
++
++_LT_EOF
++ ;;
++ *) # Bourne compatible functions.
++ cat << \_LT_EOF >> "$cfgfile"
++
++# func_dirname file append nondir_replacement
++# Compute the dirname of FILE. If nonempty, add APPEND to the result,
++# otherwise set result to NONDIR_REPLACEMENT.
++func_dirname ()
++{
++ # Extract subdirectory from the argument.
++ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
++ if test "X$func_dirname_result" = "X${1}"; then
++ func_dirname_result="${3}"
++ else
++ func_dirname_result="$func_dirname_result${2}"
++ fi
++}
++
++# func_basename file
++func_basename ()
++{
++ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
++}
++
++dnl func_dirname_and_basename
++dnl A portable version of this function is already defined in general.m4sh
++dnl so there is no need for it here.
++
++# func_stripname prefix suffix name
++# strip PREFIX and SUFFIX off of NAME.
++# PREFIX and SUFFIX must not contain globbing or regex special
++# characters, hashes, percent signs, but SUFFIX may contain a leading
++# dot (in which case that matches only a dot).
++# func_strip_suffix prefix name
++func_stripname ()
++{
++ case ${2} in
++ .*) func_stripname_result=`$ECHO "X${3}" \
++ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
++ *) func_stripname_result=`$ECHO "X${3}" \
++ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
++ esac
++}
++
++# sed scripts:
++my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
++my_sed_long_arg='1s/^-[[^=]]*=//'
++
++# func_opt_split
++func_opt_split ()
++{
++ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
++ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
++}
++
++# func_lo2o object
++func_lo2o ()
++{
++ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
++}
++
++# func_xform libobj-or-source
++func_xform ()
++{
++ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
++}
++
++# func_arith arithmetic-term...
++func_arith ()
++{
++ func_arith_result=`expr "$[@]"`
++}
++
++# func_len string
++# STRING may not start with a hyphen.
++func_len ()
++{
++ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
++}
++
++_LT_EOF
++esac
++
++case $lt_shell_append in
++ yes)
++ cat << \_LT_EOF >> "$cfgfile"
++
++# func_append var value
++# Append VALUE to the end of shell variable VAR.
++func_append ()
++{
++ eval "$[1]+=\$[2]"
++}
++_LT_EOF
++ ;;
++ *)
++ cat << \_LT_EOF >> "$cfgfile"
++
++# func_append var value
++# Append VALUE to the end of shell variable VAR.
++func_append ()
++{
++ eval "$[1]=\$$[1]\$[2]"
++}
++
++_LT_EOF
++ ;;
++ esac
+ ])
diff --git a/packages/libiconv/libiconv-1.12/preload.patch b/packages/libiconv/libiconv-1.12/preload.patch
new file mode 100644
index 0000000000..3b81814951
--- /dev/null
+++ b/packages/libiconv/libiconv-1.12/preload.patch
@@ -0,0 +1,379 @@
+Index: libiconv-1.12/Makefile.in
+===================================================================
+--- libiconv-1.12.orig/Makefile.in 2007-03-20 02:50:46.000000000 +0100
++++ libiconv-1.12/Makefile.in 2008-06-07 00:29:42.753386009 +0200
+@@ -31,6 +31,7 @@
+
+ all : lib/localcharset.h force
+ cd lib && $(MAKE) all
++ cd preload && $(MAKE) all
+ cd srclib && $(MAKE) all
+ cd src && $(MAKE) all
+ cd po && $(MAKE) all
+@@ -50,6 +51,7 @@
+ install : lib/localcharset.h force
+ cd libcharset && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
++ cd preload && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd srclib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd src && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
+@@ -60,6 +62,7 @@
+ installdirs : force
+ cd libcharset && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd lib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
++ cd preload && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd srclib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd src && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
+@@ -69,6 +72,7 @@
+ uninstall : force
+ cd libcharset && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd lib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
++ cd preload && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd srclib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ cd src && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+ $(RM) $(DESTDIR)$(includedir)/iconv.h
+@@ -78,6 +82,7 @@
+ check : all force
+ cd libcharset && $(MAKE) check
+ cd lib && $(MAKE) check
++ cd preload && $(MAKE) check
+ cd srclib && $(MAKE) check
+ cd src && $(MAKE) check
+ cd po && $(MAKE) check
+@@ -88,6 +93,7 @@
+ cd libcharset && $(MAKE) mostlyclean
+ $(RM) lib/charset.alias lib/libcharset.* lib/localcharset.h
+ cd lib && $(MAKE) mostlyclean
++ cd preload && $(MAKE) mostlyclean
+ cd srclib && $(MAKE) mostlyclean
+ cd src && $(MAKE) mostlyclean
+ cd po && $(MAKE) mostlyclean
+@@ -99,6 +105,7 @@
+ cd libcharset && $(MAKE) clean
+ $(RM) lib/charset.alias lib/libcharset.* lib/localcharset.h
+ cd lib && $(MAKE) clean
++ cd preload && $(MAKE) clean
+ cd srclib && $(MAKE) clean
+ cd src && $(MAKE) clean
+ cd po && $(MAKE) clean
+@@ -110,6 +117,7 @@
+ cd libcharset && if test -f Makefile; then $(MAKE) distclean; fi
+ $(RM) lib/charset.alias lib/libcharset.* lib/localcharset.h
+ cd lib && if test -f Makefile; then $(MAKE) distclean; fi
++ cd preload && if test -f Makefile; then $(MAKE) distclean; fi
+ cd srclib && if test -f Makefile; then $(MAKE) distclean; fi
+ cd src && if test -f Makefile; then $(MAKE) distclean; fi
+ cd po && if test -f Makefile; then $(MAKE) distclean; fi
+@@ -124,6 +132,7 @@
+ cd libcharset && if test -f Makefile; then $(MAKE) maintainer-clean; fi
+ $(RM) lib/charset.alias lib/libcharset.* lib/localcharset.h
+ cd lib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
++ cd preload && if test -f Makefile; then $(MAKE) maintainer-clean; fi
+ cd srclib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
+ cd src && if test -f Makefile; then $(MAKE) maintainer-clean; fi
+ cd po && if test -f Makefile; then $(MAKE) maintainer-clean; fi
+Index: libiconv-1.12/lib/Makefile.in
+===================================================================
+--- libiconv-1.12.orig/lib/Makefile.in 2007-05-28 00:15:31.000000000 +0200
++++ libiconv-1.12/lib/Makefile.in 2008-06-07 00:29:42.753386009 +0200
+@@ -64,41 +64,11 @@
+ OBJECTS_RES_yes = libiconv.res
+ OBJECTS_RES_no =
+
+-all : @PLUGLIB@ libiconv.la
++all : libiconv.la
+
+ libiconv.la : $(OBJECTS)
+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la -rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined $(OBJECTS)
+
+-preloadable_libiconv.so : preloadable_libiconv_@OS@.so
+- $(RM) preloadable_libiconv.so
+- $(LN_S) preloadable_libiconv_@OS@.so preloadable_libiconv.so
+-
+-preloadable_libiconv_linux.so : $(SOURCES)
+- if test -n "@GCC@"; then \
+- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
+- else \
+- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
+- fi
+-
+-preloadable_libiconv_solaris.so : $(SOURCES)
+- if test -n "@GCC@"; then \
+- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_solaris.so; \
+- else \
+- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -G -o preloadable_libiconv_solaris.so; \
+- fi
+-
+-preloadable_libiconv_osf.so : $(SOURCES)
+- if test -n "@GCC@"; then \
+- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_osf.so; \
+- else \
+- mkdir objects; \
+- for f in $(SOURCES); do \
+- $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -DPIC -DLIBICONV_PLUG -c $$f -o objects/`basename $$f | sed -e 's,\.c$$,.o,'`; \
+- done; \
+- /bin/ld -shared -expect_unresolved \* -o preloadable_libiconv_osf.so objects/*.o; \
+- rm -rf objects; \
+- fi
+-
+ iconv.lo : $(srcdir)/iconv.c $(srcdir)/converters.h $(srcdir)/encodings.def $(srcdir)/encodings_aix.def $(srcdir)/encodings_osf1.def $(srcdir)/encodings_dos.def $(srcdir)/encodings_local.def $(srcdir)/aliases.h $(srcdir)/aliases_aix.h $(srcdir)/aliases_osf1.h $(srcdir)/aliases_dos.h $(srcdir)/flags.h
+ $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/iconv.c
+
+@@ -134,21 +104,19 @@
+ rm -f $$objects && \
+ mv -f libiconv.new.a libiconv.a) ;; \
+ esac
+- if test -n "@PLUGLIB@"; then $(INSTALL_DATA) @PLUGLIB@ $(DESTDIR)$(libdir)/@PLUGLIB@.new && mv $(DESTDIR)$(libdir)/@PLUGLIB@.new $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
+
+ installdirs : force
+ if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
+
+ uninstall : force
+ $(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libiconv.la
+- if test -n "@PLUGLIB@"; then $(RM) $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
+
+ check : all
+
+ mostlyclean : clean
+
+ clean : force
+- $(RM) *.o *.lo libiconv.res *.a *.la preloadable_libiconv* core *.stackdump so_locations
++ $(RM) *.o *.lo libiconv.res *.a *.la core *.stackdump so_locations
+ $(RM) -r .libs _libs
+
+ distclean : clean
+Index: libiconv-1.12/preload/configure.ac
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libiconv-1.12/preload/configure.ac 2008-06-07 00:29:42.753386009 +0200
+@@ -0,0 +1,78 @@
++dnl Copyright (C) 1999-2008 Free Software Foundation, Inc.
++dnl This file is part of the GNU LIBICONV Library.
++dnl
++dnl The GNU LIBICONV Library is free software; you can redistribute it and/or
++dnl modify it under the terms of the GNU Library General Public License as
++dnl published by the Free Software Foundation; either version 2 of the
++dnl License, or (at your option) any later version.
++dnl
++dnl The GNU LIBICONV Library is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++dnl Library General Public License for more details.
++dnl
++dnl You should have received a copy of the GNU Library General Public License
++dnl along with the GNU LIBICONV Library; see the file COPYING.LIB. If not,
++dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
++dnl Fifth Floor, Boston, MA 02110-1301, USA.
++
++AC_PREREQ([2.60])
++
++PACKAGE=libiconv
++VERSION=0
++
++AC_INIT(configure.ac)
++AC_CONFIG_AUX_DIR(../build-aux)
++AC_PROG_MAKE_SET
++AC_SUBST(PACKAGE)
++AC_SUBST(VERSION)
++
++dnl checks for basic programs
++
++AC_PROG_CC
++AC_PROG_CPP
++AC_PROG_INSTALL
++
++dnl check for host type
++
++AC_CANONICAL_HOST
++
++dnl checks for installer options
++
++gl_RELOCATABLE_LIBRARY
++
++dnl checks for programs
++
++AC_PROG_LN_S
++
++dnl checks for UNIX variants that set DEFS
++
++AC_USE_SYSTEM_EXTENSIONS
++
++dnl checks for compiler output filename suffixes
++
++AC_OBJEXT
++AC_EXEEXT
++
++dnl check for build configuration
++
++dnl Here we need to build shared object files, regardless whether the user
++dnl wants to the libiconv library itself to be installed shared or static or
++dnl both.
++enable_shared=yes
++enable_static=no
++LT_INIT([win32-dll])
++gl_VISIBILITY
++
++dnl check whether OS supports plug libraries
++
++case "$host_os" in
++ linux* | solaris* | osf*)
++ PLUGLIB="preloadable_libiconv.so" ;;
++ *)
++ PLUGLIB=""
++esac
++AC_SUBST(PLUGLIB)
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
+Index: libiconv-1.12/preload/Makefile.devel
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libiconv-1.12/preload/Makefile.devel 2008-06-07 00:29:42.753386009 +0200
+@@ -0,0 +1,21 @@
++# This is the developer's makefile, not the user's makefile.
++# Don't use it unless you know exactly what you do!
++
++SHELL = /bin/sh
++MAKE = make
++AUTOCONF = autoconf-2.62
++ACLOCAL = aclocal-1.10
++CP = cp
++RM = rm -f
++
++all : configures
++
++aclocal.m4 : $(wildcard ../m4/*.m4)
++ $(ACLOCAL) -I ../m4 -I ../srcm4 --output=$@
++
++configures : configure
++
++configure : configure.ac aclocal.m4
++ $(AUTOCONF)
++
++force :
+Index: libiconv-1.12/preload/Makefile.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libiconv-1.12/preload/Makefile.in 2008-06-07 00:29:42.756717414 +0200
+@@ -0,0 +1,83 @@
++# Makefile for libiconv/preload
++
++#### Start of system configuration section. ####
++
++# Directories used by "make":
++srcdir = @srcdir@
++
++# Directories used by "make install":
++prefix = @prefix@
++local_prefix = /usr/local
++exec_prefix = @exec_prefix@
++libdir = @libdir@
++
++# Programs used by "make":
++CC = @CC@
++CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@
++CPPFLAGS = @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
++INCLUDES = -I../lib -I$(srcdir)/../lib -I../include -I$(srcdir)/../include -I.. -I$(srcdir)/..
++# -DBUILDING_LIBICONV: Change expansion of LIBICONV_DLL_EXPORTED macro.
++# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
++DEFS = -DLIBDIR=\"$(libdir)\" -DBUILDING_LIBICONV -DBUILDING_DLL \
++-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
++-Dset_relocation_prefix=libiconv_set_relocation_prefix \
++-Drelocate=libiconv_relocate @DEFS@
++LIBTOOL = @LIBTOOL@
++LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
++LIBTOOL_LINK = $(LIBTOOL) --mode=link
++LN_S = @LN_S@
++RM = rm -f
++
++# Programs used by "make install":
++INSTALL = @INSTALL@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_DATA = @INSTALL_DATA@
++mkinstalldirs = $(SHELL) @top_srcdir@/build-aux/mkinstalldirs
++
++#### End of system configuration section. ####
++
++SHELL = /bin/sh
++
++# Needed by $(LIBTOOL).
++top_builddir = .
++
++SOURCES = $(srcdir)/../lib/iconv.c $(srcdir)/../libcharset/lib/localcharset.c $(srcdir)/../lib/relocatable.c
++
++all : @PLUGLIB@
++
++preloadable_libiconv.so : $(SOURCES)
++ $(RM) -r objects
++ mkdir objects && \
++ for f in $(SOURCES); do \
++ $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -DLIBICONV_PLUG -c $$f -o objects/`basename $$f | sed -e 's,\.c$$,.o,'` || exit 1; \
++ done && \
++ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la -rpath $(libdir) -no-undefined objects/*.lo && \
++ $(RM) -r objects
++ cp .libs/libiconv.so preloadable_libiconv.so
++
++install : all force
++ if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
++ if test -n "@PLUGLIB@"; then $(INSTALL_DATA) @PLUGLIB@ $(DESTDIR)$(libdir)/@PLUGLIB@.new && mv $(DESTDIR)$(libdir)/@PLUGLIB@.new $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
++
++installdirs : force
++ if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
++
++uninstall : force
++ if test -n "@PLUGLIB@"; then $(RM) $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
++
++check : all
++
++mostlyclean : clean
++
++clean : force
++ $(RM) *.o *.lo *.a *.la preloadable_libiconv* core *.stackdump so_locations
++ $(RM) -r .libs _libs objects
++
++distclean : clean
++ $(RM) config.status config.log config.cache Makefile libtool
++
++maintainer-clean : distclean
++
++force :
++
+Index: libiconv-1.12/configure.ac
+===================================================================
+--- libiconv-1.12.orig/configure.ac 2008-06-07 00:35:12.706686714 +0200
++++ libiconv-1.12/configure.ac 2008-06-07 00:36:05.351174592 +0200
+@@ -121,23 +121,6 @@
+ m4_popdef([AC_LIBOBJ])
+ AC_SUBST([SRCLIBOBJS])
+
+-dnl check whether OS supports plug libraries
+-
+-OS=""
+-case "$host_os" in
+- linux*) OS="linux" ;;
+- solaris*) OS="solaris" ;;
+- osf*) OS="osf" ;;
+-esac
+-if test -n "$OS"; then
+- AC_SUBST(OS)
+- AC_SUBST(GCC)
+- PLUGLIB="preloadable_libiconv.so"
+-else
+- PLUGLIB=""
+-fi
+-AC_SUBST(PLUGLIB)
+-
+ dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+ dnl 1. when we install a shared library, we must arrange to export
+ dnl auxiliary pointer variables for every exported variable,
+@@ -185,6 +168,7 @@
+ ])
+
+ AC_CONFIG_SUBDIRS(libcharset)
++AC_CONFIG_SUBDIRS(preload)
+ AC_CONFIG_FILES([Makefile])
+ AC_CONFIG_FILES([lib/Makefile])
+ AC_CONFIG_FILES([srclib/Makefile])
diff --git a/packages/libiconv/libiconv_1.12.bb b/packages/libiconv/libiconv_1.12.bb
new file mode 100644
index 0000000000..b79ee78d7a
--- /dev/null
+++ b/packages/libiconv/libiconv_1.12.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "GNU libiconv - libiconv is for you if your application needs to support \
+multiple character encodings, but that support lacks from your system."
+HOMEPAGE = "http://www.gnu.org/software/libiconv"
+SECTION = "libs"
+PRIORITY = "optional"
+NOTES = "Needs to be stripped down to: ascii iso8859-1 eucjp iso-2022jp gb utf8"
+PROVIDES = "virtual/libiconv"
+PR = "r0"
+LICENSE = "LGPL"
+
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-${PV}.tar.gz \
+ file://autotools.patch;patch=1 \
+ file://preload.patch;patch=1"
+
+S = "${WORKDIR}/libiconv-${PV}"
+
+inherit autotools
+
+EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable --disable-rpath"
+
+do_configure_append () {
+ # Fix stupid libtool... handling. rpath handling can't be disabled and the Makefile's can't be regenerated..
+ # (GNU sed required)
+ sed -i s/^hardcode_libdir_flag_spec/#hardcode_libdir_flag_spec/ ${S}/*-libtool
+}
+
+do_stage () {
+ oe_libinstall -so -a -C lib libiconv ${STAGING_LIBDIR}
+ oe_libinstall -so -C lib libiconv_plug_linux ${STAGING_LIBDIR}
+ oe_libinstall -so -a -C libcharset/lib libcharset ${STAGING_LIBDIR}
+ autotools_stage_includes
+}
diff --git a/packages/libmatthew/files/.mtn2git_empty b/packages/libmatthew/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libmatthew/files/.mtn2git_empty
diff --git a/packages/libmatthew/files/Makefile-0.7.patch b/packages/libmatthew/files/Makefile-0.7.patch
new file mode 100644
index 0000000000..4a91cd52cf
--- /dev/null
+++ b/packages/libmatthew/files/Makefile-0.7.patch
@@ -0,0 +1,15 @@
+Index: libmatthew-java-0.7/Makefile
+===================================================================
+--- libmatthew-java-0.7.orig/Makefile 2008-05-27 13:17:47.000000000 +0800
++++ libmatthew-java-0.7/Makefile 2008-05-27 13:18:04.000000000 +0800
+@@ -8,8 +8,8 @@
+ PPFLAGS+=-C -P
+ CFLAGS+=-fpic -Wall -Os -pedantic -std=c99 -Werror
+ GCJFLAGS+=-fjni
+-JCFLAGS+=-source 5.0
+-INCLUDES+=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
++#JCFLAGS+=-source 5.0
++#INCLUDES+=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
+ JAVADOCFLAGS?=-quiet -author -link http://java.sun.com/j2se/1.4.2/docs/api/
+
+ LDVER?=$(shell ld -v | cut -d' ' -f1)
diff --git a/packages/libmatthew/libmatthew_0.7.bb b/packages/libmatthew/libmatthew_0.7.bb
new file mode 100644
index 0000000000..68be750f8e
--- /dev/null
+++ b/packages/libmatthew/libmatthew_0.7.bb
@@ -0,0 +1,50 @@
+DESCRIPTION = "Unix socket, debug and hexdump libraries"
+AUTHOR = "Matthew Johnson <web@matthew.ath.cx>"
+HOMEPAGE = "http://www.matthew.ath.cx/projects/java"
+SECTION = "libs"
+LICENSE = "LGPL"
+DEPENDS = "classpath-native classpath fastjar-native virtual/javac-native"
+RDEPENDS_${JPN} = "${PN}-jni"
+PR = "r0"
+
+SRC_URI = "http://www.matthew.ath.cx/projects/java/libmatthew-java-${PV}.tar.gz \
+ file://Makefile-0.7.patch;patch=1"
+
+S = "${WORKDIR}/libmatthew-java-${PV}"
+
+inherit java-library
+
+do_compile() {
+ oe_runmake \
+ JCFLAGS="-source 1.5" \
+ JAVAC="javac" \
+ JAR="fastjar" \
+ JAVAH="gjavah" \
+ INCLUDES="-I${STAGING_INCDIR}/classpath" \
+ LDFLAGS="-fpic -shared -lc ${LDFLAGS}" \
+ LD="${CC}" \
+ CFLAGS="-fpic -Wall -Os -pedantic -std=c99 -Werror"
+}
+do_install() {
+ oe_jarinstall cgi-0.5.jar cgi.jar
+ oe_jarinstall debug-disable-1.1.jar debug-disable.jar
+ oe_jarinstall debug-enable-1.1.jar debug-enable.jar
+ oe_jarinstall hexdump-0.2.jar hexdump.jar
+ oe_jarinstall io-0.1.jar io.jar
+ oe_jarinstall unix-0.4.jar unix.jar
+ oe_libinstall -so libcgi-java ${D}${libdir_jni}
+ oe_libinstall -so libunix-java ${D}${libdir_jni}
+}
+do_stage() {
+ oe_jarinstall -s cgi-0.5.jar cgi.jar
+ oe_jarinstall -s debug-disable-1.1.jar debug-disable.jar
+ oe_jarinstall -s debug-enable-1.1.jar debug-enable.jar
+ oe_jarinstall -s hexdump-0.2.jar hexdump.jar
+ oe_jarinstall -s io-0.1.jar io.jar
+ oe_jarinstall -s unix-0.4.jar unix.jar
+}
+
+PACKAGES += "${PN}-jni ${PN}-jni-dbg"
+
+FILES_${PN}-jni = "${libdir_jni}/lib*.so"
+FILES_${PN}-jni-dbg = "${libdir_jni}/.debug/lib*.so"
diff --git a/packages/libmikmod/libmikmod/m4.patch b/packages/libmikmod/libmikmod/m4.patch
index 854fc22b90..ac7f2d7d04 100644
--- a/packages/libmikmod/libmikmod/m4.patch
+++ b/packages/libmikmod/libmikmod/m4.patch
@@ -1,19 +1,3 @@
---- libmikmod-3.2.0-beta2/libmikmod.m4.orig 2004-01-21 02:36:34 +0100
-+++ libmikmod-3.2.0-beta2/libmikmod.m4 2004-08-12 11:28:30 +0200
-@@ -8,7 +8,7 @@
- dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and
- dnl LIBMIKMOD_LDADD
- dnl
--AC_DEFUN(AM_PATH_LIBMIKMOD,
-+AC_DEFUN([AM_PATH_LIBMIKMOD],
- [dnl
- dnl Get the cflags and libraries from the libmikmod-config script
- dnl
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
--- /dev/null
+++ libmikmod-3.2.0-beta2/m4/esd.m4
@@ -0,0 +1,194 @@
diff --git a/packages/libmikmod/libmikmod_3.1.11.bb b/packages/libmikmod/libmikmod_3.1.12.bb
index 6c8dc8e064..f1ed9d672c 100644
--- a/packages/libmikmod/libmikmod_3.1.11.bb
+++ b/packages/libmikmod/libmikmod_3.1.12.bb
@@ -2,15 +2,26 @@ DESCRIPTION = "libmikmod is a module player library supporting many formats, inc
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "LGPL"
-SRC_URI = "http://mikmod.raphnet.net/files/libmikmod-${PV}.tar.gz \
- file://m4.patch;patch=1 \
- file://autofoo.patch;patch=1"
+PR = "r1"
-inherit autotools
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/mikmod/libmikmod-${PV}.tar.gz \
+ file://m4.patch;patch=1 \
+ file://autofoo.patch;patch=1 \
+"
-EXTRA_OECONF = "--disable-af --disable-alsa --disable-esd \
---enable-oss --disable-sam9407 --disable-ultra \
---disable-esdtest --enable-threads"
+inherit autotools binconfig
+
+EXTRA_OECONF = "\
+ --disable-af \
+ --enable-alsa \
+ --disable-esd \
+ --enable-oss \
+ --disable-sam9407 \
+ --disable-ultra \
+ --disable-esdtest \
+ --enable-threads \
+"
do_stage() {
oe_libinstall -a -so -C libmikmod libmikmod ${STAGING_LIBDIR}
diff --git a/packages/libmikmod/libmikmod_3.2.0-beta2.bb b/packages/libmikmod/libmikmod_3.2.0-beta2.bb
index d866710f66..07e3af9a40 100644
--- a/packages/libmikmod/libmikmod_3.2.0-beta2.bb
+++ b/packages/libmikmod/libmikmod_3.2.0-beta2.bb
@@ -2,20 +2,27 @@ DESCRIPTION = "libmikmod is a module player library supporting many formats, inc
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "LGPL"
-SRC_URI = "http://mikmod.raphnet.net/files/libmikmod-${PV}.tar.gz \
-file://m4.patch;patch=1 \
-file://autofoo.patch;patch=1"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "\
+ http://mikmod.raphnet.net/files/libmikmod-${PV}.tar.gz \
+ file://m4.patch;patch=1 \
+ file://autofoo.patch;patch=1 \
+"
inherit autotools binconfig
-EXTRA_OECONF = "--disable-af \
- --disable-alsa \
- --disable-esd \
- --enable-oss \
- --disable-sam9407 \
- --disable-ultra \
- --disable-esdtest \
- --enable-threads"
+EXTRA_OECONF = "\
+ --disable-af \
+ --enable-alsa \
+ --disable-esd \
+ --enable-oss \
+ --disable-sam9407 \
+ --disable-ultra \
+ --disable-esdtest \
+ --enable-threads \
+"
do_stage() {
oe_libinstall -a -so -C libmikmod libmikmod ${STAGING_LIBDIR}
diff --git a/packages/libmodplug/libmodplug_0.7.bb b/packages/libmodplug/libmodplug_0.8.bb
index 369120e685..ead04a7cdb 100644
--- a/packages/libmodplug/libmodplug_0.7.bb
+++ b/packages/libmodplug/libmodplug_0.8.bb
@@ -7,6 +7,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/modplug-xmms/libmodplug-${PV}.tar.gz"
inherit autotools pkgconfig
+# NOTE: autotools_stage_all does nothing here, we need to do it manually
do_stage() {
install -m 0644 ${S}/src/modplug.h ${STAGING_INCDIR}
oe_libinstall -C src -so libmodplug ${STAGING_LIBDIR}
diff --git a/packages/libnids/libnids_1.18.bb b/packages/libnids/libnids_1.18.bb
index 8323a7ec7d..cf887457a2 100644
--- a/packages/libnids/libnids_1.18.bb
+++ b/packages/libnids/libnids_1.18.bb
@@ -1,17 +1,21 @@
-LICENSE = "GPL"
-SECTION = "libs"
-DEPENDS = "libnet libpcap"
DESCRIPTION = "Libnids performs assembly of TCP segments \
into TCP streams, IP defragmentation, and TCP port \
scan detection."
+LICENSE = "GPL"
+SECTION = "libs"
+DEPENDS = "libnet-1.0 libpcap"
+PR = "r1"
-SRC_URI = "${SOURCEFORGE_MIRROR}/libnids/libnids-${PV}.tar.gz \
- file://configure.patch;patch=1"
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/libnids/libnids-${PV}.tar.gz \
+ file://configure.patch;patch=1"
inherit autotools
-EXTRA_OECONF = "--with-libpcap=${STAGING_LIBDIR}/.. \
- --with-libnet=${STAGING_LIBDIR}/.."
+EXTRA_OECONF = "\
+ --with-libpcap=${STAGING_LIBDIR}/.. \
+ --with-libnet=${STAGING_LIBDIR}/.. \
+"
EXTRA_OEMAKE = "'install_prefix=${D}'"
do_stage () {
diff --git a/packages/liboil/liboil_0.3.14.bb b/packages/liboil/liboil_0.3.14.bb
new file mode 100644
index 0000000000..ebbe6cfb97
--- /dev/null
+++ b/packages/liboil/liboil_0.3.14.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Liboil is a library of simple functions that are optimized for various CPUs."
+HOMEPAGE = "http://liboil.freedesktop.org/"
+LICENSE = "various"
+
+# The configure script seems to have bogus checks, so let's not make it the default
+DEFAULT_PREFERENCE = "-1"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "http://liboil.freedesktop.org/download/${P}.tar.gz \
+ "
+
+inherit autotools pkgconfig
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/packages/libopie/libopie2/ipaq_rotate_fix.patch b/packages/libopie/libopie2/ipaq_rotate_fix.patch
new file mode 100644
index 0000000000..9dfdb4fbf7
--- /dev/null
+++ b/packages/libopie/libopie2/ipaq_rotate_fix.patch
@@ -0,0 +1,23 @@
+--- libopie2/opiecore/device/odevice_ipaq.cpp 2008-05-26 16:33:01.000000000 +0100
++++ libopie2/opiecore/device/odevice_ipaq.cpp 2008-05-26 16:33:40.000000000 +0100
+@@ -331,16 +331,10 @@
+ case Key_Down : {
+ int quarters;
+ switch (d->m_rotation) {
+- case Rot0: quarters = 3/*270deg*/; break;
+- case Rot90: quarters = 2/*270deg*/; break;
+- case Rot180: quarters = 1/*270deg*/; break;
+- case Rot270: quarters = 0/*270deg*/; break;
+- }
+- if( d->m_model == Model_iPAQ_H22xx ) {
+- // FIXME: there's something screwed with the keycodes being sent on h2200. I have
+- // added a temporary workaround for this here, but the bug should be fixed properly
+- // later in the right place. - Paul Eggleton 25/07/2007
+- quarters = 0;
++ case Rot0: quarters = 0/*0deg*/; break;
++ case Rot90: quarters = 1/*90deg*/; break;
++ case Rot180: quarters = 2/*180deg*/; break;
++ case Rot270: quarters = 3/*270deg*/; break;
+ }
+ newkeycode = Key_Left + ( keycode - Key_Left + quarters ) % 4;
+ break;
diff --git a/packages/libopie/libopie2/remove_h2200_rotate_fix.patch b/packages/libopie/libopie2/remove_h2200_rotate_fix.patch
deleted file mode 100644
index cef436f2f7..0000000000
--- a/packages/libopie/libopie2/remove_h2200_rotate_fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- libopie2/opiecore/device/odevice_ipaq.cpp 25 Jul 2007 10:49:20 -0000 1.32
-+++ libopie2/opiecore/device/odevice_ipaq.cpp 17 Mar 2007 22:08:43 -0000 1.30
-@@ -330,12 +330,6 @@
- case Rot180: quarters = 1/*270deg*/; break;
- case Rot270: quarters = 0/*270deg*/; break;
- }
-- if( d->m_model == Model_iPAQ_H22xx ) {
-- // FIXME: there's something screwed with the keycodes being sent on h2200. I have
-- // added a temporary workaround for this here, but the bug should be fixed properly
-- // later in the right place. - Paul Eggleton 25/07/2007
-- quarters = 0;
-- }
- newkeycode = Key_Left + ( keycode - Key_Left + quarters ) % 4;
- break;
- }
diff --git a/packages/libopie/libopie2_1.2.3.bb b/packages/libopie/libopie2_1.2.3.bb
index dc378d0646..288b689d52 100644
--- a/packages/libopie/libopie2_1.2.3.bb
+++ b/packages/libopie/libopie2_1.2.3.bb
@@ -1,11 +1,11 @@
require ${PN}.inc
-PR = "r3"
+PR = "r4"
SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/libopie2 \
file://include.pro \
file://gcc-syntax-fix.patch;patch=1 \
file://h4000_and_default_rot.patch;patch=1 \
- file://remove_h2200_rotate_fix.patch;patch=1"
+ file://ipaq_rotate_fix.patch;patch=1"
SRC_URI_append_poodle = " file://poodle-2.6-hotkeys.patch;patch=1"
diff --git a/packages/libosip2/libosip2_3.1.0.bb b/packages/libosip2/libosip2_3.1.0.bb
new file mode 100644
index 0000000000..0c6e23ce17
--- /dev/null
+++ b/packages/libosip2/libosip2_3.1.0.bb
@@ -0,0 +1,12 @@
+SECTION = "libs"
+DESCRIPTION = "Session Initiation Protocol (SIP) library"
+LEAD_SONAME = "libosip2\..*"
+PR = "r0"
+LICENSE = "LGPL"
+SRC_URI = "${GNU_MIRROR}/osip/libosip2-${PV}.tar.gz"
+
+inherit autotools pkgconfig
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/packages/libpcap/libpcap-0.9.8/aclocal.patch b/packages/libpcap/libpcap-0.9.8/aclocal.patch
new file mode 100644
index 0000000000..29cd275d58
--- /dev/null
+++ b/packages/libpcap/libpcap-0.9.8/aclocal.patch
@@ -0,0 +1,156 @@
+diff -Naru libpcap-0.9.7.orig/aclocal.m4 libpcap-0.9.7/acinclude.m4
+--- libpcap-0.9.7.orig/aclocal.m4 2007-09-16 01:19:51.000000000 +0200
++++ libpcap-0.9.7/aclocal.m4 2007-09-16 02:45:52.000000000 +0200
+@@ -42,7 +42,7 @@
+ dnl ac_cv_lbl_gcc_vers
+ dnl LBL_CFLAGS
+ dnl
+-AC_DEFUN(AC_LBL_C_INIT,
++AC_DEFUN([AC_LBL_C_INIT],
+ [AC_PREREQ(2.12)
+ AC_BEFORE([$0], [AC_PROG_CC])
+ AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
+@@ -169,7 +169,7 @@
+ # Make sure we use the V_CCOPT flags, because some of those might
+ # disable inlining.
+ #
+-AC_DEFUN(AC_LBL_C_INLINE,
++AC_DEFUN([AC_LBL_C_INLINE],
+ [AC_MSG_CHECKING(for inline)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$V_CCOPT"
+@@ -225,7 +225,7 @@
+ dnl LIBS
+ dnl LBL_LIBS
+ dnl
+-AC_DEFUN(AC_LBL_LIBPCAP,
++AC_DEFUN([AC_LBL_LIBPCAP],
+ [AC_REQUIRE([AC_LBL_LIBRARY_NET])
+ dnl
+ dnl save a copy before locating libpcap.a
+@@ -293,7 +293,7 @@
+ dnl RETSIGTYPE (defined)
+ dnl RETSIGVAL (defined)
+ dnl
+-AC_DEFUN(AC_LBL_TYPE_SIGNAL,
++AC_DEFUN([AC_LBL_TYPE_SIGNAL],
+ [AC_BEFORE([$0], [AC_LBL_LIBPCAP])
+ AC_TYPE_SIGNAL
+ if test "$ac_cv_type_signal" = void ; then
+@@ -323,7 +323,7 @@
+ dnl
+ dnl AC_LBL_FIXINCLUDES
+ dnl
+-AC_DEFUN(AC_LBL_FIXINCLUDES,
++AC_DEFUN([AC_LBL_FIXINCLUDES],
+ [if test "$GCC" = yes ; then
+ AC_MSG_CHECKING(for ANSI ioctl definitions)
+ AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes,
+@@ -369,7 +369,7 @@
+ dnl $2 (yacc appended)
+ dnl $3 (optional flex and bison -P prefix)
+ dnl
+-AC_DEFUN(AC_LBL_LEX_AND_YACC,
++AC_DEFUN([AC_LBL_LEX_AND_YACC],
+ [AC_ARG_WITH(flex, [ --without-flex don't use flex])
+ AC_ARG_WITH(bison, [ --without-bison don't use bison])
+ if test "$with_flex" = no ; then
+@@ -422,7 +422,7 @@
+ dnl
+ dnl DECLWAITSTATUS (defined)
+ dnl
+-AC_DEFUN(AC_LBL_UNION_WAIT,
++AC_DEFUN([AC_LBL_UNION_WAIT],
+ [AC_MSG_CHECKING(if union wait is used)
+ AC_CACHE_VAL(ac_cv_lbl_union_wait,
+ AC_TRY_COMPILE([
+@@ -451,7 +451,7 @@
+ dnl
+ dnl HAVE_SOCKADDR_SA_LEN (defined)
+ dnl
+-AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN,
++AC_DEFUN([AC_LBL_SOCKADDR_SA_LEN],
+ [AC_MSG_CHECKING(if sockaddr struct has sa_len member)
+ AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len,
+ AC_TRY_COMPILE([
+@@ -476,7 +476,7 @@
+ dnl
+ dnl HAVE_SOCKADDR_STORAGE (defined)
+ dnl
+-AC_DEFUN(AC_LBL_SOCKADDR_STORAGE,
++AC_DEFUN([AC_LBL_SOCKADDR_STORAGE],
+ [AC_MSG_CHECKING(if sockaddr_storage struct exists)
+ AC_CACHE_VAL(ac_cv_lbl_has_sockaddr_storage,
+ AC_TRY_COMPILE([
+@@ -509,7 +509,7 @@
+ dnl won't be using code that would use that member, or we wouldn't
+ dnl compile in any case).
+ dnl
+-AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1,
++AC_DEFUN([AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1],
+ [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member)
+ AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
+ AC_TRY_COMPILE([
+@@ -535,7 +535,7 @@
+ dnl
+ dnl ac_cv_lbl_have_run_path (yes or no)
+ dnl
+-AC_DEFUN(AC_LBL_HAVE_RUN_PATH,
++AC_DEFUN([AC_LBL_HAVE_RUN_PATH],
+ [AC_MSG_CHECKING(for ${CC-cc} -R)
+ AC_CACHE_VAL(ac_cv_lbl_have_run_path,
+ [echo 'main(){}' > conftest.c
+@@ -561,7 +561,7 @@
+ dnl int32_t (defined)
+ dnl u_int32_t (defined)
+ dnl
+-AC_DEFUN(AC_LBL_CHECK_TYPE,
++AC_DEFUN([AC_LBL_CHECK_TYPE],
+ [AC_MSG_CHECKING(for $1 using $CC)
+ AC_CACHE_VAL(ac_cv_lbl_have_$1,
+ AC_TRY_COMPILE([
+@@ -590,7 +590,7 @@
+ dnl
+ dnl LBL_ALIGN (DEFINED)
+ dnl
+-AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
++AC_DEFUN([AC_LBL_UNALIGNED_ACCESS],
+ [AC_MSG_CHECKING(if unaligned accesses fail)
+ AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
+ [case "$host_cpu" in
+@@ -695,7 +695,7 @@
+ dnl HAVE_OS_PROTO_H (defined)
+ dnl os-proto.h (symlinked)
+ dnl
+-AC_DEFUN(AC_LBL_DEVEL,
++AC_DEFUN([AC_LBL_DEVEL],
+ [rm -f os-proto.h
+ if test "${LBL_CFLAGS+set}" = set; then
+ $1="$$1 ${LBL_CFLAGS}"
+@@ -825,7 +825,7 @@
+ dnl statically and happen to have a libresolv.a lying around (and no
+ dnl libnsl.a).
+ dnl
+-AC_DEFUN(AC_LBL_LIBRARY_NET, [
++AC_DEFUN([AC_LBL_LIBRARY_NET], [
+ # Most operating systems have gethostbyname() in the default searched
+ # libraries (i.e. libc):
+ # Some OSes (eg. Solaris) place it in libnsl
+@@ -848,7 +848,7 @@
+ dnl Test for __attribute__
+ dnl
+
+-AC_DEFUN(AC_C___ATTRIBUTE__, [
++AC_DEFUN([AC_C___ATTRIBUTE__], [
+ AC_MSG_CHECKING(for __attribute__)
+ AC_CACHE_VAL(ac_cv___attribute__, [
+ AC_COMPILE_IFELSE(
+@@ -886,7 +886,7 @@
+ dnl
+ dnl -Scott Barron
+ dnl
+-AC_DEFUN(AC_LBL_TPACKET_STATS,
++AC_DEFUN([AC_LBL_TPACKET_STATS],
+ [AC_MSG_CHECKING(if if_packet.h has tpacket_stats defined)
+ AC_CACHE_VAL(ac_cv_lbl_tpacket_stats,
+ AC_TRY_COMPILE([
diff --git a/packages/libpcap/libpcap_0.9.8.bb b/packages/libpcap/libpcap_0.9.8.bb
index 865e57ab93..8003d4491f 100644
--- a/packages/libpcap/libpcap_0.9.8.bb
+++ b/packages/libpcap/libpcap_0.9.8.bb
@@ -1,3 +1,5 @@
require libpcap.inc
-PR = "r2"
+PR = "r3"
+
+SRC_URI += "file://aclocal.patch;patch=1"
diff --git a/packages/libpcre/libpcre_7.6.bb b/packages/libpcre/libpcre_7.6.bb
index a065b56cfc..eb5af03db0 100644
--- a/packages/libpcre/libpcre_7.6.bb
+++ b/packages/libpcre/libpcre_7.6.bb
@@ -5,7 +5,7 @@ provides a POSIX calling interface to PCRE; the regular expressions \
themselves still follow Perl syntax and semantics. The header file for \
the POSIX-style functions is called pcreposix.h."
SECTION = "devel"
-PR = "r2"
+PR = "r3"
LICENSE = "BSD"
SRC_URI = "${SOURCEFORGE_MIRROR}/pcre/pcre-${PV}.tar.bz2 \
file://pcre-cross.patch;patch=1"
@@ -25,7 +25,12 @@ EXTRA_OECONF = " --with-link-size=2 --enable-newline-is-lf --with-match-limit=10
do_compile () {
# stop libtool from trying to link with host libraries - fix from #33
# this resolve build problem on amd64 - #1015
- sed -i 's:-L\$:-L${STAGING_LIBDIR} -L\$:' ${S}/${TARGET_SYS}-libtool
+ if [ -e ${S}/${TARGET_SYS}-libtool ] ; then
+ sed -i 's:-L\$:-L${STAGING_LIBDIR} -L\$:' ${S}/${TARGET_SYS}-libtool
+ else
+ ln -sf ${S}/libtool ${S}/${TARGET_SYS}-libtool
+ sed -i 's:-L\$:-L${STAGING_LIBDIR} -L\$:' ${S}/${TARGET_SYS}-libtool
+ fi
# The generation of dftables can lead to timestamp problems with ccache
# because the generated config.h seems newer. It is sufficient to ensure that the
diff --git a/packages/libpng/libpng-1.2.20/.mtn2git_empty b/packages/libpng/libpng-1.2.20/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libpng/libpng-1.2.20/.mtn2git_empty
diff --git a/packages/libpng/libpng-1.2.20/makefile_fix.patch b/packages/libpng/libpng-1.2.20/makefile_fix.patch
new file mode 100644
index 0000000000..3fa8793add
--- /dev/null
+++ b/packages/libpng/libpng-1.2.20/makefile_fix.patch
@@ -0,0 +1,18 @@
+Old versions of libtool (1.5.10) used to set ECHO as a side effect. With
+libtool 2.2.2 we need to do this manually
+
+RP - 14/4/08
+
+Index: libpng-1.2.16/Makefile.am
+===================================================================
+--- libpng-1.2.16.orig/Makefile.am 2008-04-14 14:47:21.000000000 +0100
++++ libpng-1.2.16/Makefile.am 2008-04-14 14:47:47.000000000 +0100
+@@ -102,6 +102,8 @@
+ >$@.new
+ mv $@.new $@
+
++ECHO=echo
++
+ libpng.vers: libpng.sym
+ rm -f $@ $@.new
+ $(ECHO) PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0 '{global:' > $@.new
diff --git a/packages/libpng/libpng_1.2.20.bb b/packages/libpng/libpng_1.2.20.bb
index 3730f3d727..41bd6ec3f7 100644
--- a/packages/libpng/libpng_1.2.20.bb
+++ b/packages/libpng/libpng_1.2.20.bb
@@ -4,9 +4,10 @@ LICENSE = "libpng"
SECTION = "libs"
DEPENDS = "zlib"
PRIORITY = "required"
-PR = "r0"
+PR = "r6"
-SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/libpng-${PV}.tar.bz2"
+SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/libpng-${PV}.tar.bz2 \
+ file://makefile_fix.patch;patch=1"
S = "${WORKDIR}/libpng-${PV}"
inherit autotools binconfig pkgconfig
diff --git a/packages/libqpe/libqpe-opie/citytime-path.patch b/packages/libqpe/libqpe-opie/citytime-path.patch
new file mode 100644
index 0000000000..0abaf146d7
--- /dev/null
+++ b/packages/libqpe/libqpe-opie/citytime-path.patch
@@ -0,0 +1,11 @@
+--- library/tzselect.cpp.orig 2008-01-12 21:05:49.000000000 +1300
++++ library/tzselect.cpp 2008-01-12 21:06:01.000000000 +1300
+@@ -273,7 +273,7 @@
+ void TimeZoneSelector::slotExecute( void )
+ {
+ // execute the world time application...
+- if (QFile::exists(QPEApplication::qpeDir()+"bin/citytime"))
++ if (QFile::exists(OPIE_BINDIR "/citytime"))
+ Global::execute( "citytime" );
+ else
+ QMessageBox::warning(this,tr("citytime executable not found"),
diff --git a/packages/libqpe/libqpe-opie/fix-sd-card-path.patch b/packages/libqpe/libqpe-opie/fix-sd-card-path.patch
new file mode 100644
index 0000000000..32be5d2e7c
--- /dev/null
+++ b/packages/libqpe/libqpe-opie/fix-sd-card-path.patch
@@ -0,0 +1,17 @@
+Index: library/storage.cpp
+===================================================================
+RCS file: /cvs/opie/library/storage.cpp,v
+retrieving revision 1.25
+retrieving revision 1.26
+diff -U3 -r1.25 -r1.26
+--- library/storage.cpp 7 Mar 2005 14:32:58 -0000 1.25
++++ library/storage.cpp 29 Dec 2007 02:14:09 -0000 1.26
+@@ -307,7 +307,7 @@
+ bool hasMmc=false;
+ if( deviceTab("/dev/mmc/part"))
+ hasMmc=true;
+- if( deviceTab("/dev/mmcd"))
++ else if( deviceTab("/dev/mmcblk"))
+ hasMmc=true;
+ return hasMmc;
+ }
diff --git a/packages/libqpe/libqpe-opie_1.2.3.bb b/packages/libqpe/libqpe-opie_1.2.3.bb
index bd2e672fff..a51d6a9225 100644
--- a/packages/libqpe/libqpe-opie_1.2.3.bb
+++ b/packages/libqpe/libqpe-opie_1.2.3.bb
@@ -1,9 +1,12 @@
require ${PN}.inc
+PR = "r2"
TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}"
SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/library \
file://fix-titleheight.patch;patch=1 \
file://unbreak-logging.patch;patch=1 \
+ file://citytime-path.patch;patch=1 \
+ file://fix-sd-card-path.patch;patch=1 \
"
diff --git a/packages/libqpe/libqpe-opie_cvs.bb b/packages/libqpe/libqpe-opie_cvs.bb
index 10ad8d56ea..e6bf737efa 100644
--- a/packages/libqpe/libqpe-opie_cvs.bb
+++ b/packages/libqpe/libqpe-opie_cvs.bb
@@ -1,9 +1,11 @@
require ${PN}.inc
-PV = "1.2.3+cvs${SRCDATE}"
+PV = "${OPIE_CVS_PV}"
+PR = "r2"
SRC_URI = "${HANDHELDS_CVS};module=opie/library \
file://fix-titleheight.patch;patch=1 \
file://unbreak-logging.patch;patch=1 \
+ file://citytime-path.patch;patch=1 \
"
diff --git a/packages/libsdl/files/configure_tweak.patch b/packages/libsdl/files/configure_tweak.patch
new file mode 100644
index 0000000000..90a2888e57
--- /dev/null
+++ b/packages/libsdl/files/configure_tweak.patch
@@ -0,0 +1,1167 @@
+Index: SDL-1.2.11/configure.in
+===================================================================
+--- SDL-1.2.11.orig/configure.in 2006-06-27 05:48:33.000000000 +0100
++++ SDL-1.2.11/configure.in 2008-02-21 19:48:47.000000000 +0000
+@@ -40,13 +40,13 @@
+ AC_SUBST(LT_AGE)
+
+ dnl Detect the canonical build and host environments
+-AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
++AC_CONFIG_AUX_DIR(./build-scripts)
+ AC_CANONICAL_HOST
+ AC_C_BIGENDIAN
+ if test x$ac_cv_c_bigendian = xyes; then
+- AC_DEFINE(SDL_BYTEORDER, 4321)
++ AC_DEFINE(SDL_BYTEORDER, 4321, "Byte Order")
+ else
+- AC_DEFINE(SDL_BYTEORDER, 1234)
++ AC_DEFINE(SDL_BYTEORDER, 1234, "Byte Order")
+ fi
+
+ dnl Set up the compiler and linker flags
+@@ -107,7 +107,7 @@
+ AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
+ , enable_libc=yes)
+ if test x$enable_libc = xyes; then
+- AC_DEFINE(HAVE_LIBC)
++ AC_DEFINE(HAVE_LIBC,1,"")
+
+ dnl Check for C library headers
+ AC_HEADER_STDC
+@@ -118,7 +118,7 @@
+ if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
+ AC_CHECK_TYPE(int64_t)
+ if test x$ac_cv_type_int64_t = xyes; then
+- AC_DEFINE(SDL_HAS_64BIT_TYPE)
++ AC_DEFINE(SDL_HAS_64BIT_TYPE,1,"")
+ fi
+ have_inttypes=yes
+ fi
+@@ -127,11 +127,11 @@
+ AC_FUNC_ALLOCA
+ AC_FUNC_MEMCMP
+ if test x$ac_cv_func_memcmp_working = xyes; then
+- AC_DEFINE(HAVE_MEMCMP)
++ AC_DEFINE(HAVE_MEMCMP,1,"")
+ fi
+ AC_FUNC_STRTOD
+ if test x$ac_cv_func_strtod = xyes; then
+- AC_DEFINE(HAVE_STRTOD)
++ AC_DEFINE(HAVE_STRTOD,1,"")
+ fi
+ AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep)
+
+@@ -146,40 +146,40 @@
+ AC_CHECK_SIZEOF(long, 4)
+ AC_CHECK_SIZEOF(long long, 8)
+ if test x$ac_cv_sizeof_char = x1; then
+- AC_DEFINE(int8_t, signed char)
+- AC_DEFINE(uint8_t, unsigned char)
++ AC_DEFINE(int8_t, signed char,"")
++ AC_DEFINE(uint8_t, unsigned char,"")
+ fi
+ if test x$ac_cv_sizeof_short = x2; then
+- AC_DEFINE(int16_t, signed short)
+- AC_DEFINE(uint16_t, unsigned short)
++ AC_DEFINE(int16_t, signed short,"")
++ AC_DEFINE(uint16_t, unsigned short,"")
+ else
+ if test x$ac_cv_sizeof_int = x2; then
+- AC_DEFINE(int16_t, signed int)
+- AC_DEFINE(uint16_t, unsigned int)
++ AC_DEFINE(int16_t, signed int,"")
++ AC_DEFINE(uint16_t, unsigned int,"")
+ fi
+ fi
+ if test x$ac_cv_sizeof_int = x4; then
+- AC_DEFINE(int32_t, signed int)
+- AC_DEFINE(uint32_t, unsigned int)
++ AC_DEFINE(int32_t, signed int,"")
++ AC_DEFINE(uint32_t, unsigned int,"")
+ else
+ if test x$ac_cv_sizeof_long = x4; then
+- AC_DEFINE(int32_t, signed long)
+- AC_DEFINE(uint32_t, unsigned long)
++ AC_DEFINE(int32_t, signed long,"")
++ AC_DEFINE(uint32_t, unsigned long,"")
+ fi
+ fi
+ if test x$ac_cv_sizeof_long = x8; then
+- AC_DEFINE(int64_t, signed long)
+- AC_DEFINE(uint64_t, unsigned long)
+- AC_DEFINE(SDL_HAS_64BIT_TYPE)
++ AC_DEFINE(int64_t, signed long,"")
++ AC_DEFINE(uint64_t, unsigned long,"")
++ AC_DEFINE(SDL_HAS_64BIT_TYPE,"")
+ else
+ if test x$ac_cv_sizeof_long_long = x8; then
+- AC_DEFINE(int64_t, signed long long)
+- AC_DEFINE(uint64_t, unsigned long long)
+- AC_DEFINE(SDL_HAS_64BIT_TYPE)
++ AC_DEFINE(int64_t, signed long long,"")
++ AC_DEFINE(uint64_t, unsigned long long,"")
++ AC_DEFINE(SDL_HAS_64BIT_TYPE,"")
+ fi
+ fi
+- AC_DEFINE(size_t, unsigned int)
+- AC_DEFINE(uintptr_t, unsigned long)
++ AC_DEFINE(size_t, unsigned int,"")
++ AC_DEFINE(uintptr_t, unsigned long,"")
+ fi
+
+ # Standard C sources
+@@ -201,67 +201,67 @@
+ AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
+ , enable_audio=yes)
+ if test x$enable_audio != xyes; then
+- AC_DEFINE(SDL_AUDIO_DISABLED)
++ AC_DEFINE(SDL_AUDIO_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(video,
+ AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
+ , enable_video=yes)
+ if test x$enable_video != xyes; then
+- AC_DEFINE(SDL_VIDEO_DISABLED)
++ AC_DEFINE(SDL_VIDEO_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(events,
+ AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
+ , enable_events=yes)
+ if test x$enable_events != xyes; then
+- AC_DEFINE(SDL_EVENTS_DISABLED)
++ AC_DEFINE(SDL_EVENTS_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(joystick,
+ AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
+ , enable_joystick=yes)
+ if test x$enable_joystick != xyes; then
+- AC_DEFINE(SDL_JOYSTICK_DISABLED)
++ AC_DEFINE(SDL_JOYSTICK_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(cdrom,
+ AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [[default=yes]]]),
+ , enable_cdrom=yes)
+ if test x$enable_cdrom != xyes; then
+- AC_DEFINE(SDL_CDROM_DISABLED)
++ AC_DEFINE(SDL_CDROM_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(threads,
+ AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
+ , enable_threads=yes)
+ if test x$enable_threads != xyes; then
+- AC_DEFINE(SDL_THREADS_DISABLED)
++ AC_DEFINE(SDL_THREADS_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(timers,
+ AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
+ , enable_timers=yes)
+ if test x$enable_timers != xyes; then
+- AC_DEFINE(SDL_TIMERS_DISABLED)
++ AC_DEFINE(SDL_TIMERS_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(file,
+ AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
+ , enable_file=yes)
+ if test x$enable_file != xyes; then
+- AC_DEFINE(SDL_FILE_DISABLED)
++ AC_DEFINE(SDL_FILE_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(loadso,
+ AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
+ , enable_loadso=yes)
+ if test x$enable_loadso != xyes; then
+- AC_DEFINE(SDL_LOADSO_DISABLED)
++ AC_DEFINE(SDL_LOADSO_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(cpuinfo,
+ AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
+ , enable_cpuinfo=yes)
+ if test x$enable_cpuinfo != xyes; then
+- AC_DEFINE(SDL_CPUINFO_DISABLED)
++ AC_DEFINE(SDL_CPUINFO_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(assembly,
+ AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
+ , enable_assembly=yes)
+ if test x$enable_assembly = xyes; then
+- AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
++ AC_DEFINE(SDL_ASSEMBLY_ROUTINES,1,"")
+ fi
+
+ dnl See if the OSS audio interface is supported
+@@ -289,12 +289,12 @@
+ int arg = SNDCTL_DSP_SETFRAGMENT;
+ ],[
+ have_oss=yes
+- AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
++ AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H,1,"")
+ ])
+ fi
+ AC_MSG_RESULT($have_oss)
+ if test x$have_oss = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
++ AC_DEFINE(SDL_AUDIO_DRIVER_OSS,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
+ have_audio=yes
+@@ -314,45 +314,7 @@
+ AC_ARG_ENABLE(alsa,
+ AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
+ , enable_alsa=yes)
+- if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
+- AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
+- # Restore all flags from before the ALSA detection runs
+- CFLAGS="$alsa_save_CFLAGS"
+- LDFLAGS="$alsa_save_LDFLAGS"
+- LIBS="$alsa_save_LIBS"
+- if test x$have_alsa = xyes; then
+- AC_ARG_ENABLE(alsa-shared,
+-AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
+- , enable_alsa_shared=yes)
+- if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
+- if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
+- ALSA_LIBS="-L/lib $ALSA_LIBS"
+- elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
+- ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
+- elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
+- ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
+- fi
+- fi
+- alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
+- alsa_lib=`ls -- $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+- echo "-- $alsa_lib_spec -> $alsa_lib"
+-
+- AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
+- SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
+- EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
+- if test x$have_loadso != xyes && \
+- test x$enable_alsa_shared = xyes; then
+- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
+- fi
+- if test x$have_loadso = xyes && \
+- test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
+- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
+- else
+- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
+- fi
+- have_audio=yes
+- fi
+- fi
++ enable_alsa=no
+ }
+
+ dnl Check whether we want to use IRIX 6.5+ native audio or not
+@@ -371,7 +333,7 @@
+ AC_MSG_RESULT($have_dmedia)
+ # Set up files for the audio library
+ if test x$have_dmedia = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
++ AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
+ have_audio=yes
+@@ -408,7 +370,7 @@
+ AC_MSG_RESULT($have_mme)
+ # Set up files for the audio library
+ if test x$have_mme = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
+@@ -433,7 +395,7 @@
+ esd_lib=`ls -- $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+ echo "-- $esd_lib_spec -> $esd_lib"
+
+- AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
++ AC_DEFINE(SDL_AUDIO_DRIVER_ESD,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
+ if test x$have_loadso != xyes && \
+@@ -442,7 +404,7 @@
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_esd_shared = xyes && test x$esd_lib != x; then
+- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
++ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib", "")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
+ fi
+@@ -485,7 +447,7 @@
+ arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+ echo "-- $arts_lib_spec -> $arts_lib"
+
+- AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
++ AC_DEFINE(SDL_AUDIO_DRIVER_ARTS,, "")
+ SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
+ if test x$have_loadso != xyes && \
+@@ -494,7 +456,7 @@
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_arts_shared = xyes && test x$arts_lib != x; then
+- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
++ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib",1,"")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
+ fi
+@@ -527,7 +489,7 @@
+ fi
+ AC_MSG_RESULT($have_nas)
+ if test x$have_nas = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
++ AC_DEFINE(SDL_AUDIO_DRIVER_NAS,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
+@@ -543,7 +505,7 @@
+ AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
+ , enable_diskaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
++ AC_DEFINE(SDL_AUDIO_DRIVER_DISK,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
+ fi
+ }
+@@ -555,7 +517,7 @@
+ AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
+ , enable_dummyaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
++ AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
+ fi
+ }
+@@ -571,7 +533,7 @@
+ AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
+ if test x$have_mint_falcon_hdr = xyes; then
+ mintaudio=yes
+- AC_DEFINE(SDL_AUDIO_DRIVER_MINT)
++ AC_DEFINE(SDL_AUDIO_DRIVER_MINT,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/mint/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/mint/*.S"
+ have_audio=yes
+@@ -602,7 +564,7 @@
+ AC_PATH_PROG(NASM, nasm)
+ fi
+ if test "x$NASM" != x -a "x$NASM" != x'"$NASM"'; then
+- AC_DEFINE(SDL_HERMES_BLITTERS)
++ AC_DEFINE(SDL_HERMES_BLITTERS,1,"")
+ SOURCES="$SOURCES $srcdir/src/hermes/*.asm"
+ if test x"$NASMFLAGS" = x; then
+ case $ARCH in
+@@ -713,9 +675,9 @@
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_altivec = xyes; then
+- AC_DEFINE(SDL_ALTIVEC_BLITTERS)
++ AC_DEFINE(SDL_ALTIVEC_BLITTERS,1,"")
+ if test x$have_altivec_h_hdr = xyes; then
+- AC_DEFINE(HAVE_ALTIVEC_H)
++ AC_DEFINE(HAVE_ALTIVEC_H,1,"")
+ fi
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
+ fi
+@@ -758,7 +720,7 @@
+
+ if test x$enable_ipod = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DIPOD"
+- AC_DEFINE(SDL_VIDEO_DRIVER_IPOD)
++ AC_DEFINE(SDL_VIDEO_DRIVER_IPOD,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/ipod/*.c"
+ fi
+ }
+@@ -792,7 +754,7 @@
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DENABLE_NANOX_DIRECT_FB"
+ fi
+
+- AC_DEFINE(SDL_VIDEO_DRIVER_NANOX)
++ AC_DEFINE(SDL_VIDEO_DRIVER_NANOX,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/nanox/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lnano-X"
+ have_video=yes
+@@ -881,7 +843,7 @@
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ LDFLAGS="$LDFLAGS $X_LIBS"
+
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
+
+@@ -903,8 +865,8 @@
+ test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
+ echo "-- dynamic libX11 -> $x11_lib"
+ echo "-- dynamic libX11ext -> $x11ext_lib"
+- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
+- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
++ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib","")
++ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib","")
+ else
+ enable_x11_shared=no
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
+@@ -921,20 +883,20 @@
+ AC_HELP_STRING([--enable-video-dga], [use DGA 2.0 video driver [[default=yes]]]),
+ , enable_video_dga=yes)
+ if test x$enable_dga = xyes -a x$enable_video_dga = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_DGA)
++ AC_DEFINE(SDL_VIDEO_DRIVER_DGA,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/dga/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-dgamouse,
+ AC_HELP_STRING([--enable-video-x11-dgamouse], [use X11 DGA for mouse events [[default=yes]]]),
+ , enable_video_x11_dgamouse=yes)
+ if test x$enable_dga = xyes -a x$enable_video_x11_dgamouse = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE,1,"")
+ fi
+ AC_ARG_ENABLE(video-x11-vm,
+ AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
+ , enable_video_x11_vm=yes)
+ if test x$enable_video_x11_vm = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xv,
+@@ -948,14 +910,14 @@
+ AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
+ , enable_video_x11_xinerama=yes)
+ if test x$enable_video_x11_xinerama = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xme,
+ AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [[default=yes]]]),
+ , enable_video_x11_xme=yes)
+ if test x$enable_video_x11_xme = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xrandr,
+@@ -972,8 +934,8 @@
+ if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
+ echo "-- dynamic libXrender -> $xrender_lib"
+ echo "-- dynamic libXrandr -> $xrandr_lib"
+- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
+- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
++ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib","")
++ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib","")
+ definitely_enable_video_x11_xrandr=yes
+ else
+ AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
+@@ -986,7 +948,7 @@
+ fi
+ fi
+ if test x$definitely_enable_video_x11_xrandr = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR,1,"")
+ fi
+ AC_ARG_ENABLE(video-x11-dpms,
+ AC_HELP_STRING([--enable-video-x11-dpms], [enable X11 DPMS extension [[default=yes]]]),
+@@ -998,7 +960,7 @@
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_dpms_h_hdr = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS,1,"")
+ fi
+ fi
+ fi
+@@ -1026,7 +988,7 @@
+ ])
+ AC_MSG_RESULT($video_photon)
+ if test x$video_photon = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
++ AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lph"
+ have_video=yes
+@@ -1040,7 +1002,7 @@
+ CheckBWINDOW()
+ {
+ if test x$enable_video = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW)
++ AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
+ have_video=yes
+ fi
+@@ -1063,7 +1025,7 @@
+ ])
+ AC_MSG_RESULT($have_carbon)
+ if test x$have_carbon = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX)
++ AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/maccommon/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/macrom/*.c"
+ have_video=yes
+@@ -1092,7 +1054,7 @@
+ AC_MSG_RESULT($have_cocoa)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_cocoa = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ)
++ AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/quartz/*.m"
+ have_video=yes
+ fi
+@@ -1118,7 +1080,7 @@
+ ])
+ AC_MSG_RESULT($video_fbcon)
+ if test x$video_fbcon = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_FBCON)
++ AC_DEFINE(SDL_VIDEO_DRIVER_FBCON,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/fbcon/*.c"
+ have_video=yes
+ fi
+@@ -1163,7 +1125,7 @@
+ fi
+
+ if test x$video_directfb = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
++ AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
+@@ -1190,7 +1152,7 @@
+ ])
+ AC_MSG_RESULT($video_ps2gs)
+ if test x$video_ps2gs = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/ps2gs/*.c"
+ have_video=yes
+ fi
+@@ -1215,7 +1177,7 @@
+ ])
+ AC_MSG_RESULT($video_ggi)
+ if test x$video_ggi = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
++ AC_DEFINE(SDL_VIDEO_DRIVER_GGI,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lggi -lgii -lgg"
+ have_video=yes
+@@ -1245,7 +1207,7 @@
+ ])
+ AC_MSG_RESULT($video_svga)
+ if test x$video_svga = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB)
++ AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/svga/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvga"
+ have_video=yes
+@@ -1277,7 +1239,7 @@
+ ])
+ AC_MSG_RESULT($video_vgl)
+ if test x$video_vgl = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_VGL)
++ AC_DEFINE(SDL_VIDEO_DRIVER_VGL,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/vgl/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvgl"
+ have_video=yes
+@@ -1305,7 +1267,7 @@
+ ])
+ AC_MSG_RESULT($video_wscons)
+ if test x$video_wscons = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/wscons/*.c"
+ have_video=yes
+ fi
+@@ -1330,7 +1292,7 @@
+ ])
+ AC_MSG_RESULT($video_aalib)
+ if test x$video_aalib = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_AALIB)
++ AC_DEFINE(SDL_VIDEO_DRIVER_AALIB,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/aalib/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laa"
+ have_video=yes
+@@ -1360,7 +1322,7 @@
+ CXXFLAGS="$OLD_CXX"
+ AC_MSG_RESULT($video_qtopia)
+ if test x$video_qtopia = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
++ AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
+ SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $QTOPIA_FLAGS"
+@@ -1389,7 +1351,7 @@
+ ])
+ AC_MSG_RESULT($video_picogui)
+ if test x$video_picogui = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI)
++ AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/picogui/*.c"
+ SDL_LIBS="$SDL_LIBS -lpgui"
+ have_video=yes
+@@ -1413,7 +1375,7 @@
+ video_xbios=no
+ if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
+ video_xbios=yes
+- AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/xbios/*.c"
+ have_video=yes
+ fi
+@@ -1431,7 +1393,7 @@
+ AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
+ if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
+ video_gem=yes
+- AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
++ AC_DEFINE(SDL_VIDEO_DRIVER_GEM,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
+ SDL_LIBS="$SDL_LIBS -lgem"
+ have_video=yes
+@@ -1446,7 +1408,7 @@
+ AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
+ , enable_video_dummy=yes)
+ if test x$enable_video_dummy = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
++ AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
+ have_video=yes
+ fi
+@@ -1472,8 +1434,8 @@
+ ])
+ AC_MSG_RESULT($video_opengl)
+ if test x$video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
+- AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
++ AC_DEFINE(SDL_VIDEO_OPENGL_GLX,1,"")
+ fi
+ fi
+ }
+@@ -1492,7 +1454,7 @@
+ ])
+ AC_MSG_RESULT($video_opengl)
+ if test x$video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
+ fi
+ fi
+@@ -1502,8 +1464,8 @@
+ CheckWIN32GL()
+ {
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
+- AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
++ AC_DEFINE(SDL_VIDEO_OPENGL_WGL,1,"")
+ fi
+ }
+
+@@ -1511,7 +1473,7 @@
+ CheckBeGL()
+ {
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
+ fi
+ }
+@@ -1520,7 +1482,7 @@
+ CheckMacGL()
+ {
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
+ case "$host" in
+ *-*-darwin*)
+ if test x$enable_video_cocoa = xyes; then
+@@ -1552,8 +1514,8 @@
+ OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
+ OSMESA_LIBS=`$OSMESA_CONFIG --libs`
+ fi
+- AC_DEFINE(SDL_VIDEO_OPENGL)
+- AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
++ AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA,1,"")
+ SDL_CFLAGS="$SDL_CFLAGS $OSMESA_CFLAGS"
+ SDL_LIBS="$SDL_LIBS $OSMESA_LIBS"
+
+@@ -1563,7 +1525,7 @@
+ if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
+ # Dynamic linking
+ if test "x$have_osmesa_hdr" = "xyes"; then
+- AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC)
++ AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC,1,"")
+ fi
+ fi
+ fi
+@@ -1590,7 +1552,7 @@
+ ])
+ AC_MSG_RESULT($use_input_events)
+ if test x$use_input_events = xyes; then
+- AC_DEFINE(SDL_INPUT_LINUXEV)
++ AC_DEFINE(SDL_INPUT_LINUXEV,1,"")
+ fi
+ fi
+ }
+@@ -1612,7 +1574,7 @@
+ ])
+ AC_MSG_RESULT($enable_input_tslib)
+ if test x$enable_input_tslib = xyes; then
+- AC_DEFINE(SDL_INPUT_TSLIB)
++ AC_DEFINE(SDL_INPUT_TSLIB,1,"")
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
+ fi
+ fi
+@@ -1635,7 +1597,7 @@
+ AC_MSG_CHECKING(pth)
+ AC_MSG_RESULT($use_pth)
+ if test "x$use_pth" = xyes; then
+- AC_DEFINE(SDL_THREAD_PTH)
++ AC_DEFINE(SDL_THREAD_PTH,1,"")
+ SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
+ SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
+@@ -1741,7 +1703,7 @@
+
+ # Do futher testing if we have pthread support...
+ if test x$use_pthreads = xyes; then
+- AC_DEFINE(SDL_THREAD_PTHREAD)
++ AC_DEFINE(SDL_THREAD_PTHREAD,1,"")
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
+ SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
+@@ -1763,7 +1725,7 @@
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ ],[
+ has_recursive_mutexes=yes
+- AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
++ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX,1,"")
+ ])
+ fi
+ if test x$has_recursive_mutexes = xno; then
+@@ -1774,7 +1736,7 @@
+ pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+ ],[
+ has_recursive_mutexes=yes
+- AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
++ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP,1,"")
+ ])
+ fi
+ AC_MSG_RESULT($has_recursive_mutexes)
+@@ -1849,7 +1811,7 @@
+ fi
+
+ if test x$enable_video = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
++ AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
+ have_video=yes
+@@ -1871,7 +1833,7 @@
+ have_directx=yes
+ fi
+ if test x$enable_video = xyes -a x$have_directx = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
++ AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
+ have_video=yes
+ fi
+@@ -1904,9 +1866,9 @@
+ AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
+ AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes)
+ if test x$have_dlvsym = xyes; then
+- AC_DEFINE(HAVE_DLVSYM)
++ AC_DEFINE(HAVE_DLVSYM,1,"")
+ fi
+- AC_DEFINE(SDL_LOADSO_DLOPEN)
++ AC_DEFINE(SDL_LOADSO_DLOPEN,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
+ have_loadso=yes
+ fi
+@@ -1923,7 +1885,7 @@
+ AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
+ AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
+ if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
+- AC_DEFINE(SDL_LOADSO_LDG)
++ AC_DEFINE(SDL_LOADSO_LDG,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
+ SDL_LIBS="$SDL_LIBS -lldg -lgem"
+ have_loadso=yes
+@@ -2049,11 +2011,11 @@
+ have_machine_joystick=yes
+ ])
+ if test x$have_machine_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H)
++ AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H,1,"")
+ fi
+ AC_MSG_RESULT($have_machine_joystick)
+
+- AC_DEFINE(SDL_JOYSTICK_USBHID)
++ AC_DEFINE(SDL_JOYSTICK_USBHID,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
+@@ -2072,7 +2034,7 @@
+ if test x$enable_clock_gettime = xyes; then
+ AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
+ if test x$have_clock_gettime = xyes; then
+- AC_DEFINE(HAVE_CLOCK_GETTIME)
++ AC_DEFINE(HAVE_CLOCK_GETTIME,1,"")
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
+ fi
+ fi
+@@ -2103,7 +2065,7 @@
+ CheckIPod
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+@@ -2166,17 +2128,17 @@
+ if test x$enable_audio = xyes; then
+ case $ARCH in
+ sysv5|solaris|hpux)
+- AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
+ have_audio=yes
+ ;;
+ netbsd|openbsd)
+- AC_DEFINE(SDL_AUDIO_DRIVER_BSD)
++ AC_DEFINE(SDL_AUDIO_DRIVER_BSD,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
+ have_audio=yes
+ ;;
+ aix)
+- AC_DEFINE(SDL_AUDIO_DRIVER_PAUD)
++ AC_DEFINE(SDL_AUDIO_DRIVER_PAUD,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
+ have_audio=yes
+ ;;
+@@ -2186,7 +2148,7 @@
+ if test x$enable_joystick = xyes; then
+ case $ARCH in
+ linux)
+- AC_DEFINE(SDL_JOYSTICK_LINUX)
++ AC_DEFINE(SDL_JOYSTICK_LINUX,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
+ have_joystick=yes
+ ;;
+@@ -2196,32 +2158,32 @@
+ if test x$enable_cdrom = xyes; then
+ case $ARCH in
+ linux|solaris)
+- AC_DEFINE(SDL_CDROM_LINUX)
++ AC_DEFINE(SDL_CDROM_LINUX,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/linux/*.c"
+ have_cdrom=yes
+ ;;
+ *freebsd*)
+- AC_DEFINE(SDL_CDROM_FREEBSD)
++ AC_DEFINE(SDL_CDROM_FREEBSD,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
+ have_cdrom=yes
+ ;;
+ *openbsd*|*netbsd*)
+- AC_DEFINE(SDL_CDROM_OPENBSD)
++ AC_DEFINE(SDL_CDROM_OPENBSD,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
+ have_cdrom=yes
+ ;;
+ bsdi)
+- AC_DEFINE(SDL_CDROM_BSDI)
++ AC_DEFINE(SDL_CDROM_BSDI,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/bsdi/*.c"
+ have_cdrom=yes
+ ;;
+ aix)
+- AC_DEFINE(SDL_CDROM_AIX)
++ AC_DEFINE(SDL_CDROM_AIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/aix/*.c"
+ have_cdrom=yes
+ ;;
+ osf)
+- AC_DEFINE(SDL_CDROM_OSF)
++ AC_DEFINE(SDL_CDROM_OSF,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/osf/*.c"
+ have_cdrom=yes
+ ;;
+@@ -2229,7 +2191,7 @@
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
+- AC_DEFINE(SDL_THREAD_SPROC)
++ AC_DEFINE(SDL_THREAD_SPROC,1,"")
+ SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+@@ -2237,7 +2199,7 @@
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+@@ -2256,20 +2218,20 @@
+ CheckPTHREAD
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/nto/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
+ have_audio=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_QNX)
++ AC_DEFINE(SDL_CDROM_QNX,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/qnx/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+@@ -2294,29 +2256,29 @@
+ CheckNASM
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
++ AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
+ if test x$have_directx = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
++ AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
+ fi
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_WINMM)
++ AC_DEFINE(SDL_JOYSTICK_WINMM,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_WIN32)
++ AC_DEFINE(SDL_CDROM_WIN32,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/win32/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes; then
+- AC_DEFINE(SDL_THREAD_WIN32)
++ AC_DEFINE(SDL_THREAD_WIN32,1,"")
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
+@@ -2325,13 +2287,13 @@
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_WIN32)
++ AC_DEFINE(SDL_TIMER_WIN32,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/win32/*.c"
+ have_timers=yes
+ fi
+ # Set up files for the shared object loading library
+ if test x$enable_loadso = xyes; then
+- AC_DEFINE(SDL_LOADSO_WIN32)
++ AC_DEFINE(SDL_LOADSO_WIN32,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
+ have_loadso=yes
+ fi
+@@ -2356,25 +2318,25 @@
+ CheckBeGL
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_BEOS)
++ AC_DEFINE(SDL_JOYSTICK_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_BEOS)
++ AC_DEFINE(SDL_CDROM_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/beos/*.cc"
+ have_cdrom=yes
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes; then
+- AC_DEFINE(SDL_THREAD_BEOS)
++ AC_DEFINE(SDL_THREAD_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+@@ -2382,13 +2344,13 @@
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_BEOS)
++ AC_DEFINE(SDL_TIMER_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
+ have_timers=yes
+ fi
+ # Set up files for the shared object loading library
+ if test x$enable_loadso = xyes; then
+- AC_DEFINE(SDL_LOADSO_BEOS)
++ AC_DEFINE(SDL_LOADSO_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
+ have_loadso=yes
+ fi
+@@ -2425,7 +2387,7 @@
+ # Set up files for the shared object loading library
+ # (this needs to be done before the dynamic X11 check)
+ if test x$enable_loadso = xyes -a x$have_dlopen != xyes; then
+- AC_DEFINE(SDL_LOADSO_DLCOMPAT)
++ AC_DEFINE(SDL_LOADSO_DLCOMPAT,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
+ have_loadso=yes
+ fi
+@@ -2443,28 +2405,28 @@
+
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
+- AC_DEFINE(SDL_AUDIO_DRIVER_SNDMGR)
++ AC_DEFINE(SDL_AUDIO_DRIVER_SNDMGR,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/macrom/*.c"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_IOKIT)
++ AC_DEFINE(SDL_JOYSTICK_IOKIT,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_MACOSX)
++ AC_DEFINE(SDL_CDROM_MACOSX,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/macosx/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+@@ -2500,30 +2462,30 @@
+ # Set up files for the audio library
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
+ have_audio=yes
+ fi
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_MINT)
++ AC_DEFINE(SDL_JOYSTICK_MINT,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/mint/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_MINT)
++ AC_DEFINE(SDL_CDROM_MINT,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/mint/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ else
+- AC_DEFINE(SDL_TIMER_MINT)
++ AC_DEFINE(SDL_TIMER_MIN,1,""T)
+ SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
+ SOURCES="$SOURCES $srcdir/src/timer/mint/*.S"
+ fi
+@@ -2536,20 +2498,20 @@
+ CheckPTHREAD
+ # Set up files for the video library
+ if test x$enable_video = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/riscos/*.S"
+ have_video=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_RISCOS)
++ AC_DEFINE(SDL_JOYSTICK_RISCOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/riscos/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_RISCOS)
++ AC_DEFINE(SDL_TIMER_RISCOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
+ have_timers=yes
+ fi
+@@ -2566,31 +2528,31 @@
+ # Verify that we have all the platform specific files we need
+ if test x$have_joystick != xyes; then
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_DISABLED)
++ AC_DEFINE(SDL_JOYSTICK_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
+ fi
+ if test x$have_cdrom != xyes; then
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_DISABLED)
++ AC_DEFINE(SDL_CDROM_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/cdrom/dummy/*.c"
+ fi
+ if test x$have_threads != xyes; then
+ if test x$enable_threads = xyes; then
+- AC_DEFINE(SDL_THREADS_DISABLED)
++ AC_DEFINE(SDL_THREADS_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
+ fi
+ if test x$have_timers != xyes; then
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMERS_DISABLED)
++ AC_DEFINE(SDL_TIMERS_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
+ fi
+ if test x$have_loadso != xyes; then
+ if test x$enable_loadso = xyes; then
+- AC_DEFINE(SDL_LOADSO_DISABLED)
++ AC_DEFINE(SDL_LOADSO_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
+ fi
diff --git a/packages/libsdl/libsdl-mixer_1.2.8.bb b/packages/libsdl/libsdl-mixer_1.2.8.bb
new file mode 100644
index 0000000000..41c8efcc8e
--- /dev/null
+++ b/packages/libsdl/libsdl-mixer_1.2.8.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Simple DirectMedia Layer mixer library."
+SECTION = "libs"
+PRIORITY = "optional"
+DEPENDS = "virtual/libsdl libmikmod"
+LICENSE = "LGPL"
+
+SRC_URI = "http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-${PV}.tar.gz"
+S = "${WORKDIR}/SDL_mixer-${PV}"
+
+export SDL_CONFIG = "${STAGING_BINDIR_CROSS}/sdl-config"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-music-mp3"
+# although we build smpeg... need to find out how
+# to deal with optional dependencies
+
+do_stage() {
+ autotools_stage_all
+}
+
diff --git a/packages/libsdl/libsdl-x11_1.2.11.bb b/packages/libsdl/libsdl-x11_1.2.11.bb
new file mode 100644
index 0000000000..5b49898c01
--- /dev/null
+++ b/packages/libsdl/libsdl-x11_1.2.11.bb
@@ -0,0 +1,22 @@
+require libsdl.inc
+
+# extra-keys.patch is missing
+DEFAULT_PREFERENCE = "-1"
+
+PR = "r0"
+
+SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
+ file://acinclude.m4 \
+ file://configure_tweak.patch;patch=1 \
+ file://pagesize.patch;patch=1 \
+ file://kernel-asm-page.patch;patch=1 "
+
+EXTRA_OECONF = "--disable-static --disable-debug --disable-cdrom --enable-threads --enable-timers --enable-endian \
+ --enable-file --enable-oss --enable-alsa --disable-esd --disable-arts \
+ --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
+ --disable-mintaudio --disable-nasm --enable-video-x11 --disable-video-dga \
+ --enable-video-fbcon --disable-video-directfb --disable-video-ps2gs \
+ --disable-video-xbios --disable-video-gem --disable-video-dummy \
+ --enable-video-opengl --enable-input-events --enable-pthreads \
+ --disable-video-picogui --disable-video-qtopia --enable-dlopen"
+
diff --git a/packages/libsdl/libsdl.inc b/packages/libsdl/libsdl.inc
index c039f7c398..5266c71373 100644
--- a/packages/libsdl/libsdl.inc
+++ b/packages/libsdl/libsdl.inc
@@ -36,17 +36,6 @@ do_configure_append () {
}
do_stage() {
- oe_libinstall -so -C src libSDL ${STAGING_LIBDIR}
+ autotools_stage_all
rm ${STAGING_LIBDIR}/libSDL.la
- ln -sf libSDL.so ${STAGING_LIBDIR}/libSDL-1.2.so
- #oe_libinstall -a -C src/main libSDLmain ${STAGING_LIBDIR}
- install -m 0644 src/main/libSDLmain.a ${STAGING_LIBDIR}
-
- install -d ${STAGING_INCDIR}/SDL
- for f in include/*.h
- do
- install -m 0644 $f ${STAGING_INCDIR}/SDL/
- done
-
- install -m 0644 *.m4 ${STAGING_DATADIR}/aclocal/
}
diff --git a/packages/libsndfile/files/.mtn2git_empty b/packages/libsndfile/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libsndfile/files/.mtn2git_empty
diff --git a/packages/libsndfile/files/configure-fix.patch b/packages/libsndfile/files/configure-fix.patch
new file mode 100644
index 0000000000..1fcbb8c790
--- /dev/null
+++ b/packages/libsndfile/files/configure-fix.patch
@@ -0,0 +1,10 @@
+--- /tmp/configure.ac 2008-06-02 20:33:03.191936504 +0200
++++ libsndfile-1.0.17/configure.ac 2008-06-02 20:33:15.120002907 +0200
+@@ -31,6 +31,7 @@
+ SHARED_VERSION_INFO="1:17:0"
+
+ AC_PROG_CC
++AC_PROG_CXX
+ AM_PROG_LIBTOOL
+
+ AC_CHECK_PROG(autogen, autogen, yes, no)
diff --git a/packages/libsndfile/libsndfile1_1.0.17.bb b/packages/libsndfile/libsndfile1_1.0.17.bb
index b15f84f94f..670f75b3fc 100644
--- a/packages/libsndfile/libsndfile1_1.0.17.bb
+++ b/packages/libsndfile/libsndfile1_1.0.17.bb
@@ -3,9 +3,11 @@ HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
AUTHOR = "Erik de Castro Lopo"
SECTION = "libs/multimedia"
LICENSE = "LGPL"
-PR = "r1"
+PR = "r2"
+
+SRC_URI = "http://www.mega-nerd.com/libsndfile/libsndfile-${PV}.tar.gz \
+ file://configure-fix.patch;patch=1"
-SRC_URI = "http://www.mega-nerd.com/libsndfile/libsndfile-${PV}.tar.gz"
S = "${WORKDIR}/libsndfile-${PV}"
inherit autotools lib_package pkgconfig
diff --git a/packages/libtiff/tiff_3.8.2.bb b/packages/libtiff/tiff_3.8.2.bb
new file mode 100644
index 0000000000..8c6e02c4a7
--- /dev/null
+++ b/packages/libtiff/tiff_3.8.2.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "This software provides support for the Tag Image File Format (TIFF)"
+LICENSE = ""
+HOMEPAGE = "http://www.remotesensing.org/libtiff/"
+DEPENDS = "zlib jpeg lzo"
+
+DEFAULT_PREFERENCE = "-1"
+
+PV = "3.8.2+4.0.0beta2"
+SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.0beta2.tar.gz"
+
+S = "${WORKDIR}/${PN}-4.0.0beta2"
+
+inherit autotools
+
+do_stage() {
+ autotools_stage_includes
+ install -d ${STAGING_LIBDIR}
+ oe_libinstall -C libtiff -a -so libtiff ${STAGING_LIBDIR}
+ oe_libinstall -C libtiff -a -so libtiffxx ${STAGING_LIBDIR}
+
+}
+
+PACKAGES =+ "tiffxx tiffxx-dbg tiffxx-dev tiff-utils tiff-utils-dbg"
+FILES_tiffxx = "${libdir}/libtiffxx.so.*"
+FILES_tiffxx-dev = "${libdir}/libtiffxx.so ${libdir}/libtiffxx.*a"
+FILES_tiffxx-dbg += "${libdir}/.debug/libtiffxx.so*"
+FILES_tiff-utils = "${bindir}/*"
+FILES_tiff-utils-dbg += "${bindir}/.debug/"
diff --git a/packages/libtool/libtool-2.2.4/.mtn2git_empty b/packages/libtool/libtool-2.2.4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libtool/libtool-2.2.4/.mtn2git_empty
diff --git a/packages/libtool/libtool-2.2.4/cross_compile.patch b/packages/libtool/libtool-2.2.4/cross_compile.patch
new file mode 100644
index 0000000000..b4bacbd12f
--- /dev/null
+++ b/packages/libtool/libtool-2.2.4/cross_compile.patch
@@ -0,0 +1,55 @@
+Tweaks to make cross-compiling work combined and updated from various
+older patches, some by Chris Larson.
+Not upstreable in this form.
+
+RP - 01/05/2008
+
+Index: libtool-2.2.2/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.2.2.orig/libltdl/config/ltmain.m4sh 2008-05-01 21:48:42.000000000 +0100
++++ libtool-2.2.2/libltdl/config/ltmain.m4sh 2008-05-01 21:51:41.000000000 +0100
+@@ -4454,8 +4454,14 @@
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+- dir="$libdir"
+- absdir="$libdir"
++ # Adding 'libdir' from the .la file to our library search paths
++ # breaks crosscompilation horribly. We cheat here and don't add
++ # it, instead adding the path where we found the .la. -CL
++ dir="$abs_ladir"
++ absdir="$abs_ladir"
++ libdir="$abs_ladir"
++ #dir="$libdir"
++ #absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+@@ -4825,8 +4831,6 @@
+ add="$libdir/$linklib"
+ fi
+ else
+- # We cannot seem to hardcode it, guess we'll fake it.
+- add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+@@ -4972,7 +4976,17 @@
+ fi
+ ;;
+ *)
+- path="-L$absdir/$objdir"
++ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
++ # preferring $objdir. RP 31/04/2008
++ if test -f "$absdir/$objdir/$depdepl" ; then
++ depdepl="$absdir/$objdir/$depdepl"
++ path="-L$absdir/$objdir"
++ elif test -f "$absdir/$depdepl" ; then
++ depdepl="$absdir/$depdepl"
++ path="-L$absdir"
++ else
++ path="-L$absdir/$objdir"
++ fi
+ ;;
+ esac
+ else
diff --git a/packages/libtool/libtool-2.2.4/prefix.patch b/packages/libtool/libtool-2.2.4/prefix.patch
new file mode 100644
index 0000000000..639feb7456
--- /dev/null
+++ b/packages/libtool/libtool-2.2.4/prefix.patch
@@ -0,0 +1,103 @@
+Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
+it can't be confused with the host libtool.
+
+Index: libtool-2.2.2/libltdl/m4/libtool.m4
+===================================================================
+--- libtool-2.2.2.orig/libltdl/m4/libtool.m4 2008-04-13 22:43:05.000000000 +0100
++++ libtool-2.2.2/libltdl/m4/libtool.m4 2008-04-13 22:43:05.000000000 +0100
+@@ -89,7 +89,8 @@
+ LIBTOOL_DEPS="$ltmain"
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(SHELL) $(top_builddir)'
++LIBTOOL="$LIBTOOL/$host_alias-libtool"
+ AC_SUBST(LIBTOOL)dnl
+
+ _LT_SETUP
+@@ -211,7 +212,7 @@
+ no_glob_subst='s/\*/\\\*/g'
+
+ # Global variables:
+-ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+
+ # All known linkers require a `.a' archive for static linking (except MSVC,
+Index: libtool-2.2.2/Makefile.am
+===================================================================
+--- libtool-2.2.2.orig/Makefile.am 2008-04-01 19:06:08.000000000 +0100
++++ libtool-2.2.2/Makefile.am 2008-04-13 22:49:17.000000000 +0100
+@@ -31,7 +31,7 @@
+ DIST_SUBDIRS = .
+ EXTRA_DIST =
+
+-BUILT_SOURCES = libtool
++BUILT_SOURCES = $(host_alias)-libtool
+
+ CLEANFILES =
+ MOSTLYCLEANFILES =
+@@ -64,7 +64,7 @@
+ ## ---------------- ##
+
+ # The libtool distributor and the standalone libtool script.
+-bin_SCRIPTS = libtoolize libtool
++bin_SCRIPTS = libtoolize $(host_alias)-libtool
+
+ libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
+ rm -f libtoolize.tmp libtoolize
+@@ -90,8 +90,8 @@
+ # We used to do this with a 'stamp-vcl' file, but non-gmake builds
+ # would rerun configure on every invocation, so now we manually
+ # check the version numbers from the build rule when necessary.
+-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
+- @target=libtool; $(rebuild); \
++$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
++ @target=$(host_alias)-libtool; $(rebuild); \
+ if test -f "$$target"; then \
+ set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
+ test "$$actualver" = "$$correctver" && rebuild=false; \
+@@ -100,8 +100,8 @@
+ case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
+ done; \
+ if $$rebuild; then \
+- echo $(SHELL) ./config.status $$target; \
+- cd $(top_builddir) && $(SHELL) ./config.status $$target; \
++ echo $(SHELL) ./config.status libtool; \
++ cd $(top_builddir) && $(SHELL) ./config.status libtool; \
+ fi
+
+ .PHONY: configure-subdirs
+@@ -145,7 +145,7 @@
+ ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \
+ ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
+ ChangeLog.2005 ChangeLog.2006 ChangeLog.2007
+-CLEANFILES += libtool libtoolize libtoolize.tmp \
++CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \
+ $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
+
+ ## We build ltversion.m4 here, instead of from config.status,
+@@ -483,12 +483,12 @@
+
+ BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
+ LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
+- LIBTOOL="$(abs_top_builddir)/libtool" \
++ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
+ tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
+
+ INSTALLCHECK_ENVIRONMENT = \
+ LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
+- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
++ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \
+ LTDLINCL="-I$(includedir)" \
+ LIBLTDL="$(libdir)/libltdl.la" \
+ tst_aclocaldir="$(aclocaldir)"
+@@ -620,7 +620,7 @@
+ TESTS += $(FC_TESTS)
+ endif
+
+-tests/demo-conf.test: libtool
++tests/demo-conf.test: $(host_alias)-libtool
+
+ EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \
+ $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS)
diff --git a/packages/libtool/libtool-cross_2.2.4.bb b/packages/libtool/libtool-cross_2.2.4.bb
new file mode 100644
index 0000000000..9b3c6d78ea
--- /dev/null
+++ b/packages/libtool/libtool-cross_2.2.4.bb
@@ -0,0 +1,45 @@
+require libtool.inc
+require libtool_${PV}.bb
+
+PR = "r23"
+PACKAGES = ""
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
+SRC_URI_append = " file://cross_compile.patch;patch=1 \
+ file://prefix.patch;patch=1"
+
+DEPENDS += "libtool-native"
+
+DOLT_PATCH = ""
+DOLT_PATCH_arm = " file://add_dolt.patch;patch=1"
+DOLT_PATCH_i586 = " file://add_dolt.patch;patch=1"
+
+#SRC_URI_append_linux = "${DOLT_PATCH}"
+#SRC_URI_append_linux-gnueabi = "${DOLT_PATCH}"
+
+S = "${WORKDIR}/libtool-${PV}"
+
+prefix = "${STAGING_DIR_NATIVE}${layout_prefix}"
+exec_prefix = "${STAGING_DIR_NATIVE}${layout_exec_prefix}"
+bindir = "${STAGING_BINDIR_NATIVE}"
+
+do_compile () {
+ :
+}
+
+do_stage () {
+ install -m 0755 ${HOST_SYS}-libtool ${bindir}/${HOST_SYS}-libtool
+ install -d ${STAGING_DATADIR}/libtool ${STAGING_DATADIR}/aclocal
+ install -c ${S}/libltdl/config/config.guess ${STAGING_DATADIR}/libtool/
+ install -c ${S}/libltdl/config/config.sub ${STAGING_DATADIR}/libtool/
+ install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${STAGING_DATADIR}/libtool/
+ install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${STAGING_DATADIR}/aclocal/
+ if [ -e ${WORKDIR}/dolt.m4 ] ; then
+ install -c -m 0644 ${WORKDIR}/dolt.m4 ${STAGING_DATADIR}/aclocal/
+ fi
+}
+
+
+do_install () {
+ :
+}
diff --git a/packages/libtool/libtool-native_2.2.4.bb b/packages/libtool/libtool-native_2.2.4.bb
new file mode 100644
index 0000000000..73e8aabe2e
--- /dev/null
+++ b/packages/libtool/libtool-native_2.2.4.bb
@@ -0,0 +1,41 @@
+require libtool.inc
+require libtool_${PV}.bb
+
+PR = "r19"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
+SRC_URI_append = " file://cross_compile.patch;patch=1 \
+ file://prefix.patch;patch=1"
+
+S = "${WORKDIR}/libtool-${PV}"
+
+inherit native
+
+do_configure_prepend () {
+ # Remove any existing libtool m4 since old stale versions would break
+ # any upgrade
+ rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
+ rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
+}
+
+do_stage () {
+ install -m 0755 ${HOST_SYS}-libtool ${STAGING_BINDIR}/${HOST_SYS}-libtool
+ install -m 0755 libtoolize ${STAGING_BINDIR}/libtoolize
+ oe_libinstall -a -so -C libltdl libltdl ${STAGING_LIBDIR}
+ install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/
+ install -d ${STAGING_INCDIR}/libltdl/
+ install -m 0644 libltdl/libltdl/*.h ${STAGING_INCDIR}/libltdl/
+ install -d ${STAGING_DATADIR}/libtool/config/ ${STAGING_DATADIR}/aclocal/
+ install -c ${S}/libltdl/config/config.guess ${STAGING_DATADIR}/libtool/
+ install -c ${S}/libltdl/config/config.sub ${STAGING_DATADIR}/libtool/
+ install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${STAGING_DATADIR}/libtool/config/
+ install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltoptions.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltversion.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltsugar.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/lt~obsolete.m4 ${STAGING_DATADIR}/aclocal/
+}
+
+do_install () {
+ :
+}
diff --git a/packages/libtool/libtool-sdk_2.2.4.bb b/packages/libtool/libtool-sdk_2.2.4.bb
new file mode 100644
index 0000000000..b6b2aa966c
--- /dev/null
+++ b/packages/libtool/libtool-sdk_2.2.4.bb
@@ -0,0 +1,57 @@
+require libtool.inc
+require libtool_${PV}.bb
+
+PR = "r0"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
+SRC_URI_append = " file://cross_compile.patch;patch=1"
+
+S = "${WORKDIR}/libtool-${PV}"
+
+inherit sdk
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 0755 libtool ${D}${bindir}/
+ install -m 0755 libtoolize ${D}${bindir}/
+
+ install -d ${D}${libdir}/
+ oe_libinstall -a -so -C libltdl libltdl ${D}${libdir}
+
+ install -d ${D}${includedir}/
+ install -m 0644 libltdl/ltdl.h ${D}${includedir}
+
+ install -d ${D}${datadir}/libtool/config/
+ install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/
+ install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/
+ install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/config/
+
+ install -d ${D}${datadir}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${D}${datadir}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${D}${datadir}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltoptions.m4 ${D}${datadir}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltversion.m4 ${D}${datadir}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltsugar.m4 ${D}${datadir}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/lt~obsolete.m4 ${D}${datadir}/aclocal/
+}
+
+do_stage () {
+ install -d ${STAGING_BINDIR}/
+ install -m 0755 libtool ${STAGING_BINDIR}/${HOST_SYS}-libtool
+ install -m 0755 libtoolize ${STAGING_BINDIR}/libtoolize
+
+ oe_libinstall -a -so -C libltdl libltdl ${STAGING_LIBDIR}
+ install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/
+
+ install -d ${STAGING_DATADIR}/libtool/config/
+ install -c ${S}/libltdl/config/config.guess ${STAGING_DATADIR}/libtool/
+ install -c ${S}/libltdl/config/config.sub ${STAGING_DATADIR}/libtool/
+ install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${STAGING_DATADIR}/libtool/config/
+
+ install -d ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltoptions.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltversion.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltsugar.m4 ${STAGING_DATADIR}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/lt~obsolete.m4 ${STAGING_DATADIR}/aclocal/
+}
diff --git a/packages/libtool/libtool_2.2.4.bb b/packages/libtool/libtool_2.2.4.bb
new file mode 100644
index 0000000000..c8380d161c
--- /dev/null
+++ b/packages/libtool/libtool_2.2.4.bb
@@ -0,0 +1,25 @@
+require libtool.inc
+
+PR = "r14"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz"
+S = "${WORKDIR}/libtool-${PV}"
+
+PACKAGES =+ "libltdl libltdl-dev libltdl-dbg"
+FILES_${PN} += "${datadir}/aclocal*"
+FILES_libltdl = "${libdir}/libltdl.so.*"
+FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
+FILES_libltdl-dbg = "${libdir}/.debug/"
+
+inherit autotools
+
+EXTRA_AUTORECONF = "--exclude=libtoolize"
+
+do_stage () {
+ install -d ${STAGING_INCDIR}/libltdl
+ install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/
+ install -m 0644 libltdl/libltdl/*.h ${STAGING_INCDIR}/libltdl/
+ oe_libinstall -a -so -C libltdl libltdl ${STAGING_LIBDIR}
+}
diff --git a/packages/liburiparser/files/autofoo.patch b/packages/liburiparser/files/autofoo.patch
index 548867c7e7..f578b21886 100644
--- a/packages/liburiparser/files/autofoo.patch
+++ b/packages/liburiparser/files/autofoo.patch
@@ -1,21 +1,10 @@
-Index: uriparser-0.5.1/configure.in
-===================================================================
---- uriparser-0.5.1.orig/configure.in 2007-08-25 15:32:52.000000000 +0000
-+++ uriparser-0.5.1/configure.in 2007-08-25 15:34:56.000000000 +0000
-@@ -2,7 +2,7 @@
- AC_INIT([uriparser], [0.5.1])
- AM_INIT_AUTOMAKE([1.9 foreign])
- AM_CONFIG_HEADER(test/CppTest/config.h)
--
-+AM_PROG_CC_C_O
-
- AC_PROG_CC
- AC_PROG_CXX
-@@ -10,7 +10,6 @@
+--- /tmp/configure.in 2008-06-21 12:20:52.000000000 +0200
++++ uriparser-0.5.1/configure.in 2008-06-21 12:21:16.000000000 +0200
+@@ -9,6 +9,7 @@
+ AC_PROG_LIBTOOL
AC_HEADER_STDC
++AM_PROG_CC_C_O
+
--
# URI_SIZEDOWN
- AC_ARG_ENABLE(sizedown, [
- Extra options:
diff --git a/packages/libusb/files/.mtn2git_empty b/packages/libusb/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libusb/files/.mtn2git_empty
diff --git a/packages/libusb/files/configure_fix.patch b/packages/libusb/files/configure_fix.patch
new file mode 100644
index 0000000000..f01f0143f5
--- /dev/null
+++ b/packages/libusb/files/configure_fix.patch
@@ -0,0 +1,17 @@
+For some reason libtool 2.2.2 can't cope with this, LT_LANG(C++) works though.
+
+RP - 14/4/08
+
+Index: libusb-0.1.12/configure.in
+===================================================================
+--- libusb-0.1.12.orig/configure.in 2008-04-14 22:08:26.000000000 +0100
++++ libusb-0.1.12/configure.in 2008-04-14 22:09:43.000000000 +0100
+@@ -149,7 +149,7 @@
+ fi
+
+ # Checks for programs.
+-AC_LANG_CPLUSPLUS
++AC_PROG_CXX
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+ AC_PROG_INSTALL
diff --git a/packages/libusb/libusb-compat_0.0.9+0.1.0-beta1.bb b/packages/libusb/libusb-compat_0.0.9+0.1.0-beta1.bb
new file mode 100644
index 0000000000..b42e572196
--- /dev/null
+++ b/packages/libusb/libusb-compat_0.0.9+0.1.0-beta1.bb
@@ -0,0 +1,37 @@
+DESCRIPTION = "libusb is a library to provide userspace \
+access to USB devices."
+HOMEPAGE = "http://libusb.sf.net"
+SECTION = "libs"
+LICENSE = "LGPL"
+
+PE = "1"
+
+DEPENDS = "libusb1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-0.1.0-beta1.tar.bz2 \
+ "
+
+S = "${WORKDIR}/libusb-compat-0.1.0-beta1"
+
+inherit autotools pkgconfig binconfig lib_package
+
+PARALLEL_MAKE = ""
+EXTRA_OECONF = "--disable-build-docs"
+
+export CXXFLAGS += "-lstdc++ -I${STAGING_INCDIR}"
+
+do_stage() {
+ autotools_stage_all
+ install -m 755 ${S}/libusb-config ${STAGING_BINDIR}
+ # can we get rid of that? wouldn't a sed statement do as well?
+ sed -i 's:\-L${libdir} :-L${STAGING_LIBDIR} :' ${STAGING_BINDIR}/libusb-config
+
+ if [ "${STAGING_BINDIR}" != "${STAGING_BINDIR_CROSS}" ]; then
+ install -d ${STAGING_BINDIR_CROSS}/
+ mv ${STAGING_BINDIR}/libusb-config ${STAGING_BINDIR_CROSS}/libusb-config
+ fi
+}
+
+PACKAGES =+ "libusbpp"
+
+FILES_libusbpp = "${libdir}/libusbpp*.so.*"
diff --git a/packages/libusb/libusb1_0.9.0.bb b/packages/libusb/libusb1_0.9.0.bb
new file mode 100644
index 0000000000..784d9b523b
--- /dev/null
+++ b/packages/libusb/libusb1_0.9.0.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "libusb is a library to provide userspace \
+access to USB devices."
+HOMEPAGE = "http://libusb.sf.net"
+SECTION = "libs"
+LICENSE = "LGPL"
+
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
+"
+S = "${WORKDIR}/libusb-${PV}"
+
+inherit autotools pkgconfig binconfig lib_package
+
+PARALLEL_MAKE = ""
+EXTRA_OECONF = "--disable-build-docs"
+
+export CXXFLAGS += "-lstdc++ -I${STAGING_INCDIR}"
+
+LIBTOOL = "${HOST_SYS}-libtool"
+EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'"
+
+do_stage() {
+ autotools_stage_all
+}
+
+PACKAGES =+ "libusbpp"
+FILES_libusbpp = "${libdir}/libusbpp*.so.*"
diff --git a/packages/libusb/libusb_0.1.12.bb b/packages/libusb/libusb_0.1.12.bb
index 43c6ea92bd..3d6a213b45 100644
--- a/packages/libusb/libusb_0.1.12.bb
+++ b/packages/libusb/libusb_0.1.12.bb
@@ -3,9 +3,10 @@ access to USB devices."
HOMEPAGE = "http://libusb.sf.net"
SECTION = "libs"
LICENSE = "LGPL"
-PR = "r1"
+PR = "r3"
-SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.gz \
+ file://configure_fix.patch;patch=1"
S = "${WORKDIR}/libusb-${PV}"
@@ -14,7 +15,7 @@ inherit autotools pkgconfig binconfig lib_package
PARALLEL_MAKE = ""
EXTRA_OECONF = "--disable-build-docs"
-export CXXFLAGS += "-lstdc++"
+export CXXFLAGS += "-lstdc++ -I${STAGING_INCDIR}"
do_stage() {
diff --git a/packages/lighttpd/lighttpd/lighttpd b/packages/lighttpd/lighttpd/lighttpd
index 572381499a..bf89a60b7d 100644
--- a/packages/lighttpd/lighttpd/lighttpd
+++ b/packages/lighttpd/lighttpd/lighttpd
@@ -1,16 +1,15 @@
#!/bin/sh
-#
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/lighttpd
NAME=lighttpd
DESC="Lighttpd Web Server"
-
+OPTS="-f /etc/lighttpd.conf"
case "$1" in
start)
echo -n "Starting $DESC: "
- start-stop-daemon --start -x "$DAEMON" -- -f /etc/lighttpd.conf
+ start-stop-daemon --start -x "$DAEMON" -- $OPTS
echo "$NAME."
;;
stop)
@@ -20,9 +19,9 @@ case "$1" in
;;
restart|force-reload)
echo -n "Restarting $DESC: "
- start-stop-daemon -K -x "$DAEMON"
+ start-stop-daemon --stop -x "$DAEMON"
sleep 1
- start-stop-daemon -S -x "$DAEMON"
+ start-stop-daemon --start -x "$DAEMON" -- $OPTS
echo "$NAME."
;;
*)
diff --git a/packages/lighttpd/lighttpd/mod_redirect.c.patch b/packages/lighttpd/lighttpd/mod_redirect.c.patch
new file mode 100644
index 0000000000..7bbdf32082
--- /dev/null
+++ b/packages/lighttpd/lighttpd/mod_redirect.c.patch
@@ -0,0 +1,56 @@
+Backport support for url.redirect-code directive from 1.5 branch.
+
+diff -urN lighttpd-1.4.18.orig/src/mod_redirect.c lighttpd-1.4.18/src/mod_redirect.c
+--- lighttpd-1.4.18.orig/src/mod_redirect.c 2007-04-10 09:52:58.000000000 +0200
++++ lighttpd-1.4.18/src/mod_redirect.c 2008-06-11 17:38:50.000000000 +0200
+@@ -16,6 +16,8 @@
+ typedef struct {
+ pcre_keyvalue_buffer *redirect;
+ data_config *context; /* to which apply me */
++
++ unsigned short redirect_code;
+ } plugin_config;
+
+ typedef struct {
+@@ -72,6 +74,7 @@
+
+ config_values_t cv[] = {
+ { "url.redirect", NULL, T_CONFIG_LOCAL, T_CONFIG_SCOPE_CONNECTION }, /* 0 */
++ { "url.redirect-code", NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION }, /* 1 */
+ { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
+ };
+
+@@ -90,6 +93,7 @@
+ s->redirect = pcre_keyvalue_buffer_init();
+
+ cv[0].destination = s->redirect;
++ cv[1].destination = &(s->redirect_code);
+
+ p->config_storage[i] = s;
+ ca = ((data_config *)srv->config_context->data[i])->value;
+@@ -140,6 +144,7 @@
+ plugin_config *s = p->config_storage[0];
+
+ p->conf.redirect = s->redirect;
++ p->conf.redirect_code = s->redirect_code;
+ p->conf.context = NULL;
+
+ /* skip the first, the global context */
+@@ -157,6 +162,8 @@
+ if (0 == strcmp(du->key->ptr, "url.redirect")) {
+ p->conf.redirect = s->redirect;
+ p->conf.context = dc;
++ } else if (0 == strcmp(du->key->ptr, "url.redirect-code")) {
++ p->conf.redirect_code = s->redirect_code;
+ }
+ }
+ }
+@@ -250,7 +257,7 @@
+
+ response_header_insert(srv, con, CONST_STR_LEN("Location"), CONST_BUF_LEN(p->location));
+
+- con->http_status = 301;
++ con->http_status = p->conf.redirect_code > 99 && p->conf.redirect_code < 1000 ? p->conf.redirect_code : 301;
+ con->file_finished = 1;
+
+ return HANDLER_FINISHED;
diff --git a/packages/lighttpd/lighttpd_1.4.18.bb b/packages/lighttpd/lighttpd_1.4.18.bb
index a83efcaf40..d5870ba5af 100644
--- a/packages/lighttpd/lighttpd_1.4.18.bb
+++ b/packages/lighttpd/lighttpd_1.4.18.bb
@@ -2,10 +2,11 @@ DESCRIPTION = "Web server"
SECTION = "net"
LICENSE = "BSD"
DEPENDS = "libpcre"
-PR = "r1"
+PR = "r3"
SRC_URI = "http://www.lighttpd.net/download/lighttpd-${PV}.tar.gz \
file://configure.in.patch;patch=1 \
+ file://mod_redirect.c.patch;patch=1 \
file://src-server.c.patch;patch=1 \
file://index.html \
file://lighttpd.conf \
diff --git a/packages/linux/linux-davinci_2.6.x+git-davinci.bb b/packages/linux/linux-davinci_2.6.x+git-davinci.bb
index 3138436a0e..50c2eaad58 100644
--- a/packages/linux/linux-davinci_2.6.x+git-davinci.bb
+++ b/packages/linux/linux-davinci_2.6.x+git-davinci.bb
@@ -3,7 +3,7 @@ require linux-omap.inc
# uncomment the below to get the latest and greatest and avoid a full reparse
# or override in it local.conf like this: DAVINCI_SRCREV_pn-linux-davinci = "${@bb.fetch.get_srcrev(d)}"
#DAVINCI_SRCREV = "${@bb.fetch.get_srcrev(d)}"
-DAVINCI_SRCREV ?= "713dc561fa98efb6cbac3f641c43d30ce8b840dd"
+DAVINCI_SRCREV ?= "e23e6d5c446074082d93285f21cf95ed0d537a6f"
SRCREV = "${DAVINCI_SRCREV}"
PV = "2.6.25"
diff --git a/packages/linux/linux-kaiser_2.6.24+git.bb b/packages/linux/linux-kaiser_2.6.24+git.bb
index ba4e6c1973..758cbdcc0b 100644
--- a/packages/linux/linux-kaiser_2.6.24+git.bb
+++ b/packages/linux/linux-kaiser_2.6.24+git.bb
@@ -1,15 +1,16 @@
require linux.inc
PV = "2.6.24+git${SRCREV}"
+PR = "r1"
COMPATIBLE_MACHINE = "htckaiser"
-SRC_URI = "git://git.android.com/kernel.git;branch=android-msm;protocol=git \
- http://baliniak.pl/android/kernel.diff;patch=1"
+SRC_URI = "git://git.linuxtogo.org/home/groups/mobile-linux/kernel.git;branch=htc-msm;protocol=git"
S = "${WORKDIR}/git"
do_configure_prepend() {
- cp .config ../defconfig
+ cp arch/arm/configs/htckaiser_defconfig ../defconfig
}
+
diff --git a/packages/linux/linux-ml403-slab-2.6.x_git.bb b/packages/linux/linux-ml403-slab-2.6.x_git.bb
deleted file mode 100644
index ad823c2aa6..0000000000
--- a/packages/linux/linux-ml403-slab-2.6.x_git.bb
+++ /dev/null
@@ -1,80 +0,0 @@
-#Kernel for the xilinx-ml403 board using SecretLabs git tree
-# Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-SECTION = "kernel"
-DESCRIPTION = "Linux kernel for Xilinx ML403 Virtex 4 fpga board"
-LICENSE = "GPL"
-PR = "r2"
-PV = "2.6+git${SRCDATE}"
-
-COMPATIBLE_MACHINE = "xilinx-ml403"
-
-SRC_URI = "file://xilinx-ml403_defconfig "
-
-inherit kernel xilinx-bsp
-
-S = "${WORKDIR}/linux-2.6"
-
-
-FILES_kernel-image = "/boot/zImage.elf"
-
-export OS = "Linux"
-ARCH = "ppc"
-KERNEL_IMAGETYPE = "zImage"
-KERNEL_OUTPUT = "arch/ppc/boot/images/zImage.elf"
-
-#make sure git-native gets build before as
-python __anonymous () {
-
- import bb
-
-
- depends = bb.data.getVarFlag('do_fetch', 'depends', d) or ""
- depends = depends + " git-native:do_populate_staging"
- bb.data.setVarFlag('do_fetch', 'depends', depends, d)
-
-}
-
-
-do_fetch () {
-
- cd ${WORKDIR}
- ${STAGING_BINDIR_NATIVE}/git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
- cd linux-2.6
- ${STAGING_BINDIR_NATIVE}/git clone git://git.secretlab.ca/git/linux-2.6-virtex.git master
-}
-
-
-
-do_configure() {
-
- install -m 644 ${WORKDIR}/xilinx-ml403_defconfig ${S}/.config
- make ARCH=${ARCH} oldconfig
-}
-
-do_stage_append () {
-#need ppc platforms includes + friends in order for external kernel modules to compile as headers a$
-
- install -d ${STAGING_KERNEL_DIR}/arch/
- cp -pPR arch/ppc ${STAGING_KERNEL_DIR}/arch/
- cp -pPR arch/powerpc ${STAGING_KERNEL_DIR}/arch/
-
- install -d ${STAGING_KERNEL_DIR}/include/asm
- cp -pPR include/asm-powerpc ${STAGING_KERNEL_DIR}/include/
- cp -pPR include/asm-ppc ${STAGING_KERNEL_DIR}/include/
-}
-
-
-
-do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
- ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}
-}
-
-#seems like 2.6.21 kernel images have moved (or is this only for the Denx kernel ?)
-#so we need to copy the kernel image where kernel.bbclass expects it to be
-do_install_prepend() {
- install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
- arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
-}
diff --git a/packages/linux/linux-neuros/binutils-buildid-arm.patch b/packages/linux/linux-neuros/binutils-buildid-arm.patch
new file mode 100644
index 0000000000..68e35e89e1
--- /dev/null
+++ b/packages/linux/linux-neuros/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-neuros/mtune-gcc4-fix.patch b/packages/linux/linux-neuros/mtune-gcc4-fix.patch
new file mode 100644
index 0000000000..c42a5ae863
--- /dev/null
+++ b/packages/linux/linux-neuros/mtune-gcc4-fix.patch
@@ -0,0 +1,11 @@
+--- /tmp/Makefile 2008-06-30 19:58:09.000000000 +0200
++++ linux-2.6.15/arch/arm/Makefile 2008-06-30 19:58:53.000000000 +0200
+@@ -55,7 +55,7 @@
+ tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi
+ tune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi
+ #tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi
+-tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm926ejs
++tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm926ej-s
+ tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110
+ tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
+ tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
diff --git a/packages/linux/linux-neuros/neuros-osd/.mtn2git_empty b/packages/linux/linux-neuros/neuros-osd/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-neuros/neuros-osd/.mtn2git_empty
diff --git a/packages/linux/linux-neuros/neuros-osd/defconfig b/packages/linux/linux-neuros/neuros-osd/defconfig
new file mode 100644
index 0000000000..5b7ac99929
--- /dev/null
+++ b/packages/linux/linux-neuros/neuros-osd/defconfig
@@ -0,0 +1,1373 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-davinci1
+# Thu Mar 6 20:08:16 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# 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=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+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 is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+CONFIG_ARCH_DAVINCI=y
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# TI DaVinci Implementations
+#
+
+#
+# DaVinci Core Type
+#
+CONFIG_ARCH_DAVINCI644x=y
+
+#
+# DaVinci Board Type
+#
+CONFIG_MACH_NTOSD_644XA=y
+# CONFIG_MACH_DAVINCI_EVM is not set
+CONFIG_DAVINCI_I2C_EXPANDER=y
+CONFIG_DAVINCI_MCBSP=y
+
+#
+# DaVinci Options
+#
+# CONFIG_DAVINCI_BLK_DEV_CF is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# 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 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_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_LEDS=y
+# CONFIG_LEDS_CPU 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
+# 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
+# CONFIG_VFP 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_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 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=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 is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# 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 is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_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
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR 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=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+CONFIG_MTD_NAND_DAVINCI=y
+CONFIG_NAND_FLASH_HW_ECC=y
+# 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=m
+# 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=1
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+CONFIG_IDE_TASK_IOCTL=y
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_IDEPCI_PCIBUS_ORDER is not set
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+# CONFIG_IDEDMA_ONLYDISK is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
+# CONFIG_IDE_ARM is not set
+CONFIG_BLK_DEV_DAVINCI=y
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_IVB is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST 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=m
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+CONFIG_NETDEV_1000=y
+CONFIG_NETDEV_10000=y
+CONFIG_TI_DAVINCI_EMAC=y
+
+#
+# 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 is not set
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+CONFIG_NETCONSOLE=y
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+# 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=y
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_NEUROS_IR=m
+
+#
+# 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 is not set
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# 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_RESIZER=y
+CONFIG_THS7313=y
+CONFIG_THS8200=y
+# 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_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_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+CONFIG_I2C_DAVINCI=y
+
+#
+# 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_TLV320AIC23=y
+CONFIG_SENSORS_TLV320AIC32=y
+CONFIG_SENSORS_TLV320AIC33=y
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_GPIOEXPANDER_DAVINCI is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_I2C_NEUROS_MSP430=m
+
+#
+# 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 is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_TVP5146 is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+# CONFIG_TUNER_TEA5761 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_RADIO_ADAPTERS=y
+# CONFIG_RADIO_TEA5761 is not set
+# CONFIG_USB_DSBR is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_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_DAVINCI=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_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 is not set
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=y
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_DAVINCI=y
+CONFIG_SOUND_DAVINCI_AIC32=y
+
+#
+# DaVinci Audio Options
+#
+# CONFIG_MONOSTEREO_DIFFJACK is not set
+CONFIG_MONOSTEREO_SAMEJACK=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# 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
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+CONFIG_USB_MUSB_HDRC=m
+CONFIG_USB_MUSB_SOC=y
+
+#
+# DaVinci 644x USB support
+#
+CONFIG_USB_MUSB_HOST=y
+# CONFIG_USB_MUSB_PERIPHERAL=y
+# CONFIG_USB_MUSB_OTG is not set
+CONFIG_USB_GADGET_MUSB_HDRC=y
+# CONFIG_MUSB_PIO_ONLY is not set
+# CONFIG_USB_INVENTRA_DMA is not set
+CONFIG_USB_TI_CPPI_DMA=y
+CONFIG_USB_MUSB_LOGLEVEL=0
+
+#
+# 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=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_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=m
+# 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
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=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 is not set
+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 is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_DAVINCI=y
+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=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_SECURITY is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_MINIX_FS=m
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+# CONFIG_FUSE_FS 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_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
+# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
+# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
+# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
+CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=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=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_NFSD_TCP=y
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+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=m
+# 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=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=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=m
+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=m
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_CRYPTO is not set
+
+#
+# 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/linux-neuros/neuros-osd2/.mtn2git_empty b/packages/linux/linux-neuros/neuros-osd2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-neuros/neuros-osd2/.mtn2git_empty
diff --git a/packages/linux/linux-neuros/neuros-osd2/defconfig b/packages/linux/linux-neuros/neuros-osd2/defconfig
new file mode 100644
index 0000000000..b729767e3e
--- /dev/null
+++ b/packages/linux/linux-neuros/neuros-osd2/defconfig
@@ -0,0 +1,1377 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-davinci1
+# Thu Mar 6 20:08:16 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# 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=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+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 is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+CONFIG_ARCH_DAVINCI=y
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# TI DaVinci Implementations
+#
+
+#
+# DaVinci Core Type
+#
+CONFIG_ARCH_DAVINCI644x=y
+
+#
+# DaVinci Board Type
+#
+CONFIG_MACH_NTOSD_644XA=y
+# CONFIG_MACH_DAVINCI_EVM is not set
+CONFIG_DAVINCI_I2C_EXPANDER=y
+CONFIG_DAVINCI_MCBSP=y
+
+#
+# DaVinci Options
+#
+# CONFIG_DAVINCI_BLK_DEV_CF is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# 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 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_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_LEDS=y
+# CONFIG_LEDS_CPU 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
+# 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
+# CONFIG_VFP 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_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 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=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 is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# 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=y
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+CONFIG_IEEE80211_SOFTMAC=y
+
+#
+# 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
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR 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=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+CONFIG_MTD_NAND_DAVINCI=y
+CONFIG_NAND_FLASH_HW_ECC=y
+# 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=m
+# 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=1
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+CONFIG_IDE_TASK_IOCTL=y
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_IDEPCI_PCIBUS_ORDER is not set
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+# CONFIG_IDEDMA_ONLYDISK is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
+# CONFIG_IDE_ARM is not set
+CONFIG_BLK_DEV_DAVINCI=y
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_IVB is not set
+# CONFIG_BLK_DEV_HD 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=m
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+CONFIG_NETDEV_1000=y
+CONFIG_NETDEV_10000=y
+CONFIG_TI_DAVINCI_EMAC=y
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_ZD1211RW=y
+
+#
+# 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 is not set
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+CONFIG_NETCONSOLE=y
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+# 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=y
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_NEUROS_IR=m
+
+#
+# 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 is not set
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# 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_RESIZER=y
+CONFIG_THS7313=y
+CONFIG_THS8200=y
+# 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_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_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+CONFIG_I2C_DAVINCI=y
+
+#
+# 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_TLV320AIC23=y
+CONFIG_SENSORS_TLV320AIC32=y
+CONFIG_SENSORS_TLV320AIC33=y
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_GPIOEXPANDER_DAVINCI is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_I2C_NEUROS_MSP430=m
+CONFIG_I2C_NEUROS_SIL9034HDMI=m
+
+#
+# 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
+CONFIG_NEUROS_IR_BLASTER=m
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_NEW_LEDS is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_TVP5146 is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+# CONFIG_TUNER_TEA5761 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_RADIO_ADAPTERS=y
+# CONFIG_RADIO_TEA5761 is not set
+# CONFIG_USB_DSBR is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_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_DAVINCI=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_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 is not set
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=y
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_DAVINCI=y
+CONFIG_SOUND_DAVINCI_AIC32=y
+
+#
+# DaVinci Audio Options
+#
+# CONFIG_MONOSTEREO_DIFFJACK is not set
+CONFIG_MONOSTEREO_SAMEJACK=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# 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
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# 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 is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SOC=y
+
+#
+# DaVinci 644x USB support
+#
+CONFIG_USB_MUSB_HOST=y
+# CONFIG_USB_MUSB_PERIPHERAL=y
+# CONFIG_USB_MUSB_OTG is not set
+CONFIG_USB_GADGET_MUSB_HDRC=y
+# CONFIG_MUSB_PIO_ONLY is not set
+# CONFIG_USB_INVENTRA_DMA is not set
+CONFIG_USB_TI_CPPI_DMA=y
+CONFIG_USB_MUSB_LOGLEVEL=0
+
+#
+# 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_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_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=m
+# 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
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=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 is not set
+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 is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_DAVINCI=y
+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=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_SECURITY is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_MINIX_FS=m
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+# CONFIG_FUSE_FS 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_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
+# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
+# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
+# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
+CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=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=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_NFSD_TCP=y
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+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=m
+# 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=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=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=m
+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=m
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_CRYPTO is not set
+
+#
+# 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/linux-neuros_2.6.15.bb b/packages/linux/linux-neuros_2.6.15.bb
index 82df2f44bd..f103d2c35f 100644
--- a/packages/linux/linux-neuros_2.6.15.bb
+++ b/packages/linux/linux-neuros_2.6.15.bb
@@ -1,7 +1,7 @@
#require linux-omap.inc
PV = "2.6.15-torfu"
-PR = "r4"
+PR = "r5"
COMPATIBLE_MACHINE = "(neuros-osd)"
@@ -10,6 +10,7 @@ COMPATIBLE_MACHINE = "(neuros-osd)"
SRC_URI = "svn://svn.neurostechnology.com/svn/neuros-bsp/branches/torfu/kernels;module=linux-2.6.15;proto=svn;rev= \
file://g0-20080113.patch;patch=1\
file://bsp_config.h \
+ file://mtune-gcc4-fix.patch;patch=1 \
file://defconfig"
S = "${WORKDIR}/linux-2.6.15"
diff --git a/packages/linux/linux-neuros_git.bb b/packages/linux/linux-neuros_git.bb
new file mode 100644
index 0000000000..c798def1b7
--- /dev/null
+++ b/packages/linux/linux-neuros_git.bb
@@ -0,0 +1,16 @@
+require linux.inc
+
+DESCRIPTION = "Linux kernel for Neuros OSD devices"
+
+SRCREV = "11c1e25ec8b9c6e1bef53d776ef3462aaacbd0a0"
+
+PV = "2.6.23-${PR}+git${SRCREV}"
+PR = "r2"
+
+COMPATIBLE_MACHINE = "(neuros-osd|neuros-osd2)"
+
+SRC_URI = "git://git.neurostechnology.com/git/linux-davinci-2.6;protocol=git;branch=neuros \
+ file://binutils-buildid-arm.patch;patch=1 \
+ file://defconfig"
+
+S = "${WORKDIR}/git"
diff --git a/packages/linux/linux-omap1-2.6.24-omap1/timespec_add_ns_avoid_udivdi3.patch b/packages/linux/linux-omap1-2.6.24-omap1/timespec_add_ns_avoid_udivdi3.patch
new file mode 100644
index 0000000000..4aba897b06
--- /dev/null
+++ b/packages/linux/linux-omap1-2.6.24-omap1/timespec_add_ns_avoid_udivdi3.patch
@@ -0,0 +1,20 @@
+Backport of this patch here
+
+http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg270684.html
+
+Needed for 2.6.24 to compile with gcc 4.3
+Index: linux-2.6.24/include/linux/time.h
+===================================================================
+--- linux-2.6.24.orig/include/linux/time.h 2008-05-28 15:39:46.000000000 -0700
++++ linux-2.6.24/include/linux/time.h 2008-05-28 15:40:48.000000000 -0700
+@@ -173,6 +173,10 @@
+ {
+ ns += a->tv_nsec;
+ while(unlikely(ns >= NSEC_PER_SEC)) {
++ /* The following asm() prevents the compiler from
++ * optimising this loop into a modulo operation. */
++ asm("" : "+r"(ns));
++
+ ns -= NSEC_PER_SEC;
+ a->tv_sec++;
+ }
diff --git a/packages/linux/linux-omap1-2.6.25-omap1/.mtn2git_empty b/packages/linux/linux-omap1-2.6.25-omap1/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-omap1-2.6.25-omap1/.mtn2git_empty
diff --git a/packages/linux/linux-omap1-2.6.25-omap1/defconfig b/packages/linux/linux-omap1-2.6.25-omap1/defconfig
new file mode 100644
index 0000000000..f05fad61fb
--- /dev/null
+++ b/packages/linux/linux-omap1-2.6.25-omap1/defconfig
@@ -0,0 +1,1175 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.25-omap1
+# Mon Jun 2 07:43:25 2008
+#
+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_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD 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"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_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_ORION is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# TI OMAP Implementations
+#
+CONFIG_ARCH_OMAP_OTG=y
+CONFIG_ARCH_OMAP1=y
+# CONFIG_ARCH_OMAP2 is not set
+# CONFIG_ARCH_OMAP3 is not set
+
+#
+# OMAP Feature Selections
+#
+CONFIG_OMAP_DEBUG_SRAM_PATCH=y
+CONFIG_OMAP_RESET_CLOCKS=y
+# CONFIG_OMAP_BOOT_TAG is not set
+# CONFIG_OMAP_GPIO_SWITCH is not set
+CONFIG_OMAP_MUX=y
+# CONFIG_OMAP_MUX_DEBUG is not set
+CONFIG_OMAP_MUX_WARNINGS=y
+CONFIG_OMAP_MCBSP=y
+# CONFIG_OMAP_MMU_FWK is not set
+# CONFIG_OMAP_MBOX_FWK is not set
+# CONFIG_OMAP_MPU_TIMER is not set
+CONFIG_OMAP_32K_TIMER=y
+CONFIG_OMAP_32K_TIMER_HZ=128
+# CONFIG_OMAP_DM_TIMER is not set
+CONFIG_OMAP_LL_DEBUG_UART1=y
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP_SERIAL_WAKE=y
+
+#
+# OMAP Core Type
+#
+# CONFIG_ARCH_OMAP730 is not set
+# CONFIG_ARCH_OMAP15XX is not set
+CONFIG_ARCH_OMAP16XX=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_OMAP_INNOVATOR is not set
+# CONFIG_MACH_OMAP_H2 is not set
+# CONFIG_MACH_OMAP_H3 is not set
+CONFIG_MACH_OMAP_OSK=y
+# CONFIG_OMAP_OSK_MISTRAL is not set
+# CONFIG_MACH_NOKIA770 is not set
+# CONFIG_MACH_OMAP_GENERIC is not set
+
+#
+# OMAP CPU Speed
+#
+# CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER is not set
+# CONFIG_OMAP_ARM_216MHZ is not set
+CONFIG_OMAP_ARM_192MHZ=y
+# CONFIG_OMAP_ARM_168MHZ is not set
+# CONFIG_OMAP_ARM_120MHZ is not set
+# CONFIG_OMAP_ARM_60MHZ is not set
+# CONFIG_OMAP_ARM_30MHZ is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=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_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_OMAP_CF=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=128
+# 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_SPARSEMEM_VMEMMAP_ENABLE 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_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x10400000,8M root=/dev/ram0 rw"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP 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_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+# 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_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# 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_IP_MROUTE 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_LRO is not set
+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
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA 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_UEVENT_HELPER_PATH="/sbin/hotplug"
+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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+CONFIG_MTD_OMAP_NOR=y
+# 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 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_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_OMAP_STI is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=m
+CONFIG_BLK_DEV_IDE=m
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=m
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=m
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_IDE_GENERIC is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_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_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+CONFIG_NETDEV_1000=y
+# CONFIG_E1000E_ENABLED is not set
+CONFIG_NETDEV_10000=y
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_NET_PCMCIA is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=y
+CONFIG_PPP_MULTILINK=y
+# CONFIG_PPP_FILTER is not set
+# CONFIG_PPP_ASYNC is not set
+# CONFIG_PPP_SYNC_TTY is not set
+# CONFIG_PPP_DEFLATE is not set
+# CONFIG_PPP_BSDCOMP is not set
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=y
+# 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_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_OMAP=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_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 is not set
+# CONFIG_TOUCHSCREEN_TSC2005 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# 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=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_CS is not set
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+CONFIG_HW_RANDOM_OMAP=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_IPWIRELESS is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_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_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TPS65010=y
+# CONFIG_SENSORS_TLV320AIC23 is not set
+# CONFIG_GPIOEXPANDER_OMAP is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_SENSORS_TSL2563 is not set
+# CONFIG_LP5521 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_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID 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_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_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_ADS7828 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_W83L786NG is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_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 is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_FB_OMAP=y
+# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2
+# CONFIG_FB_OMAP_DMA_TUNE is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# Enable Host or Gadget support to see Inventra options
+#
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# CBUS support
+#
+# CONFIG_CBUS is not set
+# CONFIG_OMAP_DSP 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 is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_AUTOFS_FS=y
+CONFIG_AUTOFS4_FS=y
+# 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=m
+CONFIG_MSDOS_FS=m
+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 is not set
+# CONFIG_HUGETLB_PAGE is not set
+# 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_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=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 is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_SEQIV is not set
+# CONFIG_CRYPTO_MANAGER is not set
+# 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 is not set
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_CCM 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 is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SALSA20 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_AUTHENC is not set
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# 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-omap1_2.6.24-omap1.bb b/packages/linux/linux-omap1_2.6.24-omap1.bb
index f5ed1a43f9..2f2076b923 100644
--- a/packages/linux/linux-omap1_2.6.24-omap1.bb
+++ b/packages/linux/linux-omap1_2.6.24-omap1.bb
@@ -5,6 +5,7 @@ COMPATIBLE_MACHINE = "omap5912osk"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
http://www.muru.com/linux/omap/patches/patch-2.6.24-omap1.bz2;patch=1 \
file://binutils-buildid-arm.patch;patch=1 \
+ file://timespec_add_ns_avoid_udivdi3.patch;patch=1 \
file://defconfig"
S = "${WORKDIR}/linux-2.6.24"
diff --git a/packages/linux/linux-omap1_2.6.25-omap1.bb b/packages/linux/linux-omap1_2.6.25-omap1.bb
new file mode 100644
index 0000000000..1d2d0bedc5
--- /dev/null
+++ b/packages/linux/linux-omap1_2.6.25-omap1.bb
@@ -0,0 +1,9 @@
+require linux-omap.inc
+
+COMPATIBLE_MACHINE = "omap5912osk"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2 \
+ http://www.muru.com/linux/omap/patches/patch-2.6.25-omap1.bz2;patch=1 \
+ file://defconfig"
+
+S = "${WORKDIR}/linux-2.6.25"
diff --git a/packages/linux/linux-omap2-git/beagleboard/00001-mcbsp-transform.patch b/packages/linux/linux-omap2-git/beagleboard/00001-mcbsp-transform.patch
deleted file mode 100644
index 452370bf3e..0000000000
--- a/packages/linux/linux-omap2-git/beagleboard/00001-mcbsp-transform.patch
+++ /dev/null
@@ -1,1160 +0,0 @@
-From: Eduardo Valentin <eduardo.valentin@indt.org.br>
-
-This patch transform mcbsp code into a very initial
-implementation of a platform driver.
-
-It also gets ride of ifdefs on mcbsp.c code.
-To do it, a platform data structure was defined.
-
-Platform devices are located in arch/arm/plat-omap/devices.c
-
-Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
----
- arch/arm/plat-omap/devices.c | 45 +++
- arch/arm/plat-omap/mcbsp.c | 660 ++++++++++++++-----------------------
- include/asm-arm/arch-omap/mcbsp.h | 73 ++++-
- 3 files changed, 367 insertions(+), 411 deletions(-)
-
-diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
-index 099182b..b3e0147 100644
---- a/arch/arm/plat-omap/devices.c
-+++ b/arch/arm/plat-omap/devices.c
-@@ -27,6 +27,7 @@
- #include <asm/arch/gpio.h>
- #include <asm/arch/menelaus.h>
- #include <asm/arch/dsp_common.h>
-+#include <asm/arch/mcbsp.h>
-
- #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
-
-@@ -150,6 +151,49 @@ static inline void omap_init_kp(void) {}
- #endif
-
- /*-------------------------------------------------------------------------*/
-+#if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE)
-+
-+static struct platform_device omap_mcbsp_devices[OMAP_MAX_MCBSP_COUNT];
-+static int mcbsps_configured;
-+
-+void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
-+ int size)
-+{
-+ int i;
-+
-+ if (size > OMAP_MAX_MCBSP_COUNT) {
-+ printk(KERN_WARNING "Registered too many McBSPs platform_data."
-+ " Using maximum (%d) available.\n",
-+ OMAP_MAX_MCBSP_COUNT);
-+ size = OMAP_MAX_MCBSP_COUNT;
-+ }
-+
-+ for (i = 0; i < size; i++) {
-+ struct platform_device *new_mcbsp = &omap_mcbsp_devices[i];
-+ new_mcbsp->name = "omap-mcbsp";
-+ new_mcbsp->id = i + 1;
-+ new_mcbsp->dev.platform_data = &config[i];
-+ }
-+ mcbsps_configured = size;
-+}
-+
-+static void __init omap_init_mcbsp(void)
-+{
-+ int i;
-+
-+ for (i = 0; i < mcbsps_configured; i++)
-+ platform_device_register(&omap_mcbsp_devices[i]);
-+}
-+#else
-+void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
-+ int size)
-+{ }
-+
-+static inline void __init omap_init_mcbsp(void)
-+{ }
-+#endif
-+
-+/*-------------------------------------------------------------------------*/
-
- #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) \
- || defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
-@@ -511,6 +555,7 @@ static int __init omap_init_devices(void)
- */
- omap_init_dsp();
- omap_init_kp();
-+ omap_init_mcbsp();
- omap_init_mmc();
- omap_init_uwire();
- omap_init_wdt();
-diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
-index 053de31..5536223 100644
---- a/arch/arm/plat-omap/mcbsp.c
-+++ b/arch/arm/plat-omap/mcbsp.c
-@@ -15,6 +15,7 @@
- #include <linux/module.h>
- #include <linux/init.h>
- #include <linux/device.h>
-+#include <linux/platform_device.h>
- #include <linux/wait.h>
- #include <linux/completion.h>
- #include <linux/interrupt.h>
-@@ -25,83 +26,53 @@
- #include <linux/irq.h>
-
- #include <asm/arch/dma.h>
--#include <asm/arch/mux.h>
--#include <asm/arch/irqs.h>
--#include <asm/arch/dsp_common.h>
- #include <asm/arch/mcbsp.h>
-
--#ifdef CONFIG_MCBSP_DEBUG
--#define DBG(x...) printk(x)
--#else
--#define DBG(x...) do { } while (0)
--#endif
--
--struct omap_mcbsp {
-- u32 io_base;
-- u8 id;
-- u8 free;
-- omap_mcbsp_word_length rx_word_length;
-- omap_mcbsp_word_length tx_word_length;
--
-- omap_mcbsp_io_type_t io_type; /* IRQ or poll */
-- /* IRQ based TX/RX */
-- int rx_irq;
-- int tx_irq;
--
-- /* DMA stuff */
-- u8 dma_rx_sync;
-- short dma_rx_lch;
-- u8 dma_tx_sync;
-- short dma_tx_lch;
--
-- /* Completion queues */
-- struct completion tx_irq_completion;
-- struct completion rx_irq_completion;
-- struct completion tx_dma_completion;
-- struct completion rx_dma_completion;
--
-- /* Protect the field .free, while checking if the mcbsp is in use */
-- spinlock_t lock;
--};
--
- static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT];
--#ifdef CONFIG_ARCH_OMAP1
--static struct clk *mcbsp_dsp_ck;
--static struct clk *mcbsp_api_ck;
--static struct clk *mcbsp_dspxor_ck;
--#endif
--#ifdef CONFIG_ARCH_OMAP2
--static struct clk *mcbsp1_ick;
--static struct clk *mcbsp1_fck;
--static struct clk *mcbsp2_ick;
--static struct clk *mcbsp2_fck;
--#endif
-+
-+#define omap_mcbsp_check_valid_id(id) (mcbsp[id].pdata && \
-+ mcbsp[id].pdata->ops && \
-+ mcbsp[id].pdata->ops->check && \
-+ (mcbsp[id].pdata->ops->check(id) == 0))
-
- static void omap_mcbsp_dump_reg(u8 id)
- {
-- DBG("**** MCBSP%d regs ****\n", mcbsp[id].id);
-- DBG("DRR2: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, DRR2));
-- DBG("DRR1: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, DRR1));
-- DBG("DXR2: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, DXR2));
-- DBG("DXR1: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, DXR1));
-- DBG("SPCR2: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, SPCR2));
-- DBG("SPCR1: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, SPCR1));
-- DBG("RCR2: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, RCR2));
-- DBG("RCR1: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, RCR1));
-- DBG("XCR2: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, XCR2));
-- DBG("XCR1: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, XCR1));
-- DBG("SRGR2: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, SRGR2));
-- DBG("SRGR1: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, SRGR1));
-- DBG("PCR0: 0x%04x\n", OMAP_MCBSP_READ(mcbsp[id].io_base, PCR0));
-- DBG("***********************\n");
-+ dev_dbg(mcbsp[id].dev, "**** McBSP%d regs ****\n", mcbsp[id].id);
-+ dev_dbg(mcbsp[id].dev, "DRR2: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, DRR2));
-+ dev_dbg(mcbsp[id].dev, "DRR1: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, DRR1));
-+ dev_dbg(mcbsp[id].dev, "DXR2: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, DXR2));
-+ dev_dbg(mcbsp[id].dev, "DXR1: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, DXR1));
-+ dev_dbg(mcbsp[id].dev, "SPCR2: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, SPCR2));
-+ dev_dbg(mcbsp[id].dev, "SPCR1: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, SPCR1));
-+ dev_dbg(mcbsp[id].dev, "RCR2: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, RCR2));
-+ dev_dbg(mcbsp[id].dev, "RCR1: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, RCR1));
-+ dev_dbg(mcbsp[id].dev, "XCR2: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, XCR2));
-+ dev_dbg(mcbsp[id].dev, "XCR1: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, XCR1));
-+ dev_dbg(mcbsp[id].dev, "SRGR2: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, SRGR2));
-+ dev_dbg(mcbsp[id].dev, "SRGR1: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, SRGR1));
-+ dev_dbg(mcbsp[id].dev, "PCR0: 0x%04x\n",
-+ OMAP_MCBSP_READ(mcbsp[id].io_base, PCR0));
-+ dev_dbg(mcbsp[id].dev, "***********************\n");
- }
-
- static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id)
- {
- struct omap_mcbsp *mcbsp_tx = dev_id;
-
-- DBG("TX IRQ callback : 0x%x\n",
-- OMAP_MCBSP_READ(mcbsp_tx->io_base, SPCR2));
-+ dev_dbg(mcbsp_tx->dev, "TX IRQ callback : 0x%x\n",
-+ OMAP_MCBSP_READ(mcbsp_tx->io_base, SPCR2));
-
- complete(&mcbsp_tx->tx_irq_completion);
-
-@@ -112,8 +83,8 @@ static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id)
- {
- struct omap_mcbsp *mcbsp_rx = dev_id;
-
-- DBG("RX IRQ callback : 0x%x\n",
-- OMAP_MCBSP_READ(mcbsp_rx->io_base, SPCR2));
-+ dev_dbg(mcbsp_rx->dev, "RX IRQ callback : 0x%x\n",
-+ OMAP_MCBSP_READ(mcbsp_rx->io_base, SPCR2));
-
- complete(&mcbsp_rx->rx_irq_completion);
-
-@@ -124,8 +95,8 @@ static void omap_mcbsp_tx_dma_callback(int lch, u16 ch_status, void *data)
- {
- struct omap_mcbsp *mcbsp_dma_tx = data;
-
-- DBG("TX DMA callback : 0x%x\n",
-- OMAP_MCBSP_READ(mcbsp_dma_tx->io_base, SPCR2));
-+ dev_dbg(mcbsp_dma_tx->dev, "TX DMA callback : 0x%x\n",
-+ OMAP_MCBSP_READ(mcbsp_dma_tx->io_base, SPCR2));
-
- /* We can free the channels */
- omap_free_dma(mcbsp_dma_tx->dma_tx_lch);
-@@ -138,8 +109,8 @@ static void omap_mcbsp_rx_dma_callback(int lch, u16 ch_status, void *data)
- {
- struct omap_mcbsp *mcbsp_dma_rx = data;
-
-- DBG("RX DMA callback : 0x%x\n",
-- OMAP_MCBSP_READ(mcbsp_dma_rx->io_base, SPCR2));
-+ dev_dbg(mcbsp_dma_rx->dev, "RX DMA callback : 0x%x\n",
-+ OMAP_MCBSP_READ(mcbsp_dma_rx->io_base, SPCR2));
-
- /* We can free the channels */
- omap_free_dma(mcbsp_dma_rx->dma_rx_lch);
-@@ -156,9 +127,16 @@ static void omap_mcbsp_rx_dma_callback(int lch, u16 ch_status, void *data)
- */
- void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg *config)
- {
-- u32 io_base = mcbsp[id].io_base;
-+ u32 io_base;
-+
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return;
-+ }
-
-- DBG("OMAP-McBSP: McBSP%d io_base: 0x%8x\n", id + 1, io_base);
-+ io_base = mcbsp[id].io_base;
-+ dev_dbg(mcbsp[id].dev, "Configuring McBSP%d io_base: 0x%8x\n",
-+ mcbsp[id].id, io_base);
-
- /* We write the given config */
- OMAP_MCBSP_WRITE(io_base, SPCR2, config->spcr2);
-@@ -175,97 +153,22 @@ void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg *config)
- }
- EXPORT_SYMBOL(omap_mcbsp_config);
-
--static int omap_mcbsp_check(unsigned int id)
--{
-- if (cpu_is_omap730()) {
-- if (id > OMAP_MAX_MCBSP_COUNT - 1) {
-- printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n",
-- id + 1);
-- return -1;
-- }
-- return 0;
-- }
--
-- if (cpu_is_omap15xx() || cpu_is_omap16xx() || cpu_is_omap24xx()) {
-- if (id > OMAP_MAX_MCBSP_COUNT) {
-- printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n",
-- id + 1);
-- return -1;
-- }
-- return 0;
-- }
--
-- return -1;
--}
--
--#ifdef CONFIG_ARCH_OMAP1
--static void omap_mcbsp_dsp_request(void)
--{
-- if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
-- int ret;
--
-- ret = omap_dsp_request_mem();
-- if (ret < 0) {
-- printk(KERN_ERR "Could not get dsp memory: %i\n", ret);
-- return;
-- }
--
-- clk_enable(mcbsp_dsp_ck);
-- clk_enable(mcbsp_api_ck);
--
-- /* enable 12MHz clock to mcbsp 1 & 3 */
-- clk_enable(mcbsp_dspxor_ck);
--
-- /*
-- * DSP external peripheral reset
-- * FIXME: This should be moved to dsp code
-- */
-- __raw_writew(__raw_readw(DSP_RSTCT2) | 1 | 1 << 1,
-- DSP_RSTCT2);
-- }
--}
--
--static void omap_mcbsp_dsp_free(void)
--{
-- if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
-- omap_dsp_release_mem();
-- clk_disable(mcbsp_dspxor_ck);
-- clk_disable(mcbsp_dsp_ck);
-- clk_disable(mcbsp_api_ck);
-- }
--}
--#endif
--
--#ifdef CONFIG_ARCH_OMAP2
--static void omap2_mcbsp2_mux_setup(void)
--{
-- if (cpu_is_omap2420()) {
-- omap_cfg_reg(Y15_24XX_MCBSP2_CLKX);
-- omap_cfg_reg(R14_24XX_MCBSP2_FSX);
-- omap_cfg_reg(W15_24XX_MCBSP2_DR);
-- omap_cfg_reg(V15_24XX_MCBSP2_DX);
-- omap_cfg_reg(V14_24XX_GPIO117);
-- }
-- /*
-- * Need to add MUX settings for OMAP 2430 SDP
-- */
--}
--#endif
--
- /*
- * We can choose between IRQ based or polled IO.
- * This needs to be called before omap_mcbsp_request().
- */
- int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type)
- {
-- if (omap_mcbsp_check(id) < 0)
-- return -EINVAL;
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
-+ }
-
- spin_lock(&mcbsp[id].lock);
-
- if (!mcbsp[id].free) {
-- printk(KERN_ERR "OMAP-McBSP: McBSP%d is currently in use\n",
-- id + 1);
-+ dev_err(mcbsp[id].dev, "McBSP%d is currently in use\n",
-+ mcbsp[id].id);
- spin_unlock(&mcbsp[id].lock);
- return -EINVAL;
- }
-@@ -282,34 +185,20 @@ int omap_mcbsp_request(unsigned int id)
- {
- int err;
-
-- if (omap_mcbsp_check(id) < 0)
-- return -EINVAL;
--
--#ifdef CONFIG_ARCH_OMAP1
-- /*
-- * On 1510, 1610 and 1710, McBSP1 and McBSP3
-- * are DSP public peripherals.
-- */
-- if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
-- omap_mcbsp_dsp_request();
--#endif
--
--#ifdef CONFIG_ARCH_OMAP2
-- if (cpu_is_omap24xx()) {
-- if (id == OMAP_MCBSP1) {
-- clk_enable(mcbsp1_ick);
-- clk_enable(mcbsp1_fck);
-- } else {
-- clk_enable(mcbsp2_ick);
-- clk_enable(mcbsp2_fck);
-- }
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
- }
--#endif
-+
-+ if (mcbsp[id].pdata->ops->request)
-+ mcbsp[id].pdata->ops->request(id);
-+
-+ mcbsp_clk_enable(&mcbsp[id]);
-
- spin_lock(&mcbsp[id].lock);
- if (!mcbsp[id].free) {
-- printk(KERN_ERR "OMAP-McBSP: McBSP%d is currently in use\n",
-- id + 1);
-+ dev_err(mcbsp[id].dev, "McBSP%d is currently in use\n",
-+ mcbsp[id].id);
- spin_unlock(&mcbsp[id].lock);
- return -1;
- }
-@@ -322,9 +211,9 @@ int omap_mcbsp_request(unsigned int id)
- err = request_irq(mcbsp[id].tx_irq, omap_mcbsp_tx_irq_handler,
- 0, "McBSP", (void *) (&mcbsp[id]));
- if (err != 0) {
-- printk(KERN_ERR "OMAP-McBSP: Unable to "
-- "request TX IRQ %d for McBSP%d\n",
-- mcbsp[id].tx_irq, mcbsp[id].id);
-+ dev_err(mcbsp[id].dev, "Unable to request TX IRQ %d "
-+ "for McBSP%d\n", mcbsp[id].tx_irq,
-+ mcbsp[id].id);
- return err;
- }
-
-@@ -333,9 +222,9 @@ int omap_mcbsp_request(unsigned int id)
- err = request_irq(mcbsp[id].rx_irq, omap_mcbsp_rx_irq_handler,
- 0, "McBSP", (void *) (&mcbsp[id]));
- if (err != 0) {
-- printk(KERN_ERR "OMAP-McBSP: Unable to "
-- "request RX IRQ %d for McBSP%d\n",
-- mcbsp[id].rx_irq, mcbsp[id].id);
-+ dev_err(mcbsp[id].dev, "Unable to request RX IRQ %d "
-+ "for McBSP%d\n", mcbsp[id].rx_irq,
-+ mcbsp[id].id);
- free_irq(mcbsp[id].tx_irq, (void *) (&mcbsp[id]));
- return err;
- }
-@@ -349,32 +238,20 @@ EXPORT_SYMBOL(omap_mcbsp_request);
-
- void omap_mcbsp_free(unsigned int id)
- {
-- if (omap_mcbsp_check(id) < 0)
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
- return;
--
--#ifdef CONFIG_ARCH_OMAP1
-- if (cpu_class_is_omap1()) {
-- if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
-- omap_mcbsp_dsp_free();
- }
--#endif
--
--#ifdef CONFIG_ARCH_OMAP2
-- if (cpu_is_omap24xx()) {
-- if (id == OMAP_MCBSP1) {
-- clk_disable(mcbsp1_ick);
-- clk_disable(mcbsp1_fck);
-- } else {
-- clk_disable(mcbsp2_ick);
-- clk_disable(mcbsp2_fck);
-- }
-- }
--#endif
-+
-+ if (mcbsp[id].pdata->ops->free)
-+ mcbsp[id].pdata->ops->free(id);
-+
-+ mcbsp_clk_disable(&mcbsp[id]);
-
- spin_lock(&mcbsp[id].lock);
- if (mcbsp[id].free) {
-- printk(KERN_ERR "OMAP-McBSP: McBSP%d was not reserved\n",
-- id + 1);
-+ dev_err(mcbsp[id].dev, "McBSP%d was not reserved\n",
-+ mcbsp[id].id);
- spin_unlock(&mcbsp[id].lock);
- return;
- }
-@@ -400,8 +277,10 @@ void omap_mcbsp_start(unsigned int id)
- u32 io_base;
- u16 w;
-
-- if (omap_mcbsp_check(id) < 0)
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
- return;
-+ }
-
- io_base = mcbsp[id].io_base;
-
-@@ -435,8 +314,10 @@ void omap_mcbsp_stop(unsigned int id)
- u32 io_base;
- u16 w;
-
-- if (omap_mcbsp_check(id) < 0)
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
- return;
-+ }
-
- io_base = mcbsp[id].io_base;
-
-@@ -457,7 +338,14 @@ EXPORT_SYMBOL(omap_mcbsp_stop);
- /* polled mcbsp i/o operations */
- int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
- {
-- u32 base = mcbsp[id].io_base;
-+ u32 base;
-+
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
-+ }
-+
-+ base = mcbsp[id].io_base;
- writew(buf, base + OMAP_MCBSP_REG_DXR1);
- /* if frame sync error - clear the error */
- if (readw(base + OMAP_MCBSP_REG_SPCR2) & XSYNC_ERR) {
-@@ -479,8 +367,8 @@ int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
- (XRST),
- base + OMAP_MCBSP_REG_SPCR2);
- udelay(10);
-- printk(KERN_ERR
-- " Could not write to McBSP Register\n");
-+ dev_err(mcbsp[id].dev, "Could not write to"
-+ " McBSP%d Register\n", mcbsp[id].id);
- return -2;
- }
- }
-@@ -492,7 +380,14 @@ EXPORT_SYMBOL(omap_mcbsp_pollwrite);
-
- int omap_mcbsp_pollread(unsigned int id, u16 *buf)
- {
-- u32 base = mcbsp[id].io_base;
-+ u32 base;
-+
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
-+ }
-+
-+ base = mcbsp[id].io_base;
- /* if frame sync error - clear the error */
- if (readw(base + OMAP_MCBSP_REG_SPCR1) & RSYNC_ERR) {
- /* clear error */
-@@ -513,8 +408,8 @@ int omap_mcbsp_pollread(unsigned int id, u16 *buf)
- (RRST),
- base + OMAP_MCBSP_REG_SPCR1);
- udelay(10);
-- printk(KERN_ERR
-- " Could not read from McBSP Register\n");
-+ dev_err(mcbsp[id].dev, "Could not read from"
-+ " McBSP%d Register\n", mcbsp[id].id);
- return -2;
- }
- }
-@@ -531,12 +426,15 @@ EXPORT_SYMBOL(omap_mcbsp_pollread);
- void omap_mcbsp_xmit_word(unsigned int id, u32 word)
- {
- u32 io_base;
-- omap_mcbsp_word_length word_length = mcbsp[id].tx_word_length;
-+ omap_mcbsp_word_length word_length;
-
-- if (omap_mcbsp_check(id) < 0)
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
- return;
-+ }
-
- io_base = mcbsp[id].io_base;
-+ word_length = mcbsp[id].tx_word_length;
-
- wait_for_completion(&(mcbsp[id].tx_irq_completion));
-
-@@ -550,11 +448,14 @@ u32 omap_mcbsp_recv_word(unsigned int id)
- {
- u32 io_base;
- u16 word_lsb, word_msb = 0;
-- omap_mcbsp_word_length word_length = mcbsp[id].rx_word_length;
-+ omap_mcbsp_word_length word_length;
-
-- if (omap_mcbsp_check(id) < 0)
-- return -EINVAL;
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
-+ }
-
-+ word_length = mcbsp[id].rx_word_length;
- io_base = mcbsp[id].io_base;
-
- wait_for_completion(&(mcbsp[id].rx_irq_completion));
-@@ -569,11 +470,20 @@ EXPORT_SYMBOL(omap_mcbsp_recv_word);
-
- int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word)
- {
-- u32 io_base = mcbsp[id].io_base;
-- omap_mcbsp_word_length tx_word_length = mcbsp[id].tx_word_length;
-- omap_mcbsp_word_length rx_word_length = mcbsp[id].rx_word_length;
-+ u32 io_base;
-+ omap_mcbsp_word_length tx_word_length;
-+ omap_mcbsp_word_length rx_word_length;
- u16 spcr2, spcr1, attempts = 0, word_lsb, word_msb = 0;
-
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
-+ }
-+
-+ io_base = mcbsp[id].io_base;
-+ tx_word_length = mcbsp[id].tx_word_length;
-+ rx_word_length = mcbsp[id].rx_word_length;
-+
- if (tx_word_length != rx_word_length)
- return -EINVAL;
-
-@@ -587,7 +497,8 @@ int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word)
- udelay(10);
- OMAP_MCBSP_WRITE(io_base, SPCR2, spcr2 | XRST);
- udelay(10);
-- printk(KERN_ERR "McBSP transmitter not ready\n");
-+ dev_err(mcbsp[id].dev, "McBSP%d transmitter not "
-+ "ready\n", mcbsp[id].id);
- return -EAGAIN;
- }
- }
-@@ -607,7 +518,8 @@ int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word)
- udelay(10);
- OMAP_MCBSP_WRITE(io_base, SPCR1, spcr1 | RRST);
- udelay(10);
-- printk(KERN_ERR "McBSP receiver not ready\n");
-+ dev_err(mcbsp[id].dev, "McBSP%d receiver not "
-+ "ready\n", mcbsp[id].id);
- return -EAGAIN;
- }
- }
-@@ -623,11 +535,20 @@ EXPORT_SYMBOL(omap_mcbsp_spi_master_xmit_word_poll);
-
- int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 *word)
- {
-- u32 io_base = mcbsp[id].io_base, clock_word = 0;
-- omap_mcbsp_word_length tx_word_length = mcbsp[id].tx_word_length;
-- omap_mcbsp_word_length rx_word_length = mcbsp[id].rx_word_length;
-+ u32 io_base, clock_word = 0;
-+ omap_mcbsp_word_length tx_word_length;
-+ omap_mcbsp_word_length rx_word_length;
- u16 spcr2, spcr1, attempts = 0, word_lsb, word_msb = 0;
-
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
-+ }
-+
-+ io_base = mcbsp[id].io_base;
-+ tx_word_length = mcbsp[id].tx_word_length;
-+ rx_word_length = mcbsp[id].rx_word_length;
-+
- if (tx_word_length != rx_word_length)
- return -EINVAL;
-
-@@ -641,7 +562,8 @@ int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 *word)
- udelay(10);
- OMAP_MCBSP_WRITE(io_base, SPCR2, spcr2 | XRST);
- udelay(10);
-- printk(KERN_ERR "McBSP transmitter not ready\n");
-+ dev_err(mcbsp[id].dev, "McBSP%d transmitter not "
-+ "ready\n", mcbsp[id].id);
- return -EAGAIN;
- }
- }
-@@ -661,7 +583,8 @@ int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 *word)
- udelay(10);
- OMAP_MCBSP_WRITE(io_base, SPCR1, spcr1 | RRST);
- udelay(10);
-- printk(KERN_ERR "McBSP receiver not ready\n");
-+ dev_err(mcbsp[id].dev, "McBSP%d receiver not "
-+ "ready\n", mcbsp[id].id);
- return -EAGAIN;
- }
- }
-@@ -692,20 +615,24 @@ int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer,
- int dest_port = 0;
- int sync_dev = 0;
-
-- if (omap_mcbsp_check(id) < 0)
-- return -EINVAL;
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
-+ }
-
- if (omap_request_dma(mcbsp[id].dma_tx_sync, "McBSP TX",
- omap_mcbsp_tx_dma_callback,
- &mcbsp[id],
- &dma_tx_ch)) {
-- printk(KERN_ERR "OMAP-McBSP: Unable to request DMA channel for"
-- " McBSP%d TX. Trying IRQ based TX\n", id + 1);
-+ dev_err(mcbsp[id].dev, " Unable to request DMA channel for "
-+ "McBSP%d TX. Trying IRQ based TX\n",
-+ mcbsp[id].id);
- return -EAGAIN;
- }
- mcbsp[id].dma_tx_lch = dma_tx_ch;
-
-- DBG("TX DMA on channel %d\n", dma_tx_ch);
-+ dev_err(mcbsp[id].dev, "McBSP%d TX DMA on channel %d\n", mcbsp[id].id,
-+ dma_tx_ch);
-
- init_completion(&(mcbsp[id].tx_dma_completion));
-
-@@ -713,7 +640,7 @@ int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer,
- src_port = OMAP_DMA_PORT_TIPB;
- dest_port = OMAP_DMA_PORT_EMIFF;
- }
-- if (cpu_is_omap24xx())
-+ if (cpu_class_is_omap2())
- sync_dev = mcbsp[id].dma_tx_sync;
-
- omap_set_dma_transfer_params(mcbsp[id].dma_tx_lch,
-@@ -749,20 +676,24 @@ int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer,
- int dest_port = 0;
- int sync_dev = 0;
-
-- if (omap_mcbsp_check(id) < 0)
-- return -EINVAL;
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-+ return -ENODEV;
-+ }
-
- if (omap_request_dma(mcbsp[id].dma_rx_sync, "McBSP RX",
- omap_mcbsp_rx_dma_callback,
- &mcbsp[id],
- &dma_rx_ch)) {
-- printk(KERN_ERR "Unable to request DMA channel for McBSP%d RX."
-- " Trying IRQ based RX\n", id + 1);
-+ dev_err(mcbsp[id].dev, "Unable to request DMA channel for "
-+ "McBSP%d RX. Trying IRQ based RX\n",
-+ mcbsp[id].id);
- return -EAGAIN;
- }
- mcbsp[id].dma_rx_lch = dma_rx_ch;
-
-- DBG("RX DMA on channel %d\n", dma_rx_ch);
-+ dev_err(mcbsp[id].dev, "McBSP%d RX DMA on channel %d\n", mcbsp[id].id,
-+ dma_rx_ch);
-
- init_completion(&(mcbsp[id].rx_dma_completion));
-
-@@ -770,7 +701,7 @@ int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer,
- src_port = OMAP_DMA_PORT_TIPB;
- dest_port = OMAP_DMA_PORT_EMIFF;
- }
-- if (cpu_is_omap24xx())
-+ if (cpu_class_is_omap2())
- sync_dev = mcbsp[id].dma_rx_sync;
-
- omap_set_dma_transfer_params(mcbsp[id].dma_rx_lch,
-@@ -809,8 +740,10 @@ void omap_mcbsp_set_spi_mode(unsigned int id,
- {
- struct omap_mcbsp_reg_cfg mcbsp_cfg;
-
-- if (omap_mcbsp_check(id) < 0)
-+ if (!omap_mcbsp_check_valid_id(id)) {
-+ printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
- return;
-+ }
-
- memset(&mcbsp_cfg, 0, sizeof(struct omap_mcbsp_reg_cfg));
-
-@@ -871,182 +804,91 @@ EXPORT_SYMBOL(omap_mcbsp_set_spi_mode);
- * McBSP1 and McBSP3 are directly mapped on 1610 and 1510.
- * 730 has only 2 McBSP, and both of them are MPU peripherals.
- */
--struct omap_mcbsp_info {
-- u32 virt_base;
-- u8 dma_rx_sync, dma_tx_sync;
-- u16 rx_irq, tx_irq;
--};
-+static int __init omap_mcbsp_probe(struct platform_device *pdev)
-+{
-+ struct omap_mcbsp_platform_data *pdata = pdev->dev.platform_data;
-+ int id = pdev->id - 1;
-+ int ret = 0;
-+ int i;
-
--#ifdef CONFIG_ARCH_OMAP730
--static const struct omap_mcbsp_info mcbsp_730[] = {
-- [0] = { .virt_base = io_p2v(OMAP730_MCBSP1_BASE),
-- .dma_rx_sync = OMAP_DMA_MCBSP1_RX,
-- .dma_tx_sync = OMAP_DMA_MCBSP1_TX,
-- .rx_irq = INT_730_McBSP1RX,
-- .tx_irq = INT_730_McBSP1TX },
-- [1] = { .virt_base = io_p2v(OMAP730_MCBSP2_BASE),
-- .dma_rx_sync = OMAP_DMA_MCBSP3_RX,
-- .dma_tx_sync = OMAP_DMA_MCBSP3_TX,
-- .rx_irq = INT_730_McBSP2RX,
-- .tx_irq = INT_730_McBSP2TX },
--};
--#endif
--
--#ifdef CONFIG_ARCH_OMAP15XX
--static const struct omap_mcbsp_info mcbsp_1510[] = {
-- [0] = { .virt_base = OMAP1510_MCBSP1_BASE,
-- .dma_rx_sync = OMAP_DMA_MCBSP1_RX,
-- .dma_tx_sync = OMAP_DMA_MCBSP1_TX,
-- .rx_irq = INT_McBSP1RX,
-- .tx_irq = INT_McBSP1TX },
-- [1] = { .virt_base = io_p2v(OMAP1510_MCBSP2_BASE),
-- .dma_rx_sync = OMAP_DMA_MCBSP2_RX,
-- .dma_tx_sync = OMAP_DMA_MCBSP2_TX,
-- .rx_irq = INT_1510_SPI_RX,
-- .tx_irq = INT_1510_SPI_TX },
-- [2] = { .virt_base = OMAP1510_MCBSP3_BASE,
-- .dma_rx_sync = OMAP_DMA_MCBSP3_RX,
-- .dma_tx_sync = OMAP_DMA_MCBSP3_TX,
-- .rx_irq = INT_McBSP3RX,
-- .tx_irq = INT_McBSP3TX },
--};
--#endif
--
--#if defined(CONFIG_ARCH_OMAP16XX)
--static const struct omap_mcbsp_info mcbsp_1610[] = {
-- [0] = { .virt_base = OMAP1610_MCBSP1_BASE,
-- .dma_rx_sync = OMAP_DMA_MCBSP1_RX,
-- .dma_tx_sync = OMAP_DMA_MCBSP1_TX,
-- .rx_irq = INT_McBSP1RX,
-- .tx_irq = INT_McBSP1TX },
-- [1] = { .virt_base = io_p2v(OMAP1610_MCBSP2_BASE),
-- .dma_rx_sync = OMAP_DMA_MCBSP2_RX,
-- .dma_tx_sync = OMAP_DMA_MCBSP2_TX,
-- .rx_irq = INT_1610_McBSP2_RX,
-- .tx_irq = INT_1610_McBSP2_TX },
-- [2] = { .virt_base = OMAP1610_MCBSP3_BASE,
-- .dma_rx_sync = OMAP_DMA_MCBSP3_RX,
-- .dma_tx_sync = OMAP_DMA_MCBSP3_TX,
-- .rx_irq = INT_McBSP3RX,
-- .tx_irq = INT_McBSP3TX },
--};
--#endif
--
--#if defined(CONFIG_ARCH_OMAP24XX)
--static const struct omap_mcbsp_info mcbsp_24xx[] = {
-- [0] = { .virt_base = IO_ADDRESS(OMAP24XX_MCBSP1_BASE),
-- .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX,
-- .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX,
-- .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
-- .tx_irq = INT_24XX_MCBSP1_IRQ_TX,
-- },
-- [1] = { .virt_base = IO_ADDRESS(OMAP24XX_MCBSP2_BASE),
-- .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX,
-- .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX,
-- .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
-- .tx_irq = INT_24XX_MCBSP2_IRQ_TX,
-- },
--};
--#endif
-+ if (!pdata) {
-+ dev_err(&pdev->dev, "McBSP device initialized without"
-+ "platform data\n");
-+ ret = -EINVAL;
-+ goto exit;
-+ }
-
--static int __init omap_mcbsp_init(void)
-+ dev_dbg(&pdev->dev, "Initializing OMAP McBSP (%d).\n", pdev->id);
-+
-+ if (id >= OMAP_MAX_MCBSP_COUNT) {
-+ dev_err(&pdev->dev, "Invalid McBSP device id (%d)\n", id);
-+ ret = -EINVAL;
-+ goto exit;
-+ }
-+
-+ spin_lock_init(&mcbsp[id].lock);
-+ mcbsp[id].id = id + 1;
-+ mcbsp[id].free = 1;
-+ mcbsp[id].dma_tx_lch = -1;
-+ mcbsp[id].dma_rx_lch = -1;
-+
-+ mcbsp[id].io_base = pdata->virt_base;
-+ /* Default I/O is IRQ based */
-+ mcbsp[id].io_type = OMAP_MCBSP_IRQ_IO;
-+ mcbsp[id].tx_irq = pdata->tx_irq;
-+ mcbsp[id].rx_irq = pdata->rx_irq;
-+ mcbsp[id].dma_rx_sync = pdata->dma_rx_sync;
-+ mcbsp[id].dma_tx_sync = pdata->dma_tx_sync;
-+
-+ mcbsp[id].nr_clocks = ARRAY_SIZE(pdata->clocks);
-+ for (i = 0; i < ARRAY_SIZE(pdata->clocks); i++)
-+ mcbsp[id].clocks[i] = clk_get(&pdev->dev, pdata->clocks[i]);
-+
-+ mcbsp[id].pdata = pdata;
-+ mcbsp[id].dev = &pdev->dev;
-+ platform_set_drvdata(pdev, &mcbsp[id]);
-+
-+exit:
-+ return ret;
-+}
-+
-+static int omap_mcbsp_remove(struct platform_device *pdev)
- {
-- int mcbsp_count = 0, i;
-- static const struct omap_mcbsp_info *mcbsp_info;
-+ struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
-
-- printk(KERN_INFO "Initializing OMAP McBSP system\n");
-+ platform_set_drvdata(pdev, NULL);
-+ if (mcbsp) {
-+ int i;
-
--#ifdef CONFIG_ARCH_OMAP1
-- mcbsp_dsp_ck = clk_get(0, "dsp_ck");
-- if (IS_ERR(mcbsp_dsp_ck)) {
-- printk(KERN_ERR "mcbsp: could not acquire dsp_ck handle.\n");
-- return PTR_ERR(mcbsp_dsp_ck);
-- }
-- mcbsp_api_ck = clk_get(0, "api_ck");
-- if (IS_ERR(mcbsp_api_ck)) {
-- printk(KERN_ERR "mcbsp: could not acquire api_ck handle.\n");
-- return PTR_ERR(mcbsp_api_ck);
-- }
-- mcbsp_dspxor_ck = clk_get(0, "dspxor_ck");
-- if (IS_ERR(mcbsp_dspxor_ck)) {
-- printk(KERN_ERR "mcbsp: could not acquire dspxor_ck handle.\n");
-- return PTR_ERR(mcbsp_dspxor_ck);
-- }
--#endif
--#ifdef CONFIG_ARCH_OMAP2
-- mcbsp1_ick = clk_get(0, "mcbsp1_ick");
-- if (IS_ERR(mcbsp1_ick)) {
-- printk(KERN_ERR "mcbsp: could not acquire "
-- "mcbsp1_ick handle.\n");
-- return PTR_ERR(mcbsp1_ick);
-- }
-- mcbsp1_fck = clk_get(0, "mcbsp1_fck");
-- if (IS_ERR(mcbsp1_fck)) {
-- printk(KERN_ERR "mcbsp: could not acquire "
-- "mcbsp1_fck handle.\n");
-- return PTR_ERR(mcbsp1_fck);
-- }
-- mcbsp2_ick = clk_get(0, "mcbsp2_ick");
-- if (IS_ERR(mcbsp2_ick)) {
-- printk(KERN_ERR "mcbsp: could not acquire "
-- "mcbsp2_ick handle.\n");
-- return PTR_ERR(mcbsp2_ick);
-- }
-- mcbsp2_fck = clk_get(0, "mcbsp2_fck");
-- if (IS_ERR(mcbsp2_fck)) {
-- printk(KERN_ERR "mcbsp: could not acquire "
-- "mcbsp2_fck handle.\n");
-- return PTR_ERR(mcbsp2_fck);
-- }
--#endif
-+ if (mcbsp->pdata && mcbsp->pdata->ops &&
-+ mcbsp->pdata->ops->free)
-+ mcbsp->pdata->ops->free(mcbsp->id);
-
--#ifdef CONFIG_ARCH_OMAP730
-- if (cpu_is_omap730()) {
-- mcbsp_info = mcbsp_730;
-- mcbsp_count = ARRAY_SIZE(mcbsp_730);
-- }
--#endif
--#ifdef CONFIG_ARCH_OMAP15XX
-- if (cpu_is_omap15xx()) {
-- mcbsp_info = mcbsp_1510;
-- mcbsp_count = ARRAY_SIZE(mcbsp_1510);
-- }
--#endif
--#if defined(CONFIG_ARCH_OMAP16XX)
-- if (cpu_is_omap16xx()) {
-- mcbsp_info = mcbsp_1610;
-- mcbsp_count = ARRAY_SIZE(mcbsp_1610);
-- }
--#endif
--#if defined(CONFIG_ARCH_OMAP24XX)
-- if (cpu_is_omap24xx()) {
-- mcbsp_info = mcbsp_24xx;
-- mcbsp_count = ARRAY_SIZE(mcbsp_24xx);
-- omap2_mcbsp2_mux_setup();
-- }
--#endif
-- for (i = 0; i < OMAP_MAX_MCBSP_COUNT ; i++) {
-- if (i >= mcbsp_count) {
-- mcbsp[i].io_base = 0;
-- mcbsp[i].free = 0;
-- continue;
-- }
-- mcbsp[i].id = i + 1;
-- mcbsp[i].free = 1;
-- mcbsp[i].dma_tx_lch = -1;
-- mcbsp[i].dma_rx_lch = -1;
--
-- mcbsp[i].io_base = mcbsp_info[i].virt_base;
-- /* Default I/O is IRQ based */
-- mcbsp[i].io_type = OMAP_MCBSP_IRQ_IO;
-- mcbsp[i].tx_irq = mcbsp_info[i].tx_irq;
-- mcbsp[i].rx_irq = mcbsp_info[i].rx_irq;
-- mcbsp[i].dma_rx_sync = mcbsp_info[i].dma_rx_sync;
-- mcbsp[i].dma_tx_sync = mcbsp_info[i].dma_tx_sync;
-- spin_lock_init(&mcbsp[i].lock);
-+ mcbsp_clk_disable(mcbsp);
-+ mcbsp_clk_put(mcbsp);
-+
-+ for (i = 0; i < mcbsp->nr_clocks; i++)
-+ mcbsp->clocks[i] = NULL;
-+
-+ mcbsp->free = 0;
-+ mcbsp->dev = NULL;
- }
-
- return 0;
- }
-
--arch_initcall(omap_mcbsp_init);
-+static struct platform_driver omap_mcbsp_driver = {
-+ .probe = omap_mcbsp_probe,
-+ .remove = omap_mcbsp_remove,
-+ .driver = {
-+ .name = "omap-mcbsp",
-+ },
-+};
-+
-+int __init omap_mcbsp_init(void)
-+{
-+ /* Register the McBSP driver */
-+ return platform_driver_register(&omap_mcbsp_driver);
-+}
-+
-+
-diff --git a/include/asm-arm/arch-omap/mcbsp.h b/include/asm-arm/arch-omap/mcbsp.h
-index b53c3b2..aa47421 100644
---- a/include/asm-arm/arch-omap/mcbsp.h
-+++ b/include/asm-arm/arch-omap/mcbsp.h
-@@ -24,7 +24,11 @@
- #ifndef __ASM_ARCH_OMAP_MCBSP_H
- #define __ASM_ARCH_OMAP_MCBSP_H
-
-+#include <linux/completion.h>
-+#include <linux/spinlock.h>
-+
- #include <asm/hardware.h>
-+#include <asm/arch/clock.h>
-
- #define OMAP730_MCBSP1_BASE 0xfffb1000
- #define OMAP730_MCBSP2_BASE 0xfffb1800
-@@ -40,6 +44,9 @@
- #define OMAP24XX_MCBSP1_BASE 0x48074000
- #define OMAP24XX_MCBSP2_BASE 0x48076000
-
-+#define OMAP34XX_MCBSP1_BASE 0x48074000
-+#define OMAP34XX_MCBSP2_BASE 0x49022000
-+
- #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730)
-
- #define OMAP_MCBSP_REG_DRR2 0x00
-@@ -74,7 +81,8 @@
- #define OMAP_MCBSP_REG_XCERG 0x3A
- #define OMAP_MCBSP_REG_XCERH 0x3C
-
--#define OMAP_MAX_MCBSP_COUNT 3
-+#define OMAP_MAX_MCBSP_COUNT 3
-+#define MAX_MCBSP_CLOCKS 3
-
- #define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1)
- #define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1)
-@@ -117,7 +125,8 @@
- #define OMAP_MCBSP_REG_XCERG 0x74
- #define OMAP_MCBSP_REG_XCERH 0x78
-
--#define OMAP_MAX_MCBSP_COUNT 2
-+#define OMAP_MAX_MCBSP_COUNT 2
-+#define MAX_MCBSP_CLOCKS 2
-
- #define AUDIO_MCBSP_DATAWRITE (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1)
- #define AUDIO_MCBSP_DATAREAD (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1)
-@@ -298,6 +307,66 @@ struct omap_mcbsp_spi_cfg {
- omap_mcbsp_word_length word_length;
- };
-
-+/* Platform specific configuration */
-+struct omap_mcbsp_ops {
-+ void (*request)(unsigned int);
-+ void (*free)(unsigned int);
-+ int (*check)(unsigned int);
-+};
-+
-+struct omap_mcbsp_platform_data {
-+ u32 virt_base;
-+ u8 dma_rx_sync, dma_tx_sync;
-+ u16 rx_irq, tx_irq;
-+ struct omap_mcbsp_ops *ops;
-+ char const *clocks[MAX_MCBSP_CLOCKS];
-+};
-+
-+struct omap_mcbsp {
-+ struct device *dev;
-+ u32 io_base;
-+ u8 id;
-+ u8 free;
-+ omap_mcbsp_word_length rx_word_length;
-+ omap_mcbsp_word_length tx_word_length;
-+
-+ omap_mcbsp_io_type_t io_type; /* IRQ or poll */
-+ /* IRQ based TX/RX */
-+ int rx_irq;
-+ int tx_irq;
-+
-+ /* DMA stuff */
-+ u8 dma_rx_sync;
-+ short dma_rx_lch;
-+ u8 dma_tx_sync;
-+ short dma_tx_lch;
-+
-+ /* Completion queues */
-+ struct completion tx_irq_completion;
-+ struct completion rx_irq_completion;
-+ struct completion tx_dma_completion;
-+ struct completion rx_dma_completion;
-+
-+ /* Protect the field .free, while checking if the mcbsp is in use */
-+ spinlock_t lock;
-+ struct omap_mcbsp_platform_data *pdata;
-+ int nr_clocks;
-+ struct clk *clocks[MAX_MCBSP_CLOCKS];
-+};
-+
-+#define __mcbsp_clk_op(mcbsp, op) \
-+ do { \
-+ int i; \
-+ for (i = 0; i < mcbsp->nr_clocks; i++) \
-+ clk_##op(mcbsp->clocks[i]); \
-+ } while (0)
-+#define mcbsp_clk_enable(mcbsp) __mcbsp_clk_op((mcbsp), enable)
-+#define mcbsp_clk_disable(mcbsp) __mcbsp_clk_op((mcbsp), disable)
-+#define mcbsp_clk_put(mcbsp) __mcbsp_clk_op((mcbsp), put)
-+
-+int omap_mcbsp_init(void);
-+void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
-+ int size);
- void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config);
- int omap_mcbsp_request(unsigned int id);
- void omap_mcbsp_free(unsigned int id);
---
-1.5.5.1.67.gbdb8.dirty
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-omap" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-
diff --git a/packages/linux/linux-omap2-git/beagleboard/00002-mcbsp-omap1.patch b/packages/linux/linux-omap2-git/beagleboard/00002-mcbsp-omap1.patch
deleted file mode 100644
index 76246a9fae..0000000000
--- a/packages/linux/linux-omap2-git/beagleboard/00002-mcbsp-omap1.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From: Eduardo Valentin <eduardo.valentin@indt.org.br>
-
-This patch adds support for mach-omap1 based on current
-mcbsp platform driver.
-
-Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
----
- arch/arm/mach-omap1/Makefile | 2 +
- arch/arm/mach-omap1/mcbsp.c | 165 ++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 167 insertions(+), 0 deletions(-)
- create mode 100644 arch/arm/mach-omap1/mcbsp.c
-
-diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
-index 6ebf23b..09246a7 100644
---- a/arch/arm/mach-omap1/Makefile
-+++ b/arch/arm/mach-omap1/Makefile
-@@ -5,6 +5,8 @@
- # Common support
- obj-y := io.o id.o clock.o irq.o mux.o serial.o devices.o
-
-+obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
-+
- obj-$(CONFIG_OMAP_MPU_TIMER) += time.o
- obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
-
-diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
-new file mode 100644
-index 0000000..f30624a
---- /dev/null
-+++ b/arch/arm/mach-omap1/mcbsp.c
-@@ -0,0 +1,165 @@
-+/*
-+ * linux/arch/arm/mach-omap1/mcbsp.c
-+ *
-+ * Copyright (C) 2008 Instituto Nokia de Tecnologia
-+ * Contact: Eduardo Valentin <eduardo.valentin@indt.org.br>
-+ *
-+ * 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.
-+ *
-+ * Multichannel mode not supported.
-+ */
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/clk.h>
-+#include <linux/err.h>
-+#include <linux/io.h>
-+
-+#include <asm/arch/dma.h>
-+#include <asm/arch/mux.h>
-+#include <asm/arch/cpu.h>
-+#include <asm/arch/mcbsp.h>
-+#include <asm/arch/dsp_common.h>
-+
-+#define DPS_RSTCT2_PER_EN (1 << 0)
-+#define DSP_RSTCT2_WD_PER_EN (1 << 1)
-+
-+static int omap1_mcbsp_check(unsigned int id)
-+{
-+ /* REVISIT: Check correctly for number of registered McBSPs */
-+ if (cpu_is_omap730()) {
-+ if (id > OMAP_MAX_MCBSP_COUNT - 2) {
-+ printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n",
-+ id + 1);
-+ return -ENODEV;
-+ }
-+ return 0;
-+ }
-+
-+ if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
-+ if (id > OMAP_MAX_MCBSP_COUNT - 1) {
-+ printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n",
-+ id + 1);
-+ return -ENODEV;
-+ }
-+ return 0;
-+ }
-+
-+ return -ENODEV;
-+}
-+
-+static void omap1_mcbsp_request(unsigned int id)
-+{
-+ /*
-+ * On 1510, 1610 and 1710, McBSP1 and McBSP3
-+ * are DSP public peripherals.
-+ */
-+ if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
-+ omap_dsp_request_mem();
-+ /*
-+ * DSP external peripheral reset
-+ * FIXME: This should be moved to dsp code
-+ */
-+ __raw_writew(__raw_readw(DSP_RSTCT2) | DPS_RSTCT2_PER_EN |
-+ DSP_RSTCT2_WD_PER_EN, DSP_RSTCT2);
-+ }
-+}
-+
-+static void omap1_mcbsp_free(unsigned int id)
-+{
-+ if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
-+ omap_dsp_release_mem();
-+}
-+
-+static struct omap_mcbsp_ops omap1_mcbsp_ops = {
-+ .check = omap1_mcbsp_check,
-+ .request = omap1_mcbsp_request,
-+ .free = omap1_mcbsp_free,
-+};
-+
-+static struct omap_mcbsp_platform_data omap1_mcbsp_pdata[] = {
-+#ifdef CONFIG_ARCH_OMAP730
-+ {
-+ .virt_base = io_p2v(OMAP730_MCBSP1_BASE),
-+ .dma_rx_sync = OMAP_DMA_MCBSP1_RX,
-+ .dma_tx_sync = OMAP_DMA_MCBSP1_TX,
-+ .rx_irq = INT_730_McBSP1RX,
-+ .tx_irq = INT_730_McBSP1TX,
-+ .ops = &omap1_mcbsp_ops,
-+ },
-+ {
-+ .virt_base = io_p2v(OMAP730_MCBSP2_BASE),
-+ .dma_rx_sync = OMAP_DMA_MCBSP3_RX,
-+ .dma_tx_sync = OMAP_DMA_MCBSP3_TX,
-+ .rx_irq = INT_730_McBSP2RX,
-+ .tx_irq = INT_730_McBSP2TX
-+ .ops = &omap1_mcbsp_ops,
-+ },
-+#endif
-+#ifdef CONFIG_ARCH_OMAP15XX
-+ {
-+ .virt_base = OMAP1510_MCBSP1_BASE,
-+ .dma_rx_sync = OMAP_DMA_MCBSP1_RX,
-+ .dma_tx_sync = OMAP_DMA_MCBSP1_TX,
-+ .rx_irq = INT_McBSP1RX,
-+ .tx_irq = INT_McBSP1TX,
-+ .ops = &omap1_mcbsp_ops,
-+ .clocks = { "dsp_ck", "api_ck", "dspxor_ck" },
-+ },
-+ {
-+ .virt_base = io_p2v(OMAP1510_MCBSP2_BASE),
-+ .dma_rx_sync = OMAP_DMA_MCBSP2_RX,
-+ .dma_tx_sync = OMAP_DMA_MCBSP2_TX,
-+ .rx_irq = INT_1510_SPI_RX,
-+ .tx_irq = INT_1510_SPI_TX,
-+ .ops = &omap1_mcbsp_ops,
-+ },
-+ {
-+ .virt_base = OMAP1510_MCBSP3_BASE,
-+ .dma_rx_sync = OMAP_DMA_MCBSP3_RX,
-+ .dma_tx_sync = OMAP_DMA_MCBSP3_TX,
-+ .rx_irq = INT_McBSP3RX,
-+ .tx_irq = INT_McBSP3TX,
-+ .ops = &omap1_mcbsp_ops,
-+ .clocks = { "dsp_ck", "api_ck", "dspxor_ck" },
-+ },
-+#endif
-+#ifdef CONFIG_ARCH_OMAP16XX
-+ {
-+ .virt_base = OMAP1610_MCBSP1_BASE,
-+ .dma_rx_sync = OMAP_DMA_MCBSP1_RX,
-+ .dma_tx_sync = OMAP_DMA_MCBSP1_TX,
-+ .rx_irq = INT_McBSP1RX,
-+ .tx_irq = INT_McBSP1TX,
-+ .ops = &omap1_mcbsp_ops,
-+ .clocks = { "dsp_ck", "api_ck", "dspxor_ck" },
-+ },
-+ {
-+ .virt_base = io_p2v(OMAP1610_MCBSP2_BASE),
-+ .dma_rx_sync = OMAP_DMA_MCBSP2_RX,
-+ .dma_tx_sync = OMAP_DMA_MCBSP2_TX,
-+ .rx_irq = INT_1610_McBSP2_RX,
-+ .tx_irq = INT_1610_McBSP2_TX,
-+ .ops = &omap1_mcbsp_ops,
-+ },
-+ {
-+ .virt_base = OMAP1610_MCBSP3_BASE,
-+ .dma_rx_sync = OMAP_DMA_MCBSP3_RX,
-+ .dma_tx_sync = OMAP_DMA_MCBSP3_TX,
-+ .rx_irq = INT_McBSP3RX,
-+ .tx_irq = INT_McBSP3TX,
-+ .ops = &omap1_mcbsp_ops,
-+ .clocks = { "dsp_ck", "api_ck", "dspxor_ck" },
-+ },
-+#endif
-+};
-+#define mcbsp_count ARRAY_SIZE(omap1_mcbsp_pdata)
-+
-+int __init omap1_mcbsp_init(void)
-+{
-+ omap_mcbsp_register_board_cfg(omap1_mcbsp_pdata, mcbsp_count);
-+
-+ return omap_mcbsp_init();
-+}
-+arch_initcall(omap1_mcbsp_init);
---
-1.5.5.1.67.gbdb8.dirty
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-omap" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-
diff --git a/packages/linux/linux-omap2-git/beagleboard/00003-mcbsp-omap3-clock.patch b/packages/linux/linux-omap2-git/beagleboard/00003-mcbsp-omap3-clock.patch
deleted file mode 100644
index 6d1e7d3f71..0000000000
--- a/packages/linux/linux-omap2-git/beagleboard/00003-mcbsp-omap3-clock.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From: Eduardo Valentin <eduardo.valentin@indt.org.br>
-
-This patch fix the clock definition for mcbsps on clock34xx.h.
-Device identification must be done using .id field, not
-only name field.
-
-Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
----
- arch/arm/mach-omap2/clock34xx.h | 30 ++++++++++++++++++++----------
- 1 files changed, 20 insertions(+), 10 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
-index 85afe1e..3fea82e 100644
---- a/arch/arm/mach-omap2/clock34xx.h
-+++ b/arch/arm/mach-omap2/clock34xx.h
-@@ -1480,7 +1480,8 @@ static const struct clksel mcbsp_15_clksel[] = {
- };
-
- static struct clk mcbsp5_fck = {
-- .name = "mcbsp5_fck",
-+ .name = "mcbsp_fck",
-+ .id = 5,
- .init = &omap2_init_clksel_parent,
- .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
- .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
-@@ -1493,7 +1494,8 @@ static struct clk mcbsp5_fck = {
- };
-
- static struct clk mcbsp1_fck = {
-- .name = "mcbsp1_fck",
-+ .name = "mcbsp_fck",
-+ .id = 1,
- .init = &omap2_init_clksel_parent,
- .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
- .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
-@@ -1941,7 +1943,8 @@ static struct clk gpt10_ick = {
- };
-
- static struct clk mcbsp5_ick = {
-- .name = "mcbsp5_ick",
-+ .name = "mcbsp_ick",
-+ .id = 5,
- .parent = &core_l4_ick,
- .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
- .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
-@@ -1951,7 +1954,8 @@ static struct clk mcbsp5_ick = {
- };
-
- static struct clk mcbsp1_ick = {
-- .name = "mcbsp1_ick",
-+ .name = "mcbsp_ick",
-+ .id = 1,
- .parent = &core_l4_ick,
- .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
- .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
-@@ -2754,7 +2758,8 @@ static struct clk gpt2_ick = {
- };
-
- static struct clk mcbsp2_ick = {
-- .name = "mcbsp2_ick",
-+ .name = "mcbsp_ick",
-+ .id = 2,
- .parent = &per_l4_ick,
- .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
- .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
-@@ -2764,7 +2769,8 @@ static struct clk mcbsp2_ick = {
- };
-
- static struct clk mcbsp3_ick = {
-- .name = "mcbsp3_ick",
-+ .name = "mcbsp_ick",
-+ .id = 3,
- .parent = &per_l4_ick,
- .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
- .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
-@@ -2774,7 +2780,8 @@ static struct clk mcbsp3_ick = {
- };
-
- static struct clk mcbsp4_ick = {
-- .name = "mcbsp4_ick",
-+ .name = "mcbsp_ick",
-+ .id = 4,
- .parent = &per_l4_ick,
- .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
- .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
-@@ -2790,7 +2797,8 @@ static const struct clksel mcbsp_234_clksel[] = {
- };
-
- static struct clk mcbsp2_fck = {
-- .name = "mcbsp2_fck",
-+ .name = "mcbsp_fck",
-+ .id = 2,
- .init = &omap2_init_clksel_parent,
- .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
- .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
-@@ -2803,7 +2811,8 @@ static struct clk mcbsp2_fck = {
- };
-
- static struct clk mcbsp3_fck = {
-- .name = "mcbsp3_fck",
-+ .name = "mcbsp_fck",
-+ .id = 3,
- .init = &omap2_init_clksel_parent,
- .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
- .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
-@@ -2816,7 +2825,8 @@ static struct clk mcbsp3_fck = {
- };
-
- static struct clk mcbsp4_fck = {
-- .name = "mcbsp4_fck",
-+ .name = "mcbsp_fck",
-+ .id = 4,
- .init = &omap2_init_clksel_parent,
- .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
- .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
---
-1.5.5.1.67.gbdb8.dirty
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-omap" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-
diff --git a/packages/linux/linux-omap2-git/beagleboard/00004-omap2-mcbsp.patch b/packages/linux/linux-omap2-git/beagleboard/00004-omap2-mcbsp.patch
deleted file mode 100644
index f31604d658..0000000000
--- a/packages/linux/linux-omap2-git/beagleboard/00004-omap2-mcbsp.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From: Eduardo Valentin <eduardo.valentin@indt.org.br>
-
-This patch adds support for mach-omap2 based on current
-mcbsp platform driver.
-
-Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
----
- arch/arm/mach-omap2/Makefile | 2 +
- arch/arm/mach-omap2/mcbsp.c | 105 ++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 107 insertions(+), 0 deletions(-)
- create mode 100644 arch/arm/mach-omap2/mcbsp.c
-
-diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
-index 552664c..84fa698 100644
---- a/arch/arm/mach-omap2/Makefile
-+++ b/arch/arm/mach-omap2/Makefile
-@@ -7,6 +7,8 @@ obj-y := irq.o id.o io.o memory.o control.o prcm.o clock.o mux.o \
- devices.o serial.o gpmc.o timer-gp.o powerdomain.o \
- clockdomain.o
-
-+obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
-+
- # Functions loaded to SRAM
- obj-$(CONFIG_ARCH_OMAP2) += sram24xx.o
-
-diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
-new file mode 100644
-index 0000000..e2ee8f7
---- /dev/null
-+++ b/arch/arm/mach-omap2/mcbsp.c
-@@ -0,0 +1,105 @@
-+/*
-+ * linux/arch/arm/mach-omap2/mcbsp.c
-+ *
-+ * Copyright (C) 2008 Instituto Nokia de Tecnologia
-+ * Contact: Eduardo Valentin <eduardo.valentin@indt.org.br>
-+ *
-+ * 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.
-+ *
-+ * Multichannel mode not supported.
-+ */
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/clk.h>
-+#include <linux/err.h>
-+
-+#include <asm/arch/dma.h>
-+#include <asm/arch/mux.h>
-+#include <asm/arch/cpu.h>
-+#include <asm/arch/mcbsp.h>
-+
-+static void omap2_mcbsp2_mux_setup(void)
-+{
-+ omap_cfg_reg(Y15_24XX_MCBSP2_CLKX);
-+ omap_cfg_reg(R14_24XX_MCBSP2_FSX);
-+ omap_cfg_reg(W15_24XX_MCBSP2_DR);
-+ omap_cfg_reg(V15_24XX_MCBSP2_DX);
-+ omap_cfg_reg(V14_24XX_GPIO117);
-+ /*
-+ * TODO: Need to add MUX settings for OMAP 2430 SDP
-+ */
-+}
-+
-+static void omap2_mcbsp_request(unsigned int id)
-+{
-+ if (cpu_is_omap2420() && (id == OMAP_MCBSP2))
-+ omap2_mcbsp2_mux_setup();
-+}
-+
-+static int omap2_mcbsp_check(unsigned int id)
-+{
-+ if (id > OMAP_MAX_MCBSP_COUNT - 1) {
-+ printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n", id + 1);
-+ return -ENODEV;
-+ }
-+ return 0;
-+}
-+
-+static struct omap_mcbsp_ops omap2_mcbsp_ops = {
-+ .request = omap2_mcbsp_request,
-+ .check = omap2_mcbsp_check,
-+};
-+
-+static struct omap_mcbsp_platform_data omap2_mcbsp_pdata[] = {
-+#ifdef CONFIG_ARCH_OMAP24XX
-+ {
-+ .virt_base = IO_ADDRESS(OMAP24XX_MCBSP1_BASE),
-+ .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX,
-+ .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX,
-+ .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
-+ .tx_irq = INT_24XX_MCBSP1_IRQ_TX,
-+ .ops = &omap2_mcbsp_ops,
-+ .clocks = { "mcbsp_ick", "mcbsp_fck" },
-+ },
-+ {
-+ .virt_base = IO_ADDRESS(OMAP24XX_MCBSP2_BASE),
-+ .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX,
-+ .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX,
-+ .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
-+ .tx_irq = INT_24XX_MCBSP2_IRQ_TX,
-+ .ops = &omap2_mcbsp_ops,
-+ .clocks = { "mcbsp_ick", "mcbsp_fck" },
-+ },
-+#endif
-+#ifdef CONFIG_ARCH_OMAP34XX
-+ {
-+ .virt_base = IO_ADDRESS(OMAP34XX_MCBSP1_BASE),
-+ .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX,
-+ .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX,
-+ .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
-+ .tx_irq = INT_24XX_MCBSP1_IRQ_TX,
-+ .ops = &omap2_mcbsp_ops,
-+ .clocks = { "mcbsp_ick", "mcbsp_fck" },
-+ },
-+ {
-+ .virt_base = IO_ADDRESS(OMAP34XX_MCBSP2_BASE),
-+ .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX,
-+ .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX,
-+ .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
-+ .tx_irq = INT_24XX_MCBSP2_IRQ_TX,
-+ .ops = &omap2_mcbsp_ops,
-+ .clocks = { "mcbsp_ick", "mcbsp_fck" },
-+ },
-+#endif
-+};
-+#define mcbsp_count ARRAY_SIZE(omap2_mcbsp_pdata)
-+
-+int __init omap2_mcbsp_init(void)
-+{
-+ omap_mcbsp_register_board_cfg(omap2_mcbsp_pdata, mcbsp_count);
-+
-+ return omap_mcbsp_init();
-+}
-+arch_initcall(omap2_mcbsp_init);
---
-1.5.5.1.67.gbdb8.dirty
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-omap" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-
diff --git a/packages/linux/linux-omap2-git/beagleboard/0001-omap3-cpuidle.patch b/packages/linux/linux-omap2-git/beagleboard/0001-omap3-cpuidle.patch
new file mode 100644
index 0000000000..28b1ef2214
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/0001-omap3-cpuidle.patch
@@ -0,0 +1,450 @@
+From: "Rajendra Nayak" <rnayak@ti.com>
+To: <linux-omap@vger.kernel.org>
+Subject: [PATCH 01/02] OMAP3 CPUidle driver
+Date: Tue, 10 Jun 2008 12:39:00 +0530
+
+This patch adds the OMAP3 cpuidle driver. Irq enable/disable is done in the core cpuidle driver
+before it queries the governor for the next state.
+
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+
+---
+ arch/arm/mach-omap2/Makefile | 2
+ arch/arm/mach-omap2/cpuidle34xx.c | 293 ++++++++++++++++++++++++++++++++++++++
+ arch/arm/mach-omap2/cpuidle34xx.h | 51 ++++++
+ arch/arm/mach-omap2/pm34xx.c | 5
+ drivers/cpuidle/cpuidle.c | 10 +
+ 5 files changed, 359 insertions(+), 2 deletions(-)
+
+Index: linux-omap-2.6/arch/arm/mach-omap2/Makefile
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/mach-omap2/Makefile 2008-06-09 20:15:33.855303920 +0530
++++ linux-omap-2.6/arch/arm/mach-omap2/Makefile 2008-06-09 20:15:39.569121361 +0530
+@@ -20,7 +20,7 @@ obj-y += pm.o
+ obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
+ obj-$(CONFIG_ARCH_OMAP2420) += sleep242x.o
+ obj-$(CONFIG_ARCH_OMAP2430) += sleep243x.o
+-obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
++obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o
+ obj-$(CONFIG_PM_DEBUG) += pm-debug.o
+ endif
+
+Index: linux-omap-2.6/arch/arm/mach-omap2/cpuidle34xx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-omap-2.6/arch/arm/mach-omap2/cpuidle34xx.c 2008-06-10 11:41:27.644820323 +0530
+@@ -0,0 +1,293 @@
++/*
++ * linux/arch/arm/mach-omap2/cpuidle34xx.c
++ *
++ * OMAP3 CPU IDLE Routines
++ *
++ * Copyright (C) 2007-2008 Texas Instruments, Inc.
++ * Rajendra Nayak <rnayak@ti.com>
++ *
++ * Copyright (C) 2007 Texas Instruments, Inc.
++ * Karthik Dasu <karthik-dp@ti.com>
++ *
++ * Copyright (C) 2006 Nokia Corporation
++ * Tony Lindgren <tony@atomide.com>
++ *
++ * Copyright (C) 2005 Texas Instruments, Inc.
++ * Richard Woodruff <r-woodruff2@ti.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/cpuidle.h>
++#include <asm/arch/pm.h>
++#include <asm/arch/prcm.h>
++#include <asm/arch/powerdomain.h>
++#include <asm/arch/clockdomain.h>
++#include <asm/arch/irqs.h>
++#include "cpuidle34xx.h"
++
++#ifdef CONFIG_CPU_IDLE
++
++struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES];
++struct omap3_processor_cx current_cx_state;
++
++static int omap3_idle_bm_check(void)
++{
++ /* Check for omap3_fclks_active() here once available */
++ return 0;
++}
++
++/* omap3_enter_idle - Programs OMAP3 to enter the specified state.
++ * returns the total time during which the system was idle.
++ */
++static int omap3_enter_idle(struct cpuidle_device *dev,
++ struct cpuidle_state *state)
++{
++ struct omap3_processor_cx *cx = cpuidle_get_statedata(state);
++ struct timespec ts_preidle, ts_postidle, ts_idle;
++ struct powerdomain *mpu_pd, *core_pd, *per_pd, *neon_pd;
++ int neon_pwrst;
++
++ current_cx_state = *cx;
++
++ if (cx->type == OMAP3_STATE_C0) {
++ /* Do nothing for C0, not even a wfi */
++ return 0;
++ }
++
++ /* Used to keep track of the total time in idle */
++ getnstimeofday(&ts_preidle);
++
++ mpu_pd = pwrdm_lookup("mpu_pwrdm");
++ core_pd = pwrdm_lookup("core_pwrdm");
++ per_pd = pwrdm_lookup("per_pwrdm");
++ neon_pd = pwrdm_lookup("neon_pwrdm");
++
++ /* Reset previous power state registers */
++ pwrdm_clear_all_prev_pwrst(mpu_pd);
++ pwrdm_clear_all_prev_pwrst(neon_pd);
++ pwrdm_clear_all_prev_pwrst(core_pd);
++ pwrdm_clear_all_prev_pwrst(per_pd);
++
++ if (omap_irq_pending())
++ return 0;
++
++ neon_pwrst = pwrdm_read_pwrst(neon_pd);
++
++ /* Program MPU/NEON to target state */
++ if (cx->mpu_state < PWRDM_POWER_ON) {
++ if (neon_pwrst == PWRDM_POWER_ON) {
++ if (cx->mpu_state == PWRDM_POWER_RET)
++ pwrdm_set_next_pwrst(neon_pd, PWRDM_POWER_RET);
++ else if (cx->mpu_state == PWRDM_POWER_OFF)
++ pwrdm_set_next_pwrst(neon_pd, PWRDM_POWER_OFF);
++ }
++ pwrdm_set_next_pwrst(mpu_pd, cx->mpu_state);
++ }
++
++ /* Program CORE to target state */
++ if (cx->core_state < PWRDM_POWER_ON)
++ pwrdm_set_next_pwrst(core_pd, cx->core_state);
++
++ /* Execute ARM wfi */
++ omap_sram_idle();
++
++ /* Program MPU/NEON to ON */
++ if (cx->mpu_state < PWRDM_POWER_ON) {
++ if (neon_pwrst == PWRDM_POWER_ON)
++ pwrdm_set_next_pwrst(neon_pd, PWRDM_POWER_ON);
++ pwrdm_set_next_pwrst(mpu_pd, PWRDM_POWER_ON);
++ }
++
++ if (cx->core_state < PWRDM_POWER_ON)
++ pwrdm_set_next_pwrst(core_pd, PWRDM_POWER_ON);
++
++ getnstimeofday(&ts_postidle);
++ ts_idle = timespec_sub(ts_postidle, ts_preidle);
++ return timespec_to_ns(&ts_idle);
++}
++
++/*
++ * omap3_enter_idle_bm - enter function for states with CPUIDLE_FLAG_CHECK_BM
++ *
++ * This function checks for all the pre-requisites needed for OMAP3 to enter
++ * CORE RET/OFF state. It then calls omap3_enter_idle to program the desired
++ * C state.
++ */
++static int omap3_enter_idle_bm(struct cpuidle_device *dev,
++ struct cpuidle_state *state)
++{
++ struct cpuidle_state *new_state = NULL;
++ int i, j;
++
++ if ((state->flags & CPUIDLE_FLAG_CHECK_BM) && omap3_idle_bm_check()) {
++
++ /* Find current state in list */
++ for (i = 0; i < OMAP3_MAX_STATES; i++)
++ if (state == &dev->states[i])
++ break;
++ BUG_ON(i == OMAP3_MAX_STATES);
++
++ /* Back up to non 'CHECK_BM' state */
++ for (j = i - 1; j > 0; j--) {
++ struct cpuidle_state *s = &dev->states[j];
++
++ if (!(s->flags & CPUIDLE_FLAG_CHECK_BM)) {
++ new_state = s;
++ break;
++ }
++ }
++
++ pr_debug("%s: Bus activity: Entering %s (instead of %s)\n",
++ __FUNCTION__, new_state->name, state->name);
++ }
++
++ return omap3_enter_idle(dev, new_state ? : state);
++}
++
++DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
++
++/* omap3_init_power_states - Initialises the OMAP3 specific C states.
++ * Below is the desciption of each C state.
++ *
++ C0 . System executing code
++ C1 . MPU WFI + Core active
++ C2 . MPU CSWR + Core active
++ C3 . MPU OFF + Core active
++ C4 . MPU CSWR + Core CSWR
++ C5 . MPU OFF + Core CSWR
++ C6 . MPU OFF + Core OFF
++ */
++void omap_init_power_states(void)
++{
++ /* C0 . System executing code */
++ omap3_power_states[0].valid = 1;
++ omap3_power_states[0].type = OMAP3_STATE_C0;
++ omap3_power_states[0].sleep_latency = 0;
++ omap3_power_states[0].wakeup_latency = 0;
++ omap3_power_states[0].threshold = 0;
++ omap3_power_states[0].mpu_state = PWRDM_POWER_ON;
++ omap3_power_states[0].core_state = PWRDM_POWER_ON;
++ omap3_power_states[0].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_SHALLOW;
++
++ /* C1 . MPU WFI + Core active */
++ omap3_power_states[1].valid = 1;
++ omap3_power_states[1].type = OMAP3_STATE_C1;
++ omap3_power_states[1].sleep_latency = 10;
++ omap3_power_states[1].wakeup_latency = 10;
++ omap3_power_states[1].threshold = 30;
++ omap3_power_states[1].mpu_state = PWRDM_POWER_ON;
++ omap3_power_states[1].core_state = PWRDM_POWER_ON;
++ omap3_power_states[1].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_SHALLOW;
++
++ /* C2 . MPU CSWR + Core active */
++ omap3_power_states[2].valid = 1;
++ omap3_power_states[2].type = OMAP3_STATE_C2;
++ omap3_power_states[2].sleep_latency = 50;
++ omap3_power_states[2].wakeup_latency = 50;
++ omap3_power_states[2].threshold = 300;
++ omap3_power_states[2].mpu_state = PWRDM_POWER_RET;
++ omap3_power_states[2].core_state = PWRDM_POWER_ON;
++ omap3_power_states[2].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_BALANCED;
++
++ /* C3 . MPU OFF + Core active */
++ omap3_power_states[3].valid = 0;
++ omap3_power_states[3].type = OMAP3_STATE_C3;
++ omap3_power_states[3].sleep_latency = 1500;
++ omap3_power_states[3].wakeup_latency = 1800;
++ omap3_power_states[3].threshold = 4000;
++ omap3_power_states[3].mpu_state = PWRDM_POWER_OFF;
++ omap3_power_states[3].core_state = PWRDM_POWER_RET;
++ omap3_power_states[3].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_BALANCED;
++
++ /* C4 . MPU CSWR + Core CSWR*/
++ omap3_power_states[4].valid = 1;
++ omap3_power_states[4].type = OMAP3_STATE_C4;
++ omap3_power_states[4].sleep_latency = 2500;
++ omap3_power_states[4].wakeup_latency = 7500;
++ omap3_power_states[4].threshold = 12000;
++ omap3_power_states[4].mpu_state = PWRDM_POWER_RET;
++ omap3_power_states[4].core_state = PWRDM_POWER_RET;
++ omap3_power_states[4].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_BALANCED | CPUIDLE_FLAG_CHECK_BM;
++
++ /* C5 . MPU OFF + Core CSWR */
++ omap3_power_states[5].valid = 0;
++ omap3_power_states[5].type = OMAP3_STATE_C5;
++ omap3_power_states[5].sleep_latency = 3000;
++ omap3_power_states[5].wakeup_latency = 8500;
++ omap3_power_states[5].threshold = 15000;
++ omap3_power_states[5].mpu_state = PWRDM_POWER_OFF;
++ omap3_power_states[5].core_state = PWRDM_POWER_RET;
++ omap3_power_states[5].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_BALANCED | CPUIDLE_FLAG_CHECK_BM;
++
++ /* C6 . MPU OFF + Core OFF */
++ omap3_power_states[6].valid = 0;
++ omap3_power_states[6].type = OMAP3_STATE_C6;
++ omap3_power_states[6].sleep_latency = 10000;
++ omap3_power_states[6].wakeup_latency = 30000;
++ omap3_power_states[6].threshold = 300000;
++ omap3_power_states[6].mpu_state = PWRDM_POWER_OFF;
++ omap3_power_states[6].core_state = PWRDM_POWER_OFF;
++ omap3_power_states[6].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_DEEP | CPUIDLE_FLAG_CHECK_BM;
++}
++
++struct cpuidle_driver omap3_idle_driver = {
++ .name = "omap3_idle",
++ .owner = THIS_MODULE,
++};
++/*
++ * omap3_idle_init - Init routine for OMAP3 idle.
++ * Registers the OMAP3 specific cpuidle driver with the cpuidle f/w
++ * with the valid set of states.
++ */
++int omap3_idle_init(void)
++{
++ int i, count = 0;
++ struct omap3_processor_cx *cx;
++ struct cpuidle_state *state;
++ struct cpuidle_device *dev;
++
++ omap_init_power_states();
++ cpuidle_register_driver(&omap3_idle_driver);
++
++ dev = &per_cpu(omap3_idle_dev, smp_processor_id());
++
++ for (i = 0; i < OMAP3_MAX_STATES; i++) {
++ cx = &omap3_power_states[i];
++ state = &dev->states[count];
++
++ if (!cx->valid)
++ continue;
++ cpuidle_set_statedata(state, cx);
++ state->exit_latency = cx->sleep_latency + cx->wakeup_latency;
++ state->target_residency = cx->threshold;
++ state->flags = cx->flags;
++ state->enter = (state->flags & CPUIDLE_FLAG_CHECK_BM) ?
++ omap3_enter_idle_bm : omap3_enter_idle;
++ sprintf(state->name, "C%d", count+1);
++ count++;
++ }
++
++ if (!count)
++ return -EINVAL;
++ dev->state_count = count;
++
++ if (cpuidle_register_device(dev)) {
++ printk(KERN_ERR "%s: CPUidle register device failed\n",
++ __FUNCTION__);
++ return -EIO;
++ }
++
++ return 0;
++}
++__initcall(omap3_idle_init);
++#endif /* CONFIG_CPU_IDLE */
+Index: linux-omap-2.6/arch/arm/mach-omap2/cpuidle34xx.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-omap-2.6/arch/arm/mach-omap2/cpuidle34xx.h 2008-06-09 20:15:39.569121361 +0530
+@@ -0,0 +1,51 @@
++/*
++ * linux/arch/arm/mach-omap2/cpuidle34xx.h
++ *
++ * OMAP3 cpuidle structure definitions
++ *
++ * Copyright (C) 2007-2008 Texas Instruments, Inc.
++ * Written by Rajendra Nayak <rnayak@ti.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.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ *
++ * History:
++ *
++ */
++
++#ifndef ARCH_ARM_MACH_OMAP2_CPUIDLE_34XX
++#define ARCH_ARM_MACH_OMAP2_CPUIDLE_34XX
++
++#define OMAP3_MAX_STATES 7
++#define OMAP3_STATE_C0 0 /* C0 - System executing code */
++#define OMAP3_STATE_C1 1 /* C1 - MPU WFI + Core active */
++#define OMAP3_STATE_C2 2 /* C2 - MPU CSWR + Core active */
++#define OMAP3_STATE_C3 3 /* C3 - MPU OFF + Core active */
++#define OMAP3_STATE_C4 4 /* C4 - MPU RET + Core RET */
++#define OMAP3_STATE_C5 5 /* C5 - MPU OFF + Core RET */
++#define OMAP3_STATE_C6 6 /* C6 - MPU OFF + Core OFF */
++
++extern void omap_sram_idle(void);
++extern int omap3_irq_pending(void);
++
++struct omap3_processor_cx {
++ u8 valid;
++ u8 type;
++ u32 sleep_latency;
++ u32 wakeup_latency;
++ u32 mpu_state;
++ u32 core_state;
++ u32 threshold;
++ u32 flags;
++};
++
++void omap_init_power_states(void);
++int omap3_idle_init(void);
++
++#endif /* ARCH_ARM_MACH_OMAP2_CPUIDLE_34XX */
++
+Index: linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/mach-omap2/pm34xx.c 2008-06-09 20:15:33.855303920 +0530
++++ linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c 2008-06-09 20:16:20.976798343 +0530
+@@ -141,7 +141,7 @@ static irqreturn_t prcm_interrupt_handle
+ return IRQ_HANDLED;
+ }
+
+-static void omap_sram_idle(void)
++void omap_sram_idle(void)
+ {
+ /* Variable to tell what needs to be saved and restored
+ * in omap_sram_idle*/
+@@ -156,6 +156,7 @@ static void omap_sram_idle(void)
+
+ mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
+ switch (mpu_next_state) {
++ case PWRDM_POWER_ON:
+ case PWRDM_POWER_RET:
+ /* No need to save context */
+ save_state = 0;
+@@ -386,7 +387,9 @@ int __init omap3_pm_init(void)
+
+ prcm_setup_regs();
+
++#ifndef CONFIG_CPU_IDLE
+ pm_idle = omap3_pm_idle;
++#endif
+
+ err1:
+ return ret;
+Index: linux-omap-2.6/drivers/cpuidle/cpuidle.c
+===================================================================
+--- linux-omap-2.6.orig/drivers/cpuidle/cpuidle.c 2008-06-09 20:15:33.856303888 +0530
++++ linux-omap-2.6/drivers/cpuidle/cpuidle.c 2008-06-09 20:15:39.570121329 +0530
+@@ -58,6 +58,11 @@ static void cpuidle_idle_call(void)
+ return;
+ }
+
++#ifdef CONFIG_ARCH_OMAP3
++ local_irq_disable();
++ local_fiq_disable();
++#endif
++
+ /* ask the governor for the next state */
+ next_state = cpuidle_curr_governor->select(dev);
+ if (need_resched())
+@@ -70,6 +75,11 @@ static void cpuidle_idle_call(void)
+ target_state->time += (unsigned long long)dev->last_residency;
+ target_state->usage++;
+
++#ifdef CONFIG_ARCH_OMAP3
++ local_irq_enable();
++ local_fiq_enable();
++#endif
++
+ /* give the governor an opportunity to reflect on the outcome */
+ if (cpuidle_curr_governor->reflect)
+ cpuidle_curr_governor->reflect(dev);
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
diff --git a/packages/linux/linux-omap2-git/beagleboard/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch b/packages/linux/linux-omap2-git/beagleboard/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch
new file mode 100644
index 0000000000..17329be29b
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch
@@ -0,0 +1,69 @@
+From 7a444ee080c5f1a62ac5042f1e7926622b3e1ce7 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@openembedded.org>
+Date: Fri, 30 May 2008 13:43:36 +0200
+Subject: [PATCH] ARM: OMAP: omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
+
+omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
+ * on revision A5 and earlier board the two leds can't be controlled seperately, should be fixed in rev. B and C boards.
+
+Signed-off-by: Koen Kooi <koen@openembedded.org>
+---
+ arch/arm/mach-omap2/board-omap3beagle.c | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index c992cc7..83891fc 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -19,6 +19,7 @@
+ #include <linux/err.h>
+ #include <linux/clk.h>
+ #include <linux/io.h>
++#include <linux/leds.h>
+
+ #include <asm/hardware.h>
+ #include <asm/mach-types.h>
+@@ -72,6 +73,32 @@ static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
+ .ctrl_name = "internal",
+ };
+
++struct gpio_led gpio_leds[] = {
++ {
++ .name = "beagleboard::led0",
++ .default_trigger = "none",
++ .gpio = 149,
++ },
++ {
++ .name = "beagleboard::led1",
++ .default_trigger = "none",
++ .gpio = 150,
++ },
++};
++
++static struct gpio_led_platform_data gpio_led_info = {
++ .leds = gpio_leds,
++ .num_leds = ARRAY_SIZE(gpio_leds),
++};
++
++static struct platform_device leds_gpio = {
++ .name = "leds-gpio",
++ .id = -1,
++ .dev = {
++ .platform_data = &gpio_led_info,
++ },
++};
++
+ static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
+ { OMAP_TAG_UART, &omap3_beagle_uart_config },
+ { OMAP_TAG_MMC, &omap3beagle_mmc_config },
+@@ -83,6 +110,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = {
+ #ifdef CONFIG_RTC_DRV_TWL4030
+ &omap3_beagle_twl4030rtc_device,
+ #endif
++ &leds_gpio,
+ };
+
+ static void __init omap3_beagle_init(void)
+--
+1.5.4.3
+
diff --git a/packages/linux/linux-omap2-git/beagleboard/0002-omap3-cpuidle.patch b/packages/linux/linux-omap2-git/beagleboard/0002-omap3-cpuidle.patch
new file mode 100644
index 0000000000..c17c690fe1
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/0002-omap3-cpuidle.patch
@@ -0,0 +1,88 @@
+From: "Rajendra Nayak" <rnayak@ti.com>
+To: <linux-omap@vger.kernel.org>
+Subject: [PATCH 02/02] Kconfig changes
+Date: Tue, 10 Jun 2008 12:39:02 +0530
+
+Updates the CPUidle Kconfig
+
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+
+---
+ arch/arm/Kconfig | 10 ++++++++++
+ drivers/cpuidle/Kconfig | 28 ++++++++++++++++++++++------
+ 2 files changed, 32 insertions(+), 6 deletions(-)
+
+Index: linux-omap-2.6/arch/arm/Kconfig
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/Kconfig 2008-06-10 11:43:10.790502713 +0530
++++ linux-omap-2.6/arch/arm/Kconfig 2008-06-10 11:43:38.701604549 +0530
+@@ -954,6 +954,16 @@ config ATAGS_PROC
+
+ endmenu
+
++if (ARCH_OMAP)
++
++menu "CPUIdle"
++
++source "drivers/cpuidle/Kconfig"
++
++endmenu
++
++endif
++
+ if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
+
+ menu "CPU Frequency scaling"
+Index: linux-omap-2.6/drivers/cpuidle/Kconfig
+===================================================================
+--- linux-omap-2.6.orig/drivers/cpuidle/Kconfig 2008-06-10 11:43:10.790502713 +0530
++++ linux-omap-2.6/drivers/cpuidle/Kconfig 2008-06-10 12:06:36.139332151 +0530
+@@ -1,20 +1,36 @@
++menu "CPU idle PM support"
+
+ config CPU_IDLE
+ bool "CPU idle PM support"
+- default ACPI
++ default n
+ help
+ CPU idle is a generic framework for supporting software-controlled
+ idle processor power management. It includes modular cross-platform
+ governors that can be swapped during runtime.
+
+- If you're using an ACPI-enabled platform, you should say Y here.
++ If you're using a mobile platform that supports CPU idle PM (e.g.
++ an ACPI-capable notebook), you should say Y here.
++
++if CPU_IDLE
++
++comment "Governors"
+
+ config CPU_IDLE_GOV_LADDER
+- bool
++ bool "ladder"
+ depends on CPU_IDLE
+- default y
++ default n
+
+ config CPU_IDLE_GOV_MENU
+- bool
++ bool "menu"
+ depends on CPU_IDLE && NO_HZ
+- default y
++ default n
++ help
++ This cpuidle governor evaluates all available states and chooses the
++ deepest state that meets all of the following constraints: BM activity,
++ expected time until next timer interrupt, and last break event time
++ delta. It is designed to minimize power consumption. Currently
++ dynticks is required.
++
++endif # CPU_IDLE
++
++endmenu
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
diff --git a/packages/linux/linux-omap2-git/beagleboard/16bpp.patch b/packages/linux/linux-omap2-git/beagleboard/16bpp.patch
new file mode 100644
index 0000000000..f1e2181c82
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/16bpp.patch
@@ -0,0 +1,13 @@
+diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c
+index 69d4e06..c1c4f4c 100644
+--- a/drivers/video/omap/lcd_omap3beagle.c
++++ b/drivers/video/omap/lcd_omap3beagle.c
+@@ -66,7 +66,7 @@ struct lcd_panel omap3beagle_panel = {
+ .name = "omap3beagle",
+ .config = OMAP_LCDC_PANEL_TFT,
+
+- .bpp = 24,
++ .bpp = 16,
+ .data_lines = 24,
+ .x_res = LCD_XRES,
+ .y_res = LCD_YRES,
diff --git a/packages/linux/linux-omap2-git/beagleboard/defconfig b/packages/linux/linux-omap2-git/beagleboard/defconfig
index 3d3562d9f5..d4c1e9300a 100644
--- a/packages/linux/linux-omap2-git/beagleboard/defconfig
+++ b/packages/linux/linux-omap2-git/beagleboard/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.26-rc3-omap1
-# Tue May 20 19:38:20 2008
+# Linux kernel version: 2.6.26-rc7-omap1
+# Tue Jun 24 20:16:52 2008
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -31,6 +31,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
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
@@ -79,8 +80,9 @@ 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_PROFILING is not set
# CONFIG_MARKERS is not set
@@ -171,17 +173,16 @@ CONFIG_ARCH_OMAP3=y
#
# OMAP Feature Selections
#
-CONFIG_OMAP_DEBUG_SRAM_PATCH=y
# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
-# CONFIG_OMAP_RESET_CLOCKS is not set
+CONFIG_OMAP_SMARTREFLEX=y
+# CONFIG_OMAP_SMARTREFLEX_TESTING is not set
+CONFIG_OMAP_RESET_CLOCKS=y
CONFIG_OMAP_BOOT_TAG=y
CONFIG_OMAP_BOOT_REASON=y
# CONFIG_OMAP_COMPONENT_VERSION is not set
# CONFIG_OMAP_GPIO_SWITCH is not set
-CONFIG_OMAP_MUX=n
-# CONFIG_OMAP_MUX_DEBUG is not set
-CONFIG_OMAP_MUX_WARNINGS=n
+# CONFIG_OMAP_MUX is not set
CONFIG_OMAP_MCBSP=y
# CONFIG_OMAP_MMU_FWK is not set
# CONFIG_OMAP_MBOX_FWK is not set
@@ -192,7 +193,6 @@ CONFIG_OMAP_DM_TIMER=y
# CONFIG_OMAP_LL_DEBUG_UART1 is not set
# CONFIG_OMAP_LL_DEBUG_UART2 is not set
CONFIG_OMAP_LL_DEBUG_UART3=y
-CONFIG_OMAP_SERIAL_WAKE=y
CONFIG_ARCH_OMAP34XX=y
CONFIG_ARCH_OMAP3430=y
@@ -233,7 +233,7 @@ CONFIG_CPU_CP15_MMU=y
# Processor Features
#
CONFIG_ARM_THUMB=y
-# CONFIG_ARM_THUMBEE is not set
+CONFIG_ARM_THUMBEE=y
# CONFIG_CPU_ICACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_DISABLE is not set
# CONFIG_CPU_BPREDICT_DISABLE is not set
@@ -254,7 +254,7 @@ CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT=y
CONFIG_HZ=128
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
@@ -273,7 +273,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
-# CONFIG_LEDS is not set
+CONFIG_LEDS=y
CONFIG_ALIGNMENT_TRAP=y
#
@@ -287,6 +287,21 @@ CONFIG_KEXEC=y
CONFIG_ATAGS_PROC=y
#
+# CPUIdle
+#
+
+#
+# CPU idle PM support
+#
+CONFIG_CPU_IDLE=y
+
+#
+# Governors
+#
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+
+#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
@@ -473,7 +488,7 @@ CONFIG_MAC80211_RC_DEFAULT_PID=y
CONFIG_MAC80211_RC_DEFAULT="pid"
CONFIG_MAC80211_RC_PID=y
# CONFIG_MAC80211_MESH is not set
-# CONFIG_MAC80211_LEDS is not set
+CONFIG_MAC80211_LEDS=y
# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
# CONFIG_MAC80211_DEBUG is not set
CONFIG_IEEE80211=y
@@ -514,7 +529,7 @@ CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
-CONFIG_FTL=y
+# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
@@ -566,6 +581,7 @@ 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_OMAP2=y
CONFIG_MTD_NAND_IDS=y
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_NANDSIM is not set
@@ -853,22 +869,23 @@ CONFIG_I2C_OMAP=y
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
-# CONFIG_SENSORS_EEPROM is not set
+CONFIG_SENSORS_EEPROM=y
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_ISP1301_OMAP is not set
# CONFIG_TPS65010 is not set
-CONFIG_SENSORS_TLV320AIC23=y
+# CONFIG_SENSORS_TLV320AIC23 is not set
CONFIG_TWL4030_CORE=y
CONFIG_TWL4030_GPIO=y
-# CONFIG_TWL4030_MADC is not set
+CONFIG_TWL4030_MADC=m
CONFIG_TWL4030_USB=y
CONFIG_TWL4030_USB_HS_ULPI=y
CONFIG_TWL4030_PWRBUTTON=y
-# CONFIG_TWL4030_POWEROFF is not set
+CONFIG_TWL4030_POWEROFF=y
# CONFIG_SENSORS_MAX6875 is not set
# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_SENSORS_TSL2563 is not set
# CONFIG_LP5521 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
@@ -912,8 +929,65 @@ CONFIG_HAVE_GPIO_LIB=y
#
# CONFIG_GPIO_MCP23S08 is not set
# CONFIG_W1 is not set
-# CONFIG_POWER_SUPPLY is not set
-# CONFIG_HWMON is not set
+CONFIG_POWER_SUPPLY=m
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_APM_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID 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_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_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_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_ADS7828 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_W83L786NG is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_SENSORS_TSC210X is not set
+CONFIG_SENSORS_OMAP34XX=y
+# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
@@ -949,102 +1023,178 @@ CONFIG_SSB_POSSIBLE=y
#
# Multimedia core support
#
-CONFIG_VIDEO_DEV=y
-CONFIG_VIDEO_V4L2_COMMON=y
-# CONFIG_VIDEO_ALLOW_V4L1 is not set
-# CONFIG_VIDEO_V4L1_COMPAT is not set
-# CONFIG_DVB_CORE is not set
-CONFIG_VIDEO_MEDIA=y
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_COMMON=m
+CONFIG_VIDEO_ALLOW_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_DVB_CORE=m
+CONFIG_VIDEO_MEDIA=m
#
# Multimedia drivers
#
CONFIG_MEDIA_ATTACH=y
-CONFIG_MEDIA_TUNER=y
+CONFIG_MEDIA_TUNER=m
# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
-CONFIG_MEDIA_TUNER_SIMPLE=y
-CONFIG_MEDIA_TUNER_TDA8290=y
-CONFIG_MEDIA_TUNER_TDA9887=y
-CONFIG_MEDIA_TUNER_TEA5761=y
-CONFIG_MEDIA_TUNER_TEA5767=y
-CONFIG_MEDIA_TUNER_MT20XX=y
-CONFIG_MEDIA_TUNER_XC2028=y
-CONFIG_MEDIA_TUNER_XC5000=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_VIDEO_TUNER=m
+CONFIG_MEDIA_TUNER_SIMPLE=m
+CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA9887=m
+CONFIG_MEDIA_TUNER_TEA5761=m
+CONFIG_MEDIA_TUNER_TEA5767=m
+CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_MT2060=m
+CONFIG_MEDIA_TUNER_MT2266=m
+CONFIG_MEDIA_TUNER_QT1010=m
+CONFIG_MEDIA_TUNER_XC2028=m
+CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+# CONFIG_VIDEO_AU0828 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_USB_STKWEBCAM is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_TEA5761 is not set
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_SI470X is not set
+CONFIG_DVB_CAPTURE_DRIVERS=y
+# CONFIG_TTPCI_EEPROM is not set
#
-# Encoders/decoders and other helper chips
+# Supported USB Adapters
#
+CONFIG_DVB_USB=m
+# CONFIG_DVB_USB_DEBUG is not set
+CONFIG_DVB_USB_A800=m
+CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
+CONFIG_DVB_USB_DIBUSB_MC=m
+CONFIG_DVB_USB_DIB0700=m
+CONFIG_DVB_USB_UMT_010=m
+CONFIG_DVB_USB_CXUSB=m
+CONFIG_DVB_USB_M920X=m
+CONFIG_DVB_USB_GL861=m
+CONFIG_DVB_USB_AU6610=m
+CONFIG_DVB_USB_DIGITV=m
+CONFIG_DVB_USB_VP7045=m
+CONFIG_DVB_USB_VP702X=m
+CONFIG_DVB_USB_GP8PSK=m
+CONFIG_DVB_USB_NOVA_T_USB2=m
+CONFIG_DVB_USB_TTUSB2=m
+CONFIG_DVB_USB_DTT200U=m
+CONFIG_DVB_USB_OPERA1=m
+CONFIG_DVB_USB_AF9005=m
+CONFIG_DVB_USB_AF9005_REMOTE=m
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+CONFIG_DVB_CINERGYT2=m
+# CONFIG_DVB_CINERGYT2_TUNING is not set
#
-# Audio decoders
+# Supported FlexCopII (B2C2) Adapters
#
-# CONFIG_VIDEO_TVAUDIO is not set
-# CONFIG_VIDEO_TDA7432 is not set
-# CONFIG_VIDEO_TDA9840 is not set
-# CONFIG_VIDEO_TDA9875 is not set
-# CONFIG_VIDEO_TEA6415C is not set
-# CONFIG_VIDEO_TEA6420 is not set
-CONFIG_VIDEO_MSP3400=m
-# CONFIG_VIDEO_CS5345 is not set
-CONFIG_VIDEO_CS53L32A=m
-# CONFIG_VIDEO_M52790 is not set
-# CONFIG_VIDEO_TLV320AIC23B is not set
-CONFIG_VIDEO_WM8775=m
-# CONFIG_VIDEO_WM8739 is not set
-# CONFIG_VIDEO_VP27SMPX is not set
+# CONFIG_DVB_B2C2_FLEXCOP is not set
#
-# Video decoders
+# Supported DVB Frontends
#
-# CONFIG_VIDEO_OV7670 is not set
-# CONFIG_VIDEO_TCM825X is not set
-# CONFIG_VIDEO_OV9640 is not set
-CONFIG_VIDEO_SAA711X=m
-# CONFIG_VIDEO_SAA717X is not set
-# CONFIG_VIDEO_TVP5150 is not set
#
-# Video and audio decoders
+# Customise DVB Frontends
#
-CONFIG_VIDEO_CX25840=m
+# CONFIG_DVB_FE_CUSTOMISE is not set
#
-# MPEG video encoders
+# DVB-S (satellite) frontends
#
-CONFIG_VIDEO_CX2341X=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_S5H1420=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_TDA8083=m
+CONFIG_DVB_TDA10086=m
+CONFIG_DVB_VES1X93=m
+CONFIG_DVB_TUNER_ITD1000=m
+CONFIG_DVB_TDA826X=m
+CONFIG_DVB_TUA6100=m
#
-# Video encoders
+# DVB-T (terrestrial) frontends
#
-# CONFIG_VIDEO_SAA7127 is not set
+CONFIG_DVB_SP8870=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_CX22700=m
+CONFIG_DVB_CX22702=m
+CONFIG_DVB_L64781=m
+CONFIG_DVB_TDA1004X=m
+CONFIG_DVB_NXT6000=m
+CONFIG_DVB_MT352=m
+CONFIG_DVB_ZL10353=m
+CONFIG_DVB_DIB3000MB=m
+CONFIG_DVB_DIB3000MC=m
+CONFIG_DVB_DIB7000M=m
+CONFIG_DVB_DIB7000P=m
+CONFIG_DVB_TDA10048=m
#
-# Video improvement chips
+# DVB-C (cable) frontends
#
-# CONFIG_VIDEO_UPD64031A is not set
-# CONFIG_VIDEO_UPD64083 is not set
-# CONFIG_VIDEO_VIVI is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-CONFIG_V4L_USB_DRIVERS=y
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_USBVISION is not set
-# CONFIG_USB_ET61X251 is not set
-CONFIG_USB_SN9C102=m
-# CONFIG_USB_ZC0301 is not set
-# CONFIG_USB_ZR364XX is not set
-# CONFIG_USB_STKWEBCAM is not set
-# CONFIG_SOC_CAMERA is not set
-# CONFIG_RADIO_ADAPTERS is not set
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_TDA10021=m
+CONFIG_DVB_TDA10023=m
+CONFIG_DVB_STV0297=m
+
+#
+# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
+#
+CONFIG_DVB_NXT200X=m
+# CONFIG_DVB_OR51211 is not set
+# CONFIG_DVB_OR51132 is not set
+CONFIG_DVB_BCM3510=m
+CONFIG_DVB_LGDT330X=m
+CONFIG_DVB_S5H1409=m
+CONFIG_DVB_AU8522=m
+CONFIG_DVB_S5H1411=m
+
+#
+# Digital terrestrial only tuners/PLL
+#
+CONFIG_DVB_PLL=m
+CONFIG_DVB_TUNER_DIB0070=m
+
+#
+# SEC control devices for DVB-S
+#
+CONFIG_DVB_LNBP21=m
+# CONFIG_DVB_ISL6405 is not set
+CONFIG_DVB_ISL6421=m
# CONFIG_DAB is not set
#
@@ -1053,7 +1203,7 @@ CONFIG_USB_SN9C102=m
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
CONFIG_FB=y
-CONFIG_FIRMWARE_EDID=y
+# CONFIG_FIRMWARE_EDID is not set
# CONFIG_FB_DDC is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
@@ -1101,7 +1251,10 @@ CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
-# CONFIG_LOGO is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
#
# Sound
@@ -1114,15 +1267,15 @@ CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
+CONFIG_SND_HWDEP=y
+CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
-# CONFIG_SND_SEQUENCER_OSS is not set
+CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_DYNAMIC_MINORS is not set
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
@@ -1154,9 +1307,9 @@ CONFIG_SND_VERBOSE_PROCFS=y
#
# USB devices
#
-CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_AUDIO=y
CONFIG_SND_USB_CAIAQ=m
-# CONFIG_SND_USB_CAIAQ_INPUT is not set
+CONFIG_SND_USB_CAIAQ_INPUT=y
#
# System on Chip audio support
@@ -1171,6 +1324,9 @@ CONFIG_SND_SOC=y
# SoC Audio for the Texas Instruments OMAP
#
CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_MCBSP=y
+CONFIG_SND_OMAP_SOC_OMAP3BEAGLE=y
+CONFIG_SND_SOC_TWL4030=y
#
# Open Sound System
@@ -1203,7 +1359,7 @@ CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_SUSPEND=y
-# CONFIG_USB_OTG is not set
+CONFIG_USB_OTG=y
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
@@ -1228,9 +1384,10 @@ CONFIG_USB_MUSB_SOC=y
# OMAP 343x high speed USB support
#
# CONFIG_USB_MUSB_HOST is not set
-CONFIG_USB_MUSB_PERIPHERAL=y
-# CONFIG_USB_MUSB_OTG is not set
+# CONFIG_USB_MUSB_PERIPHERAL is not set
+CONFIG_USB_MUSB_OTG=y
CONFIG_USB_GADGET_MUSB_HDRC=y
+CONFIG_USB_MUSB_HDRC_HCD=y
# CONFIG_MUSB_PIO_ONLY is not set
CONFIG_USB_INVENTRA_DMA=y
# CONFIG_USB_TI_CPPI_DMA is not set
@@ -1241,6 +1398,7 @@ CONFIG_USB_MUSB_LOGLEVEL=0
#
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
+CONFIG_USB_WDM=m
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1344,6 +1502,7 @@ CONFIG_USB_SISUSBVGA_CON=y
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -1380,6 +1539,7 @@ CONFIG_MMC_UNSAFE_RESUME=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_BOUNCE=y
CONFIG_SDIO_UART=y
+# CONFIG_MMC_TEST is not set
#
# MMC/SD Host Controller Drivers
@@ -1395,14 +1555,14 @@ CONFIG_LEDS_CLASS=y
# CONFIG_LEDS_OMAP_DEBUG is not set
# CONFIG_LEDS_OMAP is not set
# CONFIG_LEDS_OMAP_PWM is not set
-CONFIG_LEDS_GPIO=m
+CONFIG_LEDS_GPIO=y
#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
@@ -1434,6 +1594,7 @@ CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_DRV_M41T80 is not set
CONFIG_RTC_DRV_TWL4030=y
# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
#
# SPI RTC drivers
@@ -1476,8 +1637,12 @@ CONFIG_EXT3_FS=y
CONFIG_JBD=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_FS_POSIX_ACL=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
CONFIG_DNOTIFY=y
@@ -1491,13 +1656,16 @@ CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# CD-ROM/DVD Filesystems
#
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
#
# DOS/FAT/NT Filesystems
@@ -1530,7 +1698,23 @@ CONFIG_TMPFS=y
# 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_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+CONFIG_JFFS2_FS_XATTR=y
+CONFIG_JFFS2_FS_POSIX_ACL=y
+CONFIG_JFFS2_FS_SECURITY=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
@@ -1641,7 +1825,9 @@ CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_OBJECTS is not set
-# CONFIG_DEBUG_SLAB is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
@@ -1652,7 +1838,7 @@ CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_WRITECOUNT is not set
@@ -1665,10 +1851,9 @@ CONFIG_FRAME_POINTER=y
# CONFIG_FAULT_INJECTION is not set
# CONFIG_SAMPLES is not set
# CONFIG_DEBUG_USER is not set
-CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_ERRORS is not set
# CONFIG_DEBUG_STACK_USAGE is not set
-CONFIG_DEBUG_LL=y
-# CONFIG_DEBUG_ICEDCC is not set
+# CONFIG_DEBUG_LL is not set
#
# Security options
@@ -1772,8 +1957,10 @@ CONFIG_CRC_ITU_T=y
CONFIG_CRC32=y
CONFIG_CRC7=y
CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=m
-CONFIG_ZLIB_DEFLATE=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
diff --git a/packages/linux/linux-omap2-git/beagleboard/fix-dispc-clocks.patch b/packages/linux/linux-omap2-git/beagleboard/fix-dispc-clocks.patch
new file mode 100644
index 0000000000..aade27fd8a
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/fix-dispc-clocks.patch
@@ -0,0 +1,147 @@
+From linux-omap-owner@vger.kernel.org Sun Jun 22 10:11:39 2008
+Received: from localhost
+ ([127.0.0.1] helo=dominion ident=koen)
+ by dominion.dominion.void with esmtp (Exim 4.63)
+ (envelope-from <linux-omap-owner@vger.kernel.org>)
+ id 1KAKfj-0008Qc-FC
+ for koen@localhost; Sun, 22 Jun 2008 10:11:39 +0200
+Received: from xs.service.utwente.nl [130.89.5.250]
+ by dominion with POP3 (fetchmail-6.3.6)
+ for <koen@localhost> (single-drop); Sun, 22 Jun 2008 10:11:39 +0200 (CEST)
+Received: from mail.service.utwente.nl ([130.89.5.253]) by exchange.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Sat, 21 Jun 2008 19:06:02 +0200
+Received: from smtp.utwente.nl ([130.89.2.9]) by mail.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Sat, 21 Jun 2008 19:06:01 +0200
+Received: from vger.kernel.org (vger.kernel.org [209.132.176.167])
+ by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id m5LH5TSm026212
+ for <k.kooi@student.utwente.nl>; Sat, 21 Jun 2008 19:05:30 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+ id S1753396AbYFURFN (ORCPT <rfc822;k.kooi@student.utwente.nl>);
+ Sat, 21 Jun 2008 13:05:13 -0400
+Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753305AbYFURFN
+ (ORCPT <rfc822;linux-omap-outgoing>);
+ Sat, 21 Jun 2008 13:05:13 -0400
+Received: from utopia.booyaka.com ([72.9.107.138]:41675 "EHLO
+ utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+ with ESMTP id S1753145AbYFURFL (ORCPT
+ <rfc822;linux-omap@vger.kernel.org>); Sat, 21 Jun 2008 13:05:11 -0400
+Received: (qmail 20532 invoked by uid 526); 21 Jun 2008 17:05:10 -0000
+Date: Sat, 21 Jun 2008 11:05:10 -0600 (MDT)
+From: Paul Walmsley <paul@pwsan.com>
+To: "Gadiyar, Anand" <gadiyar@ti.com>,
+ "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
+cc: Dirk Behme <dirk.behme@googlemail.com>,
+ "jouni.hogander@nokia.com" <jouni.hogander@nokia.com>
+Subject: [PATCH] OMAP3 clock: fix omap2_clk_wait_ready for OMAP3430ES2 DSS
+In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB022BB66209@dbde02.ent.ti.com>
+Message-ID: <alpine.DEB.1.00.0806211054100.19765@utopia.booyaka.com>
+References: <5A47E75E594F054BAF48C5E4FC4B92AB022BE46296@dbde02.ent.ti.com>,<485CA347.909@googlemail.com> <5A47E75E594F054BAF48C5E4FC4B92AB022BB66209@dbde02.ent.ti.com>
+User-Agent: Alpine 1.00 (DEB 882 2007-12-20)
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+Sender: linux-omap-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-omap.vger.kernel.org>
+X-Mailing-List: linux-omap@vger.kernel.org
+X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact servicedesk@icts.utwente.nl for more information.
+X-UTwente-MailScanner: Found to be clean
+X-UTwente-MailScanner-From: linux-omap-owner@vger.kernel.org
+X-Spam-Status: No
+X-OriginalArrivalTime: 21 Jun 2008 17:06:02.0187 (UTC) FILETIME=[157001B0:01C8D3C1]
+
+
+On OMAP3430ES2, DSS has both an initiator standby CM_IDLEST bit, and a
+target idle CM_IDLEST bit. This is a departure from previous silicon,
+which only had an initiator standby bit.
+
+This means we need to test the target idle bit after enabling
+dss1_alwon_fclk. Previous clock code has done the wrong thing since ES2
+came out: it's either tested the wrong bit, causing intermittent
+
+ Clock dss1_alwon_fck didn't enable in 100000 tries
+
+messages; or not tested anything at all, causing intermittent crashes
+during DISPC initialization with:
+
+ Unhandled fault: external abort on non-linefetch (0x1028)
+
+This patch modifies omap2_clk_wait_ready() to wait for the DSS to become
+accessible after dss1_alwon_fclk is enabled.
+
+Thanks to Anand Gadiyar <gadiyar@ti.com> for identifying one of the
+problem patches.
+
+Signed-off-by: Paul Walmsley <paul@pwsan.com>
+---
+
+ arch/arm/mach-omap2/clock.c | 30 ++++++++++++++++++++++++------
+ arch/arm/mach-omap2/cm-regbits-34xx.h | 4 +++-
+ 2 files changed, 27 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
+index ed15868..1820f75 100644
+--- a/arch/arm/mach-omap2/clock.c
++++ b/arch/arm/mach-omap2/clock.c
+@@ -244,18 +244,36 @@ static void omap2_clk_wait_ready(struct clk *clk)
+ }
+
+ /* REVISIT: What are the appropriate exclusions for 34XX? */
+- /* OMAP3: ignore DSS-mod clocks */
+- if (cpu_is_omap34xx() &&
+- ((reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0) ||
+- (((reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(CORE_MOD, 0)) &&
+- clk->enable_bit == OMAP3430_EN_SSI_SHIFT)))
+- return;
++ if (cpu_is_omap34xx()) {
++
++ /* 3430ES1 DSS and SSI have no target idlest bits */
++ if (is_sil_rev_equal_to(OMAP3430_REV_ES1_0) &&
++ ((reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0) ||
++ ((reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(CORE_MOD, 0) &&
++ clk->enable_bit == OMAP3430_EN_SSI_SHIFT)))
++ return;
++
++ /* Even for 3430ES2 DSS, only wait for dss1_alwon_fclk */
++ if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0) &&
++ (reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0) &&
++ clk->enable_bit != OMAP3430_EN_DSS1_SHIFT)
++ return;
++
++ }
+
+ /* Check if both functional and interface clocks
+ * are running. */
+ bit = 1 << clk->enable_bit;
+ if (!(__raw_readl((__force void __iomem *)other_reg) & bit))
+ return;
++
++ /* OMAP3430ES2 DSS is an unusual case */
++ if (cpu_is_omap34xx() &&
++ (reg & ~0xff) == (__force u32)OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0) &&
++ clk->enable_bit == OMAP3430_EN_DSS1_SHIFT) {
++ bit = OMAP3430ES2_ST_DSS_IDLE;
++ }
++
+ st_reg = ((other_reg & ~0xf0) | 0x20); /* CM_IDLEST* */
+
+ omap2_wait_clock_ready((__force void __iomem *)st_reg, bit, clk->name);
+diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
+index 6ec66f4..946c552 100644
+--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
++++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
+@@ -500,7 +500,9 @@
+ #define OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT 0
+
+ /* CM_IDLEST_DSS */
+-#define OMAP3430_ST_DSS (1 << 0)
++#define OMAP3430ES2_ST_DSS_IDLE (1 << 1)
++#define OMAP3430ES2_ST_DSS_STDBY (1 << 0)
++#define OMAP3430ES1_ST_DSS (1 << 0)
+
+ /* CM_AUTOIDLE_DSS */
+ #define OMAP3430_AUTO_DSS (1 << 0)
+--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
diff --git a/packages/linux/linux-omap2-git/beagleboard/flash.patch b/packages/linux/linux-omap2-git/beagleboard/flash.patch
new file mode 100644
index 0000000000..4c76cd97bd
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/flash.patch
@@ -0,0 +1,558 @@
+diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
+index 13d0043..d582b8f 100644
+--- a/arch/arm/mach-omap2/Makefile
++++ b/arch/arm/mach-omap2/Makefile
+@@ -44,7 +44,8 @@ obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o \
+ board-omap3evm-flash.o
+ obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \
+ usb-musb.o usb-ehci.o \
+- hsmmc.o
++ hsmmc.o \
++ board-omap3beagle-flash.o
+ obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \
+ hsmmc.o \
+ usb-musb.o
+diff --git a/arch/arm/mach-omap2/board-omap3beagle-flash.c b/arch/arm/mach-omap2/board-omap3beagle-flash.c
+new file mode 100644
+index 0000000..5346df0
+--- /dev/null
++++ b/arch/arm/mach-omap2/board-omap3beagle-flash.c
+@@ -0,0 +1,119 @@
++/*
++ * board-omap3beagle-flash.c
++ *
++ * Copyright (c) 2008 Texas Instruments
++ *
++ * Modified from board-omap3evm-flash.c
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/partitions.h>
++#include <linux/mtd/nand.h>
++#include <linux/types.h>
++#include <linux/io.h>
++
++#include <asm/mach/flash.h>
++#include <asm/arch/board.h>
++#include <asm/arch/gpmc.h>
++#include <asm/arch/nand.h>
++
++#define GPMC_CS0_BASE 0x60
++#define GPMC_CS_SIZE 0x30
++
++static struct mtd_partition omap3beagle_nand_partitions[] = {
++ /* All the partition sizes are listed in terms of NAND block size */
++ {
++ .name = "X-Loader",
++ .offset = 0,
++ .size = 4*(64 * 2048),
++ .mask_flags = MTD_WRITEABLE, /* force read-only */
++ },
++ {
++ .name = "U-Boot",
++ .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
++ .size = 15*(64 * 2048),
++ .mask_flags = MTD_WRITEABLE, /* force read-only */
++ },
++ {
++ .name = "U-Boot Env",
++ .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */
++ .size = 1*(64 * 2048),
++ },
++ {
++ .name = "Kernel",
++ .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
++ .size = 32*(64 * 2048),
++ },
++ {
++ .name = "File System",
++ .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
++ .size = MTDPART_SIZ_FULL,
++ },
++};
++
++static struct omap_nand_platform_data omap3beagle_nand_data = {
++ .parts = omap3beagle_nand_partitions,
++ .nr_parts = ARRAY_SIZE(omap3beagle_nand_partitions),
++ .dma_channel = -1, /* disable DMA in OMAP NAND driver */
++ .nand_setup = NULL,
++ .dev_ready = NULL,
++};
++
++static struct resource omap3beagle_nand_resource = {
++ .flags = IORESOURCE_MEM,
++};
++
++static struct platform_device omap3beagle_nand_device = {
++ .name = "omap2-nand",
++ .id = -1,
++ .dev = {
++ .platform_data = &omap3beagle_nand_data,
++ },
++ .num_resources = 1,
++ .resource = &omap3beagle_nand_resource,
++};
++
++
++void __init omap3beagle_flash_init(void)
++{
++ u8 cs = 0;
++ u8 nandcs = GPMC_CS_NUM + 1;
++
++ u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
++
++ /* find out the chip-select on which NAND exists */
++ while (cs < GPMC_CS_NUM) {
++ u32 ret = 0;
++ ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
++
++ if ((ret & 0xC00) == 0x800) {
++ printk(KERN_INFO "Found NAND on CS%d\n", cs);
++ if (nandcs > GPMC_CS_NUM)
++ nandcs = cs;
++ }
++ cs++;
++ }
++
++ if (nandcs > GPMC_CS_NUM) {
++ printk(KERN_INFO "NAND: Unable to find configuration "
++ "in GPMC\n ");
++ return;
++ }
++
++ if (nandcs < GPMC_CS_NUM) {
++ omap3beagle_nand_data.cs = nandcs;
++ omap3beagle_nand_data.gpmc_cs_baseaddr = (void *)(gpmc_base_add +
++ GPMC_CS0_BASE + nandcs * GPMC_CS_SIZE);
++ omap3beagle_nand_data.gpmc_baseaddr = (void *) (gpmc_base_add);
++
++ printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
++ if (platform_device_register(&omap3beagle_nand_device) < 0)
++ printk(KERN_ERR "Unable to register NAND device\n");
++ }
++}
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index c992cc7..99e042e 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -94,6 +94,7 @@ static void __init omap3_beagle_init(void)
+ hsmmc_init();
+ usb_musb_init();
+ usb_ehci_init();
++ omap3beagle_flash_init();
+ }
+
+ arch_initcall(omap3_beagle_i2c_init);
+diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
+index 3d5e432..02b9ced 100644
+--- a/drivers/mtd/nand/Kconfig
++++ b/drivers/mtd/nand/Kconfig
+@@ -71,7 +71,7 @@ config MTD_NAND_AMS_DELTA
+
+ config MTD_NAND_OMAP2
+ tristate "NAND Flash device on OMAP 2420H4/2430SDP boards"
+- depends on (ARM && ARCH_OMAP2 && MTD_NAND)
++ depends on ARM && MTD_NAND && (ARCH_OMAP2 || ARCH_OMAP3)
+ help
+ Support for NAND flash on Texas Instruments 2430SDP/2420H4 platforms.
+
+diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
+index 3b7307c..3aac1d2 100644
+--- a/drivers/mtd/nand/omap2.c
++++ b/drivers/mtd/nand/omap2.c
+@@ -111,15 +111,6 @@
+ static const char *part_probes[] = { "cmdlinepart", NULL };
+ #endif
+
+-static int hw_ecc = 1;
+-
+-/* new oob placement block for use with hardware ecc generation */
+-static struct nand_ecclayout omap_hw_eccoob = {
+- .eccbytes = 12,
+- .eccpos = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13},
+- .oobfree = {{16, 32}, {33, 63} },
+-};
+-
+ struct omap_nand_info {
+ struct nand_hw_control controller;
+ struct omap_nand_platform_data *pdata;
+@@ -133,6 +124,13 @@ struct omap_nand_info {
+ void __iomem *gpmc_cs_baseaddr;
+ void __iomem *gpmc_baseaddr;
+ };
++
++/*
++ * omap_nand_wp - This function enable or disable the Write Protect feature on
++ * NAND device
++ * @mtd: MTD device structure
++ * @mode: WP ON/OFF
++ */
+ static void omap_nand_wp(struct mtd_info *mtd, int mode)
+ {
+ struct omap_nand_info *info = container_of(mtd,
+@@ -189,11 +187,11 @@ static void omap_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+ }
+
+ /*
+-* omap_read_buf - read data from NAND controller into buffer
+-* @mtd: MTD device structure
+-* @buf: buffer to store date
+-* @len: number of bytes to read
+-*/
++ * omap_read_buf - read data from NAND controller into buffer
++ * @mtd: MTD device structure
++ * @buf: buffer to store date
++ * @len: number of bytes to read
++ */
+ static void omap_read_buf(struct mtd_info *mtd, u_char *buf, int len)
+ {
+ struct omap_nand_info *info = container_of(mtd,
+@@ -207,11 +205,11 @@ static void omap_read_buf(struct mtd_info *mtd, u_char *buf, int len)
+ }
+
+ /*
+-* omap_write_buf - write buffer to NAND controller
+-* @mtd: MTD device structure
+-* @buf: data buffer
+-* @len: number of bytes to write
+-*/
++ * omap_write_buf - write buffer to NAND controller
++ * @mtd: MTD device structure
++ * @buf: data buffer
++ * @len: number of bytes to write
++ */
+ static void omap_write_buf(struct mtd_info *mtd, const u_char * buf, int len)
+ {
+ struct omap_nand_info *info = container_of(mtd,
+@@ -250,10 +248,16 @@ static int omap_verify_buf(struct mtd_info *mtd, const u_char * buf, int len)
+ return 0;
+ }
+
++#ifdef CONFIG_MTD_NAND_OMAP_HWECC
++/*
++ * omap_hwecc_init-Initialize the Hardware ECC for NAND flash in GPMC controller
++ * @mtd: MTD device structure
++ */
+ static void omap_hwecc_init(struct mtd_info *mtd)
+ {
+ struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
+ mtd);
++ register struct nand_chip *chip = mtd->priv;
+ unsigned long val = 0x0;
+
+ /* Read from ECC Control Register */
+@@ -264,16 +268,15 @@ static void omap_hwecc_init(struct mtd_info *mtd)
+
+ /* Read from ECC Size Config Register */
+ val = __raw_readl(info->gpmc_baseaddr + GPMC_ECC_SIZE_CONFIG);
+- /* ECCSIZE1=512 | ECCSIZE0=8bytes | Select eccResultsize[0123] */
+- val = ((0x000000FF<<22) | (0x00000003<<12) | (0x0000000F));
++ /* ECCSIZE1=512 | Select eccResultsize[0-3] */
++ val = ((((chip->ecc.size >> 1) - 1) << 22) | (0x0000000F));
+ __raw_writel(val, info->gpmc_baseaddr + GPMC_ECC_SIZE_CONFIG);
+-
+-
+ }
+
+ /*
+- * This function will generate true ECC value, which can be used
++ * gen_true_ecc - This function will generate true ECC value, which can be used
+ * when correcting data read from NAND flash memory core
++ * @ecc_buf: buffer to store ecc code
+ */
+ static void gen_true_ecc(u8 *ecc_buf)
+ {
+@@ -289,8 +292,12 @@ static void gen_true_ecc(u8 *ecc_buf)
+ }
+
+ /*
+- * This function compares two ECC's and indicates if there is an error.
+- * If the error can be corrected it will be corrected to the buffer
++ * omap_compare_ecc - This function compares two ECC's and indicates if there
++ * is an error. If the error can be corrected it will be corrected to the
++ * buffer
++ * @ecc_data1: ecc code from nand spare area
++ * @ecc_data2: ecc code from hardware register obtained from hardware ecc
++ * @page_data: page data
+ */
+ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */
+ u8 *ecc_data2, /* read from register */
+@@ -409,6 +416,14 @@ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */
+ }
+ }
+
++/*
++ * omap_correct_data - Compares the ecc read from nand spare area with ECC
++ * registers values and corrects one bit error if it has occured
++ * @mtd: MTD device structure
++ * @dat: page data
++ * @read_ecc: ecc read from nand flash
++ * @calc_ecc: ecc read from ECC registers
++ */
+ static int omap_correct_data(struct mtd_info *mtd, u_char * dat,
+ u_char * read_ecc, u_char * calc_ecc)
+ {
+@@ -436,65 +451,64 @@ static int omap_correct_data(struct mtd_info *mtd, u_char * dat,
+ }
+
+ /*
+-** Generate non-inverted ECC bytes.
+-**
+-** Using noninverted ECC can be considered ugly since writing a blank
+-** page ie. padding will clear the ECC bytes. This is no problem as long
+-** nobody is trying to write data on the seemingly unused page.
+-**
+-** Reading an erased page will produce an ECC mismatch between
+-** generated and read ECC bytes that has to be dealt with separately.
+-*/
++ * omap_calcuate_ecc - Generate non-inverted ECC bytes.
++ * Using noninverted ECC can be considered ugly since writing a blank
++ * page ie. padding will clear the ECC bytes. This is no problem as long
++ * nobody is trying to write data on the seemingly unused page. Reading
++ * an erased page will produce an ECC mismatch between generated and read
++ * ECC bytes that has to be dealt with separately.
++ * @mtd: MTD device structure
++ * @dat: The pointer to data on which ecc is computed
++ * @ecc_code: The ecc_code buffer
++ */
+ static int omap_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
+ u_char *ecc_code)
+ {
+ struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
+ mtd);
+ unsigned long val = 0x0;
+- unsigned long reg, n;
+-
+- /* Ex NAND_ECC_HW12_2048 */
+- if ((info->nand.ecc.mode == NAND_ECC_HW) &&
+- (info->nand.ecc.size == 2048))
+- n = 4;
+- else
+- n = 1;
++ unsigned long reg;
+
+ /* Start Reading from HW ECC1_Result = 0x200 */
+ reg = (unsigned long)(info->gpmc_baseaddr + GPMC_ECC1_RESULT);
+- while (n--) {
+- val = __raw_readl(reg);
+- *ecc_code++ = val; /* P128e, ..., P1e */
+- *ecc_code++ = val >> 16; /* P128o, ..., P1o */
+- /* P2048o, P1024o, P512o, P256o, P2048e, P1024e, P512e, P256e */
+- *ecc_code++ = ((val >> 8) & 0x0f) | ((val >> 20) & 0xf0);
+- reg += 4;
+- }
++ val = __raw_readl(reg);
++ *ecc_code++ = val; /* P128e, ..., P1e */
++ *ecc_code++ = val >> 16; /* P128o, ..., P1o */
++ /* P2048o, P1024o, P512o, P256o, P2048e, P1024e, P512e, P256e */
++ *ecc_code++ = ((val >> 8) & 0x0f) | ((val >> 20) & 0xf0);
++ reg += 4;
+
+ return 0;
+-} /* omap_calculate_ecc */
++}
+
++/*
++ * omap_enable_hwecc - This function enables the hardware ecc functionality
++ * @mtd: MTD device structure
++ * @mode: Read/Write mode
++ */
+ static void omap_enable_hwecc(struct mtd_info *mtd, int mode)
+ {
+ struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
+ mtd);
++ register struct nand_chip *chip = mtd->priv;
++ unsigned int dev_width = (chip->options & NAND_BUSWIDTH_16) ? 1 : 0;
+ unsigned long val = __raw_readl(info->gpmc_baseaddr + GPMC_ECC_CONFIG);
+
+ switch (mode) {
+ case NAND_ECC_READ :
+ __raw_writel(0x101, info->gpmc_baseaddr + GPMC_ECC_CONTROL);
+- /* ECC 16 bit col) | ( CS 0 ) | ECC Enable */
+- val = (1 << 7) | (0x0) | (0x1) ;
++ /* (ECC 16 or 8 bit col) | ( CS ) | ECC Enable */
++ val = (dev_width << 7) | (info->gpmc_cs << 1) | (0x1);
+ break;
+ case NAND_ECC_READSYN :
+- __raw_writel(0x100, info->gpmc_baseaddr + GPMC_ECC_CONTROL);
+- /* ECC 16 bit col) | ( CS 0 ) | ECC Enable */
+- val = (1 << 7) | (0x0) | (0x1) ;
++ __raw_writel(0x100, info->gpmc_baseaddr + GPMC_ECC_CONTROL);
++ /* (ECC 16 or 8 bit col) | ( CS ) | ECC Enable */
++ val = (dev_width << 7) | (info->gpmc_cs << 1) | (0x1);
+ break;
+ case NAND_ECC_WRITE :
+ __raw_writel(0x101, info->gpmc_baseaddr + GPMC_ECC_CONTROL);
+- /* ECC 16 bit col) | ( CS 0 ) | ECC Enable */
+- val = (1 << 7) | (0x0) | (0x1) ;
++ /* (ECC 16 or 8 bit col) | ( CS ) | ECC Enable */
++ val = (dev_width << 7) | (info->gpmc_cs << 1) | (0x1);
+ break;
+ default:
+ DEBUG(MTD_DEBUG_LEVEL0, "Error: Unrecognized Mode[%d]!\n",
+@@ -504,7 +518,38 @@ static void omap_enable_hwecc(struct mtd_info *mtd, int mode)
+
+ __raw_writel(val, info->gpmc_baseaddr + GPMC_ECC_CONFIG);
+ }
++#endif
+
++/*
++ * omap_wait - Wait function is called during Program and erase
++ * operations and the way it is called from MTD layer, we should wait
++ * till the NAND chip is ready after the programming/erase operation
++ * has completed.
++ * @mtd: MTD device structure
++ * @chip: NAND Chip structure
++ */
++static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip)
++{
++ register struct nand_chip *this = mtd->priv;
++ struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
++ mtd);
++ int status = 0;
++
++ this->IO_ADDR_W = (void *) info->gpmc_cs_baseaddr +
++ GPMC_CS_NAND_COMMAND;
++ this->IO_ADDR_R = (void *) info->gpmc_cs_baseaddr + GPMC_CS_NAND_DATA;
++
++ while (!(status & 0x40)) {
++ __raw_writeb(NAND_CMD_STATUS & 0xFF, this->IO_ADDR_W);
++ status = __raw_readb(this->IO_ADDR_R);
++ }
++ return status;
++}
++
++/*
++ * omap_dev_ready - calls the platform specific dev_ready function
++ * @mtd: MTD device structure
++ */
+ static int omap_dev_ready(struct mtd_info *mtd)
+ {
+ struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
+@@ -534,7 +579,7 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
+ struct omap_nand_info *info;
+ struct omap_nand_platform_data *pdata;
+ int err;
+- unsigned long val;
++ unsigned long val;
+
+
+ pdata = pdev->dev.platform_data;
+@@ -568,15 +613,20 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
+ }
+
+ /* Enable RD PIN Monitoring Reg */
+- val = gpmc_cs_read_reg(info->gpmc_cs, GPMC_CS_CONFIG1);
+- val |= WR_RD_PIN_MONITORING;
+- gpmc_cs_write_reg(info->gpmc_cs, GPMC_CS_CONFIG1, val);
++ if (pdata->dev_ready) {
++ val = gpmc_cs_read_reg(info->gpmc_cs, GPMC_CS_CONFIG1);
++ val |= WR_RD_PIN_MONITORING;
++ gpmc_cs_write_reg(info->gpmc_cs, GPMC_CS_CONFIG1, val);
++ }
+
+ val = gpmc_cs_read_reg(info->gpmc_cs, GPMC_CS_CONFIG7);
+ val &= ~(0xf << 8);
+ val |= (0xc & 0xf) << 8;
+ gpmc_cs_write_reg(info->gpmc_cs, GPMC_CS_CONFIG7, val);
+
++ /* NAND write protect off */
++ omap_nand_wp(&info->mtd, NAND_WP_OFF);
++
+ if (!request_mem_region(info->phys_base, NAND_IO_SIZE,
+ pdev->dev.driver->name)) {
+ err = -EBUSY;
+@@ -597,29 +647,39 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
+ info->nand.write_buf = omap_write_buf;
+ info->nand.verify_buf = omap_verify_buf;
+
+- info->nand.dev_ready = omap_dev_ready;
+- info->nand.chip_delay = 0;
+-
+- /* Options */
+- info->nand.options = NAND_BUSWIDTH_16;
+- info->nand.options |= NAND_SKIP_BBTSCAN;
+-
+- if (hw_ecc) {
+- /* init HW ECC */
+- omap_hwecc_init(&info->mtd);
+-
+- info->nand.ecc.calculate = omap_calculate_ecc;
+- info->nand.ecc.hwctl = omap_enable_hwecc;
+- info->nand.ecc.correct = omap_correct_data;
+- info->nand.ecc.mode = NAND_ECC_HW;
+- info->nand.ecc.bytes = 12;
+- info->nand.ecc.size = 2048;
+- info->nand.ecc.layout = &omap_hw_eccoob;
+-
++ /*
++ * If RDY/BSY line is connected to OMAP then use the omap ready funcrtion
++ * and the generic nand_wait function which reads the status register
++ * after monitoring the RDY/BSY line.Otherwise use a standard chip delay
++ * which is slightly more than tR (AC Timing) of the NAND device and read
++ * status register until you get a failure or success
++ */
++ if (pdata->dev_ready) {
++ info->nand.dev_ready = omap_dev_ready;
++ info->nand.chip_delay = 0;
+ } else {
+- info->nand.ecc.mode = NAND_ECC_SOFT;
++ info->nand.waitfunc = omap_wait;
++ info->nand.chip_delay = 50;
+ }
+
++ info->nand.options |= NAND_SKIP_BBTSCAN;
++ if ((gpmc_cs_read_reg(info->gpmc_cs, GPMC_CS_CONFIG1) & 0x3000)
++ == 0x1000)
++ info->nand.options |= NAND_BUSWIDTH_16;
++
++#ifdef CONFIG_MTD_NAND_OMAP_HWECC
++ info->nand.ecc.bytes = 3;
++ info->nand.ecc.size = 512;
++ info->nand.ecc.calculate = omap_calculate_ecc;
++ info->nand.ecc.hwctl = omap_enable_hwecc;
++ info->nand.ecc.correct = omap_correct_data;
++ info->nand.ecc.mode = NAND_ECC_HW;
++
++ /* init HW ECC */
++ omap_hwecc_init(&info->mtd);
++#else
++ info->nand.ecc.mode = NAND_ECC_SOFT;
++#endif
+
+ /* DIP switches on some boards change between 8 and 16 bit
+ * bus widths for flash. Try the other width if the first try fails.
+@@ -636,14 +696,12 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
+ err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
+ if (err > 0)
+ add_mtd_partitions(&info->mtd, info->parts, err);
+- else if (err < 0 && pdata->parts)
++ else if (err <= 0 && pdata->parts)
+ add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts);
+ else
+ #endif
+ add_mtd_device(&info->mtd);
+
+- omap_nand_wp(&info->mtd, NAND_WP_OFF);
+-
+ platform_set_drvdata(pdev, &info->mtd);
+
+ return 0;
+diff --git a/include/asm-arm/arch-omap/board-omap3beagle.h b/include/asm-arm/arch-omap/board-omap3beagle.h
+index 46dff31..26ecfb8 100644
+--- a/include/asm-arm/arch-omap/board-omap3beagle.h
++++ b/include/asm-arm/arch-omap/board-omap3beagle.h
+@@ -29,5 +29,7 @@
+ #ifndef __ASM_ARCH_OMAP3_BEAGLE_H
+ #define __ASM_ARCH_OMAP3_BEAGLE_H
+
++extern void omap3beagle_flash_init(void);
++
+ #endif /* __ASM_ARCH_OMAP3_BEAGLE_H */
+
diff --git a/packages/linux/linux-omap2-git/beagleboard/omap3-dppl-divider.patch b/packages/linux/linux-omap2-git/beagleboard/omap3-dppl-divider.patch
new file mode 100644
index 0000000000..25e5aad9c9
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/omap3-dppl-divider.patch
@@ -0,0 +1,114 @@
+From linux-omap-owner@vger.kernel.org Tue Jun 24 09:24:30 2008
+Received: from localhost
+ ([127.0.0.1] helo=dominion ident=koen)
+ by dominion.dominion.void with esmtp (Exim 4.63)
+ (envelope-from <linux-omap-owner@vger.kernel.org>)
+ id 1KB2tB-0005XT-FQ
+ for koen@localhost; Tue, 24 Jun 2008 09:24:30 +0200
+Received: from xs.service.utwente.nl [130.89.5.250]
+ by dominion with POP3 (fetchmail-6.3.6)
+ for <koen@localhost> (single-drop); Tue, 24 Jun 2008 09:24:29 +0200 (CEST)
+Received: from mail.service.utwente.nl ([130.89.5.254]) by exchange.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Tue, 24 Jun 2008 09:13:04 +0200
+Received: from mx.utwente.nl ([130.89.2.13]) by mail.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Tue, 24 Jun 2008 09:13:03 +0200
+Received: from vger.kernel.org (vger.kernel.org [209.132.176.167])
+ by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id m5O7CcD7008917
+ for <k.kooi@student.utwente.nl>; Tue, 24 Jun 2008 09:12:38 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+ id S1751623AbYFXHMh (ORCPT <rfc822;k.kooi@student.utwente.nl>);
+ Tue, 24 Jun 2008 03:12:37 -0400
+Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751670AbYFXHMh
+ (ORCPT <rfc822;linux-omap-outgoing>);
+ Tue, 24 Jun 2008 03:12:37 -0400
+Received: from utopia.booyaka.com ([72.9.107.138]:47392 "EHLO
+ utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+ with ESMTP id S1751623AbYFXHMg (ORCPT
+ <rfc822;linux-omap@vger.kernel.org>); Tue, 24 Jun 2008 03:12:36 -0400
+Received: (qmail 1797 invoked by uid 526); 24 Jun 2008 07:12:35 -0000
+Date: Tue, 24 Jun 2008 01:12:35 -0600 (MDT)
+From: Paul Walmsley <paul@pwsan.com>
+To: linux-omap@vger.kernel.org
+Subject: [PATCH] OMAP3 clock: DPLL{1,2}_FCLK clksel can divide by 4
+Message-ID: <alpine.DEB.1.00.0806240111320.9741@utopia.booyaka.com>
+User-Agent: Alpine 1.00 (DEB 882 2007-12-20)
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+Sender: linux-omap-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-omap.vger.kernel.org>
+X-Mailing-List: linux-omap@vger.kernel.org
+X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact servicedesk@icts.utwente.nl for more information.
+X-UTwente-MailScanner: Found to be clean
+X-UTwente-MailScanner-From: linux-omap-owner@vger.kernel.org
+X-Spam-Status: No
+X-OriginalArrivalTime: 24 Jun 2008 07:13:04.0264 (UTC) FILETIME=[BE950880:01C8D5C9]
+
+
+OMAP34xx ES2 TRM Delta G to H states that the divider for DPLL1_FCLK and
+DPLL2_FCLK can divide by 4 in addition to dividing by 1 and 2. Encode this
+into the OMAP3 clock framework.
+
+Signed-off-by: Paul Walmsley <paul@pwsan.com>
+---
+
+ arch/arm/mach-omap2/clock34xx.h | 20 ++++++++++++++++----
+ 1 files changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
+index b4dceea..9605744 100644
+--- a/arch/arm/mach-omap2/clock34xx.h
++++ b/arch/arm/mach-omap2/clock34xx.h
+@@ -1029,8 +1029,15 @@ static struct clk corex2_fck = {
+
+ /* DPLL power domain clock controls */
+
+-static const struct clksel div2_core_clksel[] = {
+- { .parent = &core_ck, .rates = div2_rates },
++static const struct clksel_rate div4_rates[] = {
++ { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
++ { .div = 2, .val = 2, .flags = RATE_IN_343X },
++ { .div = 4, .val = 4, .flags = RATE_IN_343X },
++ { .div = 0 }
++};
++
++static const struct clksel div4_core_clksel[] = {
++ { .parent = &core_ck, .rates = div4_rates },
+ { .parent = NULL }
+ };
+
+@@ -1044,7 +1051,7 @@ static struct clk dpll1_fck = {
+ .init = &omap2_init_clksel_parent,
+ .clksel_reg = _OMAP34XX_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
+ .clksel_mask = OMAP3430_MPU_CLK_SRC_MASK,
+- .clksel = div2_core_clksel,
++ .clksel = div4_core_clksel,
+ .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
+ PARENT_CONTROLS_CLOCK,
+ .recalc = &omap2_clksel_recalc,
+@@ -1119,7 +1126,7 @@ static struct clk dpll2_fck = {
+ .init = &omap2_init_clksel_parent,
+ .clksel_reg = _OMAP34XX_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
+ .clksel_mask = OMAP3430_IVA2_CLK_SRC_MASK,
+- .clksel = div2_core_clksel,
++ .clksel = div4_core_clksel,
+ .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
+ PARENT_CONTROLS_CLOCK,
+ .recalc = &omap2_clksel_recalc,
+@@ -1155,6 +1162,11 @@ static struct clk iva2_ck = {
+
+ /* Common interface clocks */
+
++static const struct clksel div2_core_clksel[] = {
++ { .parent = &core_ck, .rates = div2_rates },
++ { .parent = NULL }
++};
++
+ static struct clk l3_ick = {
+ .name = "l3_ick",
+ .parent = &core_ck,
+--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
diff --git a/packages/linux/linux-omap2-git/beagleboard/omap3-jitter.patch b/packages/linux/linux-omap2-git/beagleboard/omap3-jitter.patch
new file mode 100644
index 0000000000..2e0dfd9f13
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/omap3-jitter.patch
@@ -0,0 +1,95 @@
+From linux-omap-owner@vger.kernel.org Tue Jun 24 09:24:30 2008
+Received: from localhost
+ ([127.0.0.1] helo=dominion ident=koen)
+ by dominion.dominion.void with esmtp (Exim 4.63)
+ (envelope-from <linux-omap-owner@vger.kernel.org>)
+ id 1KB2tC-0005XT-Mj
+ for koen@localhost; Tue, 24 Jun 2008 09:24:30 +0200
+Received: from xs.service.utwente.nl [130.89.5.250]
+ by dominion with POP3 (fetchmail-6.3.6)
+ for <koen@localhost> (single-drop); Tue, 24 Jun 2008 09:24:30 +0200 (CEST)
+Received: from mail.service.utwente.nl ([130.89.5.253]) by exchange.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Tue, 24 Jun 2008 09:20:48 +0200
+Received: from smtp.utwente.nl ([130.89.2.8]) by mail.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Tue, 24 Jun 2008 09:20:47 +0200
+Received: from vger.kernel.org (vger.kernel.org [209.132.176.167])
+ by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id m5O7BPWU031214
+ for <k.kooi@student.utwente.nl>; Tue, 24 Jun 2008 09:11:25 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+ id S1751128AbYFXHLY (ORCPT <rfc822;k.kooi@student.utwente.nl>);
+ Tue, 24 Jun 2008 03:11:24 -0400
+Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751405AbYFXHLX
+ (ORCPT <rfc822;linux-omap-outgoing>);
+ Tue, 24 Jun 2008 03:11:23 -0400
+Received: from utopia.booyaka.com ([72.9.107.138]:44580 "EHLO
+ utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+ with ESMTP id S1751128AbYFXHLX (ORCPT
+ <rfc822;linux-omap@vger.kernel.org>); Tue, 24 Jun 2008 03:11:23 -0400
+Received: (qmail 1744 invoked by uid 526); 24 Jun 2008 07:11:21 -0000
+Date: Tue, 24 Jun 2008 01:11:21 -0600 (MDT)
+From: Paul Walmsley <paul@pwsan.com>
+To: linux-omap@vger.kernel.org
+Subject: [PATCH] OMAP3 clock: fix DPLL jitter correction and rate
+ programming
+Message-ID: <alpine.DEB.1.00.0806240109440.9741@utopia.booyaka.com>
+User-Agent: Alpine 1.00 (DEB 882 2007-12-20)
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+Sender: linux-omap-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-omap.vger.kernel.org>
+X-Mailing-List: linux-omap@vger.kernel.org
+X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact servicedesk@icts.utwente.nl for more information.
+X-UTwente-MailScanner: Found to be clean
+X-UTwente-MailScanner-From: linux-omap-owner@vger.kernel.org
+X-Spam-Status: No
+X-OriginalArrivalTime: 24 Jun 2008 07:20:48.0265 (UTC) FILETIME=[D325F790:01C8D5CA]
+
+
+Fix DPLL jitter correction programming. Previously,
+omap3_noncore_dpll_program() stored the FREQSEL jitter correction
+parameter to the wrong register. This caused jitter correction to be set
+incorrectly and also caused the DPLL divider to be programmed incorrectly.
+
+Also, fix DPLL divider programming. An off-by-one error existed in
+omap3_noncore_dpll_program(), causing DPLLs to be programmed with a higher
+divider than intended.
+
+Signed-off-by: Paul Walmsley <paul@pwsan.com>
+---
+
+ arch/arm/mach-omap2/clock34xx.c | 13 ++++++++-----
+ 1 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
+index 408b51a..8fdf8f3 100644
+--- a/arch/arm/mach-omap2/clock34xx.c
++++ b/arch/arm/mach-omap2/clock34xx.c
+@@ -346,14 +346,17 @@ static int omap3_noncore_dpll_program(struct clk *clk, u16 m, u8 n, u16 freqsel)
+ /* 3430 ES2 TRM: 4.7.6.9 DPLL Programming Sequence */
+ _omap3_noncore_dpll_bypass(clk);
+
++ /* Set jitter correction */
++ v = __raw_readl(dd->control_reg);
++ v &= ~dd->freqsel_mask;
++ v |= freqsel << __ffs(dd->freqsel_mask);
++ __raw_writel(v, dd->control_reg);
++
++ /* Set DPLL multiplier, divider */
+ v = __raw_readl(dd->mult_div1_reg);
+ v &= ~(dd->mult_mask | dd->div1_mask);
+-
+- /* Set mult (M), div1 (N), freqsel */
+ v |= m << __ffs(dd->mult_mask);
+- v |= n << __ffs(dd->div1_mask);
+- v |= freqsel << __ffs(dd->freqsel_mask);
+-
++ v |= (n - 1) << __ffs(dd->div1_mask);
+ __raw_writel(v, dd->mult_div1_reg);
+
+ /* We let the clock framework set the other output dividers later */
+--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
diff --git a/packages/linux/linux-omap2-git/beagleboard/soc.patch b/packages/linux/linux-omap2-git/beagleboard/soc.patch
new file mode 100644
index 0000000000..bb97403f29
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/soc.patch
@@ -0,0 +1,1173 @@
+diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
+index 3903ab7..468536d 100644
+--- a/sound/soc/codecs/Kconfig
++++ b/sound/soc/codecs/Kconfig
+@@ -44,3 +44,7 @@ config SND_SOC_CS4270_VD33_ERRATA
+ config SND_SOC_TLV320AIC3X
+ tristate
+ depends on SND_SOC && I2C
++
++config SND_SOC_TWL4030
++ tristate
++ depends on SND_SOC && I2C
+diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
+index 4e1314c..d2c0b12 100644
+--- a/sound/soc/codecs/Makefile
++++ b/sound/soc/codecs/Makefile
+@@ -6,6 +6,7 @@ snd-soc-wm9712-objs := wm9712.o
+ snd-soc-wm9713-objs := wm9713.o
+ snd-soc-cs4270-objs := cs4270.o
+ snd-soc-tlv320aic3x-objs := tlv320aic3x.o
++snd-soc-twl4030-objs := twl4030.o
+
+ obj-$(CONFIG_SND_SOC_AC97_CODEC) += snd-soc-ac97.o
+ obj-$(CONFIG_SND_SOC_WM8731) += snd-soc-wm8731.o
+@@ -15,3 +16,4 @@ obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o
+ obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o
+ obj-$(CONFIG_SND_SOC_CS4270) += snd-soc-cs4270.o
+ obj-$(CONFIG_SND_SOC_TLV320AIC3X) += snd-soc-tlv320aic3x.o
++obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o
+diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
+new file mode 100644
+index 0000000..c9eee19
+--- /dev/null
++++ b/sound/soc/codecs/twl4030.c
+@@ -0,0 +1,595 @@
++/*
++ * ALSA SoC TWL4030 codec driver
++ *
++ * Author: Steve Sakoman, <steve@sakoman.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/module.h>
++#include <linux/moduleparam.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/pm.h>
++#include <linux/i2c.h>
++#include <linux/platform_device.h>
++#include <linux/i2c/twl4030.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++#include <sound/soc-dapm.h>
++#include <sound/initval.h>
++
++#include "twl4030.h"
++
++/*
++ * twl4030 register cache & default register settings
++ */
++static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = {
++ 0x00, // this register not used
++ 0x93, // REG_CODEC_MODE (0x1)
++ 0xc3, // REG_OPTION (0x2)
++ 0x00, // REG_UNKNOWN (0x3)
++ 0x00, // REG_MICBIAS_CTL (0x4)
++ 0x34, // REG_ANAMICL (0x5)
++ 0x14, // REG_ANAMICR (0x6)
++ 0x0a, // REG_AVADC_CTL (0x7)
++ 0x00, // REG_ADCMICSEL (0x8)
++ 0x00, // REG_DIGMIXING (0x9)
++ 0x0c, // REG_ATXL1PGA (0xA)
++ 0x0c, // REG_ATXR1PGA (0xB)
++ 0x00, // REG_AVTXL2PGA (0xC)
++ 0x00, // REG_AVTXR2PGA (0xD)
++ 0x01, // REG_AUDIO_IF (0xE)
++ 0x00, // REG_VOICE_IF (0xF)
++ 0x00, // REG_ARXR1PGA (0x10)
++ 0x00, // REG_ARXL1PGA (0x11)
++ 0x6c, // REG_ARXR2PGA (0x12)
++ 0x6c, // REG_ARXL2PGA (0x13)
++ 0x00, // REG_VRXPGA (0x14)
++ 0x00, // REG_VSTPGA (0x15)
++ 0x00, // REG_VRX2ARXPGA (0x16)
++ 0x0c, // REG_AVDAC_CTL (0x17)
++ 0x00, // REG_ARX2VTXPGA (0x18)
++ 0x00, // REG_ARXL1_APGA_CTL (0x19)
++ 0x00, // REG_ARXR1_APGA_CTL (0x1A)
++ 0x4b, // REG_ARXL2_APGA_CTL (0x1B)
++ 0x4b, // REG_ARXR2_APGA_CTL (0x1C)
++ 0x00, // REG_ATX2ARXPGA (0x1D)
++ 0x00, // REG_BT_IF (0x1E)
++ 0x00, // REG_BTPGA (0x1F)
++ 0x00, // REG_BTSTPGA (0x20)
++ 0x00, // REG_EAR_CTL (0x21)
++ 0x24, // REG_HS_SEL (0x22)
++ 0x0a, // REG_HS_GAIN_SET (0x23)
++ 0x00, // REG_HS_POPN_SET (0x24)
++ 0x00, // REG_PREDL_CTL (0x25)
++ 0x00, // REG_PREDR_CTL (0x26)
++ 0x00, // REG_PRECKL_CTL (0x27)
++ 0x00, // REG_PRECKR_CTL (0x28)
++ 0x00, // REG_HFL_CTL (0x29)
++ 0x00, // REG_HFR_CTL (0x2A)
++ 0x00, // REG_ALC_CTL (0x2B)
++ 0x00, // REG_ALC_SET1 (0x2C)
++ 0x00, // REG_ALC_SET2 (0x2D)
++ 0x00, // REG_BOOST_CTL (0x2E)
++ 0x01, // REG_SOFTVOL_CTL (0x2F)
++ 0x00, // REG_DTMF_FREQSEL (0x30)
++ 0x00, // REG_DTMF_TONEXT1H (0x31)
++ 0x00, // REG_DTMF_TONEXT1L (0x32)
++ 0x00, // REG_DTMF_TONEXT2H (0x33)
++ 0x00, // REG_DTMF_TONEXT2L (0x34)
++ 0x00, // REG_DTMF_TONOFF (0x35)
++ 0x00, // REG_DTMF_WANONOFF (0x36)
++ 0x00, // REG_I2S_RX_SCRAMBLE_H (0x37)
++ 0x00, // REG_I2S_RX_SCRAMBLE_M (0x38)
++ 0x00, // REG_I2S_RX_SCRAMBLE_L (0x39)
++ 0x16, // REG_APLL_CTL (0x3A)
++ 0x00, // REG_DTMF_CTL (0x3B)
++ 0x00, // REG_DTMF_PGA_CTL2 (0x3C)
++ 0x00, // REG_DTMF_PGA_CTL1 (0x3D)
++ 0x00, // REG_MISC_SET_1 (0x3E)
++ 0x00, // REG_PCMBTMUX (0x3F)
++ 0x00, // REG_RX_PATH_SEL (0x43)
++ 0x00, // REG_VDL_APGA_CTL (0x44)
++ 0x00, // REG_VIBRA_CTL (0x45)
++ 0x00, // REG_VIBRA_SET (0x46)
++ 0x00, // REG_VIBRA_PWM_SET (0x47)
++ 0x00, // REG_ANAMIC_GAIN (0x48)
++ 0x00, // REG_MISC_SET_2 (0x49)
++};
++
++static void twl4030_dump_registers(void)
++{
++ int i = 0;
++ u8 data;
++
++ printk(KERN_INFO "TWL 4030 Register dump for Audio Module\n");
++
++ for (i = REG_CODEC_MODE; i <= REG_MISC_SET_2; i++) {
++ twl4030_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &data, i);
++ printk(KERN_INFO "Register[0x%02x]=0x%02x\n", i, data);
++ }
++}
++
++struct twl4030_priv {
++ unsigned int dummy;
++};
++
++/*
++ * read twl4030 register cache
++ */
++static inline unsigned int twl4030_read_reg_cache(struct snd_soc_codec *codec,
++ unsigned int reg)
++{
++ u8 *cache = codec->reg_cache;
++
++ return cache[reg];
++}
++
++/*
++ * write twl4030 register cache
++ */
++static inline void twl4030_write_reg_cache(struct snd_soc_codec *codec,
++ u8 reg, u8 value)
++{
++ u8 *cache = codec->reg_cache;
++
++ if (reg >= TWL4030_CACHEREGNUM)
++ return;
++ cache[reg] = value;
++}
++
++/*
++ * write to the twl4030 register space
++ */
++static int twl4030_write(struct snd_soc_codec *codec,
++ unsigned int reg, unsigned int value)
++{
++ twl4030_write_reg_cache(codec, reg, value);
++ return twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, value, reg);
++}
++
++static void twl4030_init_chip(void)
++{
++ unsigned char byte;
++ int i;
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE,
++ twl4030_reg[REG_CODEC_MODE] & 0xfd, REG_CODEC_MODE);
++
++ udelay(10); /* 10 ms delay for power settling */
++
++ for (i = REG_OPTION; i <= REG_MISC_SET_2; i++) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, twl4030_reg[i], i);
++ }
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE,
++ twl4030_reg[REG_CODEC_MODE], REG_CODEC_MODE);
++
++ udelay(10); /* 10 ms delay for power settling */
++
++ /* initiate offset cancellation */
++ twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE,
++ twl4030_reg[REG_ANAMICL] | 0x80, REG_ANAMICL);
++
++ /* wait for offset cancellation to complete */
++ twl4030_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte, REG_ANAMICL);
++ while ((byte & 0x80) == 0x80)
++ twl4030_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte, REG_ANAMICL);
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE,
++ twl4030_reg[REG_MISC_SET_1] | 0x02, REG_MISC_SET_1);
++
++ twl4030_dump_registers();
++}
++
++static const struct snd_kcontrol_new twl4030_snd_controls[] = {
++ SOC_DOUBLE_R("Master Playback Volume",
++ REG_ARXL2PGA, REG_ARXR2PGA,
++ 0, 127, 0),
++ SOC_DOUBLE_R("Capture Volume",
++ REG_ATXL1PGA, REG_ATXR1PGA,
++ 0, 127, 0),
++};
++
++/* add non dapm controls */
++static int twl4030_add_controls(struct snd_soc_codec *codec)
++{
++ int err, i;
++
++ for (i = 0; i < ARRAY_SIZE(twl4030_snd_controls); i++) {
++ err = snd_ctl_add(codec->card,
++ snd_soc_cnew(&twl4030_snd_controls[i],
++ codec, NULL));
++ if (err < 0)
++ return err;
++ }
++
++ return 0;
++}
++
++#define TWL4030_PWR 0
++
++static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
++ SND_SOC_DAPM_INPUT("INL"),
++ SND_SOC_DAPM_INPUT("INR"),
++
++ SND_SOC_DAPM_OUTPUT("OUTL"),
++ SND_SOC_DAPM_OUTPUT("OUTR"),
++
++ SND_SOC_DAPM_DAC("DACL", "Left Playback", SND_SOC_NOPM, 0, 0),
++ SND_SOC_DAPM_DAC("DACR", "Right Playback", SND_SOC_NOPM, 0, 0),
++
++ SND_SOC_DAPM_ADC("ADCL", "Left Capture", SND_SOC_NOPM, 0, 0),
++ SND_SOC_DAPM_ADC("ADCR", "Right Capture", SND_SOC_NOPM, 0, 0),
++};
++
++static const char *intercon[][3] = {
++ /* outputs */
++ {"OUTL", NULL, "DACL"},
++ {"OUTR", NULL, "DACR"},
++
++ /* inputs */
++ {"ADCL", NULL, "INL"},
++ {"ADCR", NULL, "INR"},
++
++ /* terminator */
++ {NULL, NULL, NULL},
++};
++
++static int twl4030_add_widgets(struct snd_soc_codec *codec)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(twl4030_dapm_widgets); i++)
++ snd_soc_dapm_new_control(codec, &twl4030_dapm_widgets[i]);
++
++ /* set up audio path interconnects */
++ for (i = 0; intercon[i][0] != NULL; i++)
++ snd_soc_dapm_connect_input(codec, intercon[i][0],
++ intercon[i][1], intercon[i][2]);
++
++ snd_soc_dapm_new_widgets(codec);
++ return 0;
++}
++
++static int twl4030_dapm_event(struct snd_soc_codec *codec, int event)
++{
++
++ printk(KERN_INFO "TWL4030 Audio Codec dapm event\n");
++ switch (event) {
++ case SNDRV_CTL_POWER_D0: /* full On */
++ break;
++ case SNDRV_CTL_POWER_D1: /* partial On */
++ case SNDRV_CTL_POWER_D2: /* partial On */
++ break;
++ case SNDRV_CTL_POWER_D3hot: /* off, with power */
++ break;
++ case SNDRV_CTL_POWER_D3cold: /* off, without power */
++ break;
++ }
++ codec->dapm_state = event;
++
++ return 0;
++}
++
++static void twl4030_power_up (struct snd_soc_codec *codec, u8 mode)
++{
++ twl4030_write(codec, REG_CODEC_MODE, mode & ~CODECPDZ);
++ twl4030_write(codec, REG_CODEC_MODE, mode | CODECPDZ);
++ udelay(10);
++
++ u8 popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) | (0x40);
++ twl4030_write(codec, REG_HS_POPN_SET, popn);
++
++ u8 hsgain = twl4030_read_reg_cache(codec, REG_HS_GAIN_SET) | (0x0a);
++ twl4030_write(codec, REG_HS_GAIN_SET, hsgain);
++
++ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) | (0x02);
++ twl4030_write(codec, REG_HS_POPN_SET, popn);
++}
++
++static void twl4030_power_down (struct snd_soc_codec *codec)
++{
++ u8 popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) & ~(0x02);
++ twl4030_write(codec, REG_HS_POPN_SET, popn);
++
++ u8 hsgain = twl4030_read_reg_cache(codec, REG_HS_GAIN_SET) & ~(0x0f);
++ twl4030_write(codec, REG_HS_GAIN_SET, hsgain);
++
++ popn = twl4030_read_reg_cache(codec, REG_HS_POPN_SET) & ~(0x40);
++ twl4030_write(codec, REG_HS_POPN_SET, popn);
++
++ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE) & ~CODECPDZ;
++ twl4030_write(codec, REG_CODEC_MODE, mode);
++ udelay(10);
++}
++
++
++static int twl4030_hw_params(struct snd_pcm_substream *substream,
++ struct snd_pcm_hw_params *params)
++{
++ struct snd_soc_pcm_runtime *rtd = substream->private_data;
++ struct snd_soc_device *socdev = rtd->socdev;
++ struct snd_soc_codec *codec = socdev->codec;
++ struct twl4030_priv *twl4030 = codec->private_data;
++
++ twl4030_power_down(codec);
++
++ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE) & ~CODECPDZ;
++
++ mode &= ~APLL_RATE;
++ switch (params_rate(params)) {
++ case 44100:
++ printk(KERN_INFO "TWL4030 hw params: set rate to 44.1khz\n");
++ mode |= APLL_RATE_44100;
++ break;
++ case 48000:
++ printk(KERN_INFO "TWL4030 hw params: set rate to 48khz\n");
++ mode |= APLL_RATE_48000;
++ break;
++ default:
++ printk(KERN_INFO "TWL4030 hw params: unknown rate %d\n", params_rate(params));
++ return -EINVAL;
++ }
++
++ /* bit size */
++ switch (params_format(params)) {
++ case SNDRV_PCM_FORMAT_S16_LE:
++ printk(KERN_INFO "TWL4030 hw params: set format to S16_LE\n");
++ break;
++ case SNDRV_PCM_FORMAT_S24_LE:
++ printk(KERN_INFO "TWL4030 hw params: set format to S24_LE\n");
++ break;
++ default:
++ printk(KERN_INFO "TWL4030 hw params: unknown format %d\n", params_format(params));
++ return -EINVAL;
++ }
++
++ /* change rate and turn codec back on */
++ twl4030_power_up(codec, mode);
++
++ return 0;
++}
++
++static int twl4030_mute(struct snd_soc_codec_dai *dai, int mute)
++{
++ struct snd_soc_codec *codec = dai->codec;
++
++ u8 ldac_reg = twl4030_read_reg_cache(codec, REG_ARXL2PGA);
++ u8 rdac_reg = twl4030_read_reg_cache(codec, REG_ARXR2PGA);
++
++ if (mute) {
++ printk(KERN_INFO "TWL4030 Audio Codec mute\n");
++ twl4030_write(codec, REG_ARXL2PGA, 0x00);
++ twl4030_write(codec, REG_ARXR2PGA, 0x00);
++ twl4030_write_reg_cache(codec, REG_ARXL2PGA, ldac_reg);
++ twl4030_write_reg_cache(codec, REG_ARXR2PGA, rdac_reg);
++ }
++ else {
++ printk(KERN_INFO "TWL4030 Audio Codec unmute: %02x/%02x\n", ldac_reg, rdac_reg);
++ twl4030_write(codec, REG_ARXL2PGA, ldac_reg);
++ twl4030_write(codec, REG_ARXR2PGA, rdac_reg);
++ }
++
++ return 0;
++}
++
++static int twl4030_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
++ unsigned int fmt)
++{
++ struct snd_soc_codec *codec = codec_dai->codec;
++ struct twl4030_priv *twl4030 = codec->private_data;
++
++ /* get current format */
++ u8 format = twl4030_read_reg_cache(codec, REG_AUDIO_IF);
++
++ /* set master/slave audio interface */
++ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
++ case SND_SOC_DAIFMT_CBM_CFM:
++ printk(KERN_INFO "TWL4030 set dai fmt: master\n");
++ format &= ~(AIF_SLAVE_EN);
++ format |= CLK256FS_EN;
++ break;
++ case SND_SOC_DAIFMT_CBS_CFS:
++ printk(KERN_INFO "TWL4030 set dai fmt: slave\n");
++ format &= ~(CLK256FS_EN);
++ format |= AIF_SLAVE_EN;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ /* interface format */
++ format &= ~AIF_FORMAT;
++ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
++ case SND_SOC_DAIFMT_I2S:
++ printk(KERN_INFO "TWL4030 set dai fmt: i2s\n");
++ format |= AIF_FORMAT_CODEC;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ /* turn off codec before changing format */
++ twl4030_power_down(codec);
++
++ /* change format */
++ twl4030_write(codec, REG_AUDIO_IF, format);
++
++ u8 mode = twl4030_read_reg_cache(codec, REG_CODEC_MODE);
++ twl4030_power_up(codec, mode);
++
++ return 0;
++}
++
++#define TWL4030_RATES SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000
++#define TWL4030_FORMATS SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE
++
++struct snd_soc_codec_dai twl4030_dai = {
++ .name = "twl4030",
++ .playback = {
++ .stream_name = "Playback",
++ .channels_min = 2,
++ .channels_max = 2,
++ .rates = TWL4030_RATES,
++ .formats = TWL4030_FORMATS,},
++ .capture = {
++ .stream_name = "Capture",
++ .channels_min = 2,
++ .channels_max = 2,
++ .rates = TWL4030_RATES,
++ .formats = TWL4030_FORMATS,},
++ .ops = {
++ .hw_params = twl4030_hw_params,
++ },
++ .dai_ops = {
++ .digital_mute = twl4030_mute,
++ .set_fmt = twl4030_set_dai_fmt,
++ }
++};
++
++EXPORT_SYMBOL_GPL(twl4030_dai);
++
++static int twl4030_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct snd_soc_device *socdev = platform_get_drvdata(pdev);
++ struct snd_soc_codec *codec = socdev->codec;
++
++ printk(KERN_INFO "TWL4030 Audio Codec suspend\n");
++ twl4030_dapm_event(codec, SNDRV_CTL_POWER_D3cold);
++
++ return 0;
++}
++
++static int twl4030_resume(struct platform_device *pdev)
++{
++ struct snd_soc_device *socdev = platform_get_drvdata(pdev);
++ struct snd_soc_codec *codec = socdev->codec;
++ int i;
++ u16 *cache = codec->reg_cache;
++
++ printk(KERN_INFO "TWL4030 Audio Codec resume\n");
++ /* Sync reg_cache with the hardware */
++ for (i = REG_CODEC_MODE; i <= REG_MISC_SET_2; i++) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, cache[i], i);
++ }
++ twl4030_dapm_event(codec, SNDRV_CTL_POWER_D3hot);
++ twl4030_dapm_event(codec, codec->suspend_dapm_state);
++ return 0;
++}
++
++/*
++ * initialize the driver
++ * register the mixer and dsp interfaces with the kernel
++ */
++
++static int twl4030_init(struct snd_soc_device *socdev)
++{
++ struct snd_soc_codec *codec = socdev->codec;
++ int ret = 0;
++
++ printk(KERN_INFO "TWL4030 Audio Codec init \n");
++
++ twl4030_init_chip();
++
++ codec->name = "twl4030";
++ codec->owner = THIS_MODULE;
++ codec->read = twl4030_read_reg_cache;
++ codec->write = twl4030_write;
++ codec->dapm_event = twl4030_dapm_event;
++ codec->dai = &twl4030_dai;
++ codec->num_dai = 1;
++ codec->reg_cache_size = sizeof(twl4030_reg);
++ codec->reg_cache = kmemdup(twl4030_reg, sizeof(twl4030_reg), GFP_KERNEL);
++ if (codec->reg_cache == NULL)
++ return -ENOMEM;
++
++ /* register pcms */
++ ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
++ if (ret < 0) {
++ printk(KERN_ERR "twl4030: failed to create pcms\n");
++ goto pcm_err;
++ }
++
++ twl4030_add_controls(codec);
++ twl4030_add_widgets(codec);
++
++ ret = snd_soc_register_card(socdev);
++ if (ret < 0) {
++ printk(KERN_ERR "twl4030: failed to register card\n");
++ goto card_err;
++ }
++
++ return ret;
++
++card_err:
++ printk(KERN_INFO "TWL4030 Audio Codec init card error\n");
++ snd_soc_free_pcms(socdev);
++ snd_soc_dapm_free(socdev);
++pcm_err:
++ printk(KERN_INFO "TWL4030 Audio Codec init pcm error\n");
++ kfree(codec->reg_cache);
++ return ret;
++}
++
++static struct snd_soc_device *twl4030_socdev;
++
++static int twl4030_probe(struct platform_device *pdev)
++{
++ struct snd_soc_device *socdev = platform_get_drvdata(pdev);
++ struct snd_soc_codec *codec;
++ struct twl4030_priv *twl4030;
++
++ printk(KERN_INFO "TWL4030 Audio Codec probe\n");
++
++ codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
++ if (codec == NULL)
++ return -ENOMEM;
++
++ twl4030 = kzalloc(sizeof(struct twl4030_priv), GFP_KERNEL);
++ if (twl4030 == NULL) {
++ kfree(codec);
++ return -ENOMEM;
++ }
++
++ codec->private_data = twl4030;
++ socdev->codec = codec;
++ mutex_init(&codec->mutex);
++ INIT_LIST_HEAD(&codec->dapm_widgets);
++ INIT_LIST_HEAD(&codec->dapm_paths);
++
++ twl4030_socdev = socdev;
++ twl4030_init(socdev);
++
++ printk(KERN_INFO "TWL4030 Audio Codec probe exit\n");
++ return 0;
++}
++
++static int twl4030_remove(struct platform_device *pdev)
++{
++ struct snd_soc_device *socdev = platform_get_drvdata(pdev);
++ struct snd_soc_codec *codec = socdev->codec;
++
++ printk(KERN_INFO "TWL4030 Audio Codec remove\n");
++ kfree(codec->private_data);
++ kfree(codec);
++
++ return 0;
++}
++
++struct snd_soc_codec_device soc_codec_dev_twl4030 = {
++ .probe = twl4030_probe,
++ .remove = twl4030_remove,
++ .suspend = twl4030_suspend,
++ .resume = twl4030_resume,
++};
++EXPORT_SYMBOL_GPL(soc_codec_dev_twl4030);
++
++MODULE_DESCRIPTION("ASoC TWL4030 codec driver");
++MODULE_AUTHOR("Steve Sakoman");
++MODULE_LICENSE("GPL");
+diff --git a/sound/soc/codecs/twl4030.h b/sound/soc/codecs/twl4030.h
+new file mode 100644
+index 0000000..af8eb43
+--- /dev/null
++++ b/sound/soc/codecs/twl4030.h
+@@ -0,0 +1,125 @@
++/*
++ * ALSA SoC TWL4030 codec driver
++ *
++ * Author: Steve Sakoman, <steve@sakoman.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.
++ */
++
++#ifndef __TWL4030_AUDIO_H__
++#define __TWL4030_AUDIO_H__
++
++#define REG_CODEC_MODE 0x1
++#define REG_OPTION 0x2
++#define REG_UNKNOWN 0x3
++#define REG_MICBIAS_CTL 0x4
++#define REG_ANAMICL 0x5
++#define REG_ANAMICR 0x6
++#define REG_AVADC_CTL 0x7
++#define REG_ADCMICSEL 0x8
++#define REG_DIGMIXING 0x9
++#define REG_ATXL1PGA 0xA
++#define REG_ATXR1PGA 0xB
++#define REG_AVTXL2PGA 0xC
++#define REG_AVTXR2PGA 0xD
++#define REG_AUDIO_IF 0xE
++#define REG_VOICE_IF 0xF
++#define REG_ARXR1PGA 0x10
++#define REG_ARXL1PGA 0x11
++#define REG_ARXR2PGA 0x12
++#define REG_ARXL2PGA 0x13
++#define REG_VRXPGA 0x14
++#define REG_VSTPGA 0x15
++#define REG_VRX2ARXPGA 0x16
++#define REG_AVDAC_CTL 0x17
++#define REG_ARX2VTXPGA 0x18
++#define REG_ARXL1_APGA_CTL 0x19
++#define REG_ARXR1_APGA_CTL 0x1A
++#define REG_ARXL2_APGA_CTL 0x1B
++#define REG_ARXR2_APGA_CTL 0x1C
++#define REG_ATX2ARXPGA 0x1D
++#define REG_BT_IF 0x1E
++#define REG_BTPGA 0x1F
++#define REG_BTSTPGA 0x20
++#define REG_EAR_CTL 0x21
++#define REG_HS_SEL 0x22
++#define REG_HS_GAIN_SET 0x23
++#define REG_HS_POPN_SET 0x24
++#define REG_PREDL_CTL 0x25
++#define REG_PREDR_CTL 0x26
++#define REG_PRECKL_CTL 0x27
++#define REG_PRECKR_CTL 0x28
++#define REG_HFL_CTL 0x29
++#define REG_HFR_CTL 0x2A
++#define REG_ALC_CTL 0x2B
++#define REG_ALC_SET1 0x2C
++#define REG_ALC_SET2 0x2D
++#define REG_BOOST_CTL 0x2E
++#define REG_SOFTVOL_CTL 0x2F
++#define REG_DTMF_FREQSEL 0x30
++#define REG_DTMF_TONEXT1H 0x31
++#define REG_DTMF_TONEXT1L 0x32
++#define REG_DTMF_TONEXT2H 0x33
++#define REG_DTMF_TONEXT2L 0x34
++#define REG_DTMF_TONOFF 0x35
++#define REG_DTMF_WANONOFF 0x36
++#define REG_I2S_RX_SCRAMBLE_H 0x37
++#define REG_I2S_RX_SCRAMBLE_M 0x38
++#define REG_I2S_RX_SCRAMBLE_L 0x39
++#define REG_APLL_CTL 0x3A
++#define REG_DTMF_CTL 0x3B
++#define REG_DTMF_PGA_CTL2 0x3C
++#define REG_DTMF_PGA_CTL1 0x3D
++#define REG_MISC_SET_1 0x3E
++#define REG_PCMBTMUX 0x3F
++#define REG_RX_PATH_SEL 0x43
++#define REG_VDL_APGA_CTL 0x44
++#define REG_VIBRA_CTL 0x45
++#define REG_VIBRA_SET 0x46
++#define REG_VIBRA_PWM_SET 0x47
++#define REG_ANAMIC_GAIN 0x48
++#define REG_MISC_SET_2 0x49
++
++#define TWL4030_CACHEREGNUM REG_MISC_SET_2 + 1
++
++/* Bitfield Definitions */
++
++/* CODEC_MODE Fields */
++
++#define APLL_RATE 0xF0
++#define APLL_RATE_8000 0x00
++#define APLL_RATE_11025 0x10
++#define APLL_RATE_12000 0x20
++#define APLL_RATE_16000 0x40
++#define APLL_RATE_22050 0x50
++#define APLL_RATE_24000 0x60
++#define APLL_RATE_32000 0x80
++#define APLL_RATE_44100 0x90
++#define APLL_RATE_48000 0xa0
++#define SEL_16K 0x04
++#define CODECPDZ 0x02
++#define OPT_MODE 0x01
++
++/* AUDIO_IF Fields */
++
++#define AIF_SLAVE_EN 0x80
++#define DATA_WIDTH 0x60
++#define DATA_WIDTH_16S_16W 0x00
++#define DATA_WIDTH_32S_16W 0x40
++#define DATA_WIDTH_32S_24W 0x60
++#define AIF_FORMAT 0x18
++#define AIF_FORMAT_CODEC 0x00
++#define AIF_FORMAT_LEFT 0x08
++#define AIF_FORMAT_RIGHT 0x10
++#define AIF_FORMAT_TDM 0x18
++#define AIF_TRI_EN 0x04
++#define CLK256FS_EN 0x02
++#define AIF_EN 0x01
++
++
++extern struct snd_soc_codec_dai twl4030_dai;
++extern struct snd_soc_codec_device soc_codec_dev_twl4030;
++
++#endif /* End of __TWL4030_AUDIO_H__ */
+diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
+index 0230d83..8703cea 100644
+--- a/sound/soc/omap/Kconfig
++++ b/sound/soc/omap/Kconfig
+@@ -16,4 +16,20 @@ config SND_OMAP_SOC_N810
+ help
+ Say Y if you want to add support for SoC audio on Nokia N810.
+
++config SND_OMAP_SOC_OMAP3EVM
++ tristate "SoC Audio support for OMAP3 EVM"
++ depends on SND_OMAP_SOC && MACH_OMAP3EVM
++ select SND_OMAP_SOC_MCBSP
++ select SND_SOC_TWL4030
++ help
++ Say Y if you want to add support for SoC audio on the OMAP3 EVM.
++
++config SND_OMAP_SOC_OMAP3BEAGLE
++ tristate "SoC Audio support for OMAP3 Beagle"
++ depends on SND_OMAP_SOC && MACH_OMAP3_BEAGLE
++ select SND_OMAP_SOC_MCBSP
++ select SND_SOC_TWL4030
++ help
++ Say Y if you want to add support for SoC audio on the OMAP3 Beagle.
++
+ endmenu
+diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
+index d8d8d58..638a240 100644
+--- a/sound/soc/omap/Makefile
++++ b/sound/soc/omap/Makefile
+@@ -7,5 +7,10 @@ obj-$(CONFIG_SND_OMAP_SOC_MCBSP) += snd-soc-omap-mcbsp.o
+
+ # OMAP Machine Support
+ snd-soc-n810-objs := n810.o
++snd-soc-omap3evm-objs := omap3evm.o
++snd-soc-omap3beagle-objs := omap3beagle.o
+
+ obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
++obj-$(CONFIG_SND_OMAP_SOC_OMAP3EVM) += snd-soc-omap3evm.o
++obj-$(CONFIG_SND_OMAP_SOC_OMAP3BEAGLE) += snd-soc-omap3beagle.o
++
+diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c
+new file mode 100644
+index 0000000..fb79938
+--- /dev/null
++++ b/sound/soc/omap/omap3beagle.c
+@@ -0,0 +1,180 @@
++/*
++ * omap3beagle.c -- SoC audio for OMAP3 Beagle
++ *
++ * Author: Steve Sakoman <steve@sakoman.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.
++ *
++ * 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 St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#include <linux/clk.h>
++#include <linux/platform_device.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/hardware.h>
++#include <asm/arch/gpio.h>
++#include <asm/arch/mcbsp.h>
++
++#include "omap-mcbsp.h"
++#include "omap-pcm.h"
++#include "../codecs/twl4030.h"
++
++static int omap3beagle_hw_params(struct snd_pcm_substream *substream,
++ struct snd_pcm_hw_params *params)
++{
++ struct snd_soc_pcm_runtime *rtd = substream->private_data;
++ struct snd_soc_codec_dai *codec_dai = rtd->dai->codec_dai;
++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
++ int ret;
++
++ /* Set codec DAI configuration */
++ ret = codec_dai->dai_ops.set_fmt(codec_dai,
++ SND_SOC_DAIFMT_I2S |
++ SND_SOC_DAIFMT_NB_NF |
++ SND_SOC_DAIFMT_CBM_CFM);
++ if (ret < 0) {
++ printk(KERN_INFO "can't set codec DAI configuration\n");
++ return ret;
++ }
++
++ /* Set cpu DAI configuration */
++ ret = cpu_dai->dai_ops.set_fmt(cpu_dai,
++ SND_SOC_DAIFMT_I2S |
++ SND_SOC_DAIFMT_NB_NF |
++ SND_SOC_DAIFMT_CBM_CFM);
++ if (ret < 0) {
++ printk(KERN_INFO "can't set cpu DAI configuration\n");
++ return ret;
++ }
++
++ return 0;
++}
++
++static struct snd_soc_ops omap3beagle_ops = {
++ .hw_params = omap3beagle_hw_params,
++};
++
++static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
++ SND_SOC_DAPM_HP("Headphone Jack", NULL),
++ SND_SOC_DAPM_LINE("Line In", NULL),
++};
++
++static const char *audio_map[][3] = {
++ {"Headphone Jack", NULL, "HPLOUT"},
++ {"Headphone Jack", NULL, "HPROUT"},
++
++ {"Line In", NULL, "Line In"},
++ {"Line In", NULL, "Line In"},
++};
++
++static int omap3beagle_twl4030_init(struct snd_soc_codec *codec)
++{
++ int i;
++
++ printk(KERN_INFO "OMAP3 Beagle TWL4030 SoC init\n");
++
++ /* Add omap3beagle specific widgets */
++ for (i = 0; i < ARRAY_SIZE(twl4030_dapm_widgets); i++)
++ snd_soc_dapm_new_control(codec, &twl4030_dapm_widgets[i]);
++
++ /* Set up omap3beagle specific audio path audio_map */
++ for (i = 0; i < ARRAY_SIZE(audio_map); i++)
++ snd_soc_dapm_connect_input(codec, audio_map[i][0],
++ audio_map[i][1], audio_map[i][2]);
++
++ /* always connected */
++ snd_soc_dapm_set_endpoint(codec, "Headphone Jack", 1);
++ snd_soc_dapm_set_endpoint(codec, "Line In", 1);
++
++ snd_soc_dapm_sync_endpoints(codec);
++
++ return 0;
++}
++
++/* Digital audio interface glue - connects codec <--> CPU */
++static struct snd_soc_dai_link omap3beagle_dai = {
++ .name = "TWL4030",
++ .stream_name = "TWL4030",
++ .cpu_dai = &omap_mcbsp_dai[0],
++ .codec_dai = &twl4030_dai,
++ .init = omap3beagle_twl4030_init,
++ .ops = &omap3beagle_ops,
++};
++
++/* Audio machine driver */
++static struct snd_soc_machine snd_soc_machine_omap3beagle = {
++ .name = "omap3beagle",
++ .dai_link = &omap3beagle_dai,
++ .num_links = 1,
++};
++
++/* Audio subsystem */
++static struct snd_soc_device omap3beagle_snd_devdata = {
++ .machine = &snd_soc_machine_omap3beagle,
++ .platform = &omap_soc_platform,
++ .codec_dev = &soc_codec_dev_twl4030,
++};
++
++static struct platform_device *omap3beagle_snd_device;
++
++static int __init omap3beagle_soc_init(void)
++{
++ int ret;
++
++ printk(KERN_INFO "OMAP3 Beagle SoC init\n");
++ if (!machine_is_omap3_beagle()) {
++ printk(KERN_INFO "Not OMAP3 Beagle!\n");
++ return -ENODEV;
++ }
++
++ omap3beagle_snd_device = platform_device_alloc("soc-audio", -1);
++ if (!omap3beagle_snd_device) {
++ printk(KERN_INFO "Platform device allocation failed\n");
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(omap3beagle_snd_device, &omap3beagle_snd_devdata);
++ omap3beagle_snd_devdata.dev = &omap3beagle_snd_device->dev;
++ *(unsigned int *)omap3beagle_dai.cpu_dai->private_data = 1; /* McBSP2 */
++
++ ret = platform_device_add(omap3beagle_snd_device);
++ if (ret)
++ goto err1;
++
++ return 0;
++
++err1:
++ printk(KERN_INFO "Unable to add platform device\n");
++ platform_device_put(omap3beagle_snd_device);
++
++ return ret;
++}
++
++static void __exit omap3beagle_soc_exit(void)
++{
++ printk(KERN_INFO "OMAP3 Beagle SoC exit\n");
++ platform_device_unregister(omap3beagle_snd_device);
++}
++
++module_init(omap3beagle_soc_init);
++module_exit(omap3beagle_soc_exit);
++
++MODULE_AUTHOR("Steve Sakoman <steve@sakoman.com>");
++MODULE_DESCRIPTION("ALSA SoC OMAP3 Beagle");
++MODULE_LICENSE("GPL");
+diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
+new file mode 100644
+index 0000000..32d4f5d
+--- /dev/null
++++ b/sound/soc/omap/omap3evm.c
+@@ -0,0 +1,180 @@
++/*
++ * omap3evm.c -- SoC audio for OMAP3 EVM
++ *
++ * Author: Steve Sakoman <steve@sakoman.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.
++ *
++ * 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 St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#include <linux/clk.h>
++#include <linux/platform_device.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/hardware.h>
++#include <asm/arch/gpio.h>
++#include <asm/arch/mcbsp.h>
++
++#include "omap-mcbsp.h"
++#include "omap-pcm.h"
++#include "../codecs/twl4030.h"
++
++static int omap3evm_hw_params(struct snd_pcm_substream *substream,
++ struct snd_pcm_hw_params *params)
++{
++ struct snd_soc_pcm_runtime *rtd = substream->private_data;
++ struct snd_soc_codec_dai *codec_dai = rtd->dai->codec_dai;
++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
++ int ret;
++
++ /* Set codec DAI configuration */
++ ret = codec_dai->dai_ops.set_fmt(codec_dai,
++ SND_SOC_DAIFMT_I2S |
++ SND_SOC_DAIFMT_NB_NF |
++ SND_SOC_DAIFMT_CBM_CFM);
++ if (ret < 0) {
++ printk(KERN_INFO "can't set codec DAI configuration\n");
++ return ret;
++ }
++
++ /* Set cpu DAI configuration */
++ ret = cpu_dai->dai_ops.set_fmt(cpu_dai,
++ SND_SOC_DAIFMT_I2S |
++ SND_SOC_DAIFMT_NB_NF |
++ SND_SOC_DAIFMT_CBM_CFM);
++ if (ret < 0) {
++ printk(KERN_INFO "can't set cpu DAI configuration\n");
++ return ret;
++ }
++
++ return 0;
++}
++
++static struct snd_soc_ops omap3evm_ops = {
++ .hw_params = omap3evm_hw_params,
++};
++
++static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
++ SND_SOC_DAPM_HP("Headphone Jack", NULL),
++ SND_SOC_DAPM_LINE("Line In", NULL),
++};
++
++static const char *audio_map[][3] = {
++ {"Headphone Jack", NULL, "HPLOUT"},
++ {"Headphone Jack", NULL, "HPROUT"},
++
++ {"Line In", NULL, "Line In"},
++ {"Line In", NULL, "Line In"},
++};
++
++static int omap3evm_twl4030_init(struct snd_soc_codec *codec)
++{
++ int i;
++
++ printk(KERN_INFO "OMAP3 EVM TWL4030 SoC init\n");
++
++ /* Add omap3evm specific widgets */
++ for (i = 0; i < ARRAY_SIZE(twl4030_dapm_widgets); i++)
++ snd_soc_dapm_new_control(codec, &twl4030_dapm_widgets[i]);
++
++ /* Set up omap3evm specific audio path audio_map */
++ for (i = 0; i < ARRAY_SIZE(audio_map); i++)
++ snd_soc_dapm_connect_input(codec, audio_map[i][0],
++ audio_map[i][1], audio_map[i][2]);
++
++ /* always connected */
++ snd_soc_dapm_set_endpoint(codec, "Headphone Jack", 1);
++ snd_soc_dapm_set_endpoint(codec, "Line In", 1);
++
++ snd_soc_dapm_sync_endpoints(codec);
++
++ return 0;
++}
++
++/* Digital audio interface glue - connects codec <--> CPU */
++static struct snd_soc_dai_link omap3evm_dai = {
++ .name = "TWL4030",
++ .stream_name = "TWL4030",
++ .cpu_dai = &omap_mcbsp_dai[0],
++ .codec_dai = &twl4030_dai,
++ .init = omap3evm_twl4030_init,
++ .ops = &omap3evm_ops,
++};
++
++/* Audio machine driver */
++static struct snd_soc_machine snd_soc_machine_omap3evm = {
++ .name = "omap3evm",
++ .dai_link = &omap3evm_dai,
++ .num_links = 1,
++};
++
++/* Audio subsystem */
++static struct snd_soc_device omap3evm_snd_devdata = {
++ .machine = &snd_soc_machine_omap3evm,
++ .platform = &omap_soc_platform,
++ .codec_dev = &soc_codec_dev_twl4030,
++};
++
++static struct platform_device *omap3evm_snd_device;
++
++static int __init omap3evm_soc_init(void)
++{
++ int ret;
++
++ printk(KERN_INFO "OMAP3 EVM SoC init\n");
++ if (!machine_is_omap3evm()) {
++ printk(KERN_INFO "Not OMAP3 EVM!\n");
++ return -ENODEV;
++ }
++
++ omap3evm_snd_device = platform_device_alloc("soc-audio", -1);
++ if (!omap3evm_snd_device) {
++ printk(KERN_INFO "Platform device allocation failed\n");
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(omap3evm_snd_device, &omap3evm_snd_devdata);
++ omap3evm_snd_devdata.dev = &omap3evm_snd_device->dev;
++ *(unsigned int *)omap3evm_dai.cpu_dai->private_data = 1; /* McBSP2 */
++
++ ret = platform_device_add(omap3evm_snd_device);
++ if (ret)
++ goto err1;
++
++ return 0;
++
++err1:
++ printk(KERN_INFO "Unable to add platform device\n");
++ platform_device_put(omap3evm_snd_device);
++
++ return ret;
++}
++
++static void __exit omap3evm_soc_exit(void)
++{
++ printk(KERN_INFO "OMAP3 EVM SoC exit\n");
++ platform_device_unregister(omap3evm_snd_device);
++}
++
++module_init(omap3evm_soc_init);
++module_exit(omap3evm_soc_exit);
++
++MODULE_AUTHOR("Steve Sakoman <steve@sakoman.com>");
++MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM");
++MODULE_LICENSE("GPL");
diff --git a/packages/linux/linux-omap2-git/beagleboard/timer-suppression.patch b/packages/linux/linux-omap2-git/beagleboard/timer-suppression.patch
new file mode 100644
index 0000000000..04362c96e3
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/timer-suppression.patch
@@ -0,0 +1,43 @@
+diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
+index b854a89..26f5569 100644
+--- a/kernel/time/tick-sched.c
++++ b/kernel/time/tick-sched.c
+@@ -253,6 +253,16 @@ void tick_nohz_stop_sched_tick(void)
+
+ /* Schedule the tick, if we are at least one jiffie off */
+ if ((long)delta_jiffies >= 1) {
++ /*
++ * calculate the expiry time for the next timer wheel
++ * timer
++ */
++ expires = ktime_add_ns(last_update, tick_period.tv64 *
++ delta_jiffies);
++
++ /* Skip reprogram of event if its not changed */
++ if(ts->tick_stopped && ktime_equal(expires, dev->next_event))
++ goto out2;
+
+ if (delta_jiffies > 1)
+ cpu_set(cpu, nohz_cpu_mask);
+@@ -304,12 +314,7 @@ void tick_nohz_stop_sched_tick(void)
+ goto out;
+ }
+
+- /*
+- * calculate the expiry time for the next timer wheel
+- * timer
+- */
+- expires = ktime_add_ns(last_update, tick_period.tv64 *
+- delta_jiffies);
++ /* Mark expiries */
+ ts->idle_expires = expires;
+
+ if (ts->nohz_mode == NOHZ_MODE_HIGHRES) {
+@@ -328,6 +333,7 @@ void tick_nohz_stop_sched_tick(void)
+ tick_do_update_jiffies64(ktime_get());
+ cpu_clear(cpu, nohz_cpu_mask);
+ }
++out2:
+ raise_softirq_irqoff(TIMER_SOFTIRQ);
+ out:
+ ts->next_jiffies = next_jiffies;
diff --git a/packages/linux/linux-omap2-git/omap3evm/.mtn2git_empty b/packages/linux/linux-omap2-git/omap3evm/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/.mtn2git_empty
diff --git a/packages/linux/linux-omap2-git/omap3evm/0001-ARM-OMAP-SmartReflex-driver.patch b/packages/linux/linux-omap2-git/omap3evm/0001-ARM-OMAP-SmartReflex-driver.patch
new file mode 100644
index 0000000000..550a4f58be
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/0001-ARM-OMAP-SmartReflex-driver.patch
@@ -0,0 +1,1002 @@
+From: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+To: linux-omap@vger.kernel.org
+Cc: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+Subject: [PATCH 1/3] ARM: OMAP: SmartReflex driver, reference source and header files
+Date: Mon, 2 Jun 2008 14:30:12 +0300
+
+The following patch set integrates TI's SmartReflex driver. SmartReflex is a
+module that adjusts OMAP3 VDD1 and VDD2 operating voltages around the nominal
+values of current operating point depending on silicon characteristics and
+operating conditions.
+
+The driver creates two sysfs entries into /sys/power/ named "sr_vdd1_autocomp"
+and "sr_vdd2_autocomp" which can be used to activate SmartReflex modules 1 and
+2.
+
+Use the following commands to enable SmartReflex:
+
+echo -n 1 > /sys/power/sr_vdd1_autocomp
+echo -n 1 > /sys/power/sr_vdd2_autocomp
+
+To disable:
+
+echo -n 0 > /sys/power/sr_vdd1_autocomp
+echo -n 0 > /sys/power/sr_vdd2_autocomp
+
+This particular patch adds the TI reference source and header files for
+SmartReflex. Only modifications include minor styling to pass checkpatch.pl
+test.
+
+Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+---
+ arch/arm/mach-omap2/smartreflex.c | 815 +++++++++++++++++++++++++++++++++++++
+ arch/arm/mach-omap2/smartreflex.h | 136 ++++++
+ 2 files changed, 951 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/mach-omap2/smartreflex.c
+ create mode 100644 arch/arm/mach-omap2/smartreflex.h
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+new file mode 100644
+index 0000000..dae7460
+--- /dev/null
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -0,0 +1,815 @@
++/*
++ * linux/arch/arm/mach-omap3/smartreflex.c
++ *
++ * OMAP34XX SmartReflex Voltage Control
++ *
++ * Copyright (C) 2007 Texas Instruments, Inc.
++ * Lesly A M <x0080970@ti.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/interrupt.h>
++#include <linux/module.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++#include <linux/clk.h>
++#include <linux/sysfs.h>
++
++#include <asm/arch/prcm.h>
++#include <asm/arch/power_companion.h>
++#include <linux/io.h>
++
++#include "prcm-regs.h"
++#include "smartreflex.h"
++
++
++/* #define DEBUG_SR 1 */
++#ifdef DEBUG_SR
++# define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__ ,\
++ ## args)
++#else
++# define DPRINTK(fmt, args...)
++#endif
++
++struct omap_sr{
++ int srid;
++ int is_sr_reset;
++ int is_autocomp_active;
++ struct clk *fck;
++ u32 req_opp_no;
++ u32 opp1_nvalue, opp2_nvalue, opp3_nvalue, opp4_nvalue, opp5_nvalue;
++ u32 senp_mod, senn_mod;
++ u32 srbase_addr;
++ u32 vpbase_addr;
++};
++
++static struct omap_sr sr1 = {
++ .srid = SR1,
++ .is_sr_reset = 1,
++ .is_autocomp_active = 0,
++ .srbase_addr = OMAP34XX_SR1_BASE,
++};
++
++static struct omap_sr sr2 = {
++ .srid = SR2,
++ .is_sr_reset = 1,
++ .is_autocomp_active = 0,
++ .srbase_addr = OMAP34XX_SR2_BASE,
++};
++
++static inline void sr_write_reg(struct omap_sr *sr, int offset, u32 value)
++{
++ omap_writel(value, sr->srbase_addr + offset);
++}
++
++static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
++ u32 value)
++{
++ u32 reg_val;
++
++ reg_val = omap_readl(sr->srbase_addr + offset);
++ reg_val &= ~mask;
++ reg_val |= value;
++
++ omap_writel(reg_val, sr->srbase_addr + offset);
++}
++
++static inline u32 sr_read_reg(struct omap_sr *sr, int offset)
++{
++ return omap_readl(sr->srbase_addr + offset);
++}
++
++
++#ifndef USE_EFUSE_VALUES
++static void cal_reciprocal(u32 sensor, u32 *sengain, u32 *rnsen)
++{
++ u32 gn, rn, mul;
++
++ for (gn = 0; gn < GAIN_MAXLIMIT; gn++) {
++ mul = 1 << (gn + 8);
++ rn = mul / sensor;
++ if (rn < R_MAXLIMIT) {
++ *sengain = gn;
++ *rnsen = rn;
++ }
++ }
++}
++#endif
++
++static int sr_clk_enable(struct omap_sr *sr)
++{
++ if (clk_enable(sr->fck) != 0) {
++ printk(KERN_ERR "Could not enable sr%d_fck\n", sr->srid);
++ goto clk_enable_err;
++ }
++
++ /* set fclk- active , iclk- idle */
++ sr_modify_reg(sr, ERRCONFIG, SR_CLKACTIVITY_MASK,
++ SR_CLKACTIVITY_IOFF_FON);
++
++ return 0;
++
++clk_enable_err:
++ return -1;
++}
++
++static int sr_clk_disable(struct omap_sr *sr)
++{
++ /* set fclk, iclk- idle */
++ sr_modify_reg(sr, ERRCONFIG, SR_CLKACTIVITY_MASK,
++ SR_CLKACTIVITY_IOFF_FOFF);
++
++ clk_disable(sr->fck);
++ sr->is_sr_reset = 1;
++
++ return 0;
++}
++
++static void sr_set_nvalues(struct omap_sr *sr)
++{
++#ifdef USE_EFUSE_VALUES
++ u32 n1, n2;
++#else
++ u32 senpval, sennval;
++ u32 senpgain, senngain;
++ u32 rnsenp, rnsenn;
++#endif
++
++ if (sr->srid == SR1) {
++#ifdef USE_EFUSE_VALUES
++ /* Read values for VDD1 from EFUSE */
++#else
++ /* since E-Fuse Values are not available, calculating the
++ * reciprocal of the SenN and SenP values for SR1
++ */
++ sr->senp_mod = 0x03; /* SenN-M5 enabled */
++ sr->senn_mod = 0x03;
++
++ /* for OPP5 */
++ senpval = 0x848 + 0x330;
++ sennval = 0xacd + 0x330;
++
++ cal_reciprocal(senpval, &senpgain, &rnsenp);
++ cal_reciprocal(sennval, &senngain, &rnsenn);
++
++ sr->opp5_nvalue =
++ ((senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
++
++ /* for OPP4 */
++ senpval = 0x727 + 0x2a0;
++ sennval = 0x964 + 0x2a0;
++
++ cal_reciprocal(senpval, &senpgain, &rnsenp);
++ cal_reciprocal(sennval, &senngain, &rnsenn);
++
++ sr->opp4_nvalue =
++ ((senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
++
++ /* for OPP3 */
++ senpval = 0x655 + 0x200;
++ sennval = 0x85b + 0x200;
++
++ cal_reciprocal(senpval, &senpgain, &rnsenp);
++ cal_reciprocal(sennval, &senngain, &rnsenn);
++
++ sr->opp3_nvalue =
++ ((senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
++
++ /* for OPP2 */
++ senpval = 0x3be + 0x1a0;
++ sennval = 0x506 + 0x1a0;
++
++ cal_reciprocal(senpval, &senpgain, &rnsenp);
++ cal_reciprocal(sennval, &senngain, &rnsenn);
++
++ sr->opp2_nvalue =
++ ((senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
++
++ /* for OPP1 */
++ senpval = 0x28c + 0x100;
++ sennval = 0x373 + 0x100;
++
++ cal_reciprocal(senpval, &senpgain, &rnsenp);
++ cal_reciprocal(sennval, &senngain, &rnsenn);
++
++ sr->opp1_nvalue =
++ ((senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
++
++ sr_clk_enable(sr);
++ sr_write_reg(sr, NVALUERECIPROCAL, sr->opp3_nvalue);
++ sr_clk_disable(sr);
++
++#endif
++ } else if (sr->srid == SR2) {
++#ifdef USE_EFUSE_VALUES
++ /* Read values for VDD2 from EFUSE */
++#else
++ /* since E-Fuse Values are not available, calculating the
++ * reciprocal of the SenN and SenP values for SR2
++ */
++ sr->senp_mod = 0x03;
++ sr->senn_mod = 0x03;
++
++ /* for OPP3 */
++ senpval = 0x579 + 0x200;
++ sennval = 0x76f + 0x200;
++
++ cal_reciprocal(senpval, &senpgain, &rnsenp);
++ cal_reciprocal(sennval, &senngain, &rnsenn);
++
++ sr->opp3_nvalue =
++ ((senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
++
++ /* for OPP2 */
++ senpval = 0x390 + 0x1c0;
++ sennval = 0x4f5 + 0x1c0;
++
++ cal_reciprocal(senpval, &senpgain, &rnsenp);
++ cal_reciprocal(sennval, &senngain, &rnsenn);
++
++ sr->opp2_nvalue =
++ ((senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
++
++ /* for OPP1 */
++ senpval = 0x25d;
++ sennval = 0x359;
++
++ cal_reciprocal(senpval, &senpgain, &rnsenp);
++ cal_reciprocal(sennval, &senngain, &rnsenn);
++
++ sr->opp1_nvalue =
++ ((senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
++
++#endif
++ }
++
++}
++
++static void sr_configure_vp(int srid)
++{
++ u32 vpconfig;
++
++ if (srid == SR1) {
++ vpconfig = PRM_VP1_CONFIG_ERROROFFSET | PRM_VP1_CONFIG_ERRORGAIN
++ | PRM_VP1_CONFIG_INITVOLTAGE | PRM_VP1_CONFIG_TIMEOUTEN;
++
++ PRM_VP1_CONFIG = vpconfig;
++ PRM_VP1_VSTEPMIN = PRM_VP1_VSTEPMIN_SMPSWAITTIMEMIN |
++ PRM_VP1_VSTEPMIN_VSTEPMIN;
++
++ PRM_VP1_VSTEPMAX = PRM_VP1_VSTEPMAX_SMPSWAITTIMEMAX |
++ PRM_VP1_VSTEPMAX_VSTEPMAX;
++
++ PRM_VP1_VLIMITTO = PRM_VP1_VLIMITTO_VDDMAX |
++ PRM_VP1_VLIMITTO_VDDMIN | PRM_VP1_VLIMITTO_TIMEOUT;
++
++ PRM_VP1_CONFIG |= PRM_VP1_CONFIG_INITVDD;
++ PRM_VP1_CONFIG &= ~PRM_VP1_CONFIG_INITVDD;
++
++ } else if (srid == SR2) {
++ vpconfig = PRM_VP2_CONFIG_ERROROFFSET | PRM_VP2_CONFIG_ERRORGAIN
++ | PRM_VP2_CONFIG_INITVOLTAGE | PRM_VP2_CONFIG_TIMEOUTEN;
++
++ PRM_VP2_CONFIG = vpconfig;
++ PRM_VP2_VSTEPMIN = PRM_VP2_VSTEPMIN_SMPSWAITTIMEMIN |
++ PRM_VP2_VSTEPMIN_VSTEPMIN;
++
++ PRM_VP2_VSTEPMAX = PRM_VP2_VSTEPMAX_SMPSWAITTIMEMAX |
++ PRM_VP2_VSTEPMAX_VSTEPMAX;
++
++ PRM_VP2_VLIMITTO = PRM_VP2_VLIMITTO_VDDMAX |
++ PRM_VP2_VLIMITTO_VDDMIN | PRM_VP2_VLIMITTO_TIMEOUT;
++
++ PRM_VP2_CONFIG |= PRM_VP2_CONFIG_INITVDD;
++ PRM_VP2_CONFIG &= ~PRM_VP2_CONFIG_INITVDD;
++
++ }
++}
++
++static void sr_configure_vc(void)
++{
++ PRM_VC_SMPS_SA =
++ (R_SRI2C_SLAVE_ADDR << PRM_VC_SMPS_SA1_SHIFT) |
++ (R_SRI2C_SLAVE_ADDR << PRM_VC_SMPS_SA0_SHIFT);
++
++ PRM_VC_SMPS_VOL_RA = (R_VDD2_SR_CONTROL << PRM_VC_SMPS_VOLRA1_SHIFT) |
++ (R_VDD1_SR_CONTROL << PRM_VC_SMPS_VOLRA0_SHIFT);
++
++ PRM_VC_CMD_VAL_0 = (PRM_VC_CMD_VAL0_ON << PRM_VC_CMD_ON_SHIFT) |
++ (PRM_VC_CMD_VAL0_ONLP << PRM_VC_CMD_ONLP_SHIFT) |
++ (PRM_VC_CMD_VAL0_RET << PRM_VC_CMD_RET_SHIFT) |
++ (PRM_VC_CMD_VAL0_OFF << PRM_VC_CMD_OFF_SHIFT);
++
++ PRM_VC_CMD_VAL_1 = (PRM_VC_CMD_VAL1_ON << PRM_VC_CMD_ON_SHIFT) |
++ (PRM_VC_CMD_VAL1_ONLP << PRM_VC_CMD_ONLP_SHIFT) |
++ (PRM_VC_CMD_VAL1_RET << PRM_VC_CMD_RET_SHIFT) |
++ (PRM_VC_CMD_VAL1_OFF << PRM_VC_CMD_OFF_SHIFT);
++
++ PRM_VC_CH_CONF = PRM_VC_CH_CONF_CMD1 | PRM_VC_CH_CONF_RAV1;
++
++ PRM_VC_I2C_CFG = PRM_VC_I2C_CFG_MCODE | PRM_VC_I2C_CFG_HSEN
++ | PRM_VC_I2C_CFG_SREN;
++
++ /* Setup voltctrl and other setup times */
++#ifdef CONFIG_SYSOFFMODE
++ PRM_VOLTCTRL = PRM_VOLTCTRL_AUTO_OFF | PRM_VOLTCTRL_AUTO_RET;
++ PRM_CLKSETUP = PRM_CLKSETUP_DURATION;
++ PRM_VOLTSETUP1 = (PRM_VOLTSETUP_TIME2 << PRM_VOLTSETUP_TIME2_OFFSET) |
++ (PRM_VOLTSETUP_TIME1 << PRM_VOLTSETUP_TIME1_OFFSET);
++ PRM_VOLTOFFSET = PRM_VOLTOFFSET_DURATION;
++ PRM_VOLTSETUP2 = PRM_VOLTSETUP2_DURATION;
++#else
++ PRM_VOLTCTRL |= PRM_VOLTCTRL_AUTO_RET;
++#endif
++
++}
++
++
++static void sr_configure(struct omap_sr *sr)
++{
++ u32 sys_clk, sr_clk_length = 0;
++ u32 sr_config;
++ u32 senp_en , senn_en;
++
++ senp_en = sr->senp_mod;
++ senn_en = sr->senn_mod;
++
++ sys_clk = prcm_get_system_clock_speed();
++
++ switch (sys_clk) {
++ case 12000:
++ sr_clk_length = SRCLKLENGTH_12MHZ_SYSCLK;
++ break;
++ case 13000:
++ sr_clk_length = SRCLKLENGTH_13MHZ_SYSCLK;
++ break;
++ case 19200:
++ sr_clk_length = SRCLKLENGTH_19MHZ_SYSCLK;
++ break;
++ case 26000:
++ sr_clk_length = SRCLKLENGTH_26MHZ_SYSCLK;
++ break;
++ case 38400:
++ sr_clk_length = SRCLKLENGTH_38MHZ_SYSCLK;
++ break;
++ default :
++ printk(KERN_ERR "Invalid sysclk value\n");
++ break;
++ }
++
++ DPRINTK(KERN_DEBUG "SR : sys clk %lu\n", sys_clk);
++ if (sr->srid == SR1) {
++ sr_config = SR1_SRCONFIG_ACCUMDATA |
++ (sr_clk_length << SRCONFIG_SRCLKLENGTH_SHIFT) |
++ SRCONFIG_SENENABLE | SRCONFIG_ERRGEN_EN |
++ SRCONFIG_MINMAXAVG_EN |
++ (senn_en << SRCONFIG_SENNENABLE_SHIFT) |
++ (senp_en << SRCONFIG_SENPENABLE_SHIFT) |
++ SRCONFIG_DELAYCTRL;
++
++ sr_write_reg(sr, SRCONFIG, sr_config);
++
++ sr_write_reg(sr, AVGWEIGHT, SR1_AVGWEIGHT_SENPAVGWEIGHT |
++ SR1_AVGWEIGHT_SENNAVGWEIGHT);
++
++ sr_modify_reg(sr, ERRCONFIG, (SR_ERRWEIGHT_MASK |
++ SR_ERRMAXLIMIT_MASK | SR_ERRMINLIMIT_MASK),
++ (SR1_ERRWEIGHT | SR1_ERRMAXLIMIT | SR1_ERRMINLIMIT));
++
++ } else if (sr->srid == SR2) {
++ sr_config = SR2_SRCONFIG_ACCUMDATA |
++ (sr_clk_length << SRCONFIG_SRCLKLENGTH_SHIFT) |
++ SRCONFIG_SENENABLE | SRCONFIG_ERRGEN_EN |
++ SRCONFIG_MINMAXAVG_EN |
++ (senn_en << SRCONFIG_SENNENABLE_SHIFT) |
++ (senp_en << SRCONFIG_SENPENABLE_SHIFT) |
++ SRCONFIG_DELAYCTRL;
++
++ sr_write_reg(sr, SRCONFIG, sr_config);
++
++ sr_write_reg(sr, AVGWEIGHT, SR2_AVGWEIGHT_SENPAVGWEIGHT |
++ SR2_AVGWEIGHT_SENNAVGWEIGHT);
++
++ sr_modify_reg(sr, ERRCONFIG, (SR_ERRWEIGHT_MASK |
++ SR_ERRMAXLIMIT_MASK | SR_ERRMINLIMIT_MASK),
++ (SR2_ERRWEIGHT | SR2_ERRMAXLIMIT | SR2_ERRMINLIMIT));
++
++ }
++ sr->is_sr_reset = 0;
++}
++
++static void sr_enable(struct omap_sr *sr, u32 target_opp_no)
++{
++ u32 nvalue_reciprocal, current_nvalue;
++
++ sr->req_opp_no = target_opp_no;
++
++ if (sr->srid == SR1) {
++ switch (target_opp_no) {
++ case 5:
++ nvalue_reciprocal = sr->opp5_nvalue;
++ break;
++ case 4:
++ nvalue_reciprocal = sr->opp4_nvalue;
++ break;
++ case 3:
++ nvalue_reciprocal = sr->opp3_nvalue;
++ break;
++ case 2:
++ nvalue_reciprocal = sr->opp2_nvalue;
++ break;
++ case 1:
++ nvalue_reciprocal = sr->opp1_nvalue;
++ break;
++ default:
++ nvalue_reciprocal = sr->opp3_nvalue;
++ break;
++ }
++ } else {
++ switch (target_opp_no) {
++ case 3:
++ nvalue_reciprocal = sr->opp3_nvalue;
++ break;
++ case 2:
++ nvalue_reciprocal = sr->opp2_nvalue;
++ break;
++ case 1:
++ nvalue_reciprocal = sr->opp1_nvalue;
++ break;
++ default:
++ nvalue_reciprocal = sr->opp3_nvalue;
++ break;
++ }
++ }
++
++ current_nvalue = sr_read_reg(sr, NVALUERECIPROCAL);
++
++ if (current_nvalue == nvalue_reciprocal) {
++ DPRINTK("System is already at the desired voltage level\n");
++ return;
++ }
++
++ sr_write_reg(sr, NVALUERECIPROCAL, nvalue_reciprocal);
++
++ /* Enable the interrupt */
++ sr_modify_reg(sr, ERRCONFIG,
++ (ERRCONFIG_VPBOUNDINTEN | ERRCONFIG_VPBOUNDINTST),
++ (ERRCONFIG_VPBOUNDINTEN | ERRCONFIG_VPBOUNDINTST));
++
++ if (sr->srid == SR1) {
++ /* Enable VP1 */
++ PRM_VP1_CONFIG |= PRM_VP1_CONFIG_VPENABLE;
++ } else if (sr->srid == SR2) {
++ /* Enable VP2 */
++ PRM_VP2_CONFIG |= PRM_VP2_CONFIG_VPENABLE;
++ }
++
++ /* SRCONFIG - enable SR */
++ sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE, SRCONFIG_SRENABLE);
++
++}
++
++static void sr_disable(struct omap_sr *sr)
++{
++ sr->is_sr_reset = 1;
++
++ /* SRCONFIG - disable SR */
++ sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE, ~SRCONFIG_SRENABLE);
++
++ if (sr->srid == SR1) {
++ /* Enable VP1 */
++ PRM_VP1_CONFIG &= ~PRM_VP1_CONFIG_VPENABLE;
++ } else if (sr->srid == SR2) {
++ /* Enable VP2 */
++ PRM_VP2_CONFIG &= ~PRM_VP2_CONFIG_VPENABLE;
++ }
++}
++
++
++void sr_start_vddautocomap(int srid, u32 target_opp_no)
++{
++ struct omap_sr *sr = NULL;
++
++ if (srid == SR1)
++ sr = &sr1;
++ else if (srid == SR2)
++ sr = &sr2;
++
++ if (sr->is_sr_reset == 1) {
++ sr_clk_enable(sr);
++ sr_configure(sr);
++ }
++
++ if (sr->is_autocomp_active == 1)
++ DPRINTK(KERN_WARNING "SR%d: VDD autocomp is already active\n",
++ srid);
++
++ sr->is_autocomp_active = 1;
++ sr_enable(sr, target_opp_no);
++}
++EXPORT_SYMBOL(sr_start_vddautocomap);
++
++int sr_stop_vddautocomap(int srid)
++{
++ struct omap_sr *sr = NULL;
++
++ if (srid == SR1)
++ sr = &sr1;
++ else if (srid == SR2)
++ sr = &sr2;
++
++ if (sr->is_autocomp_active == 1) {
++ sr_disable(sr);
++ sr_clk_disable(sr);
++ sr->is_autocomp_active = 0;
++ return SR_TRUE;
++ } else {
++ DPRINTK(KERN_WARNING "SR%d: VDD autocomp is not active\n",
++ srid);
++ return SR_FALSE;
++ }
++
++}
++EXPORT_SYMBOL(sr_stop_vddautocomap);
++
++void enable_smartreflex(int srid)
++{
++ u32 target_opp_no = 0;
++ struct omap_sr *sr = NULL;
++
++ if (srid == SR1)
++ sr = &sr1;
++ else if (srid == SR2)
++ sr = &sr2;
++
++ if (sr->is_autocomp_active == 1) {
++ if (sr->is_sr_reset == 1) {
++ if (srid == SR1) {
++ /* Enable SR clks */
++ CM_FCLKEN_WKUP |= SR1_CLK_ENABLE;
++ target_opp_no = get_opp_no(current_vdd1_opp);
++
++ } else if (srid == SR2) {
++ /* Enable SR clks */
++ CM_FCLKEN_WKUP |= SR2_CLK_ENABLE;
++ target_opp_no = get_opp_no(current_vdd2_opp);
++ }
++
++ sr_configure(sr);
++
++ sr_enable(sr, target_opp_no);
++ }
++ }
++}
++
++void disable_smartreflex(int srid)
++{
++ struct omap_sr *sr = NULL;
++
++ if (srid == SR1)
++ sr = &sr1;
++ else if (srid == SR2)
++ sr = &sr2;
++
++ if (sr->is_autocomp_active == 1) {
++ if (srid == SR1) {
++ /* Enable SR clk */
++ CM_FCLKEN_WKUP |= SR1_CLK_ENABLE;
++
++ } else if (srid == SR2) {
++ /* Enable SR clk */
++ CM_FCLKEN_WKUP |= SR2_CLK_ENABLE;
++ }
++
++ if (sr->is_sr_reset == 0) {
++
++ sr->is_sr_reset = 1;
++ /* SRCONFIG - disable SR */
++ sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE,
++ ~SRCONFIG_SRENABLE);
++
++ if (sr->srid == SR1) {
++ /* Disable SR clk */
++ CM_FCLKEN_WKUP &= ~SR1_CLK_ENABLE;
++ /* Enable VP1 */
++ PRM_VP1_CONFIG &= ~PRM_VP1_CONFIG_VPENABLE;
++
++ } else if (sr->srid == SR2) {
++ /* Disable SR clk */
++ CM_FCLKEN_WKUP &= ~SR2_CLK_ENABLE;
++ /* Enable VP2 */
++ PRM_VP2_CONFIG &= ~PRM_VP2_CONFIG_VPENABLE;
++ }
++ }
++ }
++}
++
++
++/* Voltage Scaling using SR VCBYPASS */
++int sr_voltagescale_vcbypass(u32 target_opp, u8 vsel)
++{
++ int ret;
++ int sr_status = 0;
++ u32 vdd, target_opp_no;
++ u32 vc_bypass_value;
++ u32 reg_addr = 0;
++ u32 loop_cnt = 0, retries_cnt = 0;
++
++ vdd = get_vdd(target_opp);
++ target_opp_no = get_opp_no(target_opp);
++
++ if (vdd == PRCM_VDD1) {
++ sr_status = sr_stop_vddautocomap(SR1);
++
++ PRM_VC_CMD_VAL_0 = (PRM_VC_CMD_VAL_0 & ~PRM_VC_CMD_ON_MASK) |
++ (vsel << PRM_VC_CMD_ON_SHIFT);
++ reg_addr = R_VDD1_SR_CONTROL;
++
++ } else if (vdd == PRCM_VDD2) {
++ sr_status = sr_stop_vddautocomap(SR2);
++
++ PRM_VC_CMD_VAL_1 = (PRM_VC_CMD_VAL_1 & ~PRM_VC_CMD_ON_MASK) |
++ (vsel << PRM_VC_CMD_ON_SHIFT);
++ reg_addr = R_VDD2_SR_CONTROL;
++ }
++
++ vc_bypass_value = (vsel << PRM_VC_BYPASS_DATA_SHIFT) |
++ (reg_addr << PRM_VC_BYPASS_REGADDR_SHIFT) |
++ (R_SRI2C_SLAVE_ADDR << PRM_VC_BYPASS_SLAVEADDR_SHIFT);
++
++ PRM_VC_BYPASS_VAL = vc_bypass_value;
++
++ PRM_VC_BYPASS_VAL |= PRM_VC_BYPASS_VALID;
++
++ DPRINTK("%s : PRM_VC_BYPASS_VAL %X\n", __func__, PRM_VC_BYPASS_VAL);
++ DPRINTK("PRM_IRQST_MPU %X\n", PRM_IRQSTATUS_MPU);
++
++ while ((PRM_VC_BYPASS_VAL & PRM_VC_BYPASS_VALID) != 0x0) {
++ ret = loop_wait(&loop_cnt, &retries_cnt, 10);
++ if (ret != PRCM_PASS) {
++ printk(KERN_INFO "Loop count exceeded in check SR I2C"
++ "write\n");
++ return ret;
++ }
++ }
++
++ omap_udelay(T2_SMPS_UPDATE_DELAY);
++
++ if (sr_status) {
++ if (vdd == PRCM_VDD1)
++ sr_start_vddautocomap(SR1, target_opp_no);
++ else if (vdd == PRCM_VDD2)
++ sr_start_vddautocomap(SR2, target_opp_no);
++ }
++
++ return SR_PASS;
++}
++
++/* Sysfs interface to select SR VDD1 auto compensation */
++static ssize_t omap_sr_vdd1_autocomp_show(struct kset *subsys, char *buf)
++{
++ return sprintf(buf, "%d\n", sr1.is_autocomp_active);
++}
++
++static ssize_t omap_sr_vdd1_autocomp_store(struct kset *subsys,
++ const char *buf, size_t n)
++{
++ u32 current_vdd1opp_no;
++ unsigned short value;
++
++ if (sscanf(buf, "%hu", &value) != 1 || (value > 1)) {
++ printk(KERN_ERR "sr_vdd1_autocomp: Invalid value\n");
++ return -EINVAL;
++ }
++
++ current_vdd1opp_no = get_opp_no(current_vdd1_opp);
++
++ if (value == 0)
++ sr_stop_vddautocomap(SR1);
++ else
++ sr_start_vddautocomap(SR1, current_vdd1opp_no);
++
++ return n;
++}
++
++static struct subsys_attribute sr_vdd1_autocomp = {
++ .attr = {
++ .name = __stringify(sr_vdd1_autocomp),
++ .mode = 0644,
++ },
++ .show = omap_sr_vdd1_autocomp_show,
++ .store = omap_sr_vdd1_autocomp_store,
++};
++
++/* Sysfs interface to select SR VDD2 auto compensation */
++static ssize_t omap_sr_vdd2_autocomp_show(struct kset *subsys, char *buf)
++{
++ return sprintf(buf, "%d\n", sr2.is_autocomp_active);
++}
++
++static ssize_t omap_sr_vdd2_autocomp_store(struct kset *subsys,
++ const char *buf, size_t n)
++{
++ u32 current_vdd2opp_no;
++ unsigned short value;
++
++ if (sscanf(buf, "%hu", &value) != 1 || (value > 1)) {
++ printk(KERN_ERR "sr_vdd2_autocomp: Invalid value\n");
++ return -EINVAL;
++ }
++
++ current_vdd2opp_no = get_opp_no(current_vdd2_opp);
++
++ if (value == 0)
++ sr_stop_vddautocomap(SR2);
++ else
++ sr_start_vddautocomap(SR2, current_vdd2opp_no);
++
++ return n;
++}
++
++static struct subsys_attribute sr_vdd2_autocomp = {
++ .attr = {
++ .name = __stringify(sr_vdd2_autocomp),
++ .mode = 0644,
++ },
++ .show = omap_sr_vdd2_autocomp_show,
++ .store = omap_sr_vdd2_autocomp_store,
++};
++
++
++
++static int __init omap3_sr_init(void)
++{
++ int ret = 0;
++ u8 RdReg;
++
++#ifdef CONFIG_ARCH_OMAP34XX
++ sr1.fck = clk_get(NULL, "sr1_fck");
++ if (IS_ERR(sr1.fck))
++ printk(KERN_ERR "Could not get sr1_fck\n");
++
++ sr2.fck = clk_get(NULL, "sr2_fck");
++ if (IS_ERR(sr2.fck))
++ printk(KERN_ERR "Could not get sr2_fck\n");
++#endif /* #ifdef CONFIG_ARCH_OMAP34XX */
++
++ /* Call the VPConfig, VCConfig, set N Values. */
++ sr_set_nvalues(&sr1);
++ sr_configure_vp(SR1);
++
++ sr_set_nvalues(&sr2);
++ sr_configure_vp(SR2);
++
++ sr_configure_vc();
++
++ /* Enable SR on T2 */
++ ret = t2_in(PM_RECEIVER, &RdReg, R_DCDC_GLOBAL_CFG);
++ RdReg |= DCDC_GLOBAL_CFG_ENABLE_SRFLX;
++ ret |= t2_out(PM_RECEIVER, RdReg, R_DCDC_GLOBAL_CFG);
++
++
++ printk(KERN_INFO "SmartReflex driver initialized\n");
++
++ ret = subsys_create_file(&power_subsys, &sr_vdd1_autocomp);
++ if (ret)
++ printk(KERN_ERR "subsys_create_file failed: %d\n", ret);
++
++ ret = subsys_create_file(&power_subsys, &sr_vdd2_autocomp);
++ if (ret)
++ printk(KERN_ERR "subsys_create_file failed: %d\n", ret);
++
++ return 0;
++}
++
++arch_initcall(omap3_sr_init);
+diff --git a/arch/arm/mach-omap2/smartreflex.h b/arch/arm/mach-omap2/smartreflex.h
+new file mode 100644
+index 0000000..62907ef
+--- /dev/null
++++ b/arch/arm/mach-omap2/smartreflex.h
+@@ -0,0 +1,136 @@
++/*
++ * linux/arch/arm/mach-omap3/smartreflex.h
++ *
++ * Copyright (C) 2007 Texas Instruments, Inc.
++ * Lesly A M <x0080970@ti.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.
++ */
++
++
++/* SR Modules */
++#define SR1 1
++#define SR2 2
++
++#define SR_FAIL 1
++#define SR_PASS 0
++
++#define SR_TRUE 1
++#define SR_FALSE 0
++
++#define GAIN_MAXLIMIT 16
++#define R_MAXLIMIT 256
++
++#define SR1_CLK_ENABLE (0x1 << 6)
++#define SR2_CLK_ENABLE (0x1 << 7)
++
++/* PRM_VP1_CONFIG */
++#define PRM_VP1_CONFIG_ERROROFFSET (0x00 << 24)
++#define PRM_VP1_CONFIG_ERRORGAIN (0x20 << 16)
++
++#define PRM_VP1_CONFIG_INITVOLTAGE (0x30 << 8) /* 1.2 volt */
++#define PRM_VP1_CONFIG_TIMEOUTEN (0x1 << 3)
++#define PRM_VP1_CONFIG_INITVDD (0x1 << 2)
++#define PRM_VP1_CONFIG_FORCEUPDATE (0x1 << 1)
++#define PRM_VP1_CONFIG_VPENABLE (0x1 << 0)
++
++/* PRM_VP1_VSTEPMIN */
++#define PRM_VP1_VSTEPMIN_SMPSWAITTIMEMIN (0x01F4 << 8)
++#define PRM_VP1_VSTEPMIN_VSTEPMIN (0x01 << 0)
++
++/* PRM_VP1_VSTEPMAX */
++#define PRM_VP1_VSTEPMAX_SMPSWAITTIMEMAX (0x01F4 << 8)
++#define PRM_VP1_VSTEPMAX_VSTEPMAX (0x04 << 0)
++
++/* PRM_VP1_VLIMITTO */
++#define PRM_VP1_VLIMITTO_VDDMAX (0x3C << 24)
++#define PRM_VP1_VLIMITTO_VDDMIN (0x0 << 16)
++#define PRM_VP1_VLIMITTO_TIMEOUT (0xFFFF << 0)
++
++/* PRM_VP2_CONFIG */
++#define PRM_VP2_CONFIG_ERROROFFSET (0x00 << 24)
++#define PRM_VP2_CONFIG_ERRORGAIN (0x20 << 16)
++
++#define PRM_VP2_CONFIG_INITVOLTAGE (0x30 << 8) /* 1.2 volt */
++#define PRM_VP2_CONFIG_TIMEOUTEN (0x1 << 3)
++#define PRM_VP2_CONFIG_INITVDD (0x1 << 2)
++#define PRM_VP2_CONFIG_FORCEUPDATE (0x1 << 1)
++#define PRM_VP2_CONFIG_VPENABLE (0x1 << 0)
++
++/* PRM_VP2_VSTEPMIN */
++#define PRM_VP2_VSTEPMIN_SMPSWAITTIMEMIN (0x01F4 << 8)
++#define PRM_VP2_VSTEPMIN_VSTEPMIN (0x01 << 0)
++
++/* PRM_VP2_VSTEPMAX */
++#define PRM_VP2_VSTEPMAX_SMPSWAITTIMEMAX (0x01F4 << 8)
++#define PRM_VP2_VSTEPMAX_VSTEPMAX (0x04 << 0)
++
++/* PRM_VP2_VLIMITTO */
++#define PRM_VP2_VLIMITTO_VDDMAX (0x2C << 24)
++#define PRM_VP2_VLIMITTO_VDDMIN (0x0 << 16)
++#define PRM_VP2_VLIMITTO_TIMEOUT (0xFFFF << 0)
++
++/* SRCONFIG */
++#define SR1_SRCONFIG_ACCUMDATA (0x1F4 << 22)
++#define SR2_SRCONFIG_ACCUMDATA (0x1F4 << 22)
++
++#define SRCLKLENGTH_12MHZ_SYSCLK 0x3C
++#define SRCLKLENGTH_13MHZ_SYSCLK 0x41
++#define SRCLKLENGTH_19MHZ_SYSCLK 0x60
++#define SRCLKLENGTH_26MHZ_SYSCLK 0x82
++#define SRCLKLENGTH_38MHZ_SYSCLK 0xC0
++
++#define SRCONFIG_SRCLKLENGTH_SHIFT 12
++#define SRCONFIG_SENNENABLE_SHIFT 5
++#define SRCONFIG_SENPENABLE_SHIFT 3
++
++#define SRCONFIG_SRENABLE (0x01 << 11)
++#define SRCONFIG_SENENABLE (0x01 << 10)
++#define SRCONFIG_ERRGEN_EN (0x01 << 9)
++#define SRCONFIG_MINMAXAVG_EN (0x01 << 8)
++
++#define SRCONFIG_DELAYCTRL (0x01 << 2)
++#define SRCONFIG_CLKCTRL (0x00 << 0)
++
++/* AVGWEIGHT */
++#define SR1_AVGWEIGHT_SENPAVGWEIGHT (0x03 << 2)
++#define SR1_AVGWEIGHT_SENNAVGWEIGHT (0x03 << 0)
++
++#define SR2_AVGWEIGHT_SENPAVGWEIGHT (0x01 << 2)
++#define SR2_AVGWEIGHT_SENNAVGWEIGHT (0x01 << 0)
++
++/* NVALUERECIPROCAL */
++#define NVALUERECIPROCAL_SENPGAIN_SHIFT 20
++#define NVALUERECIPROCAL_SENNGAIN_SHIFT 16
++#define NVALUERECIPROCAL_RNSENP_SHIFT 8
++#define NVALUERECIPROCAL_RNSENN_SHIFT 0
++
++/* ERRCONFIG */
++#define SR_CLKACTIVITY_MASK (0x03 << 20)
++#define SR_ERRWEIGHT_MASK (0x07 << 16)
++#define SR_ERRMAXLIMIT_MASK (0xFF << 8)
++#define SR_ERRMINLIMIT_MASK (0xFF << 0)
++
++#define SR_CLKACTIVITY_IOFF_FOFF (0x00 << 20)
++#define SR_CLKACTIVITY_IOFF_FON (0x02 << 20)
++
++#define ERRCONFIG_VPBOUNDINTEN (0x1 << 31)
++#define ERRCONFIG_VPBOUNDINTST (0x1 << 30)
++
++#define SR1_ERRWEIGHT (0x07 << 16)
++#define SR1_ERRMAXLIMIT (0x02 << 8)
++#define SR1_ERRMINLIMIT (0xFA << 0)
++
++#define SR2_ERRWEIGHT (0x07 << 16)
++#define SR2_ERRMAXLIMIT (0x02 << 8)
++#define SR2_ERRMINLIMIT (0xF9 << 0)
++
++extern u32 current_vdd1_opp;
++extern u32 current_vdd2_opp;
++extern struct kset power_subsys;
++
++extern inline int loop_wait(u32 *lcnt, u32 *rcnt, u32 delay);
++extern void omap_udelay(u32 udelay);
++
+--
+1.5.4.3
diff --git a/packages/linux/linux-omap2-git/omap3evm/0001-ASoC-OMAP-Add-basic-support-for-OMAP34xx-in-McBSP.patch b/packages/linux/linux-omap2-git/omap3evm/0001-ASoC-OMAP-Add-basic-support-for-OMAP34xx-in-McBSP.patch
new file mode 100644
index 0000000000..6e31ead2bd
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/0001-ASoC-OMAP-Add-basic-support-for-OMAP34xx-in-McBSP.patch
@@ -0,0 +1,55 @@
+From a1dbb6dd28e9815a307b87b8d96dcf371d6cfd58 Mon Sep 17 00:00:00 2001
+From: Jarkko Nikula <jarkko.nikula@nokia.com>
+Date: Mon, 19 May 2008 13:24:41 +0300
+Subject: [PATCH] ASoC: OMAP: Add basic support for OMAP34xx in McBSP DAI driver
+
+This adds support for OMAP34xx McBSP port 1 and 2.
+
+Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
+---
+ sound/soc/omap/omap-mcbsp.c | 20 +++++++++++++++++++-
+ 1 files changed, 19 insertions(+), 1 deletions(-)
+
+diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
+index 40d87e6..8e6ec9d 100644
+--- a/sound/soc/omap/omap-mcbsp.c
++++ b/sound/soc/omap/omap-mcbsp.c
+@@ -99,6 +99,21 @@ static const unsigned long omap2420_mcbsp_port[][2] = {
+ static const int omap2420_dma_reqs[][2] = {};
+ static const unsigned long omap2420_mcbsp_port[][2] = {};
+ #endif
++#if defined(CONFIG_ARCH_OMAP34XX)
++static const int omap34xx_dma_reqs[][2] = {
++ { OMAP24XX_DMA_MCBSP1_TX, OMAP24XX_DMA_MCBSP1_RX },
++ { OMAP24XX_DMA_MCBSP2_TX, OMAP24XX_DMA_MCBSP2_RX },
++};
++static const unsigned long omap34xx_mcbsp_port[][2] = {
++ { OMAP34XX_MCBSP1_BASE + OMAP_MCBSP_REG_DXR2,
++ OMAP34XX_MCBSP1_BASE + OMAP_MCBSP_REG_DRR2 },
++ { OMAP34XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR2,
++ OMAP34XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR2 },
++};
++#else
++static const int omap34xx_dma_reqs[][2] = {};
++static const unsigned long omap34xx_mcbsp_port[][2] = {};
++#endif
+
+ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream)
+ {
+@@ -169,9 +184,12 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
+ } else if (cpu_is_omap2420()) {
+ dma = omap2420_dma_reqs[bus_id][substream->stream];
+ port = omap2420_mcbsp_port[bus_id][substream->stream];
++ } else if (cpu_is_omap343x()) {
++ dma = omap34xx_dma_reqs[bus_id][substream->stream];
++ port = omap34xx_mcbsp_port[bus_id][substream->stream];
+ } else {
+ /*
+- * TODO: Add support for 2430 and 3430
++ * TODO: Add support for 2430
+ */
+ return -ENODEV;
+ }
+--
+1.5.5.1
+
diff --git a/packages/linux/linux-omap2-git/omap3evm/0001-omap3-cpuidle.patch b/packages/linux/linux-omap2-git/omap3evm/0001-omap3-cpuidle.patch
new file mode 100644
index 0000000000..28b1ef2214
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/0001-omap3-cpuidle.patch
@@ -0,0 +1,450 @@
+From: "Rajendra Nayak" <rnayak@ti.com>
+To: <linux-omap@vger.kernel.org>
+Subject: [PATCH 01/02] OMAP3 CPUidle driver
+Date: Tue, 10 Jun 2008 12:39:00 +0530
+
+This patch adds the OMAP3 cpuidle driver. Irq enable/disable is done in the core cpuidle driver
+before it queries the governor for the next state.
+
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+
+---
+ arch/arm/mach-omap2/Makefile | 2
+ arch/arm/mach-omap2/cpuidle34xx.c | 293 ++++++++++++++++++++++++++++++++++++++
+ arch/arm/mach-omap2/cpuidle34xx.h | 51 ++++++
+ arch/arm/mach-omap2/pm34xx.c | 5
+ drivers/cpuidle/cpuidle.c | 10 +
+ 5 files changed, 359 insertions(+), 2 deletions(-)
+
+Index: linux-omap-2.6/arch/arm/mach-omap2/Makefile
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/mach-omap2/Makefile 2008-06-09 20:15:33.855303920 +0530
++++ linux-omap-2.6/arch/arm/mach-omap2/Makefile 2008-06-09 20:15:39.569121361 +0530
+@@ -20,7 +20,7 @@ obj-y += pm.o
+ obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
+ obj-$(CONFIG_ARCH_OMAP2420) += sleep242x.o
+ obj-$(CONFIG_ARCH_OMAP2430) += sleep243x.o
+-obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
++obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o
+ obj-$(CONFIG_PM_DEBUG) += pm-debug.o
+ endif
+
+Index: linux-omap-2.6/arch/arm/mach-omap2/cpuidle34xx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-omap-2.6/arch/arm/mach-omap2/cpuidle34xx.c 2008-06-10 11:41:27.644820323 +0530
+@@ -0,0 +1,293 @@
++/*
++ * linux/arch/arm/mach-omap2/cpuidle34xx.c
++ *
++ * OMAP3 CPU IDLE Routines
++ *
++ * Copyright (C) 2007-2008 Texas Instruments, Inc.
++ * Rajendra Nayak <rnayak@ti.com>
++ *
++ * Copyright (C) 2007 Texas Instruments, Inc.
++ * Karthik Dasu <karthik-dp@ti.com>
++ *
++ * Copyright (C) 2006 Nokia Corporation
++ * Tony Lindgren <tony@atomide.com>
++ *
++ * Copyright (C) 2005 Texas Instruments, Inc.
++ * Richard Woodruff <r-woodruff2@ti.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/cpuidle.h>
++#include <asm/arch/pm.h>
++#include <asm/arch/prcm.h>
++#include <asm/arch/powerdomain.h>
++#include <asm/arch/clockdomain.h>
++#include <asm/arch/irqs.h>
++#include "cpuidle34xx.h"
++
++#ifdef CONFIG_CPU_IDLE
++
++struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES];
++struct omap3_processor_cx current_cx_state;
++
++static int omap3_idle_bm_check(void)
++{
++ /* Check for omap3_fclks_active() here once available */
++ return 0;
++}
++
++/* omap3_enter_idle - Programs OMAP3 to enter the specified state.
++ * returns the total time during which the system was idle.
++ */
++static int omap3_enter_idle(struct cpuidle_device *dev,
++ struct cpuidle_state *state)
++{
++ struct omap3_processor_cx *cx = cpuidle_get_statedata(state);
++ struct timespec ts_preidle, ts_postidle, ts_idle;
++ struct powerdomain *mpu_pd, *core_pd, *per_pd, *neon_pd;
++ int neon_pwrst;
++
++ current_cx_state = *cx;
++
++ if (cx->type == OMAP3_STATE_C0) {
++ /* Do nothing for C0, not even a wfi */
++ return 0;
++ }
++
++ /* Used to keep track of the total time in idle */
++ getnstimeofday(&ts_preidle);
++
++ mpu_pd = pwrdm_lookup("mpu_pwrdm");
++ core_pd = pwrdm_lookup("core_pwrdm");
++ per_pd = pwrdm_lookup("per_pwrdm");
++ neon_pd = pwrdm_lookup("neon_pwrdm");
++
++ /* Reset previous power state registers */
++ pwrdm_clear_all_prev_pwrst(mpu_pd);
++ pwrdm_clear_all_prev_pwrst(neon_pd);
++ pwrdm_clear_all_prev_pwrst(core_pd);
++ pwrdm_clear_all_prev_pwrst(per_pd);
++
++ if (omap_irq_pending())
++ return 0;
++
++ neon_pwrst = pwrdm_read_pwrst(neon_pd);
++
++ /* Program MPU/NEON to target state */
++ if (cx->mpu_state < PWRDM_POWER_ON) {
++ if (neon_pwrst == PWRDM_POWER_ON) {
++ if (cx->mpu_state == PWRDM_POWER_RET)
++ pwrdm_set_next_pwrst(neon_pd, PWRDM_POWER_RET);
++ else if (cx->mpu_state == PWRDM_POWER_OFF)
++ pwrdm_set_next_pwrst(neon_pd, PWRDM_POWER_OFF);
++ }
++ pwrdm_set_next_pwrst(mpu_pd, cx->mpu_state);
++ }
++
++ /* Program CORE to target state */
++ if (cx->core_state < PWRDM_POWER_ON)
++ pwrdm_set_next_pwrst(core_pd, cx->core_state);
++
++ /* Execute ARM wfi */
++ omap_sram_idle();
++
++ /* Program MPU/NEON to ON */
++ if (cx->mpu_state < PWRDM_POWER_ON) {
++ if (neon_pwrst == PWRDM_POWER_ON)
++ pwrdm_set_next_pwrst(neon_pd, PWRDM_POWER_ON);
++ pwrdm_set_next_pwrst(mpu_pd, PWRDM_POWER_ON);
++ }
++
++ if (cx->core_state < PWRDM_POWER_ON)
++ pwrdm_set_next_pwrst(core_pd, PWRDM_POWER_ON);
++
++ getnstimeofday(&ts_postidle);
++ ts_idle = timespec_sub(ts_postidle, ts_preidle);
++ return timespec_to_ns(&ts_idle);
++}
++
++/*
++ * omap3_enter_idle_bm - enter function for states with CPUIDLE_FLAG_CHECK_BM
++ *
++ * This function checks for all the pre-requisites needed for OMAP3 to enter
++ * CORE RET/OFF state. It then calls omap3_enter_idle to program the desired
++ * C state.
++ */
++static int omap3_enter_idle_bm(struct cpuidle_device *dev,
++ struct cpuidle_state *state)
++{
++ struct cpuidle_state *new_state = NULL;
++ int i, j;
++
++ if ((state->flags & CPUIDLE_FLAG_CHECK_BM) && omap3_idle_bm_check()) {
++
++ /* Find current state in list */
++ for (i = 0; i < OMAP3_MAX_STATES; i++)
++ if (state == &dev->states[i])
++ break;
++ BUG_ON(i == OMAP3_MAX_STATES);
++
++ /* Back up to non 'CHECK_BM' state */
++ for (j = i - 1; j > 0; j--) {
++ struct cpuidle_state *s = &dev->states[j];
++
++ if (!(s->flags & CPUIDLE_FLAG_CHECK_BM)) {
++ new_state = s;
++ break;
++ }
++ }
++
++ pr_debug("%s: Bus activity: Entering %s (instead of %s)\n",
++ __FUNCTION__, new_state->name, state->name);
++ }
++
++ return omap3_enter_idle(dev, new_state ? : state);
++}
++
++DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
++
++/* omap3_init_power_states - Initialises the OMAP3 specific C states.
++ * Below is the desciption of each C state.
++ *
++ C0 . System executing code
++ C1 . MPU WFI + Core active
++ C2 . MPU CSWR + Core active
++ C3 . MPU OFF + Core active
++ C4 . MPU CSWR + Core CSWR
++ C5 . MPU OFF + Core CSWR
++ C6 . MPU OFF + Core OFF
++ */
++void omap_init_power_states(void)
++{
++ /* C0 . System executing code */
++ omap3_power_states[0].valid = 1;
++ omap3_power_states[0].type = OMAP3_STATE_C0;
++ omap3_power_states[0].sleep_latency = 0;
++ omap3_power_states[0].wakeup_latency = 0;
++ omap3_power_states[0].threshold = 0;
++ omap3_power_states[0].mpu_state = PWRDM_POWER_ON;
++ omap3_power_states[0].core_state = PWRDM_POWER_ON;
++ omap3_power_states[0].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_SHALLOW;
++
++ /* C1 . MPU WFI + Core active */
++ omap3_power_states[1].valid = 1;
++ omap3_power_states[1].type = OMAP3_STATE_C1;
++ omap3_power_states[1].sleep_latency = 10;
++ omap3_power_states[1].wakeup_latency = 10;
++ omap3_power_states[1].threshold = 30;
++ omap3_power_states[1].mpu_state = PWRDM_POWER_ON;
++ omap3_power_states[1].core_state = PWRDM_POWER_ON;
++ omap3_power_states[1].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_SHALLOW;
++
++ /* C2 . MPU CSWR + Core active */
++ omap3_power_states[2].valid = 1;
++ omap3_power_states[2].type = OMAP3_STATE_C2;
++ omap3_power_states[2].sleep_latency = 50;
++ omap3_power_states[2].wakeup_latency = 50;
++ omap3_power_states[2].threshold = 300;
++ omap3_power_states[2].mpu_state = PWRDM_POWER_RET;
++ omap3_power_states[2].core_state = PWRDM_POWER_ON;
++ omap3_power_states[2].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_BALANCED;
++
++ /* C3 . MPU OFF + Core active */
++ omap3_power_states[3].valid = 0;
++ omap3_power_states[3].type = OMAP3_STATE_C3;
++ omap3_power_states[3].sleep_latency = 1500;
++ omap3_power_states[3].wakeup_latency = 1800;
++ omap3_power_states[3].threshold = 4000;
++ omap3_power_states[3].mpu_state = PWRDM_POWER_OFF;
++ omap3_power_states[3].core_state = PWRDM_POWER_RET;
++ omap3_power_states[3].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_BALANCED;
++
++ /* C4 . MPU CSWR + Core CSWR*/
++ omap3_power_states[4].valid = 1;
++ omap3_power_states[4].type = OMAP3_STATE_C4;
++ omap3_power_states[4].sleep_latency = 2500;
++ omap3_power_states[4].wakeup_latency = 7500;
++ omap3_power_states[4].threshold = 12000;
++ omap3_power_states[4].mpu_state = PWRDM_POWER_RET;
++ omap3_power_states[4].core_state = PWRDM_POWER_RET;
++ omap3_power_states[4].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_BALANCED | CPUIDLE_FLAG_CHECK_BM;
++
++ /* C5 . MPU OFF + Core CSWR */
++ omap3_power_states[5].valid = 0;
++ omap3_power_states[5].type = OMAP3_STATE_C5;
++ omap3_power_states[5].sleep_latency = 3000;
++ omap3_power_states[5].wakeup_latency = 8500;
++ omap3_power_states[5].threshold = 15000;
++ omap3_power_states[5].mpu_state = PWRDM_POWER_OFF;
++ omap3_power_states[5].core_state = PWRDM_POWER_RET;
++ omap3_power_states[5].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_BALANCED | CPUIDLE_FLAG_CHECK_BM;
++
++ /* C6 . MPU OFF + Core OFF */
++ omap3_power_states[6].valid = 0;
++ omap3_power_states[6].type = OMAP3_STATE_C6;
++ omap3_power_states[6].sleep_latency = 10000;
++ omap3_power_states[6].wakeup_latency = 30000;
++ omap3_power_states[6].threshold = 300000;
++ omap3_power_states[6].mpu_state = PWRDM_POWER_OFF;
++ omap3_power_states[6].core_state = PWRDM_POWER_OFF;
++ omap3_power_states[6].flags = CPUIDLE_FLAG_TIME_VALID |
++ CPUIDLE_FLAG_DEEP | CPUIDLE_FLAG_CHECK_BM;
++}
++
++struct cpuidle_driver omap3_idle_driver = {
++ .name = "omap3_idle",
++ .owner = THIS_MODULE,
++};
++/*
++ * omap3_idle_init - Init routine for OMAP3 idle.
++ * Registers the OMAP3 specific cpuidle driver with the cpuidle f/w
++ * with the valid set of states.
++ */
++int omap3_idle_init(void)
++{
++ int i, count = 0;
++ struct omap3_processor_cx *cx;
++ struct cpuidle_state *state;
++ struct cpuidle_device *dev;
++
++ omap_init_power_states();
++ cpuidle_register_driver(&omap3_idle_driver);
++
++ dev = &per_cpu(omap3_idle_dev, smp_processor_id());
++
++ for (i = 0; i < OMAP3_MAX_STATES; i++) {
++ cx = &omap3_power_states[i];
++ state = &dev->states[count];
++
++ if (!cx->valid)
++ continue;
++ cpuidle_set_statedata(state, cx);
++ state->exit_latency = cx->sleep_latency + cx->wakeup_latency;
++ state->target_residency = cx->threshold;
++ state->flags = cx->flags;
++ state->enter = (state->flags & CPUIDLE_FLAG_CHECK_BM) ?
++ omap3_enter_idle_bm : omap3_enter_idle;
++ sprintf(state->name, "C%d", count+1);
++ count++;
++ }
++
++ if (!count)
++ return -EINVAL;
++ dev->state_count = count;
++
++ if (cpuidle_register_device(dev)) {
++ printk(KERN_ERR "%s: CPUidle register device failed\n",
++ __FUNCTION__);
++ return -EIO;
++ }
++
++ return 0;
++}
++__initcall(omap3_idle_init);
++#endif /* CONFIG_CPU_IDLE */
+Index: linux-omap-2.6/arch/arm/mach-omap2/cpuidle34xx.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-omap-2.6/arch/arm/mach-omap2/cpuidle34xx.h 2008-06-09 20:15:39.569121361 +0530
+@@ -0,0 +1,51 @@
++/*
++ * linux/arch/arm/mach-omap2/cpuidle34xx.h
++ *
++ * OMAP3 cpuidle structure definitions
++ *
++ * Copyright (C) 2007-2008 Texas Instruments, Inc.
++ * Written by Rajendra Nayak <rnayak@ti.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.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ *
++ * History:
++ *
++ */
++
++#ifndef ARCH_ARM_MACH_OMAP2_CPUIDLE_34XX
++#define ARCH_ARM_MACH_OMAP2_CPUIDLE_34XX
++
++#define OMAP3_MAX_STATES 7
++#define OMAP3_STATE_C0 0 /* C0 - System executing code */
++#define OMAP3_STATE_C1 1 /* C1 - MPU WFI + Core active */
++#define OMAP3_STATE_C2 2 /* C2 - MPU CSWR + Core active */
++#define OMAP3_STATE_C3 3 /* C3 - MPU OFF + Core active */
++#define OMAP3_STATE_C4 4 /* C4 - MPU RET + Core RET */
++#define OMAP3_STATE_C5 5 /* C5 - MPU OFF + Core RET */
++#define OMAP3_STATE_C6 6 /* C6 - MPU OFF + Core OFF */
++
++extern void omap_sram_idle(void);
++extern int omap3_irq_pending(void);
++
++struct omap3_processor_cx {
++ u8 valid;
++ u8 type;
++ u32 sleep_latency;
++ u32 wakeup_latency;
++ u32 mpu_state;
++ u32 core_state;
++ u32 threshold;
++ u32 flags;
++};
++
++void omap_init_power_states(void);
++int omap3_idle_init(void);
++
++#endif /* ARCH_ARM_MACH_OMAP2_CPUIDLE_34XX */
++
+Index: linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/mach-omap2/pm34xx.c 2008-06-09 20:15:33.855303920 +0530
++++ linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c 2008-06-09 20:16:20.976798343 +0530
+@@ -141,7 +141,7 @@ static irqreturn_t prcm_interrupt_handle
+ return IRQ_HANDLED;
+ }
+
+-static void omap_sram_idle(void)
++void omap_sram_idle(void)
+ {
+ /* Variable to tell what needs to be saved and restored
+ * in omap_sram_idle*/
+@@ -156,6 +156,7 @@ static void omap_sram_idle(void)
+
+ mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
+ switch (mpu_next_state) {
++ case PWRDM_POWER_ON:
+ case PWRDM_POWER_RET:
+ /* No need to save context */
+ save_state = 0;
+@@ -386,7 +387,9 @@ int __init omap3_pm_init(void)
+
+ prcm_setup_regs();
+
++#ifndef CONFIG_CPU_IDLE
+ pm_idle = omap3_pm_idle;
++#endif
+
+ err1:
+ return ret;
+Index: linux-omap-2.6/drivers/cpuidle/cpuidle.c
+===================================================================
+--- linux-omap-2.6.orig/drivers/cpuidle/cpuidle.c 2008-06-09 20:15:33.856303888 +0530
++++ linux-omap-2.6/drivers/cpuidle/cpuidle.c 2008-06-09 20:15:39.570121329 +0530
+@@ -58,6 +58,11 @@ static void cpuidle_idle_call(void)
+ return;
+ }
+
++#ifdef CONFIG_ARCH_OMAP3
++ local_irq_disable();
++ local_fiq_disable();
++#endif
++
+ /* ask the governor for the next state */
+ next_state = cpuidle_curr_governor->select(dev);
+ if (need_resched())
+@@ -70,6 +75,11 @@ static void cpuidle_idle_call(void)
+ target_state->time += (unsigned long long)dev->last_residency;
+ target_state->usage++;
+
++#ifdef CONFIG_ARCH_OMAP3
++ local_irq_enable();
++ local_fiq_enable();
++#endif
++
+ /* give the governor an opportunity to reflect on the outcome */
+ if (cpuidle_curr_governor->reflect)
+ cpuidle_curr_governor->reflect(dev);
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
diff --git a/packages/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch b/packages/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch
new file mode 100644
index 0000000000..17329be29b
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch
@@ -0,0 +1,69 @@
+From 7a444ee080c5f1a62ac5042f1e7926622b3e1ce7 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@openembedded.org>
+Date: Fri, 30 May 2008 13:43:36 +0200
+Subject: [PATCH] ARM: OMAP: omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
+
+omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
+ * on revision A5 and earlier board the two leds can't be controlled seperately, should be fixed in rev. B and C boards.
+
+Signed-off-by: Koen Kooi <koen@openembedded.org>
+---
+ arch/arm/mach-omap2/board-omap3beagle.c | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index c992cc7..83891fc 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -19,6 +19,7 @@
+ #include <linux/err.h>
+ #include <linux/clk.h>
+ #include <linux/io.h>
++#include <linux/leds.h>
+
+ #include <asm/hardware.h>
+ #include <asm/mach-types.h>
+@@ -72,6 +73,32 @@ static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
+ .ctrl_name = "internal",
+ };
+
++struct gpio_led gpio_leds[] = {
++ {
++ .name = "beagleboard::led0",
++ .default_trigger = "none",
++ .gpio = 149,
++ },
++ {
++ .name = "beagleboard::led1",
++ .default_trigger = "none",
++ .gpio = 150,
++ },
++};
++
++static struct gpio_led_platform_data gpio_led_info = {
++ .leds = gpio_leds,
++ .num_leds = ARRAY_SIZE(gpio_leds),
++};
++
++static struct platform_device leds_gpio = {
++ .name = "leds-gpio",
++ .id = -1,
++ .dev = {
++ .platform_data = &gpio_led_info,
++ },
++};
++
+ static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
+ { OMAP_TAG_UART, &omap3_beagle_uart_config },
+ { OMAP_TAG_MMC, &omap3beagle_mmc_config },
+@@ -83,6 +110,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = {
+ #ifdef CONFIG_RTC_DRV_TWL4030
+ &omap3_beagle_twl4030rtc_device,
+ #endif
++ &leds_gpio,
+ };
+
+ static void __init omap3_beagle_init(void)
+--
+1.5.4.3
+
diff --git a/packages/linux/linux-omap2-git/omap3evm/0002-ARM-OMAP-SmartReflex-driver.patch b/packages/linux/linux-omap2-git/omap3evm/0002-ARM-OMAP-SmartReflex-driver.patch
new file mode 100644
index 0000000000..8e609395a0
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/0002-ARM-OMAP-SmartReflex-driver.patch
@@ -0,0 +1,278 @@
+From: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+To: linux-omap@vger.kernel.org
+Cc: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+Subject: [PATCH 2/3] ARM: OMAP: SmartReflex driver: added required register and bit definitions.
+Date: Fri, 6 Jun 2008 12:49:48 +0300
+
+Added new register and bit definitions to enable Smartreflex driver integration.
+Also PRM_VC_SMPS_SA bit definitions' naming was changed to match the naming of
+other similar bit definitions.
+
+Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+---
+ arch/arm/mach-omap2/prm-regbits-34xx.h | 27 ++++++--
+ arch/arm/mach-omap2/smartreflex.h | 124 ++++++++++++++++++++++++++++++-
+ include/asm-arm/arch-omap/control.h | 19 +++++
+ include/asm-arm/arch-omap/omap34xx.h | 2 +
+ 4 files changed, 163 insertions(+), 9 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
+index c6a7940..f82b5a7 100644
+--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
++++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
+@@ -435,10 +435,10 @@
+ /* PM_PWSTST_EMU specific bits */
+
+ /* PRM_VC_SMPS_SA */
+-#define OMAP3430_PRM_VC_SMPS_SA_SA1_SHIFT 16
+-#define OMAP3430_PRM_VC_SMPS_SA_SA1_MASK (0x7f << 16)
+-#define OMAP3430_PRM_VC_SMPS_SA_SA0_SHIFT 0
+-#define OMAP3430_PRM_VC_SMPS_SA_SA0_MASK (0x7f << 0)
++#define OMAP3430_SMPS_SA1_SHIFT 16
++#define OMAP3430_SMPS_SA1_MASK (0x7f << 16)
++#define OMAP3430_SMPS_SA0_SHIFT 0
++#define OMAP3430_SMPS_SA0_MASK (0x7f << 0)
+
+ /* PRM_VC_SMPS_VOL_RA */
+ #define OMAP3430_VOLRA1_SHIFT 16
+@@ -452,7 +452,7 @@
+ #define OMAP3430_CMDRA0_SHIFT 0
+ #define OMAP3430_CMDRA0_MASK (0xff << 0)
+
+-/* PRM_VC_CMD_VAL_0 specific bits */
++/* PRM_VC_CMD_VAL */
+ #define OMAP3430_VC_CMD_ON_SHIFT 24
+ #define OMAP3430_VC_CMD_ON_MASK (0xFF << 24)
+ #define OMAP3430_VC_CMD_ONLP_SHIFT 16
+@@ -462,7 +462,17 @@
+ #define OMAP3430_VC_CMD_OFF_SHIFT 0
+ #define OMAP3430_VC_CMD_OFF_MASK (0xFF << 0)
+
++/* PRM_VC_CMD_VAL_0 specific bits */
++#define OMAP3430_VC_CMD_VAL0_ON (0x3 << 4)
++#define OMAP3430_VC_CMD_VAL0_ONLP (0x3 << 3)
++#define OMAP3430_VC_CMD_VAL0_RET (0x3 << 3)
++#define OMAP3430_VC_CMD_VAL0_OFF (0x3 << 3)
++
+ /* PRM_VC_CMD_VAL_1 specific bits */
++#define OMAP3430_VC_CMD_VAL1_ON (0xB << 2)
++#define OMAP3430_VC_CMD_VAL1_ONLP (0x3 << 3)
++#define OMAP3430_VC_CMD_VAL1_RET (0x3 << 3)
++#define OMAP3430_VC_CMD_VAL1_OFF (0x3 << 3)
+
+ /* PRM_VC_CH_CONF */
+ #define OMAP3430_CMD1 (1 << 20)
+@@ -521,6 +531,13 @@
+ #define OMAP3430_AUTO_RET (1 << 1)
+ #define OMAP3430_AUTO_SLEEP (1 << 0)
+
++/* Constants to define setup durations */
++#define OMAP3430_CLKSETUP_DURATION 0xff
++#define OMAP3430_VOLTSETUP_TIME2 0xfff
++#define OMAP3430_VOLTSETUP_TIME1 0xfff
++#define OMAP3430_VOLTOFFSET_DURATION 0xff
++#define OMAP3430_VOLTSETUP2_DURATION 0xff
++
+ /* PRM_SRAM_PCHARGE */
+ #define OMAP3430_PCHARGE_TIME_SHIFT 0
+ #define OMAP3430_PCHARGE_TIME_MASK (0xff << 0)
+diff --git a/arch/arm/mach-omap2/smartreflex.h b/arch/arm/mach-omap2/smartreflex.h
+index 62907ef..2091a15 100644
+--- a/arch/arm/mach-omap2/smartreflex.h
++++ b/arch/arm/mach-omap2/smartreflex.h
+@@ -1,5 +1,10 @@
++#ifndef __ARCH_ARM_MACH_OMAP3_SMARTREFLEX_H
++#define __ARCH_ARM_MACH_OMAP3_SMARTREFLEX_H
+ /*
+- * linux/arch/arm/mach-omap3/smartreflex.h
++ * linux/arch/arm/mach-omap2/smartreflex.h
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Kalle Jokiniemi
+ *
+ * Copyright (C) 2007 Texas Instruments, Inc.
+ * Lesly A M <x0080970@ti.com>
+@@ -9,6 +14,21 @@
+ * published by the Free Software Foundation.
+ */
+
++#define PHY_TO_OFF_PM_MASTER(p) (p - 0x36)
++#define PHY_TO_OFF_PM_RECIEVER(p) (p - 0x5b)
++#define PHY_TO_OFF_PM_INT(p) (p - 0x2e)
++
++/* SMART REFLEX REG ADDRESS OFFSET */
++#define SRCONFIG 0x00
++#define SRSTATUS 0x04
++#define SENVAL 0x08
++#define SENMIN 0x0C
++#define SENMAX 0x10
++#define SENAVG 0x14
++#define AVGWEIGHT 0x18
++#define NVALUERECIPROCAL 0x1C
++#define SENERROR 0x20
++#define ERRCONFIG 0x24
+
+ /* SR Modules */
+ #define SR1 1
+@@ -127,10 +147,106 @@
+ #define SR2_ERRMAXLIMIT (0x02 << 8)
+ #define SR2_ERRMINLIMIT (0xF9 << 0)
+
++/* T2 SMART REFLEX */
++#define R_SRI2C_SLAVE_ADDR 0x12
++#define R_VDD1_SR_CONTROL 0x00
++#define R_VDD2_SR_CONTROL 0x01
++#define T2_SMPS_UPDATE_DELAY 360 /* In uSec */
++
++/* Vmode control */
++#define R_DCDC_GLOBAL_CFG PHY_TO_OFF_PM_RECIEVER(0x61)
++
++#define R_VDD1_VSEL PHY_TO_OFF_PM_RECIEVER(0xb9)
++#define R_VDD1_VMODE_CFG PHY_TO_OFF_PM_RECIEVER(0xba)
++#define R_VDD1_VFLOOR PHY_TO_OFF_PM_RECIEVER(0xbb)
++#define R_VDD1_VROOF PHY_TO_OFF_PM_RECIEVER(0xbc)
++#define R_VDD1_STEP PHY_TO_OFF_PM_RECIEVER(0xbd)
++
++#define R_VDD2_VSEL PHY_TO_OFF_PM_RECIEVER(0xc7)
++#define R_VDD2_VMODE_CFG PHY_TO_OFF_PM_RECIEVER(0xc8)
++#define R_VDD2_VFLOOR PHY_TO_OFF_PM_RECIEVER(0xc9)
++#define R_VDD2_VROOF PHY_TO_OFF_PM_RECIEVER(0xca)
++#define R_VDD2_STEP PHY_TO_OFF_PM_RECIEVER(0xcb)
++
++/* R_DCDC_GLOBAL_CFG register, SMARTREFLEX_ENABLE valuws */
++#define DCDC_GLOBAL_CFG_ENABLE_SRFLX 0x08
++
++/* VDDs*/
++#define PRCM_VDD1 1
++#define PRCM_VDD2 2
++#define PRCM_MAX_SYSC_REGS 30
++
++/* XXX: These should be removed/moved from here once we have a working DVFS
++ implementation in place */
++#define AT_3430 1 /*3430 ES 1.0 */
++#define AT_3430_ES2 2 /*3430 ES 2.0 */
++
++#define ID_OPP 0xE2 /*OPP*/
++
++/* DEVICE ID/DPLL ID/CLOCK ID: bits 28-31 for OMAP type */
++#define OMAP_TYPE_SHIFT 28
++#define OMAP_TYPE_MASK 0xF
++/* OPP ID: bits: 0-4 for OPP number */
++#define OPP_NO_POS 0
++#define OPP_NO_MASK 0x1F
++/* OPP ID: bits: 5-6 for VDD */
++#define VDD_NO_POS 5
++#define VDD_NO_MASK 0x3
++/* Other IDs: bits 20-27 for ID type */
++/* These IDs have bits 25,26,27 as 1 */
++#define OTHER_ID_TYPE_SHIFT 20
++#define OTHER_ID_TYPE_MASK 0xFF
++
++#define OTHER_ID_TYPE(X) ((X & OTHER_ID_TYPE_MASK) << OTHER_ID_TYPE_SHIFT)
++#define ID_OPP_NO(X) ((X & OPP_NO_MASK) << OPP_NO_POS)
++#define ID_VDD(X) ((X & VDD_NO_MASK) << VDD_NO_POS)
++#define OMAP(X) ((X >> OMAP_TYPE_SHIFT) & OMAP_TYPE_MASK)
++#define get_opp_no(X) ((X >> OPP_NO_POS) & OPP_NO_MASK)
++#define get_vdd(X) ((X >> VDD_NO_POS) & VDD_NO_MASK)
++
++/* VDD1 OPPs */
++#define PRCM_VDD1_OPP1 (OMAP(AT_3430_ES2) | OTHER_ID_TYPE(ID_OPP) | \
++ ID_VDD(PRCM_VDD1) | ID_OPP_NO(0x1))
++#define PRCM_VDD1_OPP2 (OMAP(AT_3430_ES2) | OTHER_ID_TYPE(ID_OPP) | \
++ ID_VDD(PRCM_VDD1) | ID_OPP_NO(0x2))
++#define PRCM_VDD1_OPP3 (OMAP(AT_3430_ES2) | OTHER_ID_TYPE(ID_OPP) | \
++ ID_VDD(PRCM_VDD1) | ID_OPP_NO(0x3))
++#define PRCM_VDD1_OPP4 (OMAP(AT_3430_ES2) | OTHER_ID_TYPE(ID_OPP) | \
++ ID_VDD(PRCM_VDD1) | ID_OPP_NO(0x4))
++#define PRCM_VDD1_OPP5 (OMAP(AT_3430_ES2) | OTHER_ID_TYPE(ID_OPP) | \
++ ID_VDD(PRCM_VDD1) | ID_OPP_NO(0x5))
++#define PRCM_NO_VDD1_OPPS 5
++
++
++/* VDD2 OPPs */
++#define PRCM_VDD2_OPP1 (OMAP(AT_3430_ES2) | OTHER_ID_TYPE(ID_OPP) | \
++ ID_VDD(PRCM_VDD2) | ID_OPP_NO(0x1))
++#define PRCM_VDD2_OPP2 (OMAP(AT_3430_ES2) | OTHER_ID_TYPE(ID_OPP) | \
++ ID_VDD(PRCM_VDD2) | ID_OPP_NO(0x2))
++#define PRCM_VDD2_OPP3 (OMAP(AT_3430_ES2) | OTHER_ID_TYPE(ID_OPP) | \
++ ID_VDD(PRCM_VDD2) | ID_OPP_NO(0x3))
++#define PRCM_NO_VDD2_OPPS 3
++/* XXX: end remove/move */
++
++
++/* XXX: find more appropriate place for these once DVFS is in place */
+ extern u32 current_vdd1_opp;
+ extern u32 current_vdd2_opp;
+-extern struct kset power_subsys;
+
+-extern inline int loop_wait(u32 *lcnt, u32 *rcnt, u32 delay);
+-extern void omap_udelay(u32 udelay);
++/*
++ * Smartreflex module enable/disable interface.
++ * NOTE: if smartreflex is not enabled from sysfs, these functions will not
++ * do anything.
++ */
++#if defined(CONFIG_ARCH_OMAP34XX) && defined(CONFIG_TWL4030_CORE)
++void enable_smartreflex(int srid);
++void disable_smartreflex(int srid);
++#else
++static inline void enable_smartreflex(int srid) {}
++static inline void disable_smartreflex(int srid) {}
++#endif
++
++
++#endif
++
+
+diff --git a/include/asm-arm/arch-omap/control.h b/include/asm-arm/arch-omap/control.h
+index 12bc22a..6e64fe7 100644
+--- a/include/asm-arm/arch-omap/control.h
++++ b/include/asm-arm/arch-omap/control.h
+@@ -138,6 +138,15 @@
+ #define OMAP343X_CONTROL_TEST_KEY_11 (OMAP2_CONTROL_GENERAL + 0x00f4)
+ #define OMAP343X_CONTROL_TEST_KEY_12 (OMAP2_CONTROL_GENERAL + 0x00f8)
+ #define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc)
++#define OMAP343X_CONTROL_FUSE_OPP1_VDD1 (OMAP2_CONTROL_GENERAL + 0x0110)
++#define OMAP343X_CONTROL_FUSE_OPP2_VDD1 (OMAP2_CONTROL_GENERAL + 0x0114)
++#define OMAP343X_CONTROL_FUSE_OPP3_VDD1 (OMAP2_CONTROL_GENERAL + 0x0118)
++#define OMAP343X_CONTROL_FUSE_OPP4_VDD1 (OMAP2_CONTROL_GENERAL + 0x011c)
++#define OMAP343X_CONTROL_FUSE_OPP5_VDD1 (OMAP2_CONTROL_GENERAL + 0x0120)
++#define OMAP343X_CONTROL_FUSE_OPP1_VDD2 (OMAP2_CONTROL_GENERAL + 0x0124)
++#define OMAP343X_CONTROL_FUSE_OPP2_VDD2 (OMAP2_CONTROL_GENERAL + 0x0128)
++#define OMAP343X_CONTROL_FUSE_OPP3_VDD2 (OMAP2_CONTROL_GENERAL + 0x012c)
++#define OMAP343X_CONTROL_FUSE_SR (OMAP2_CONTROL_GENERAL + 0x0130)
+ #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)
+ #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194)
+ #define OMAP343X_CONTROL_TEMP_SENSOR (OMAP2_CONTROL_GENERAL + 0x02b4)
+@@ -172,6 +181,16 @@
+ #define OMAP2_SYSBOOT_1_MASK (1 << 1)
+ #define OMAP2_SYSBOOT_0_MASK (1 << 0)
+
++/* CONTROL_FUSE_SR bits */
++#define OMAP343X_SR2_SENNENABLE_MASK (0x3 << 10)
++#define OMAP343X_SR2_SENNENABLE_SHIFT 10
++#define OMAP343X_SR2_SENPENABLE_MASK (0x3 << 8)
++#define OMAP343X_SR2_SENPENABLE_SHIFT 8
++#define OMAP343X_SR1_SENNENABLE_MASK (0x3 << 2)
++#define OMAP343X_SR1_SENNENABLE_SHIFT 2
++#define OMAP343X_SR1_SENPENABLE_MASK (0x3 << 0)
++#define OMAP343X_SR1_SENPENABLE_SHIFT 0
++
+ #ifndef __ASSEMBLY__
+ #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+ extern void __iomem *omap_ctrl_base_get(void);
+diff --git a/include/asm-arm/arch-omap/omap34xx.h b/include/asm-arm/arch-omap/omap34xx.h
+index 6a0459a..3667fd6 100644
+--- a/include/asm-arm/arch-omap/omap34xx.h
++++ b/include/asm-arm/arch-omap/omap34xx.h
+@@ -54,6 +54,8 @@
+ #define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000)
+ #define OMAP34XX_HSUSB_HOST_BASE (L4_34XX_BASE + 0x64000)
+ #define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000)
++#define OMAP34XX_SR1_BASE 0x480C9000
++#define OMAP34XX_SR2_BASE 0x480CB000
+
+
+ #if defined(CONFIG_ARCH_OMAP3430)
+--
+1.5.4.3
diff --git a/packages/linux/linux-omap2-git/omap3evm/0002-omap3-cpuidle.patch b/packages/linux/linux-omap2-git/omap3evm/0002-omap3-cpuidle.patch
new file mode 100644
index 0000000000..c17c690fe1
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/0002-omap3-cpuidle.patch
@@ -0,0 +1,88 @@
+From: "Rajendra Nayak" <rnayak@ti.com>
+To: <linux-omap@vger.kernel.org>
+Subject: [PATCH 02/02] Kconfig changes
+Date: Tue, 10 Jun 2008 12:39:02 +0530
+
+Updates the CPUidle Kconfig
+
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+
+---
+ arch/arm/Kconfig | 10 ++++++++++
+ drivers/cpuidle/Kconfig | 28 ++++++++++++++++++++++------
+ 2 files changed, 32 insertions(+), 6 deletions(-)
+
+Index: linux-omap-2.6/arch/arm/Kconfig
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/Kconfig 2008-06-10 11:43:10.790502713 +0530
++++ linux-omap-2.6/arch/arm/Kconfig 2008-06-10 11:43:38.701604549 +0530
+@@ -954,6 +954,16 @@ config ATAGS_PROC
+
+ endmenu
+
++if (ARCH_OMAP)
++
++menu "CPUIdle"
++
++source "drivers/cpuidle/Kconfig"
++
++endmenu
++
++endif
++
+ if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
+
+ menu "CPU Frequency scaling"
+Index: linux-omap-2.6/drivers/cpuidle/Kconfig
+===================================================================
+--- linux-omap-2.6.orig/drivers/cpuidle/Kconfig 2008-06-10 11:43:10.790502713 +0530
++++ linux-omap-2.6/drivers/cpuidle/Kconfig 2008-06-10 12:06:36.139332151 +0530
+@@ -1,20 +1,36 @@
++menu "CPU idle PM support"
+
+ config CPU_IDLE
+ bool "CPU idle PM support"
+- default ACPI
++ default n
+ help
+ CPU idle is a generic framework for supporting software-controlled
+ idle processor power management. It includes modular cross-platform
+ governors that can be swapped during runtime.
+
+- If you're using an ACPI-enabled platform, you should say Y here.
++ If you're using a mobile platform that supports CPU idle PM (e.g.
++ an ACPI-capable notebook), you should say Y here.
++
++if CPU_IDLE
++
++comment "Governors"
+
+ config CPU_IDLE_GOV_LADDER
+- bool
++ bool "ladder"
+ depends on CPU_IDLE
+- default y
++ default n
+
+ config CPU_IDLE_GOV_MENU
+- bool
++ bool "menu"
+ depends on CPU_IDLE && NO_HZ
+- default y
++ default n
++ help
++ This cpuidle governor evaluates all available states and chooses the
++ deepest state that meets all of the following constraints: BM activity,
++ expected time until next timer interrupt, and last break event time
++ delta. It is designed to minimize power consumption. Currently
++ dynticks is required.
++
++endif # CPU_IDLE
++
++endmenu
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
diff --git a/packages/linux/linux-omap2-git/omap3evm/0003-ARM-OMAP-SmartReflex-driver.patch b/packages/linux/linux-omap2-git/omap3evm/0003-ARM-OMAP-SmartReflex-driver.patch
new file mode 100644
index 0000000000..40d5790367
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/0003-ARM-OMAP-SmartReflex-driver.patch
@@ -0,0 +1,1001 @@
+From: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+To: linux-omap@vger.kernel.org
+Cc: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+Subject: [PATCH 3/3] ARM: OMAP: SmartReflex driver: integration to linux-omap
+Date: Fri, 6 Jun 2008 12:49:49 +0300
+Message-Id: <1212745789-13926-3-git-send-email-ext-kalle.jokiniemi@nokia.com>
+
+- Changed register accesses to use prm_{read,write}_mod_reg and
+ prm_{set,clear,rmw}_mod_reg_bits() functions instread of
+ "REG_X = REG_Y" type accesses.
+
+- Changed direct register clock enables/disables to clockframework calls.
+
+- replaced cpu-related #ifdefs with if (cpu_is_xxxx()) calls.
+
+- Added E-fuse support: Use silicon characteristics parameters from E-fuse
+
+- added smartreflex_disable/enable calls to pm34xx.c suspend function.
+
+- Added "SmartReflex support" entry into Kconfig under "System type->TI OMAP
+ Implementations". It depends on ARCH_OMAP34XX and TWL4030_CORE.
+
+- Added "SmartReflex testing support" Kconfig option for using hard coded
+ software parameters instead of E-fuse parameters.
+
+Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
+---
+ arch/arm/mach-omap2/Makefile | 3 +
+ arch/arm/mach-omap2/pm34xx.c | 9 +
+ arch/arm/mach-omap2/smartreflex.c | 531 +++++++++++++++++++++++--------------
+ arch/arm/mach-omap2/smartreflex.h | 9 +-
+ arch/arm/plat-omap/Kconfig | 31 +++
+ 5 files changed, 385 insertions(+), 198 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
+index 50c6657..f645b6e 100644
+--- a/arch/arm/mach-omap2/Makefile
++++ b/arch/arm/mach-omap2/Makefile
+@@ -25,6 +25,9 @@ obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
+ obj-$(CONFIG_PM_DEBUG) += pm-debug.o
+ endif
+
++# SmartReflex driver
++obj-$(CONFIG_OMAP_SMARTREFLEX) += smartreflex.o
++
+ # Clock framework
+ obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o
+ obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o
+diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
+index 7e775cc..3da4f47 100644
+--- a/arch/arm/mach-omap2/pm34xx.c
++++ b/arch/arm/mach-omap2/pm34xx.c
+@@ -36,6 +36,7 @@
+
+ #include "prm.h"
+ #include "pm.h"
++#include "smartreflex.h"
+
+ struct power_state {
+ struct powerdomain *pwrdm;
+@@ -256,6 +257,10 @@ static int omap3_pm_suspend(void)
+ struct power_state *pwrst;
+ int state, ret = 0;
+
++ /* XXX Disable smartreflex before entering suspend */
++ disable_smartreflex(SR1);
++ disable_smartreflex(SR2);
++
+ /* Read current next_pwrsts */
+ list_for_each_entry(pwrst, &pwrst_list, node)
+ pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm);
+@@ -287,6 +292,10 @@ restore:
+ printk(KERN_INFO "Successfully put all powerdomains "
+ "to target state\n");
+
++ /* XXX Enable smartreflex after suspend */
++ enable_smartreflex(SR1);
++ enable_smartreflex(SR2);
++
+ return ret;
+ }
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index dae7460..0b10a5d 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -3,6 +3,9 @@
+ *
+ * OMAP34XX SmartReflex Voltage Control
+ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Kalle Jokiniemi
++ *
+ * Copyright (C) 2007 Texas Instruments, Inc.
+ * Lesly A M <x0080970@ti.com>
+ *
+@@ -20,13 +23,16 @@
+ #include <linux/err.h>
+ #include <linux/clk.h>
+ #include <linux/sysfs.h>
+-
+-#include <asm/arch/prcm.h>
+-#include <asm/arch/power_companion.h>
++#include <linux/kobject.h>
++#include <linux/i2c/twl4030.h>
+ #include <linux/io.h>
+
+-#include "prcm-regs.h"
++#include <asm/arch/omap34xx.h>
++#include <asm/arch/control.h>
++
++#include "prm.h"
+ #include "smartreflex.h"
++#include "prm-regbits-34xx.h"
+
+
+ /* #define DEBUG_SR 1 */
+@@ -37,11 +43,16 @@
+ # define DPRINTK(fmt, args...)
+ #endif
+
++/* XXX: These should be relocated where-ever the OPP implementation will be */
++u32 current_vdd1_opp;
++u32 current_vdd2_opp;
++
+ struct omap_sr{
+ int srid;
+ int is_sr_reset;
+ int is_autocomp_active;
+ struct clk *fck;
++ u32 clk_length;
+ u32 req_opp_no;
+ u32 opp1_nvalue, opp2_nvalue, opp3_nvalue, opp4_nvalue, opp5_nvalue;
+ u32 senp_mod, senn_mod;
+@@ -53,6 +64,7 @@ static struct omap_sr sr1 = {
+ .srid = SR1,
+ .is_sr_reset = 1,
+ .is_autocomp_active = 0,
++ .clk_length = 0,
+ .srbase_addr = OMAP34XX_SR1_BASE,
+ };
+
+@@ -60,6 +72,7 @@ static struct omap_sr sr2 = {
+ .srid = SR2,
+ .is_sr_reset = 1,
+ .is_autocomp_active = 0,
++ .clk_length = 0,
+ .srbase_addr = OMAP34XX_SR2_BASE,
+ };
+
+@@ -85,8 +98,6 @@ static inline u32 sr_read_reg(struct omap_sr *sr, int offset)
+ return omap_readl(sr->srbase_addr + offset);
+ }
+
+-
+-#ifndef USE_EFUSE_VALUES
+ static void cal_reciprocal(u32 sensor, u32 *sengain, u32 *rnsen)
+ {
+ u32 gn, rn, mul;
+@@ -100,7 +111,21 @@ static void cal_reciprocal(u32 sensor, u32 *sengain, u32 *rnsen)
+ }
+ }
+ }
+-#endif
++
++static void sr_clk_get(struct omap_sr *sr)
++{
++ if (sr->srid == SR1) {
++ sr->fck = clk_get(NULL, "sr1_fck");
++ if (IS_ERR(sr->fck))
++ printk(KERN_ERR "Could not get sr1_fck\n");
++
++ } else if (sr->srid == SR2) {
++ sr->fck = clk_get(NULL, "sr2_fck");
++ if (IS_ERR(sr->fck))
++ printk(KERN_ERR "Could not get sr2_fck\n");
++
++ }
++}
+
+ static int sr_clk_enable(struct omap_sr *sr)
+ {
+@@ -131,22 +156,86 @@ static int sr_clk_disable(struct omap_sr *sr)
+ return 0;
+ }
+
+-static void sr_set_nvalues(struct omap_sr *sr)
++static void sr_set_clk_length(struct omap_sr *sr)
++{
++ struct clk *osc_sys_ck;
++ u32 sys_clk = 0;
++
++ osc_sys_ck = clk_get(NULL, "osc_sys_ck");
++ sys_clk = clk_get_rate(osc_sys_ck);
++ clk_put(osc_sys_ck);
++
++ switch (sys_clk) {
++ case 12000000:
++ sr->clk_length = SRCLKLENGTH_12MHZ_SYSCLK;
++ break;
++ case 13000000:
++ sr->clk_length = SRCLKLENGTH_13MHZ_SYSCLK;
++ break;
++ case 19200000:
++ sr->clk_length = SRCLKLENGTH_19MHZ_SYSCLK;
++ break;
++ case 26000000:
++ sr->clk_length = SRCLKLENGTH_26MHZ_SYSCLK;
++ break;
++ case 38400000:
++ sr->clk_length = SRCLKLENGTH_38MHZ_SYSCLK;
++ break;
++ default :
++ printk(KERN_ERR "Invalid sysclk value: %d\n", sys_clk);
++ break;
++ }
++}
++
++static void sr_set_efuse_nvalues(struct omap_sr *sr)
++{
++ if (sr->srid == SR1) {
++ sr->senn_mod = (omap_ctrl_readl(OMAP343X_CONTROL_FUSE_SR) &
++ OMAP343X_SR1_SENNENABLE_MASK) >>
++ OMAP343X_SR1_SENNENABLE_SHIFT;
++
++ sr->senp_mod = (omap_ctrl_readl(OMAP343X_CONTROL_FUSE_SR) &
++ OMAP343X_SR1_SENPENABLE_MASK) >>
++ OMAP343X_SR1_SENPENABLE_SHIFT;
++
++ sr->opp5_nvalue = omap_ctrl_readl(
++ OMAP343X_CONTROL_FUSE_OPP5_VDD1);
++ sr->opp4_nvalue = omap_ctrl_readl(
++ OMAP343X_CONTROL_FUSE_OPP4_VDD1);
++ sr->opp3_nvalue = omap_ctrl_readl(
++ OMAP343X_CONTROL_FUSE_OPP3_VDD1);
++ sr->opp2_nvalue = omap_ctrl_readl(
++ OMAP343X_CONTROL_FUSE_OPP2_VDD1);
++ sr->opp1_nvalue = omap_ctrl_readl(
++ OMAP343X_CONTROL_FUSE_OPP1_VDD1);
++ } else if (sr->srid == SR2) {
++ sr->senn_mod = (omap_ctrl_readl(OMAP343X_CONTROL_FUSE_SR) &
++ OMAP343X_SR2_SENNENABLE_MASK) >>
++ OMAP343X_SR2_SENNENABLE_SHIFT;
++
++ sr->senp_mod = (omap_ctrl_readl(OMAP343X_CONTROL_FUSE_SR) &
++ OMAP343X_SR2_SENPENABLE_MASK) >>
++ OMAP343X_SR2_SENPENABLE_SHIFT;
++
++ sr->opp3_nvalue = omap_ctrl_readl(
++ OMAP343X_CONTROL_FUSE_OPP3_VDD2);
++ sr->opp2_nvalue = omap_ctrl_readl(
++ OMAP343X_CONTROL_FUSE_OPP2_VDD2);
++ sr->opp1_nvalue = omap_ctrl_readl(
++ OMAP343X_CONTROL_FUSE_OPP1_VDD2);
++ }
++}
++
++/* Hard coded nvalues for testing purposes, may cause device to hang! */
++static void sr_set_testing_nvalues(struct omap_sr *sr)
+ {
+-#ifdef USE_EFUSE_VALUES
+- u32 n1, n2;
+-#else
+ u32 senpval, sennval;
+ u32 senpgain, senngain;
+ u32 rnsenp, rnsenn;
+-#endif
+
+ if (sr->srid == SR1) {
+-#ifdef USE_EFUSE_VALUES
+- /* Read values for VDD1 from EFUSE */
+-#else
+- /* since E-Fuse Values are not available, calculating the
+- * reciprocal of the SenN and SenP values for SR1
++ /* Calculating the reciprocal of the SenN and SenP values
++ * for SR1
+ */
+ sr->senp_mod = 0x03; /* SenN-M5 enabled */
+ sr->senn_mod = 0x03;
+@@ -216,15 +305,16 @@ static void sr_set_nvalues(struct omap_sr *sr)
+ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
+ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
+
++ /* XXX The clocks are enabled in the startup and NVALUE is
++ * set also there. Disabling this for now, but this could
++ * be related to dynamic sleep during boot */
++#if 0
+ sr_clk_enable(sr);
+ sr_write_reg(sr, NVALUERECIPROCAL, sr->opp3_nvalue);
+ sr_clk_disable(sr);
+-
+ #endif
++
+ } else if (sr->srid == SR2) {
+-#ifdef USE_EFUSE_VALUES
+- /* Read values for VDD2 from EFUSE */
+-#else
+ /* since E-Fuse Values are not available, calculating the
+ * reciprocal of the SenN and SenP values for SR2
+ */
+@@ -269,134 +359,163 @@ static void sr_set_nvalues(struct omap_sr *sr)
+ (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
+ (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
+ (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT));
+-
+-#endif
+ }
+
+ }
+
++static void sr_set_nvalues(struct omap_sr *sr)
++{
++ if (SR_TESTING_NVALUES)
++ sr_set_testing_nvalues(sr);
++ else
++ sr_set_efuse_nvalues(sr);
++}
++
+ static void sr_configure_vp(int srid)
+ {
+ u32 vpconfig;
+
+ if (srid == SR1) {
+ vpconfig = PRM_VP1_CONFIG_ERROROFFSET | PRM_VP1_CONFIG_ERRORGAIN
+- | PRM_VP1_CONFIG_INITVOLTAGE | PRM_VP1_CONFIG_TIMEOUTEN;
+-
+- PRM_VP1_CONFIG = vpconfig;
+- PRM_VP1_VSTEPMIN = PRM_VP1_VSTEPMIN_SMPSWAITTIMEMIN |
+- PRM_VP1_VSTEPMIN_VSTEPMIN;
+-
+- PRM_VP1_VSTEPMAX = PRM_VP1_VSTEPMAX_SMPSWAITTIMEMAX |
+- PRM_VP1_VSTEPMAX_VSTEPMAX;
+-
+- PRM_VP1_VLIMITTO = PRM_VP1_VLIMITTO_VDDMAX |
+- PRM_VP1_VLIMITTO_VDDMIN | PRM_VP1_VLIMITTO_TIMEOUT;
+-
+- PRM_VP1_CONFIG |= PRM_VP1_CONFIG_INITVDD;
+- PRM_VP1_CONFIG &= ~PRM_VP1_CONFIG_INITVDD;
++ | PRM_VP1_CONFIG_INITVOLTAGE
++ | PRM_VP1_CONFIG_TIMEOUTEN;
++
++ prm_write_mod_reg(vpconfig, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_CONFIG_OFFSET);
++ prm_write_mod_reg(PRM_VP1_VSTEPMIN_SMPSWAITTIMEMIN |
++ PRM_VP1_VSTEPMIN_VSTEPMIN,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_VSTEPMIN_OFFSET);
++
++ prm_write_mod_reg(PRM_VP1_VSTEPMAX_SMPSWAITTIMEMAX |
++ PRM_VP1_VSTEPMAX_VSTEPMAX,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_VSTEPMAX_OFFSET);
++
++ prm_write_mod_reg(PRM_VP1_VLIMITTO_VDDMAX |
++ PRM_VP1_VLIMITTO_VDDMIN |
++ PRM_VP1_VLIMITTO_TIMEOUT,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_VLIMITTO_OFFSET);
++
++ /* Trigger initVDD value copy to voltage processor */
++ prm_set_mod_reg_bits(PRM_VP1_CONFIG_INITVDD, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_CONFIG_OFFSET);
++ /* Clear initVDD copy trigger bit */
++ prm_clear_mod_reg_bits(PRM_VP1_CONFIG_INITVDD, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_CONFIG_OFFSET);
+
+ } else if (srid == SR2) {
+ vpconfig = PRM_VP2_CONFIG_ERROROFFSET | PRM_VP2_CONFIG_ERRORGAIN
+- | PRM_VP2_CONFIG_INITVOLTAGE | PRM_VP2_CONFIG_TIMEOUTEN;
+-
+- PRM_VP2_CONFIG = vpconfig;
+- PRM_VP2_VSTEPMIN = PRM_VP2_VSTEPMIN_SMPSWAITTIMEMIN |
+- PRM_VP2_VSTEPMIN_VSTEPMIN;
+-
+- PRM_VP2_VSTEPMAX = PRM_VP2_VSTEPMAX_SMPSWAITTIMEMAX |
+- PRM_VP2_VSTEPMAX_VSTEPMAX;
+-
+- PRM_VP2_VLIMITTO = PRM_VP2_VLIMITTO_VDDMAX |
+- PRM_VP2_VLIMITTO_VDDMIN | PRM_VP2_VLIMITTO_TIMEOUT;
+-
+- PRM_VP2_CONFIG |= PRM_VP2_CONFIG_INITVDD;
+- PRM_VP2_CONFIG &= ~PRM_VP2_CONFIG_INITVDD;
++ | PRM_VP2_CONFIG_INITVOLTAGE
++ | PRM_VP2_CONFIG_TIMEOUTEN;
++
++ prm_write_mod_reg(vpconfig, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_CONFIG_OFFSET);
++ prm_write_mod_reg(PRM_VP2_VSTEPMIN_SMPSWAITTIMEMIN |
++ PRM_VP2_VSTEPMIN_VSTEPMIN,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_VSTEPMIN_OFFSET);
++
++ prm_write_mod_reg(PRM_VP2_VSTEPMAX_SMPSWAITTIMEMAX |
++ PRM_VP2_VSTEPMAX_VSTEPMAX,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_VSTEPMAX_OFFSET);
++
++ prm_write_mod_reg(PRM_VP2_VLIMITTO_VDDMAX |
++ PRM_VP2_VLIMITTO_VDDMIN |
++ PRM_VP2_VLIMITTO_TIMEOUT,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_VLIMITTO_OFFSET);
++
++ /* Trigger initVDD value copy to voltage processor */
++ prm_set_mod_reg_bits(PRM_VP2_CONFIG_INITVDD, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_CONFIG_OFFSET);
++ /* Reset initVDD copy trigger bit */
++ prm_clear_mod_reg_bits(PRM_VP2_CONFIG_INITVDD, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_CONFIG_OFFSET);
+
+ }
+ }
+
+ static void sr_configure_vc(void)
+ {
+- PRM_VC_SMPS_SA =
+- (R_SRI2C_SLAVE_ADDR << PRM_VC_SMPS_SA1_SHIFT) |
+- (R_SRI2C_SLAVE_ADDR << PRM_VC_SMPS_SA0_SHIFT);
+-
+- PRM_VC_SMPS_VOL_RA = (R_VDD2_SR_CONTROL << PRM_VC_SMPS_VOLRA1_SHIFT) |
+- (R_VDD1_SR_CONTROL << PRM_VC_SMPS_VOLRA0_SHIFT);
+-
+- PRM_VC_CMD_VAL_0 = (PRM_VC_CMD_VAL0_ON << PRM_VC_CMD_ON_SHIFT) |
+- (PRM_VC_CMD_VAL0_ONLP << PRM_VC_CMD_ONLP_SHIFT) |
+- (PRM_VC_CMD_VAL0_RET << PRM_VC_CMD_RET_SHIFT) |
+- (PRM_VC_CMD_VAL0_OFF << PRM_VC_CMD_OFF_SHIFT);
+-
+- PRM_VC_CMD_VAL_1 = (PRM_VC_CMD_VAL1_ON << PRM_VC_CMD_ON_SHIFT) |
+- (PRM_VC_CMD_VAL1_ONLP << PRM_VC_CMD_ONLP_SHIFT) |
+- (PRM_VC_CMD_VAL1_RET << PRM_VC_CMD_RET_SHIFT) |
+- (PRM_VC_CMD_VAL1_OFF << PRM_VC_CMD_OFF_SHIFT);
+-
+- PRM_VC_CH_CONF = PRM_VC_CH_CONF_CMD1 | PRM_VC_CH_CONF_RAV1;
+-
+- PRM_VC_I2C_CFG = PRM_VC_I2C_CFG_MCODE | PRM_VC_I2C_CFG_HSEN
+- | PRM_VC_I2C_CFG_SREN;
++ prm_write_mod_reg((R_SRI2C_SLAVE_ADDR << OMAP3430_SMPS_SA1_SHIFT) |
++ (R_SRI2C_SLAVE_ADDR << OMAP3430_SMPS_SA0_SHIFT),
++ OMAP3430_GR_MOD, OMAP3_PRM_VC_SMPS_SA_OFFSET);
++
++ prm_write_mod_reg((R_VDD2_SR_CONTROL << OMAP3430_VOLRA1_SHIFT) |
++ (R_VDD1_SR_CONTROL << OMAP3430_VOLRA0_SHIFT),
++ OMAP3430_GR_MOD, OMAP3_PRM_VC_SMPS_VOL_RA_OFFSET);
++
++ prm_write_mod_reg((OMAP3430_VC_CMD_VAL0_ON <<
++ OMAP3430_VC_CMD_ON_SHIFT) |
++ (OMAP3430_VC_CMD_VAL0_ONLP << OMAP3430_VC_CMD_ONLP_SHIFT) |
++ (OMAP3430_VC_CMD_VAL0_RET << OMAP3430_VC_CMD_RET_SHIFT) |
++ (OMAP3430_VC_CMD_VAL0_OFF << OMAP3430_VC_CMD_OFF_SHIFT),
++ OMAP3430_GR_MOD, OMAP3_PRM_VC_CMD_VAL_0_OFFSET);
++
++ prm_write_mod_reg((OMAP3430_VC_CMD_VAL1_ON <<
++ OMAP3430_VC_CMD_ON_SHIFT) |
++ (OMAP3430_VC_CMD_VAL1_ONLP << OMAP3430_VC_CMD_ONLP_SHIFT) |
++ (OMAP3430_VC_CMD_VAL1_RET << OMAP3430_VC_CMD_RET_SHIFT) |
++ (OMAP3430_VC_CMD_VAL1_OFF << OMAP3430_VC_CMD_OFF_SHIFT),
++ OMAP3430_GR_MOD, OMAP3_PRM_VC_CMD_VAL_1_OFFSET);
++
++ prm_write_mod_reg(OMAP3430_CMD1 | OMAP3430_RAV1,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VC_CH_CONF_OFFSET);
++
++ prm_write_mod_reg(OMAP3430_MCODE_SHIFT | OMAP3430_HSEN | OMAP3430_SREN,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VC_I2C_CFG_OFFSET);
+
+ /* Setup voltctrl and other setup times */
++ /* XXX CONFIG_SYSOFFMODE has not been implemented yet */
+ #ifdef CONFIG_SYSOFFMODE
+- PRM_VOLTCTRL = PRM_VOLTCTRL_AUTO_OFF | PRM_VOLTCTRL_AUTO_RET;
+- PRM_CLKSETUP = PRM_CLKSETUP_DURATION;
+- PRM_VOLTSETUP1 = (PRM_VOLTSETUP_TIME2 << PRM_VOLTSETUP_TIME2_OFFSET) |
+- (PRM_VOLTSETUP_TIME1 << PRM_VOLTSETUP_TIME1_OFFSET);
+- PRM_VOLTOFFSET = PRM_VOLTOFFSET_DURATION;
+- PRM_VOLTSETUP2 = PRM_VOLTSETUP2_DURATION;
++ prm_write_mod_reg(OMAP3430_AUTO_OFF | OMAP3430_AUTO_RET,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VOLTCTRL_OFFSET);
++
++ prm_write_mod_reg(OMAP3430_CLKSETUP_DURATION, OMAP3430_GR_MOD,
++ OMAP3_PRM_CLKSETUP_OFFSET);
++ prm_write_mod_reg((OMAP3430_VOLTSETUP_TIME2 <<
++ OMAP3430_VOLTSETUP_TIME2_OFFSET) |
++ (OMAP3430_VOLTSETUP_TIME1 <<
++ OMAP3430_VOLTSETUP_TIME1_OFFSET),
++ OMAP3430_GR_MOD, OMAP3_PRM_VOLTSETUP1_OFFSET);
++
++ prm_write_mod_reg(OMAP3430_VOLTOFFSET_DURATION, OMAP3430_GR_MOD,
++ OMAP3_PRM_VOLTOFFSET_OFFSET);
++ prm_write_mod_reg(OMAP3430_VOLTSETUP2_DURATION, OMAP3430_GR_MOD,
++ OMAP3_PRM_VOLTSETUP2_OFFSET);
+ #else
+- PRM_VOLTCTRL |= PRM_VOLTCTRL_AUTO_RET;
++ prm_set_mod_reg_bits(OMAP3430_AUTO_RET, OMAP3430_GR_MOD,
++ OMAP3_PRM_VOLTCTRL_OFFSET);
+ #endif
+
+ }
+
+-
+ static void sr_configure(struct omap_sr *sr)
+ {
+- u32 sys_clk, sr_clk_length = 0;
+ u32 sr_config;
+ u32 senp_en , senn_en;
+
++ if (sr->clk_length == 0)
++ sr_set_clk_length(sr);
++
+ senp_en = sr->senp_mod;
+ senn_en = sr->senn_mod;
+-
+- sys_clk = prcm_get_system_clock_speed();
+-
+- switch (sys_clk) {
+- case 12000:
+- sr_clk_length = SRCLKLENGTH_12MHZ_SYSCLK;
+- break;
+- case 13000:
+- sr_clk_length = SRCLKLENGTH_13MHZ_SYSCLK;
+- break;
+- case 19200:
+- sr_clk_length = SRCLKLENGTH_19MHZ_SYSCLK;
+- break;
+- case 26000:
+- sr_clk_length = SRCLKLENGTH_26MHZ_SYSCLK;
+- break;
+- case 38400:
+- sr_clk_length = SRCLKLENGTH_38MHZ_SYSCLK;
+- break;
+- default :
+- printk(KERN_ERR "Invalid sysclk value\n");
+- break;
+- }
+-
+- DPRINTK(KERN_DEBUG "SR : sys clk %lu\n", sys_clk);
+ if (sr->srid == SR1) {
+ sr_config = SR1_SRCONFIG_ACCUMDATA |
+- (sr_clk_length << SRCONFIG_SRCLKLENGTH_SHIFT) |
++ (sr->clk_length << SRCONFIG_SRCLKLENGTH_SHIFT) |
+ SRCONFIG_SENENABLE | SRCONFIG_ERRGEN_EN |
+ SRCONFIG_MINMAXAVG_EN |
+ (senn_en << SRCONFIG_SENNENABLE_SHIFT) |
+ (senp_en << SRCONFIG_SENPENABLE_SHIFT) |
+ SRCONFIG_DELAYCTRL;
+-
++ DPRINTK(KERN_DEBUG "setting SRCONFIG1 to 0x%08lx\n",
++ (unsigned long int) sr_config);
+ sr_write_reg(sr, SRCONFIG, sr_config);
+
+ sr_write_reg(sr, AVGWEIGHT, SR1_AVGWEIGHT_SENPAVGWEIGHT |
+@@ -408,18 +527,18 @@ static void sr_configure(struct omap_sr *sr)
+
+ } else if (sr->srid == SR2) {
+ sr_config = SR2_SRCONFIG_ACCUMDATA |
+- (sr_clk_length << SRCONFIG_SRCLKLENGTH_SHIFT) |
++ (sr->clk_length << SRCONFIG_SRCLKLENGTH_SHIFT) |
+ SRCONFIG_SENENABLE | SRCONFIG_ERRGEN_EN |
+ SRCONFIG_MINMAXAVG_EN |
+ (senn_en << SRCONFIG_SENNENABLE_SHIFT) |
+ (senp_en << SRCONFIG_SENPENABLE_SHIFT) |
+ SRCONFIG_DELAYCTRL;
+
++ DPRINTK(KERN_DEBUG "setting SRCONFIG2 to 0x%08lx\n",
++ (unsigned long int) sr_config);
+ sr_write_reg(sr, SRCONFIG, sr_config);
+-
+ sr_write_reg(sr, AVGWEIGHT, SR2_AVGWEIGHT_SENPAVGWEIGHT |
+ SR2_AVGWEIGHT_SENNAVGWEIGHT);
+-
+ sr_modify_reg(sr, ERRCONFIG, (SR_ERRWEIGHT_MASK |
+ SR_ERRMAXLIMIT_MASK | SR_ERRMINLIMIT_MASK),
+ (SR2_ERRWEIGHT | SR2_ERRMAXLIMIT | SR2_ERRMINLIMIT));
+@@ -428,9 +547,9 @@ static void sr_configure(struct omap_sr *sr)
+ sr->is_sr_reset = 0;
+ }
+
+-static void sr_enable(struct omap_sr *sr, u32 target_opp_no)
++static int sr_enable(struct omap_sr *sr, u32 target_opp_no)
+ {
+- u32 nvalue_reciprocal, current_nvalue;
++ u32 nvalue_reciprocal;
+
+ sr->req_opp_no = target_opp_no;
+
+@@ -472,11 +591,10 @@ static void sr_enable(struct omap_sr *sr, u32 target_opp_no)
+ }
+ }
+
+- current_nvalue = sr_read_reg(sr, NVALUERECIPROCAL);
+-
+- if (current_nvalue == nvalue_reciprocal) {
+- DPRINTK("System is already at the desired voltage level\n");
+- return;
++ if (nvalue_reciprocal == 0) {
++ printk(KERN_NOTICE "OPP%d doesn't support SmartReflex\n",
++ target_opp_no);
++ return SR_FALSE;
+ }
+
+ sr_write_reg(sr, NVALUERECIPROCAL, nvalue_reciprocal);
+@@ -485,18 +603,19 @@ static void sr_enable(struct omap_sr *sr, u32 target_opp_no)
+ sr_modify_reg(sr, ERRCONFIG,
+ (ERRCONFIG_VPBOUNDINTEN | ERRCONFIG_VPBOUNDINTST),
+ (ERRCONFIG_VPBOUNDINTEN | ERRCONFIG_VPBOUNDINTST));
+-
+ if (sr->srid == SR1) {
+ /* Enable VP1 */
+- PRM_VP1_CONFIG |= PRM_VP1_CONFIG_VPENABLE;
++ prm_set_mod_reg_bits(PRM_VP1_CONFIG_VPENABLE, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_CONFIG_OFFSET);
+ } else if (sr->srid == SR2) {
+ /* Enable VP2 */
+- PRM_VP2_CONFIG |= PRM_VP2_CONFIG_VPENABLE;
++ prm_set_mod_reg_bits(PRM_VP2_CONFIG_VPENABLE, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_CONFIG_OFFSET);
+ }
+
+ /* SRCONFIG - enable SR */
+ sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE, SRCONFIG_SRENABLE);
+-
++ return SR_TRUE;
+ }
+
+ static void sr_disable(struct omap_sr *sr)
+@@ -507,11 +626,13 @@ static void sr_disable(struct omap_sr *sr)
+ sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE, ~SRCONFIG_SRENABLE);
+
+ if (sr->srid == SR1) {
+- /* Enable VP1 */
+- PRM_VP1_CONFIG &= ~PRM_VP1_CONFIG_VPENABLE;
++ /* Disable VP1 */
++ prm_clear_mod_reg_bits(PRM_VP1_CONFIG_VPENABLE, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_CONFIG_OFFSET);
+ } else if (sr->srid == SR2) {
+- /* Enable VP2 */
+- PRM_VP2_CONFIG &= ~PRM_VP2_CONFIG_VPENABLE;
++ /* Disable VP2 */
++ prm_clear_mod_reg_bits(PRM_VP2_CONFIG_VPENABLE, OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_CONFIG_OFFSET);
+ }
+ }
+
+@@ -535,7 +656,12 @@ void sr_start_vddautocomap(int srid, u32 target_opp_no)
+ srid);
+
+ sr->is_autocomp_active = 1;
+- sr_enable(sr, target_opp_no);
++ if (!sr_enable(sr, target_opp_no)) {
++ printk(KERN_WARNING "SR%d: VDD autocomp not activated\n", srid);
++ sr->is_autocomp_active = 0;
++ if (sr->is_sr_reset == 1)
++ sr_clk_disable(sr);
++ }
+ }
+ EXPORT_SYMBOL(sr_start_vddautocomap);
+
+@@ -574,20 +700,18 @@ void enable_smartreflex(int srid)
+
+ if (sr->is_autocomp_active == 1) {
+ if (sr->is_sr_reset == 1) {
+- if (srid == SR1) {
+- /* Enable SR clks */
+- CM_FCLKEN_WKUP |= SR1_CLK_ENABLE;
+- target_opp_no = get_opp_no(current_vdd1_opp);
++ /* Enable SR clks */
++ sr_clk_enable(sr);
+
+- } else if (srid == SR2) {
+- /* Enable SR clks */
+- CM_FCLKEN_WKUP |= SR2_CLK_ENABLE;
++ if (srid == SR1)
++ target_opp_no = get_opp_no(current_vdd1_opp);
++ else if (srid == SR2)
+ target_opp_no = get_opp_no(current_vdd2_opp);
+- }
+
+ sr_configure(sr);
+
+- sr_enable(sr, target_opp_no);
++ if (!sr_enable(sr, target_opp_no))
++ sr_clk_disable(sr);
+ }
+ }
+ }
+@@ -602,15 +726,6 @@ void disable_smartreflex(int srid)
+ sr = &sr2;
+
+ if (sr->is_autocomp_active == 1) {
+- if (srid == SR1) {
+- /* Enable SR clk */
+- CM_FCLKEN_WKUP |= SR1_CLK_ENABLE;
+-
+- } else if (srid == SR2) {
+- /* Enable SR clk */
+- CM_FCLKEN_WKUP |= SR2_CLK_ENABLE;
+- }
+-
+ if (sr->is_sr_reset == 0) {
+
+ sr->is_sr_reset = 1;
+@@ -618,17 +733,18 @@ void disable_smartreflex(int srid)
+ sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE,
+ ~SRCONFIG_SRENABLE);
+
++ /* Disable SR clk */
++ sr_clk_disable(sr);
+ if (sr->srid == SR1) {
+- /* Disable SR clk */
+- CM_FCLKEN_WKUP &= ~SR1_CLK_ENABLE;
+- /* Enable VP1 */
+- PRM_VP1_CONFIG &= ~PRM_VP1_CONFIG_VPENABLE;
+-
++ /* Disable VP1 */
++ prm_clear_mod_reg_bits(PRM_VP1_CONFIG_VPENABLE,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VP1_CONFIG_OFFSET);
+ } else if (sr->srid == SR2) {
+- /* Disable SR clk */
+- CM_FCLKEN_WKUP &= ~SR2_CLK_ENABLE;
+- /* Enable VP2 */
+- PRM_VP2_CONFIG &= ~PRM_VP2_CONFIG_VPENABLE;
++ /* Disable VP2 */
++ prm_clear_mod_reg_bits(PRM_VP2_CONFIG_VPENABLE,
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VP2_CONFIG_OFFSET);
+ }
+ }
+ }
+@@ -638,7 +754,6 @@ void disable_smartreflex(int srid)
+ /* Voltage Scaling using SR VCBYPASS */
+ int sr_voltagescale_vcbypass(u32 target_opp, u8 vsel)
+ {
+- int ret;
+ int sr_status = 0;
+ u32 vdd, target_opp_no;
+ u32 vc_bypass_value;
+@@ -651,39 +766,53 @@ int sr_voltagescale_vcbypass(u32 target_opp, u8 vsel)
+ if (vdd == PRCM_VDD1) {
+ sr_status = sr_stop_vddautocomap(SR1);
+
+- PRM_VC_CMD_VAL_0 = (PRM_VC_CMD_VAL_0 & ~PRM_VC_CMD_ON_MASK) |
+- (vsel << PRM_VC_CMD_ON_SHIFT);
++ prm_rmw_mod_reg_bits(OMAP3430_VC_CMD_ON_MASK,
++ (vsel << OMAP3430_VC_CMD_ON_SHIFT),
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VC_CMD_VAL_0_OFFSET);
+ reg_addr = R_VDD1_SR_CONTROL;
+
+ } else if (vdd == PRCM_VDD2) {
+ sr_status = sr_stop_vddautocomap(SR2);
+
+- PRM_VC_CMD_VAL_1 = (PRM_VC_CMD_VAL_1 & ~PRM_VC_CMD_ON_MASK) |
+- (vsel << PRM_VC_CMD_ON_SHIFT);
++ prm_rmw_mod_reg_bits(OMAP3430_VC_CMD_ON_MASK,
++ (vsel << OMAP3430_VC_CMD_ON_SHIFT),
++ OMAP3430_GR_MOD,
++ OMAP3_PRM_VC_CMD_VAL_1_OFFSET);
+ reg_addr = R_VDD2_SR_CONTROL;
+ }
+
+- vc_bypass_value = (vsel << PRM_VC_BYPASS_DATA_SHIFT) |
+- (reg_addr << PRM_VC_BYPASS_REGADDR_SHIFT) |
+- (R_SRI2C_SLAVE_ADDR << PRM_VC_BYPASS_SLAVEADDR_SHIFT);
++ vc_bypass_value = (vsel << OMAP3430_DATA_SHIFT) |
++ (reg_addr << OMAP3430_REGADDR_SHIFT) |
++ (R_SRI2C_SLAVE_ADDR << OMAP3430_SLAVEADDR_SHIFT);
+
+- PRM_VC_BYPASS_VAL = vc_bypass_value;
++ prm_write_mod_reg(vc_bypass_value, OMAP3430_GR_MOD,
++ OMAP3_PRM_VC_BYPASS_VAL_OFFSET);
+
+- PRM_VC_BYPASS_VAL |= PRM_VC_BYPASS_VALID;
++ vc_bypass_value = prm_set_mod_reg_bits(OMAP3430_VALID, OMAP3430_GR_MOD,
++ OMAP3_PRM_VC_BYPASS_VAL_OFFSET);
+
+- DPRINTK("%s : PRM_VC_BYPASS_VAL %X\n", __func__, PRM_VC_BYPASS_VAL);
+- DPRINTK("PRM_IRQST_MPU %X\n", PRM_IRQSTATUS_MPU);
++ DPRINTK("%s : PRM_VC_BYPASS_VAL %X\n", __func__, vc_bypass_value);
++ DPRINTK("PRM_IRQST_MPU %X\n", prm_read_mod_reg(OCP_MOD,
++ OMAP3_PRM_IRQSTATUS_MPU_OFFSET));
+
+- while ((PRM_VC_BYPASS_VAL & PRM_VC_BYPASS_VALID) != 0x0) {
+- ret = loop_wait(&loop_cnt, &retries_cnt, 10);
+- if (ret != PRCM_PASS) {
++ while ((vc_bypass_value & OMAP3430_VALID) != 0x0) {
++ loop_cnt++;
++ if (retries_cnt > 10) {
+ printk(KERN_INFO "Loop count exceeded in check SR I2C"
+ "write\n");
+- return ret;
++ return SR_FAIL;
++ }
++ if (loop_cnt > 50) {
++ retries_cnt++;
++ loop_cnt = 0;
++ udelay(10);
+ }
++ vc_bypass_value = prm_read_mod_reg(OMAP3430_GR_MOD,
++ OMAP3_PRM_VC_BYPASS_VAL_OFFSET);
+ }
+
+- omap_udelay(T2_SMPS_UPDATE_DELAY);
++ udelay(T2_SMPS_UPDATE_DELAY);
+
+ if (sr_status) {
+ if (vdd == PRCM_VDD1)
+@@ -696,13 +825,15 @@ int sr_voltagescale_vcbypass(u32 target_opp, u8 vsel)
+ }
+
+ /* Sysfs interface to select SR VDD1 auto compensation */
+-static ssize_t omap_sr_vdd1_autocomp_show(struct kset *subsys, char *buf)
++static ssize_t omap_sr_vdd1_autocomp_show(struct kobject *kobj,
++ struct kobj_attribute *attr, char *buf)
+ {
+ return sprintf(buf, "%d\n", sr1.is_autocomp_active);
+ }
+
+-static ssize_t omap_sr_vdd1_autocomp_store(struct kset *subsys,
+- const char *buf, size_t n)
++static ssize_t omap_sr_vdd1_autocomp_store(struct kobject *kobj,
++ struct kobj_attribute *attr,
++ const char *buf, size_t n)
+ {
+ u32 current_vdd1opp_no;
+ unsigned short value;
+@@ -722,7 +853,7 @@ static ssize_t omap_sr_vdd1_autocomp_store(struct kset *subsys,
+ return n;
+ }
+
+-static struct subsys_attribute sr_vdd1_autocomp = {
++static struct kobj_attribute sr_vdd1_autocomp = {
+ .attr = {
+ .name = __stringify(sr_vdd1_autocomp),
+ .mode = 0644,
+@@ -732,13 +863,15 @@ static struct subsys_attribute sr_vdd1_autocomp = {
+ };
+
+ /* Sysfs interface to select SR VDD2 auto compensation */
+-static ssize_t omap_sr_vdd2_autocomp_show(struct kset *subsys, char *buf)
++static ssize_t omap_sr_vdd2_autocomp_show(struct kobject *kobj,
++ struct kobj_attribute *attr, char *buf)
+ {
+ return sprintf(buf, "%d\n", sr2.is_autocomp_active);
+ }
+
+-static ssize_t omap_sr_vdd2_autocomp_store(struct kset *subsys,
+- const char *buf, size_t n)
++static ssize_t omap_sr_vdd2_autocomp_store(struct kobject *kobj,
++ struct kobj_attribute *attr,
++ const char *buf, size_t n)
+ {
+ u32 current_vdd2opp_no;
+ unsigned short value;
+@@ -758,7 +891,7 @@ static ssize_t omap_sr_vdd2_autocomp_store(struct kset *subsys,
+ return n;
+ }
+
+-static struct subsys_attribute sr_vdd2_autocomp = {
++static struct kobj_attribute sr_vdd2_autocomp = {
+ .attr = {
+ .name = __stringify(sr_vdd2_autocomp),
+ .mode = 0644,
+@@ -774,15 +907,19 @@ static int __init omap3_sr_init(void)
+ int ret = 0;
+ u8 RdReg;
+
+-#ifdef CONFIG_ARCH_OMAP34XX
+- sr1.fck = clk_get(NULL, "sr1_fck");
+- if (IS_ERR(sr1.fck))
+- printk(KERN_ERR "Could not get sr1_fck\n");
+-
+- sr2.fck = clk_get(NULL, "sr2_fck");
+- if (IS_ERR(sr2.fck))
+- printk(KERN_ERR "Could not get sr2_fck\n");
+-#endif /* #ifdef CONFIG_ARCH_OMAP34XX */
++ if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
++ current_vdd1_opp = PRCM_VDD1_OPP3;
++ current_vdd2_opp = PRCM_VDD2_OPP3;
++ } else {
++ current_vdd1_opp = PRCM_VDD1_OPP1;
++ current_vdd2_opp = PRCM_VDD1_OPP1;
++ }
++ if (cpu_is_omap34xx()) {
++ sr_clk_get(&sr1);
++ sr_clk_get(&sr2);
++ }
++ sr_set_clk_length(&sr1);
++ sr_set_clk_length(&sr2);
+
+ /* Call the VPConfig, VCConfig, set N Values. */
+ sr_set_nvalues(&sr1);
+@@ -794,22 +931,24 @@ static int __init omap3_sr_init(void)
+ sr_configure_vc();
+
+ /* Enable SR on T2 */
+- ret = t2_in(PM_RECEIVER, &RdReg, R_DCDC_GLOBAL_CFG);
+- RdReg |= DCDC_GLOBAL_CFG_ENABLE_SRFLX;
+- ret |= t2_out(PM_RECEIVER, RdReg, R_DCDC_GLOBAL_CFG);
++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &RdReg,
++ R_DCDC_GLOBAL_CFG);
+
++ RdReg |= DCDC_GLOBAL_CFG_ENABLE_SRFLX;
++ ret |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, RdReg,
++ R_DCDC_GLOBAL_CFG);
+
+ printk(KERN_INFO "SmartReflex driver initialized\n");
+
+- ret = subsys_create_file(&power_subsys, &sr_vdd1_autocomp);
++ ret = sysfs_create_file(power_kobj, &sr_vdd1_autocomp.attr);
+ if (ret)
+- printk(KERN_ERR "subsys_create_file failed: %d\n", ret);
++ printk(KERN_ERR "sysfs_create_file failed: %d\n", ret);
+
+- ret = subsys_create_file(&power_subsys, &sr_vdd2_autocomp);
++ ret = sysfs_create_file(power_kobj, &sr_vdd2_autocomp.attr);
+ if (ret)
+- printk(KERN_ERR "subsys_create_file failed: %d\n", ret);
++ printk(KERN_ERR "sysfs_create_file failed: %d\n", ret);
+
+ return 0;
+ }
+
+-arch_initcall(omap3_sr_init);
++late_initcall(omap3_sr_init);
+diff --git a/arch/arm/mach-omap2/smartreflex.h b/arch/arm/mach-omap2/smartreflex.h
+index 2091a15..194429e 100644
+--- a/arch/arm/mach-omap2/smartreflex.h
++++ b/arch/arm/mach-omap2/smartreflex.h
+@@ -233,12 +233,18 @@
+ extern u32 current_vdd1_opp;
+ extern u32 current_vdd2_opp;
+
++#ifdef CONFIG_OMAP_SMARTREFLEX_TESTING
++#define SR_TESTING_NVALUES 1
++#else
++#define SR_TESTING_NVALUES 0
++#endif
++
+ /*
+ * Smartreflex module enable/disable interface.
+ * NOTE: if smartreflex is not enabled from sysfs, these functions will not
+ * do anything.
+ */
+-#if defined(CONFIG_ARCH_OMAP34XX) && defined(CONFIG_TWL4030_CORE)
++#ifdef CONFIG_OMAP_SMARTREFLEX
+ void enable_smartreflex(int srid);
+ void disable_smartreflex(int srid);
+ #else
+@@ -246,7 +252,6 @@ static inline void enable_smartreflex(int srid) {}
+ static inline void disable_smartreflex(int srid) {}
+ #endif
+
+-
+ #endif
+
+
+diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
+index b085b07..960c13f 100644
+--- a/arch/arm/plat-omap/Kconfig
++++ b/arch/arm/plat-omap/Kconfig
+@@ -56,6 +56,37 @@ config OMAP_DEBUG_CLOCKDOMAIN
+ for every clockdomain register write. However, the
+ extra detail costs some memory.
+
++config OMAP_SMARTREFLEX
++ bool "SmartReflex support"
++ depends on ARCH_OMAP34XX && TWL4030_CORE
++ help
++ Say Y if you want to enable SmartReflex.
++
++ SmartReflex can perform continuous dynamic voltage
++ scaling around the nominal operating point voltage
++ according to silicon characteristics and operating
++ conditions. Enabling SmartReflex reduces power
++ consumption.
++
++ Please note, that by default SmartReflex is only
++ initialized. To enable the automatic voltage
++ compensation for VDD1 and VDD2, user must write 1 to
++ /sys/power/sr_vddX_autocomp, where X is 1 or 2.
++
++config OMAP_SMARTREFLEX_TESTING
++ bool "Smartreflex testing support"
++ depends on OMAP_SMARTREFLEX
++ default n
++ help
++ Say Y if you want to enable SmartReflex testing with SW hardcoded
++ NVALUES intead of E-fuse NVALUES set in factory silicon testing.
++
++ In some devices the E-fuse values have not been set, even though
++ SmartReflex modules are included. Using these hardcoded values set
++ in software, one can test the SmartReflex features without E-fuse.
++
++ WARNING: Enabling this option may cause your device to hang!
++
+ config OMAP_RESET_CLOCKS
+ bool "Reset unused clocks during boot"
+ depends on ARCH_OMAP
+--
+1.5.4.3
diff --git a/packages/linux/linux-omap2-git/omap3evm/defconfig b/packages/linux/linux-omap2-git/omap3evm/defconfig
new file mode 100644
index 0000000000..f74cef90ee
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/defconfig
@@ -0,0 +1,1567 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.26-rc3-omap1
+# Wed May 21 07:38:41 2008
+#
+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_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+CONFIG_LSF=y
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# 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_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 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=y
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# TI OMAP Implementations
+#
+CONFIG_ARCH_OMAP_OTG=y
+# CONFIG_ARCH_OMAP1 is not set
+# CONFIG_ARCH_OMAP2 is not set
+CONFIG_ARCH_OMAP3=y
+
+#
+# OMAP Feature Selections
+#
+CONFIG_OMAP_DEBUG_SRAM_PATCH=y
+# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
+# CONFIG_OMAP_RESET_CLOCKS is not set
+CONFIG_OMAP_BOOT_TAG=y
+CONFIG_OMAP_BOOT_REASON=y
+# CONFIG_OMAP_COMPONENT_VERSION is not set
+# CONFIG_OMAP_GPIO_SWITCH is not set
+# CONFIG_OMAP_MUX is not set
+CONFIG_OMAP_MCBSP=y
+# CONFIG_OMAP_MMU_FWK is not set
+# CONFIG_OMAP_MBOX_FWK is not set
+# CONFIG_OMAP_MPU_TIMER is not set
+CONFIG_OMAP_32K_TIMER=y
+CONFIG_OMAP_32K_TIMER_HZ=128
+CONFIG_OMAP_DM_TIMER=y
+# CONFIG_OMAP_LL_DEBUG_UART1 is not set
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+CONFIG_OMAP_LL_DEBUG_UART3=y
+CONFIG_ARCH_OMAP34XX=y
+CONFIG_ARCH_OMAP3430=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_OMAP_LDP is not set
+# CONFIG_MACH_OMAP_3430SDP is not set
+CONFIG_MACH_OMAP3EVM=y
+# CONFIG_MACH_OMAP3_BEAGLE is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_V7=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_PABRT_IFAR=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_ARM_THUMBEE is not set
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_LOCKDOWN_TO_64K_L2 is not set
+# CONFIG_CPU_LOCKDOWN_TO_128K_L2 is not set
+CONFIG_CPU_LOCKDOWN_TO_256K_L2=y
+# CONFIG_CPU_L2CACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_HAS_TLS_REG=y
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=128
+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_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=" quiet "
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+# CONFIG_NEON is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP 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=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE 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=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
+# 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_CAN 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 is not set
+# CONFIG_BT_HCIBTUSB is not set
+CONFIG_BT_HCIBTSDIO=m
+# CONFIG_BT_HCIUART is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIBRF6150 is not set
+# CONFIG_BT_HCIH4P is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+CONFIG_CFG80211=m
+CONFIG_NL80211=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_MAC80211=m
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_NONE is not set
+
+#
+# Selecting 'y' for an algorithm will
+#
+
+#
+# build the algorithm into mac80211.
+#
+CONFIG_MAC80211_RC_DEFAULT="pid"
+CONFIG_MAC80211_RC_PID=y
+# CONFIG_MAC80211_MESH is not set
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT 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 is not set
+# CONFIG_IEEE80211_CRYPT_TKIP is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=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=y
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+CONFIG_MTD_OMAP_NOR=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+CONFIG_MTD_ONENAND=y
+CONFIG_MTD_ONENAND_VERIFY_WRITE=y
+# CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
+# CONFIG_MTD_ONENAND_OTP is not set
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_SIM 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=16384
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+CONFIG_EEPROM_93CX6=m
+# CONFIG_OMAP_STI is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+CONFIG_NETDEVICES_MULTIQUEUE=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+CONFIG_SMC911X=y
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_LIBERTAS=m
+# CONFIG_LIBERTAS_USB is not set
+CONFIG_LIBERTAS_SDIO=m
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_RTL8187 is not set
+CONFIG_P54_COMMON=m
+# CONFIG_P54_USB is not set
+# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+# CONFIG_B43 is not set
+# CONFIG_B43LEGACY is not set
+# CONFIG_ZD1211RW is not set
+# CONFIG_RT2X00 is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_ZAURUS=m
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+CONFIG_PPPOL2TP=m
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=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_TSC2005 is not set
+# CONFIG_TOUCHSCREEN_TSC2102 is not set
+# CONFIG_TOUCHSCREEN_TSC210X 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 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_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=32
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=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=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_ISP1301_OMAP is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_TLV320AIC23 is not set
+CONFIG_TWL4030_CORE=y
+CONFIG_TWL4030_GPIO=y
+# CONFIG_TWL4030_MADC is not set
+CONFIG_TWL4030_USB=y
+CONFIG_TWL4030_USB_HS_ULPI=y
+# CONFIG_TWL4030_PWRBUTTON is not set
+# CONFIG_TWL4030_POWEROFF is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_LP5521 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+CONFIG_SPI_DEBUG=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_SPI_OMAP24XX=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_TSC2101 is not set
+# CONFIG_SPI_TSC2102 is not set
+# CONFIG_SPI_TSC210X is not set
+# CONFIG_SPI_TSC2301 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+# CONFIG_DEBUG_GPIO is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_OMAP_WATCHDOG=y
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_FB_OMAP=y
+# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_LOGO 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 is not set
+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=y
+CONFIG_SND_PCM_XRUN_DEBUG=y
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_OMAP_AIC23 is not set
+# CONFIG_SND_OMAP_TSC2101 is not set
+# CONFIG_SND_SX1 is not set
+# CONFIG_SND_OMAP_TSC2102 is not set
+# CONFIG_SND_OMAP24XX_EAC is not set
+
+#
+# SPI devices
+#
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=y
+
+#
+# ALSA SoC audio for Freescale SOCs
+#
+
+#
+# SoC Audio for the Texas Instruments OMAP
+#
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_MCBSP=y
+CONFIG_SND_OMAP_SOC_OMAP3EVM=y
+CONFIG_SND_SOC_TWL4030=y
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=y
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW 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=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_OMAP_EHCI_PHY_MODE=y
+# CONFIG_OMAP_EHCI_TLL_MODE is not set
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_ISP116X_HCD=y
+# CONFIG_USB_ISP1760_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=y
+CONFIG_USB_R8A66597_HCD=y
+CONFIG_USB_MUSB_HDRC=m
+CONFIG_USB_MUSB_SOC=y
+
+#
+# OMAP 343x high speed USB support
+#
+CONFIG_USB_MUSB_HOST=y
+# CONFIG_USB_MUSB_PERIPHERAL is not set
+# CONFIG_USB_MUSB_OTG is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+CONFIG_USB_MUSB_HDRC_HCD=y
+# CONFIG_MUSB_PIO_ONLY is not set
+CONFIG_USB_INVENTRA_DMA=y
+# CONFIG_USB_TI_CPPI_DMA is not set
+CONFIG_USB_MUSB_LOGLEVEL=0
+
+#
+# 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_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_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_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+CONFIG_USB_GADGET=m
+# 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_ATMEL_USBA 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_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+CONFIG_USB_GADGET_OMAP=y
+CONFIG_USB_OMAP=m
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_USB_G_PRINTER=m
+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
+CONFIG_SDIO_UART=m
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_OMAP_HS=y
+# CONFIG_MMC_SPI is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+CONFIG_RTC_DRV_TWL4030=y
+# CONFIG_RTC_DRV_S35390A is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_UIO is not set
+
+#
+# CBUS support
+#
+# CONFIG_CBUS 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 is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_XFS_FS=m
+CONFIG_XFS_QUOTA=y
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
+CONFIG_PRINT_QUOTA_WARNING=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+# CONFIG_NTFS_RW is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# 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=m
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+# CONFIG_NFS_FS 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=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+CONFIG_MAC_PARTITION=y
+CONFIG_MSDOS_PARTITION=y
+CONFIG_BSD_DISKLABEL=y
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 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=m
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+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_OBJECTS 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=y
+# 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_WRITECOUNT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=y
+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-omap2-git/omap3evm/no-harry-potter.diff b/packages/linux/linux-omap2-git/omap3evm/no-harry-potter.diff
new file mode 100644
index 0000000000..2bb20ab9c0
--- /dev/null
+++ b/packages/linux/linux-omap2-git/omap3evm/no-harry-potter.diff
@@ -0,0 +1,11 @@
+--- /tmp/Makefile 2008-04-24 14:36:20.509598016 +0200
++++ git/arch/arm/Makefile 2008-04-24 14:36:31.949546584 +0200
+@@ -47,7 +47,7 @@
+ # Note that GCC does not numerically define an architecture version
+ # macro, but instead defines a whole series of macros which makes
+ # testing for a specific architecture or later rather impossible.
+-arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7a,-march=armv5t -Wa$(comma)-march=armv7a)
++arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
+ arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
+ # Only override the compiler option if ARMv6. The ARMv6K extensions are
+ # always available in ARMv7
diff --git a/packages/linux/linux-omap2_git.bb b/packages/linux/linux-omap2_git.bb
index f128d9cc8f..176bf0cd83 100644
--- a/packages/linux/linux-omap2_git.bb
+++ b/packages/linux/linux-omap2_git.bb
@@ -2,24 +2,33 @@ require linux-omap.inc
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap2-git/${MACHINE}"
-SRCREV = "41c13615e46ed02a1aaafcc267603be8ea5244e9"
+SRCREV = "050684c18f2ea0b08fdd5233a0cd3c7f96e00a0e"
-PV = "2.6.25+2.6.26-rc3+git${SRCREV}"
-PR = "r16"
+PV = "2.6.25+2.6.26-rc8+${PR}+git${SRCREV}"
+PR = "r31"
SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;protocol=git \
- file://00001-mcbsp-transform.patch;patch=1 \
- file://00002-mcbsp-omap1.patch;patch=1 \
- file://00003-mcbsp-omap3-clock.patch;patch=1 \
- file://00004-omap2-mcbsp.patch;patch=1 \
- file://0001-ASoC-OMAP-Add-basic-support-for-OMAP34xx-in-McBSP.patch;patch=1 \
file://defconfig"
SRC_URI_append_beagleboard = " file://no-harry-potter.diff;patch=1 \
+ file://0001-ASoC-OMAP-Add-basic-support-for-OMAP34xx-in-McBSP.patch;patch=1 \
+ file://flash.patch;patch=1 \
+ file://0001-omap3-cpuidle.patch;patch=1 \
+ file://0002-omap3-cpuidle.patch;patch=1 \
+ file://timer-suppression.patch;patch=1 \
+ file://soc.patch;patch=1 \
+ file://16bpp.patch;patch=1 \
+"
+
+SRC_URI_append_omap3evm = " file://no-harry-potter.diff;patch=1 \
+ file://0001-ASoC-OMAP-Add-basic-support-for-OMAP34xx-in-McBSP.patch;patch=1 \
+ file://0001-omap3-cpuidle.patch;patch=1 \
+ file://0002-omap3-cpuidle.patch;patch=1 \
"
-COMPATIBLE_MACHINE = "omap2430sdp|omap2420h4|beagleboard"
+
+COMPATIBLE_MACHINE = "omap2430sdp|omap2420h4|beagleboard|omap3evm"
S = "${WORKDIR}/git"
diff --git a/packages/linux/linux-openezx-devel_svn.bb b/packages/linux/linux-openezx-devel_svn.bb
new file mode 100644
index 0000000000..34daac007c
--- /dev/null
+++ b/packages/linux/linux-openezx-devel_svn.bb
@@ -0,0 +1,63 @@
+DESCRIPTION = "OpenEZX 2.6 Linux Development Kernel for the Motorola EZX GSM phones"
+AUTHOR = "The OpenEZX Team <openezx-devel@lists.openezx.org>"
+HOMEPAGE = "http://www.openezx.org"
+
+DEFAULT_PREFERENCE = "-1"
+
+require linux.inc
+
+RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
+
+KERNEL_RELEASE = "2.6.24"
+KERNEL_PATCHES = "kernel-2.6.24.x-patches"
+PV = "${KERNEL_RELEASE}+svnr${SRCREV}"
+PR = "r0"
+
+SRC_URI = "\
+ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${KERNEL_RELEASE}.tar.bz2 \
+ svn://svn.openezx.org/branches;module=${KERNEL_PATCHES};proto=http \
+# file://logo_linux_clut224.ppm \
+"
+S = "${WORKDIR}/linux-${KERNEL_RELEASE}"
+
+
+##############################################################
+# kernel image resides on a seperate flash partition (for now)
+# But we can flash it from userspace (flash_unlock /dev/mtdX && flash_eraseall /dev/mtdX && flashcp /boot/zImage /dev/mtdX)
+# so lets make a package of it. What about a postinst that flashes the new kernel?
+
+COMPATIBLE_HOST = "arm.*-linux"
+COMPATIBLE_MACHINE = '(a780|e680|a1200|rorkre2|rokre6)'
+
+# For now the code for serial console is disabled in compress.c
+#CMDLINE_CON = "console=ttyS2,115200n8 console=tty1 "
+CMDLINE_CON = "console=tty1 "
+
+CMDLINE_ROOT = "root=/dev/mmcblk0p2 rootfstype=ext2 rootwait=1"
+CMDLINE_NFSROOT = "root=/dev/nfs rootfstype=nfs nfsroot=192.168.0.200:/export/ezx-image rootdelay=1 "
+# Uncomment to enable dyntick
+#CMDLINE_OTHER = "dyntick=enable"
+CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}'
+CMDLINE_IP = "ip=192.168.0.202:192.168.0.200:192.168.0.200:255.255.255.0"
+CMDLINE_MEM = "mem=32M@0xA0000000 mem=16M@0xAC000000"
+CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG} ${CMDLINE_MEM}"
+# Uncomment to use root-over-nfs-over-usb
+#CMDLINE_NFSROOT_USB = "${CMDLINE_CON} ${CMDLINE_NFSROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG} ${CMDLINE_MEM}"
+
+# 1024x1024 once was the maximum kernel size for boot-over-usb -- is it still?
+#KERNEL_IMAGE_MAXSIZE = "1294336"
+
+###############################################################
+# module configs specific to this kernel
+#
+#module_autoload_pxaficp_ir = "pxaficp_ir"
+#module_autoload_snd-pcm-oss = "snd-pcm-oss"
+
+do_prepatch() {
+ mv ${WORKDIR}/${KERNEL_PATCHES}/defconfig-${MACHINE} ${WORKDIR}/defconfig
+ mv ${WORKDIR}/${KERNEL_PATCHES} ${S}/patches && cd ${S} && quilt push -av
+ mv patches patches.openezx
+ mv .pc .pc.old
+}
+
+addtask prepatch after do_unpack before do_patch
diff --git a/packages/linux/linux-openmoko-devel/.mtn2git_empty b/packages/linux/linux-openmoko-devel/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-openmoko-devel/.mtn2git_empty
diff --git a/packages/linux/linux-openmoko-devel/defconfig-om-gta01 b/packages/linux/linux-openmoko-devel/defconfig-om-gta01
new file mode 100644
index 0000000000..4dd9b12eff
--- /dev/null
+++ b/packages/linux/linux-openmoko-devel/defconfig-om-gta01
@@ -0,0 +1,1767 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Mon Feb 25 07:03:56 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+# CONFIG_GENERIC_CLOCKEVENTS is not set
+CONFIG_MMU=y
+CONFIG_NO_IOPORT=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_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_FIQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_FAIR_GROUP_SCHED is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS 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_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_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=m
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=m
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX 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 is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+CONFIG_ARCH_S3C2410=y
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+CONFIG_PLAT_S3C24XX=y
+CONFIG_CPU_S3C244X=y
+CONFIG_S3C2410_DMA=y
+# CONFIG_S3C2410_DMA_DEBUG is not set
+CONFIG_MACH_SMDK=y
+CONFIG_MACH_NEO1973=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 is not set
+# CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_S3C_LOWLEVEL_UART_PORT=0
+
+#
+# S3C2400 Machines
+#
+CONFIG_CPU_S3C2410=y
+CONFIG_CPU_S3C2410_DMA=y
+CONFIG_S3C2410_PM=y
+CONFIG_S3C2410_GPIO=y
+CONFIG_S3C2410_CLOCK=y
+CONFIG_S3C2410_PWM=y
+
+#
+# S3C2410 Machines
+#
+# CONFIG_ARCH_SMDK2410 is not set
+# CONFIG_ARCH_H1940 is not set
+# CONFIG_MACH_N30 is not set
+# CONFIG_ARCH_BAST is not set
+# CONFIG_MACH_OTOM is not set
+# CONFIG_MACH_AML_M5900 is not set
+# CONFIG_MACH_VR1000 is not set
+CONFIG_MACH_QT2410=y
+CONFIG_MACH_NEO1973_GTA01=y
+
+#
+# S3C2412 Machines
+#
+# CONFIG_MACH_SMDK2413 is not set
+# CONFIG_MACH_SMDK2412 is not set
+# CONFIG_MACH_VSTMS is not set
+CONFIG_CPU_S3C2440=y
+CONFIG_S3C2440_DMA=y
+CONFIG_S3C2440_C_FIQ=y
+
+#
+# S3C2440 Machines
+#
+# CONFIG_MACH_ANUBIS is not set
+# CONFIG_MACH_OSIRIS is not set
+# CONFIG_MACH_RX3715 is not set
+CONFIG_ARCH_S3C2440=y
+# CONFIG_MACH_NEXCODER_2440 is not set
+CONFIG_SMDK2440_CPU2440=y
+# CONFIG_MACH_HXD8 is not set
+CONFIG_MACH_NEO1973_GTA02=y
+# CONFIG_NEO1973_GTA02_2440 is not set
+CONFIG_CPU_S3C2442=y
+
+#
+# S3C2442 Machines
+#
+CONFIG_SMDK2440_CPU2442=y
+
+#
+# S3C2443 Machines
+#
+# CONFIG_MACH_SMDK2443 is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM920T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=200
+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_SPARSEMEM_VMEMMAP_ENABLE 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="unused -- bootloader passes ATAG list"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+CONFIG_PM_DEBUG=y
+# CONFIG_PM_VERBOSE 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=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+CONFIG_XFRM_MIGRATE=y
+CONFIG_NET_KEY=m
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+# CONFIG_IP_ROUTE_MULTIPATH is not set
+# CONFIG_IP_ROUTE_VERBOSE is not set
+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=m
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+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=y
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+# CONFIG_NF_CT_PROTO_UDPLITE is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_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_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+# CONFIG_IP_NF_MATCH_RECENT is not set
+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 is not set
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_HL=m
+# CONFIG_IP6_NF_RAW is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+CONFIG_NET_SCHED=y
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+# CONFIG_NET_SCH_RR is not set
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_EMATCH is not set
+# CONFIG_NET_CLS_ACT is not set
+# CONFIG_NET_CLS_POLICE is not set
+# CONFIG_NET_CLS_IND 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=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_HCIBTSDIO is not set
+# CONFIG_BT_HCIUART is not set
+# 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
+CONFIG_FIB_RULES=y
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# 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_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=m
+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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+CONFIG_MTD_ABSENT=y
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR 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=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=y
+CONFIG_MTD_NAND_S3C2410=y
+# CONFIG_MTD_NAND_S3C2410_DEBUG is not set
+CONFIG_MTD_NAND_S3C2410_HWECC=y
+# CONFIG_MTD_NAND_S3C2410_CLKSTOP is not set
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_PNP=y
+CONFIG_PNP_DEBUG=y
+
+#
+# Protocols
+#
+# CONFIG_PNPACPI is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_UB=m
+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_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_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=m
+# CONFIG_VETH is not set
+# CONFIG_NET_SB1000 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 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+CONFIG_NET_PCI=y
+# CONFIG_B44 is not set
+CONFIG_CS89x0=m
+# 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=y
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_ZAURUS=m
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# 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=480
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=m
+
+#
+# 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=m
+CONFIG_KEYBOARD_GPIO=m
+CONFIG_KEYBOARD_NEO1973=y
+CONFIG_KEYBOARD_QT2410=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 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_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
+# 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 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+CONFIG_INPUT_LIS302DL=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_NR_TTY_DEVICES=4
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_S3C2410=y
+CONFIG_SERIAL_S3C2410_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# 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=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_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# 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
+
+#
+# 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_PCF50606=y
+CONFIG_SENSORS_PCF50633=y
+# 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_SENSORS_TSL256X=m
+# 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_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_S3C24XX=y
+CONFIG_SPI_S3C24XX_GPIO=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 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_BQ27000_HDQ=y
+CONFIG_GTA02_HDQ=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_S3C2410_WATCHDOG=m
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_MFD_GLAMO=y
+CONFIG_MFD_GLAMO_FB=y
+CONFIG_MFD_GLAMO_SPI_GPIO=y
+CONFIG_MFD_GLAMO_SPI_FB=y
+CONFIG_MFD_GLAMO_MCI=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_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_UVESA is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_S3C2410=y
+# CONFIG_FB_S3C2410_DEBUG is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_LTV350QV is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_GTA01=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+CONFIG_DISPLAY_JBT6K74=y
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+CONFIG_FONT_6x11=y
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# 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_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
+#
+
+#
+# SPI devices
+#
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_S3C24XX_SOC=m
+CONFIG_SND_S3C24XX_SOC_I2S=m
+CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=m
+CONFIG_SND_S3C24XX_SOC_NEO1973_GTA02_WM8753=m
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM8753=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE 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=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# 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=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_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=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+# CONFIG_USB_STORAGE_ISD200 is not set
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_STORAGE_KARMA=y
+CONFIG_USB_LIBUSUAL=y
+
+#
+# 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_CH341 is not set
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP2101=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_FUNSOFT=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX 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=m
+# 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=m
+CONFIG_USB_IOWARRIOR=m
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX 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
+CONFIG_USB_GADGET_S3C2410=y
+CONFIG_USB_S3C2410=y
+# CONFIG_USB_S3C2410_DEBUG 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=y
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+
+#
+# SDIO support
+#
+CONFIG_SDIO=y
+CONFIG_SDIO_S3C24XX=y
+CONFIG_SDIO_S3C24XX_DMA=y
+CONFIG_SDIO_AR6000_WLAN=y
+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
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+# CONFIG_MMC_SPI is not set
+CONFIG_MMC_S3C=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_S3C24XX=m
+# CONFIG_LEDS_GPIO is not set
+CONFIG_LEDS_NEO1973_VIBRATOR=y
+CONFIG_LEDS_NEO1973_GTA02=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_S3C=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=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=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_YAFFS_FS=y
+CONFIG_YAFFS_YAFFS1=y
+CONFIG_YAFFS_9BYTE_TAGS=y
+CONFIG_YAFFS_YAFFS2=y
+CONFIG_YAFFS_AUTO_YAFFS2=y
+# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
+CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
+# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
+# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
+CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+# 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=m
+CONFIG_NLS_CODEPAGE_950=m
+# 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=m
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+CONFIG_DEBUG_S3C_UART=0
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+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
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-openmoko-devel/defconfig-om-gta02 b/packages/linux/linux-openmoko-devel/defconfig-om-gta02
new file mode 100644
index 0000000000..eaa62e624f
--- /dev/null
+++ b/packages/linux/linux-openmoko-devel/defconfig-om-gta02
@@ -0,0 +1,1766 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Mon Feb 25 07:03:56 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+# CONFIG_GENERIC_CLOCKEVENTS is not set
+CONFIG_MMU=y
+CONFIG_NO_IOPORT=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_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_FIQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_FAIR_GROUP_SCHED is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS 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_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_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=m
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=m
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX 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 is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+CONFIG_ARCH_S3C2410=y
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+CONFIG_PLAT_S3C24XX=y
+CONFIG_CPU_S3C244X=y
+CONFIG_S3C2410_DMA=y
+# CONFIG_S3C2410_DMA_DEBUG is not set
+CONFIG_MACH_SMDK=y
+CONFIG_MACH_NEO1973=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_CHECK is not set
+CONFIG_S3C_LOWLEVEL_UART_PORT=2
+
+#
+# S3C2400 Machines
+#
+CONFIG_CPU_S3C2410=y
+CONFIG_CPU_S3C2410_DMA=y
+CONFIG_S3C2410_PM=y
+CONFIG_S3C2410_GPIO=y
+CONFIG_S3C2410_CLOCK=y
+CONFIG_S3C2410_PWM=y
+
+#
+# S3C2410 Machines
+#
+# CONFIG_ARCH_SMDK2410 is not set
+# CONFIG_ARCH_H1940 is not set
+# CONFIG_MACH_N30 is not set
+# CONFIG_ARCH_BAST is not set
+# CONFIG_MACH_OTOM is not set
+# CONFIG_MACH_AML_M5900 is not set
+# CONFIG_MACH_VR1000 is not set
+CONFIG_MACH_QT2410=y
+CONFIG_MACH_NEO1973_GTA01=y
+
+#
+# S3C2412 Machines
+#
+# CONFIG_MACH_SMDK2413 is not set
+# CONFIG_MACH_SMDK2412 is not set
+# CONFIG_MACH_VSTMS is not set
+CONFIG_CPU_S3C2440=y
+CONFIG_S3C2440_DMA=y
+CONFIG_S3C2440_C_FIQ=y
+
+#
+# S3C2440 Machines
+#
+# CONFIG_MACH_ANUBIS is not set
+# CONFIG_MACH_OSIRIS is not set
+# CONFIG_MACH_RX3715 is not set
+CONFIG_ARCH_S3C2440=y
+# CONFIG_MACH_NEXCODER_2440 is not set
+CONFIG_SMDK2440_CPU2440=y
+# CONFIG_MACH_HXD8 is not set
+CONFIG_MACH_NEO1973_GTA02=y
+# CONFIG_NEO1973_GTA02_2440 is not set
+CONFIG_CPU_S3C2442=y
+
+#
+# S3C2442 Machines
+#
+CONFIG_SMDK2440_CPU2442=y
+
+#
+# S3C2443 Machines
+#
+# CONFIG_MACH_SMDK2443 is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM920T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=200
+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_SPARSEMEM_VMEMMAP_ENABLE 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="unused -- bootloader passes ATAG list"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+CONFIG_PM_DEBUG=y
+# CONFIG_PM_VERBOSE 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=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+CONFIG_XFRM_MIGRATE=y
+CONFIG_NET_KEY=m
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+# CONFIG_IP_ROUTE_MULTIPATH is not set
+# CONFIG_IP_ROUTE_VERBOSE is not set
+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=m
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+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=y
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+# CONFIG_NF_CT_PROTO_UDPLITE is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_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_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+# CONFIG_IP_NF_MATCH_RECENT is not set
+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 is not set
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_HL=m
+# CONFIG_IP6_NF_RAW is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+CONFIG_NET_SCHED=y
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+# CONFIG_NET_SCH_RR is not set
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_EMATCH is not set
+# CONFIG_NET_CLS_ACT is not set
+# CONFIG_NET_CLS_POLICE is not set
+# CONFIG_NET_CLS_IND 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=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_HCIBTSDIO is not set
+# CONFIG_BT_HCIUART is not set
+# 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
+CONFIG_FIB_RULES=y
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# 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_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=m
+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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+CONFIG_MTD_ABSENT=y
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR 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=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=y
+CONFIG_MTD_NAND_S3C2410=y
+# CONFIG_MTD_NAND_S3C2410_DEBUG is not set
+CONFIG_MTD_NAND_S3C2410_HWECC=y
+# CONFIG_MTD_NAND_S3C2410_CLKSTOP is not set
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_PNP=y
+CONFIG_PNP_DEBUG=y
+
+#
+# Protocols
+#
+# CONFIG_PNPACPI is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_UB=m
+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_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_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=m
+# CONFIG_VETH is not set
+# CONFIG_NET_SB1000 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 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+CONFIG_NET_PCI=y
+# CONFIG_B44 is not set
+CONFIG_CS89x0=m
+# 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=y
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_ZAURUS=m
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# 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=480
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=m
+
+#
+# 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=m
+CONFIG_KEYBOARD_GPIO=m
+CONFIG_KEYBOARD_NEO1973=y
+CONFIG_KEYBOARD_QT2410=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 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_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
+# 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 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+CONFIG_INPUT_LIS302DL=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_NR_TTY_DEVICES=4
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_S3C2410=y
+CONFIG_SERIAL_S3C2410_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# 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=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_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# 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
+
+#
+# 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_PCF50606=y
+CONFIG_SENSORS_PCF50633=y
+# 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_SENSORS_TSL256X=m
+# 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_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_S3C24XX=y
+CONFIG_SPI_S3C24XX_GPIO=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 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_BQ27000_HDQ=y
+CONFIG_GTA02_HDQ=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_S3C2410_WATCHDOG=m
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_MFD_GLAMO=y
+CONFIG_MFD_GLAMO_FB=y
+CONFIG_MFD_GLAMO_SPI_GPIO=y
+CONFIG_MFD_GLAMO_SPI_FB=y
+CONFIG_MFD_GLAMO_MCI=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_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_UVESA is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_S3C2410=y
+# CONFIG_FB_S3C2410_DEBUG is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_LTV350QV is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_GTA01=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+CONFIG_DISPLAY_JBT6K74=y
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+CONFIG_FONT_6x11=y
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# 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_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
+#
+
+#
+# SPI devices
+#
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_S3C24XX_SOC=m
+CONFIG_SND_S3C24XX_SOC_I2S=m
+CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=m
+CONFIG_SND_S3C24XX_SOC_NEO1973_GTA02_WM8753=m
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM8753=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE 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=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# 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=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_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=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+# CONFIG_USB_STORAGE_ISD200 is not set
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_STORAGE_KARMA=y
+CONFIG_USB_LIBUSUAL=y
+
+#
+# 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_CH341 is not set
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP2101=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_FUNSOFT=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX 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=m
+# 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=m
+CONFIG_USB_IOWARRIOR=m
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX 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
+CONFIG_USB_GADGET_S3C2410=y
+CONFIG_USB_S3C2410=y
+# CONFIG_USB_S3C2410_DEBUG 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=y
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+
+#
+# SDIO support
+#
+CONFIG_SDIO=y
+CONFIG_SDIO_S3C24XX=y
+CONFIG_SDIO_S3C24XX_DMA=y
+CONFIG_SDIO_AR6000_WLAN=y
+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
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+# CONFIG_MMC_SPI is not set
+CONFIG_MMC_S3C=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_S3C24XX=m
+# CONFIG_LEDS_GPIO is not set
+CONFIG_LEDS_NEO1973_VIBRATOR=y
+CONFIG_LEDS_NEO1973_GTA02=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_S3C=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=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=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_YAFFS_FS=y
+CONFIG_YAFFS_YAFFS1=y
+CONFIG_YAFFS_9BYTE_TAGS=y
+CONFIG_YAFFS_YAFFS2=y
+CONFIG_YAFFS_AUTO_YAFFS2=y
+# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
+CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
+# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
+# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
+CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+# 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=m
+CONFIG_NLS_CODEPAGE_950=m
+# 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=m
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+CONFIG_DEBUG_S3C_UART=2
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+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
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-openmoko-devel/del-hardcoded-led-behaviour.patch b/packages/linux/linux-openmoko-devel/del-hardcoded-led-behaviour.patch
new file mode 100644
index 0000000000..b2d091adbe
--- /dev/null
+++ b/packages/linux/linux-openmoko-devel/del-hardcoded-led-behaviour.patch
@@ -0,0 +1,16 @@
+Index: git/arch/arm/mach-s3c2440/mach-gta02.c
+===================================================================
+--- git.orig/arch/arm/mach-s3c2440/mach-gta02.c
++++ git/arch/arm/mach-s3c2440/mach-gta02.c
+@@ -471,11 +471,9 @@ static int pmu_callback(struct device *d
+ break;
+ case PMU_EVT_CHARGER_IDLE:
+ /* printk(KERN_ERR"PMU_EVT_CHARGER_IDLE\n"); */
+- neo1973_gpb_setpin(GTA02_GPIO_AUX_LED, 0);
+ break;
+ case PMU_EVT_CHARGER_ACTIVE:
+ /* printk(KERN_ERR"PMU_EVT_CHARGER_ACTIVE\n"); */
+- neo1973_gpb_setpin(GTA02_GPIO_AUX_LED, 1);
+ break;
+ default:
+ break;
diff --git a/packages/linux/linux-openmoko-devel/fix-defconfig-gta01.patch b/packages/linux/linux-openmoko-devel/fix-defconfig-gta01.patch
new file mode 100644
index 0000000000..ccf7dfd233
--- /dev/null
+++ b/packages/linux/linux-openmoko-devel/fix-defconfig-gta01.patch
@@ -0,0 +1,30 @@
+diff -Nru a/defconfig-2.6.24 b/defconfig-2.6.24
+--- a/defconfig-2.6.24 2008-06-15 19:24:36.000000000 +0200
++++ b/defconfig-2.6.24 2008-06-15 19:24:56.000000000 +0200
+@@ -163,7 +163,7 @@
+ #
+ # CONFIG_S3C2410_PM_DEBUG is not set
+ # CONFIG_S3C2410_PM_CHECK is not set
+-CONFIG_S3C_LOWLEVEL_UART_PORT=2
++CONFIG_S3C_LOWLEVEL_UART_PORT=0
+
+ #
+ # S3C2400 Machines
+@@ -726,7 +726,7 @@
+ # CONFIG_MTD_NAND_MUSEUM_IDS is not set
+ CONFIG_MTD_NAND_IDS=y
+ CONFIG_MTD_NAND_S3C2410=y
+-CONFIG_MTD_NAND_S3C2410_DEBUG=y
++# CONFIG_MTD_NAND_S3C2410_DEBUG is not set
+ CONFIG_MTD_NAND_S3C2410_HWECC=y
+ # CONFIG_MTD_NAND_S3C2410_CLKSTOP is not set
+ # CONFIG_MTD_NAND_DISKONCHIP is not set
+@@ -1757,7 +1757,7 @@
+ # CONFIG_DEBUG_LL is not set
+ # CONFIG_DEBUG_ICEDCC is not set
+ # CONFIG_DEBUG_S3C_PORT is not set
+-CONFIG_DEBUG_S3C_UART=2
++CONFIG_DEBUG_S3C_UART=0
+
+ #
+ # Security options
diff --git a/packages/linux/linux-openmoko-devel_git.bb b/packages/linux/linux-openmoko-devel_git.bb
index e84ee67199..d6bf57e3e3 100644
--- a/packages/linux/linux-openmoko-devel_git.bb
+++ b/packages/linux/linux-openmoko-devel_git.bb
@@ -1,15 +1,15 @@
require linux.inc
require linux-openmoko.inc
-DESCRIPTION = "Linux 2.6.x (development) kernel for FIC SmartPhones shipping w/ Openmoko"
+DESCRIPTION = "Linux 2.6.x (development) kernel for the Openmoko Neo Smartphones"
DEFAULT_PREFERENCE = "-1"
-KERNEL_RELEASE = "2.6.24-rc8"
+KERNEL_RELEASE = "2.6.24"
KERNEL_VERSION = "${KERNEL_RELEASE}"
# If you use a rc, you will need to use this:
PV = "${KERNEL_RELEASE}+git${SRCREV}"
-PR = "r0"
+PR = "r1"
KERNEL_IMAGETYPE = "uImage"
UBOOT_ENTRYPOINT = "30008000"
@@ -17,6 +17,9 @@ UBOOT_ENTRYPOINT = "30008000"
SRC_URI = "git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy"
S = "${WORKDIR}/git"
+SRC_URI_append-om-gta02 = " file://del-hardcoded-led-behaviour.patch;patch=1"
+SRC_URI += "file://defconfig-${MACHINE}"
+
##############################################################
# kernel image resides on a seperate flash partition (for now)
#
@@ -42,5 +45,6 @@ module_autoload_snd-soc-neo1973-wm8753 = "snd-soc-neo1973-wm8753"
module_autoload_s3cmci = "s3cmci"
do_configure_prepend() {
- mv defconfig-2.6.24 ${WORKDIR}/defconfig
+ cp ${WORKDIR}/defconfig-${MACHINE} ${WORKDIR}/defconfig
}
+
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-akita b/packages/linux/linux-rp-2.6.23/defconfig-akita
index 9587fb2a23..ddc7ba01b1 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-akita
+++ b/packages/linux/linux-rp-2.6.23/defconfig-akita
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.23
-# Tue Oct 16 13:20:27 2007
+# Mon May 19 22:50:30 2008
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -241,7 +241,7 @@ CONFIG_ALIGNMENT_TRAP=y
#
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1 dyntick=enable quiet"
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1 dyntick=enable debug"
# CONFIG_XIP_KERNEL is not set
CONFIG_KEXEC=y
CONFIG_ATAGS_PROC=y
@@ -1081,9 +1081,6 @@ CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
# CONFIG_LOGO_LINUX_CLUT224 is not set
CONFIG_LOGO_OHAND_CLUT224=y
-# CONFIG_LOGO_OZ240_CLUT224 is not set
-# CONFIG_LOGO_OZ480_CLUT224 is not set
-# CONFIG_LOGO_OZ640_CLUT224 is not set
#
# Sound
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-bootcdx86 b/packages/linux/linux-rp-2.6.23/defconfig-bootcdx86
index e8852205e5..244df733ac 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-bootcdx86
+++ b/packages/linux/linux-rp-2.6.23/defconfig-bootcdx86
@@ -1,10 +1,11 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.21
-# Mon Jun 11 12:01:43 2007
+# Linux kernel version: 2.6.23
+# Wed Feb 6 18:24:38 2008
#
CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
@@ -14,6 +15,7 @@ CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
+CONFIG_QUICKLIST=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
@@ -23,28 +25,24 @@ CONFIG_DMI=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
-# Code maturity level options
+# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# 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=y
# 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=y
CONFIG_AUDITSYSCALL=y
# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=15
# CONFIG_CPUSETS is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
@@ -63,31 +61,29 @@ 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_SLAB=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_SLOB is not set
-
-#
-# Loadable module support
-#
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
-
-#
-# Block layer
-#
+CONFIG_STOP_MACHINE=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
@@ -142,9 +138,11 @@ CONFIG_MPENTIUMII=y
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
CONFIG_X86_GENERIC=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_XADD=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -153,11 +151,12 @@ CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
+CONFIG_X86_CMOV=y
+CONFIG_X86_MINIMUM_CPU_FAMILY=4
CONFIG_HPET_TIMER=y
CONFIG_NR_CPUS=8
CONFIG_SCHED_SMT=y
@@ -185,14 +184,17 @@ CONFIG_VM86=y
# CONFIG_EDD is not set
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
+CONFIG_DMIID=y
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_VMSPLIT_3G=y
# CONFIG_VMSPLIT_3G_OPT is not set
# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_2G_OPT is not set
# CONFIG_VMSPLIT_1G is not set
CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_X86_PAE is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -207,6 +209,9 @@ CONFIG_SPARSEMEM_STATIC=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_NR_QUICK=1
+CONFIG_VIRT_TO_BUS=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
@@ -218,11 +223,10 @@ CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_KEXEC=y
-CONFIG_ATAGS_PROC=y
CONFIG_PHYSICAL_START=0x100000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x100000
-# CONFIG_HOTPLUG_CPU is not set
+CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set
#
@@ -231,22 +235,25 @@ CONFIG_PHYSICAL_ALIGN=0x100000
CONFIG_PM=y
CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_SMP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_HIBERNATION_SMP_POSSIBLE=y
+# CONFIG_HIBERNATION is not set
CONFIG_ACPI=y
+CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
+CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
-# CONFIG_ACPI_IBM is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
@@ -254,11 +261,8 @@ CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
+CONFIG_ACPI_CONTAINER=y
+# CONFIG_ACPI_SBS is not set
# CONFIG_APM is not set
#
@@ -279,6 +283,7 @@ CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y
+CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
CONFIG_HT_IRQ=y
CONFIG_ISA_DMA_API=y
@@ -292,10 +297,6 @@ CONFIG_K8_NB=y
# PCCARD (PCMCIA/CardBus) support
#
# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
# CONFIG_HOTPLUG_PCI is not set
#
@@ -313,7 +314,6 @@ CONFIG_NET=y
#
# Networking options
#
-# CONFIG_NETDEBUG is not set
CONFIG_PACKET=m
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
@@ -345,6 +345,7 @@ CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
@@ -374,7 +375,6 @@ CONFIG_NETFILTER_XTABLES=m
# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
# CONFIG_NETFILTER_XT_MATCH_MAC is not set
# CONFIG_NETFILTER_XT_MATCH_MARK is not set
-# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
@@ -411,21 +411,8 @@ CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m
-
-
-#
-# 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
@@ -451,7 +438,17 @@ CONFIG_IP_NF_ARP_MANGLE=m
# 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
@@ -464,25 +461,10 @@ CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=m
# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-# CONFIG_CONNECTOR is not set
-
-#
-# Memory Technology Devices (MTD)
-#
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set
@@ -492,10 +474,7 @@ CONFIG_PNP=y
# CONFIG_ISAPNP is not set
# CONFIG_PNPBIOS is not set
CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
+CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_CPQ_DA is not set
@@ -508,23 +487,19 @@ CONFIG_PNPACPI=y
# 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=65536
+CONFIG_BLK_DEV_RAM_COUNT=1
+CONFIG_BLK_DEV_RAM_SIZE=81920
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
-
-#
-# Misc devices
-#
+CONFIG_MISC_DEVICES=y
# CONFIG_IBM_ASM is not set
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_SONY_LAPTOP is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
+# CONFIG_THINKPAD_ACPI is not set
# CONFIG_IDE is not set
#
@@ -532,6 +507,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=y
@@ -553,6 +529,7 @@ CONFIG_SCSI_MULTI_LUN=y
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
#
# SCSI Transports
@@ -560,12 +537,8 @@ CONFIG_SCSI_MULTI_LUN=y
# 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_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
@@ -617,20 +590,7 @@ CONFIG_SCSI_MULTI_LUN=y
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
# CONFIG_ATA is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
# CONFIG_MD is not set
#
@@ -644,41 +604,20 @@ CONFIG_SCSI_MULTI_LUN=y
#
# IEEE 1394 (FireWire) support
#
+# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
# CONFIG_I2O is not set
-
-#
-# Macintosh device drivers
-#
-# CONFIG_MAC_EMUMOUSEBTN is not set
-
-#
-# Network device support
-#
+# CONFIG_MACINTOSH_DRIVERS 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_NET_SB1000 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
@@ -699,10 +638,6 @@ CONFIG_WD80x3=m
CONFIG_ULTRA=m
CONFIG_SMC9194=m
# CONFIG_NET_VENDOR_RACAL is not set
-
-#
-# Tulip family network device support
-#
CONFIG_NET_TULIP=y
# CONFIG_DE2104X is not set
CONFIG_TULIP=m
@@ -763,10 +698,7 @@ CONFIG_VIA_RHINE=m
CONFIG_VIA_RHINE_MMIO=y
CONFIG_VIA_RHINE_NAPI=y
CONFIG_SC92031=m
-
-#
-# Ethernet (1000 Mbit)
-#
+CONFIG_NETDEV_1000=y
CONFIG_ACENIC=m
CONFIG_ACENIC_OMIT_TIGON_I=y
CONFIG_DL2K=m
@@ -787,30 +719,31 @@ CONFIG_TIGON3=m
CONFIG_BNX2=m
CONFIG_QLA3XXX=m
CONFIG_ATL1=m
-
-#
-# Ethernet (10000 Mbit)
-#
+CONFIG_NETDEV_10000=y
# 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_MLX4_CORE is not set
# CONFIG_TR is not set
#
-# Wireless LAN (non-hamradio)
+# Wireless LAN
#
-# CONFIG_NET_RADIO is not set
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
#
-# Wan interfaces
+# 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_FDDI is not set
# CONFIG_HIPPI is not set
@@ -821,15 +754,7 @@ CONFIG_ATL1=m
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
# CONFIG_PHONE is not set
#
@@ -837,6 +762,7 @@ CONFIG_ATL1=m
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
#
# Userland interfaces
@@ -863,12 +789,20 @@ CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_STOWAWAY 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_INPORT is not set
# CONFIG_MOUSE_LOGIBM is not set
# CONFIG_MOUSE_PC110PAD is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set
@@ -898,6 +832,7 @@ CONFIG_HW_CONSOLE=y
#
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_CONSOLE is not set
+CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=4
@@ -911,15 +846,7 @@ CONFIG_SERIAL_CORE=y
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
-
-#
-# IPMI
-#
# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
@@ -941,8 +868,6 @@ CONFIG_AGP_SWORKS=m
CONFIG_AGP_VIA=m
CONFIG_AGP_EFFICEON=m
# CONFIG_DRM is not set
-# CONFIG_DRM_I830 is not set
-# CONFIG_DRM_I915 is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
@@ -950,16 +875,9 @@ CONFIG_AGP_EFFICEON=m
# CONFIG_RAW_DRIVER is not set
# CONFIG_HPET is not set
# CONFIG_HANGCHECK_TIMER is not set
-
-#
-# TPM devices
-#
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
+CONFIG_DEVPORT=y
# CONFIG_I2C is not set
#
@@ -967,22 +885,16 @@ CONFIG_AGP_EFFICEON=m
#
# 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_POWER_SUPPLY is not set
# CONFIG_HWMON is not set
-# CONFIG_HWMON_VID is not set
#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
#
# Multi-Function Devices
@@ -995,28 +907,74 @@ CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L1=y
CONFIG_VIDEO_V4L1_COMPAT=y
CONFIG_VIDEO_V4L2=y
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_STRADIS is not set
+CONFIG_V4L_USB_DRIVERS=y
+# 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_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_RADIO_ADAPTERS=y
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_RADIO_SF16FMR2 is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+# CONFIG_USB_DSBR is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
# CONFIG_USB_DABUSB is not set
#
# Graphics support
#
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+CONFIG_VGASTATE=y
+CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_FB=y
-# CONFIG_FIRMWARE_EDID is not set
+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 is not set
+CONFIG_FB_TILEBLITTING=y
#
# Frame buffer hardware drivers
@@ -1027,17 +985,16 @@ CONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=y
-CONFIG_FB_VESA=y
-# CONFIG_FB_VESA_STD is not set
-CONFIG_FB_VESA_TNG=y
-CONFIG_FB_VESA_DEFAULT_MODE="640x480-16@60"
-CONFIG_VIDEO_SELECT=y
+# CONFIG_FB_VGA16 is not set
+CONFIG_FB_UVESA=m
+# CONFIG_FB_VESA is not set
+# CONFIG_FB_HECUBA is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I810 is not set
+# CONFIG_FB_LE80578 is not set
# CONFIG_FB_INTEL is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
@@ -1050,8 +1007,11 @@ CONFIG_VIDEO_SELECT=y
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_VIRTUAL is not set
@@ -1060,9 +1020,11 @@ CONFIG_VIDEO_SELECT=y
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+CONFIG_VIDEO_SELECT=y
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
@@ -1075,18 +1037,11 @@ CONFIG_FONT_8x16=y
# 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 is not set
CONFIG_LOGO_OHAND_CLUT224=y
-# CONFIG_LOGO_OZ240_CLUT224 is not set
-# CONFIG_LOGO_OZ480_CLUT224 is not set
-# CONFIG_LOGO_OZ640_CLUT224 is not set
#
# Sound
@@ -1173,6 +1128,7 @@ CONFIG_SND_AC97_CODEC=y
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_CS5530 is not set
# CONFIG_SND_CS5535AUDIO is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
@@ -1222,27 +1178,34 @@ CONFIG_SND_AC97_POWER_SAVE=y
#
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_USX2Y is not set
+# CONFIG_SND_USB_CAIAQ is not set
#
-# SoC audio support
+# System on Chip audio support
#
# CONFIG_SND_SOC is not set
#
-# Open Sound System
+# SoC Audio support for SuperH
#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=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
#
-# USB support
+# 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=y
@@ -1253,8 +1216,10 @@ CONFIG_USB=y
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_SUSPEND=y
+# CONFIG_USB_PERSIST is not set
# CONFIG_USB_OTG is not set
#
@@ -1264,7 +1229,6 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_SPLIT_ISO=y
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
-# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
# CONFIG_USB_ISP116X_HCD is not set
CONFIG_USB_OHCI_HCD=y
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1272,6 +1236,7 @@ CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
#
# USB Device Class drivers
@@ -1290,41 +1255,10 @@ CONFIG_USB_UHCI_HCD=y
# 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=y
-# 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 is not set
#
@@ -1368,38 +1302,10 @@ CONFIG_USB_WACOM=y
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
# CONFIG_MMC is not set
-
-#
-# LED devices
-#
# CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
# CONFIG_EDAC is not set
-
-#
-# Real Time Clock
-#
# CONFIG_RTC_CLASS is not set
#
@@ -1414,15 +1320,13 @@ CONFIG_USB_WACOM=y
#
# DMA Devices
#
+CONFIG_VIRTUALIZATION=y
+# CONFIG_KVM is not set
#
-# Auxiliary Display support
-#
-
-#
-# Virtualization
+# Userspace I/O
#
-# CONFIG_KVM is not set
+# CONFIG_UIO is not set
#
# File systems
@@ -1431,7 +1335,13 @@ CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_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 is not set
@@ -1499,13 +1409,22 @@ CONFIG_RAMFS=y
# 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 is not set
+CONFIG_LOCKD=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 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
@@ -1561,10 +1480,7 @@ CONFIG_NLS_UTF8=y
# Distributed Lock Manager
#
# CONFIG_DLM is not set
-
-#
-# Instrumentation Support
-#
+CONFIG_INSTRUMENTATION=y
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
# CONFIG_KPROBES is not set
@@ -1580,8 +1496,6 @@ CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_KERNEL is not set
-CONFIG_LOG_BUF_SHIFT=15
-CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_BUGVERBOSE is not set
CONFIG_EARLY_PRINTK=y
CONFIG_X86_FIND_SMP_CONFIG=y
@@ -1593,10 +1507,6 @@ CONFIG_DOUBLEFAULT=y
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_BLKCIPHER=m
@@ -1616,6 +1526,7 @@ 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
@@ -1636,10 +1547,7 @@ CONFIG_CRYPTO_PCBC=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
CONFIG_CRYPTO_DEV_PADLOCK=m
CONFIG_CRYPTO_DEV_PADLOCK_AES=m
CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
@@ -1651,14 +1559,16 @@ CONFIG_CRYPTO_DEV_GEODE=m
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=m
CONFIG_AUDIT_GENERIC=y
-# CONFIG_LZO is not set
CONFIG_ZLIB_INFLATE=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y
@@ -1667,4 +1577,3 @@ CONFIG_X86_HT=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_X86_TRAMPOLINE=y
CONFIG_KTIME_SCALAR=y
-# CONFIG_SHARPSL_RC is not set
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-c7x0 b/packages/linux/linux-rp-2.6.23/defconfig-c7x0
index 4f6b8d202d..f1d0295fb0 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-c7x0
+++ b/packages/linux/linux-rp-2.6.23/defconfig-c7x0
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-collie b/packages/linux/linux-rp-2.6.23/defconfig-collie
index fd10d3df85..64e5090ae6 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-collie
+++ b/packages/linux/linux-rp-2.6.23/defconfig-collie
@@ -31,7 +31,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
# General setup
#
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_IPC_NS is not set
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-htcuniversal b/packages/linux/linux-rp-2.6.23/defconfig-htcuniversal
index ead49c2c8a..3f33b1446f 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-htcuniversal
+++ b/packages/linux/linux-rp-2.6.23/defconfig-htcuniversal
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-hx2000 b/packages/linux/linux-rp-2.6.23/defconfig-hx2000
index 09ce9e5740..447d26da80 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-hx2000
+++ b/packages/linux/linux-rp-2.6.23/defconfig-hx2000
@@ -31,7 +31,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
# General setup
#
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
# CONFIG_IPC_NS is not set
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-poodle b/packages/linux/linux-rp-2.6.23/defconfig-poodle
index 210997df4a..5afa7c556b 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-poodle
+++ b/packages/linux/linux-rp-2.6.23/defconfig-poodle
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-qemuarm b/packages/linux/linux-rp-2.6.23/defconfig-qemuarm
index c369657596..78f08bea40 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-qemuarm
+++ b/packages/linux/linux-rp-2.6.23/defconfig-qemuarm
@@ -32,7 +32,7 @@ CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-qemux86 b/packages/linux/linux-rp-2.6.23/defconfig-qemux86
index c5e91d989f..62bbaceaf9 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-qemux86
+++ b/packages/linux/linux-rp-2.6.23/defconfig-qemux86
@@ -31,7 +31,7 @@ CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-spitz b/packages/linux/linux-rp-2.6.23/defconfig-spitz
index a4e849cba2..d3512f2a4b 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-spitz
+++ b/packages/linux/linux-rp-2.6.23/defconfig-spitz
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-tosa b/packages/linux/linux-rp-2.6.23/defconfig-tosa
index 5173e242a8..d005193a34 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-tosa
+++ b/packages/linux/linux-rp-2.6.23/defconfig-tosa
@@ -21,7 +21,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
# General setup
#
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
diff --git a/packages/linux/linux-rp-2.6.23/defconfig-zylonite b/packages/linux/linux-rp-2.6.23/defconfig-zylonite
index 8be4a3bd47..d98974989f 100644
--- a/packages/linux/linux-rp-2.6.23/defconfig-zylonite
+++ b/packages/linux/linux-rp-2.6.23/defconfig-zylonite
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc4
-# Tue Sep 25 15:57:10 2007
+# Linux kernel version: 2.6.23
+# Mon Feb 18 01:42:46 2008
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -33,7 +33,7 @@ CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -65,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
@@ -262,6 +261,7 @@ CONFIG_BINFMT_ELF=y
# Power management options
#
# CONFIG_PM is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
#
# Networking
@@ -272,6 +272,7 @@ CONFIG_NET=y
# Networking options
#
CONFIG_PACKET=m
+# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
@@ -304,6 +305,7 @@ CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
@@ -370,7 +372,6 @@ CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m
-
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
@@ -551,6 +552,7 @@ CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_IDS=y
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_SHARPSL is not set
+CONFIG_MTD_NAND_ZYLONITE=y
# CONFIG_MTD_NAND_NANDSIM is not set
# CONFIG_MTD_NAND_PLATFORM is not set
# CONFIG_MTD_ONENAND is not set
@@ -727,11 +729,13 @@ CONFIG_KEYBOARD_ATKBD=y
# 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_ZYLONITE=y
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_ELO is not set
@@ -964,11 +968,8 @@ CONFIG_FONT_8x16=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_LOGO_OHAND_CLUT224 is not set
-# CONFIG_LOGO_OZ240_CLUT224 is not set
-# CONFIG_LOGO_OZ480_CLUT224 is not set
-# CONFIG_LOGO_OZ640_CLUT224 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
#
# Sound
@@ -1237,7 +1238,13 @@ CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_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 is not set
diff --git a/packages/linux/linux-rp-2.6.23/zylonite_keypad-r0.patch b/packages/linux/linux-rp-2.6.23/zylonite_keypad-r0.patch
new file mode 100644
index 0000000000..1889b3884e
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.23/zylonite_keypad-r0.patch
@@ -0,0 +1,1187 @@
+Eric Miao's pxa keypad patchset backport.
+---
+ arch/arm/mach-pxa/devices.h | 1
+ arch/arm/mach-pxa/generic.c | 31 +
+ arch/arm/mach-pxa/pxa27x.c | 2
+ arch/arm/mach-pxa/pxa300.c | 6
+ arch/arm/mach-pxa/pxa3xx.c | 1
+ arch/arm/mach-pxa/zylonite.c | 68 +++
+ drivers/input/keyboard/Kconfig | 8
+ drivers/input/keyboard/Makefile | 2
+ drivers/input/keyboard/pxa27x_keyboard.c | 273 -------------
+ drivers/input/keyboard/pxa27x_keypad.c | 575 +++++++++++++++++++++++++++++
+ include/asm-arm/arch-pxa/irqs.h | 2
+ include/asm-arm/arch-pxa/pxa27x_keyboard.h | 13
+ include/asm-arm/arch-pxa/pxa27x_keypad.h | 58 ++
+ 13 files changed, 745 insertions(+), 295 deletions(-)
+
+Index: linux-2.6.23-z-input/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/Kconfig 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/drivers/input/keyboard/Kconfig 2008-02-18 01:43:28.000000000 +0100
+@@ -218,13 +218,13 @@
+ module will be called omap-keypad.
+
+ config KEYBOARD_PXA27x
+- tristate "PXA27x keyboard support"
+- depends on PXA27x
++ tristate "PXA27x/PXA3xx keypad support"
++ depends on PXA27x || PXA3xx
+ help
+- Enable support for PXA27x matrix keyboard controller
++ Enable support for PXA27x/PXA3xx keypad controller
+
+ To compile this driver as a module, choose M here: the
+- module will be called pxa27x_keyboard.
++ module will be called pxa27x_keypad.
+
+ config KEYBOARD_AAED2000
+ tristate "AAED-2000 keyboard"
+Index: linux-2.6.23-z-input/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/Makefile 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/drivers/input/keyboard/Makefile 2008-02-18 01:43:28.000000000 +0100
+@@ -18,7 +18,7 @@
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+ obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
+-obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keyboard.o
++obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o
+ obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o
+ obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o
+ obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
+Index: linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keypad.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keypad.c 2008-02-19 01:40:04.000000000 +0100
+@@ -0,0 +1,575 @@
++/*
++ * linux/drivers/input/keyboard/pxa27x_keypad.c
++ *
++ * Driver for the pxa27x matrix keyboard controller.
++ *
++ * Created: Feb 22, 2007
++ * Author: Rodolfo Giometti <giometti@linux.it>
++ *
++ * Based on a previous implementations by Kevin O'Connor
++ * <kevin_at_koconnor.net> and Alex Osborne <bobofdoom@gmail.com> and
++ * on some suggestions by Nicolas Pitre <nico@cam.org>.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/input.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/mfp.h>
++#include <asm/arch/pxa27x_keypad.h>
++
++#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
++
++/*
++ * Keypad Controller registers
++ */
++#define KPC 0x0000 /* Keypad Control register */
++#define KPDK 0x0008 /* Keypad Direct Key register */
++#define KPREC 0x0010 /* Keypad Rotary Encoder register */
++#define KPMK 0x0018 /* Keypad Matrix Key register */
++#define KPAS 0x0020 /* Keypad Automatic Scan register */
++
++/* Keypad Automatic Scan Multiple Key Presser register 0-3 */
++#define KPASMKP0 0x0028
++#define KPASMKP1 0x0030
++#define KPASMKP2 0x0038
++#define KPASMKP3 0x0040
++#define KPKDI 0x0048
++
++/* bit definitions */
++#define KPC_MKRN(n) ((((n) - 1) & 0x7) << 26) /* matrix key row number */
++#define KPC_MKCN(n) ((((n) - 1) & 0x7) << 23) /* matrix key column number */
++#define KPC_DKN(n) ((((n) - 1) & 0x7) << 6) /* direct key number */
++
++#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_MS(n) (0x1 << (13 + (n))) /* Matrix scan line 'n' */
++#define KPC_MS_ALL (0xff << 13)
++
++#define KPC_ME (0x1 << 12) /* Matrix Keypad Enable */
++#define KPC_MIE (0x1 << 11) /* Matrix Interrupt Enable */
++#define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Keypad Debounce Select */
++#define KPC_DI (0x1 << 5) /* Direct key interrupt bit */
++#define KPC_RE_ZERO_DEB (0x1 << 4) /* Rotary Encoder Zero Debounce */
++#define KPC_REE1 (0x1 << 3) /* Rotary Encoder1 Enable */
++#define KPC_REE0 (0x1 << 2) /* Rotary Encoder0 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_DK(n) ((n) & 0xff)
++
++#define KPREC_OF1 (0x1 << 31)
++#define kPREC_UF1 (0x1 << 30)
++#define KPREC_OF0 (0x1 << 15)
++#define KPREC_UF0 (0x1 << 14)
++
++#define KPREC_RECOUNT0(n) ((n) & 0xff)
++#define KPREC_RECOUNT1(n) (((n) >> 16) & 0xff)
++
++#define KPMK_MKP (0x1 << 31)
++#define KPAS_SO (0x1 << 31)
++#define KPASMKPx_SO (0x1 << 31)
++
++#define KPAS_MUKP(n) (((n) >> 26) & 0x1f)
++#define KPAS_RP(n) (((n) >> 4) & 0xf)
++#define KPAS_CP(n) ((n) & 0xf)
++
++#define KPASMKP_MKC_MASK (0xff)
++
++#define keypad_readl(off) __raw_readl(keypad->mmio_base + (off))
++#define keypad_writel(off, v) __raw_writel((v), keypad->mmio_base + (off))
++
++#define MAX_MATRIX_KEY_NUM (8 * 8)
++
++struct pxa27x_keypad {
++ struct pxa27x_keypad_platform_data *pdata;
++
++ struct clk *clk;
++ struct input_dev *input_dev;
++ void __iomem *mmio_base;
++
++ /* matrix key code map */
++ unsigned int matrix_keycodes[MAX_MATRIX_KEY_NUM];
++
++ /* state row bits of each column scan */
++ uint32_t matrix_key_state[MAX_MATRIX_KEY_COLS];
++ uint32_t direct_key_state;
++
++ unsigned int direct_key_mask;
++
++ int rotary_rel_code[2];
++ int rotary_up_key[2];
++ int rotary_down_key[2];
++};
++
++static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ struct input_dev *input_dev = keypad->input_dev;
++ unsigned int *key;
++ int i;
++
++ key = &pdata->matrix_key_map[0];
++ for (i = 0; i < pdata->matrix_key_map_size; i++, key++) {
++ int row = ((*key) >> 28) & 0xf;
++ int col = ((*key) >> 24) & 0xf;
++ int code = (*key) & 0xffffff;
++
++ keypad->matrix_keycodes[(row << 3) + col] = code;
++ set_bit(code, input_dev->keybit);
++ }
++
++ keypad->rotary_up_key[0] = pdata->rotary0_up_key;
++ keypad->rotary_up_key[1] = pdata->rotary1_up_key;
++ keypad->rotary_down_key[0] = pdata->rotary0_down_key;
++ keypad->rotary_down_key[1] = pdata->rotary1_down_key;
++ keypad->rotary_rel_code[0] = pdata->rotary0_rel_code;
++ keypad->rotary_rel_code[1] = pdata->rotary1_rel_code;
++
++ if (pdata->rotary0_up_key && pdata->rotary0_down_key) {
++ set_bit(pdata->rotary0_up_key, input_dev->keybit);
++ set_bit(pdata->rotary0_down_key, input_dev->keybit);
++ } else
++ set_bit(pdata->rotary0_rel_code, input_dev->relbit);
++
++ if (pdata->rotary1_up_key && pdata->rotary1_down_key) {
++ set_bit(pdata->rotary1_up_key, input_dev->keybit);
++ set_bit(pdata->rotary1_down_key, input_dev->keybit);
++ } else
++ set_bit(pdata->rotary1_rel_code, input_dev->relbit);
++}
++
++static inline unsigned int lookup_matrix_keycode(
++ struct pxa27x_keypad *keypad, int row, int col)
++{
++ return keypad->matrix_keycodes[(row << 3) + col];
++}
++
++static void pxa27x_keypad_scan_matrix(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ int row, col, num_keys_pressed = 0;
++ uint32_t new_state[MAX_MATRIX_KEY_COLS];
++ uint32_t kpas = keypad_readl(KPAS);
++
++ num_keys_pressed = KPAS_MUKP(kpas);
++
++ memset(new_state, 0, sizeof(new_state));
++
++ if (num_keys_pressed == 0)
++ goto scan;
++
++ if (num_keys_pressed == 1) {
++ col = KPAS_CP(kpas);
++ row = KPAS_RP(kpas);
++
++ /* if invalid row/col, treat as no key pressed */
++ if (col >= pdata->matrix_key_cols ||
++ row >= pdata->matrix_key_rows)
++ goto scan;
++
++ new_state[col] = (1 << row);
++ goto scan;
++ }
++
++ if (num_keys_pressed > 1) {
++ uint32_t kpasmkp0 = keypad_readl(KPASMKP0);
++ uint32_t kpasmkp1 = keypad_readl(KPASMKP1);
++ uint32_t kpasmkp2 = keypad_readl(KPASMKP2);
++ uint32_t kpasmkp3 = keypad_readl(KPASMKP3);
++
++ new_state[0] = kpasmkp0 & KPASMKP_MKC_MASK;
++ new_state[1] = (kpasmkp0 >> 16) & KPASMKP_MKC_MASK;
++ new_state[2] = kpasmkp1 & KPASMKP_MKC_MASK;
++ new_state[3] = (kpasmkp1 >> 16) & KPASMKP_MKC_MASK;
++ new_state[4] = kpasmkp2 & KPASMKP_MKC_MASK;
++ new_state[5] = (kpasmkp2 >> 16) & KPASMKP_MKC_MASK;
++ new_state[6] = kpasmkp3 & KPASMKP_MKC_MASK;
++ new_state[7] = (kpasmkp3 >> 16) & KPASMKP_MKC_MASK;
++ }
++scan:
++ for (col = 0; col < pdata->matrix_key_cols; col++) {
++ uint32_t bits_changed;
++
++ bits_changed = keypad->matrix_key_state[col] ^ new_state[col];
++ if (bits_changed == 0)
++ continue;
++
++ for (row = 0; row < pdata->matrix_key_rows; row++) {
++ if ((bits_changed & (1 << row)) == 0)
++ continue;
++
++ input_report_key(keypad->input_dev,
++ lookup_matrix_keycode(keypad, row, col),
++ new_state[col] & (1 << row));
++ }
++ }
++ input_sync(keypad->input_dev);
++ memcpy(keypad->matrix_key_state, new_state, sizeof(new_state));
++}
++
++#define DEFAULT_KPREC (0x007f007f)
++
++static inline int rotary_delta(uint32_t kprec)
++{
++ if (kprec & KPREC_OF0)
++ return (kprec & 0xff) + 0x7f;
++ else if (kprec & KPREC_UF0)
++ return (kprec & 0xff) - 0x7f - 0xff;
++ else
++ return (kprec & 0xff) - 0x7f;
++}
++
++static void report_rotary_event(struct pxa27x_keypad *keypad, int r, int delta)
++{
++ struct input_dev *dev = keypad->input_dev;
++
++ if (delta == 0)
++ return;
++
++ if (keypad->rotary_up_key[r] && keypad->rotary_down_key[r]) {
++ int keycode = (delta > 0) ? keypad->rotary_up_key[r] :
++ keypad->rotary_down_key[r];
++
++ /* simulate a press-n-release */
++ input_report_key(dev, keycode, 1);
++ input_sync(dev);
++ input_report_key(dev, keycode, 0);
++ input_sync(dev);
++ } else {
++ input_report_rel(dev, keypad->rotary_rel_code[r], delta);
++ input_sync(dev);
++ }
++}
++
++static void pxa27x_keypad_scan_rotary(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ uint32_t kprec;
++
++ /* read and reset to default count value */
++ kprec = keypad_readl(KPREC);
++ keypad_writel(KPREC, DEFAULT_KPREC);
++
++ if (pdata->enable_rotary0)
++ report_rotary_event(keypad, 0, rotary_delta(kprec));
++
++ if (pdata->enable_rotary1)
++ report_rotary_event(keypad, 1, rotary_delta(kprec >> 16));
++}
++
++static void pxa27x_keypad_scan_direct(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ unsigned int new_state;
++ uint32_t kpdk, bits_changed;
++ int i;
++
++ kpdk = keypad_readl(KPDK);
++
++ if (pdata->enable_rotary0 || pdata->enable_rotary1)
++ pxa27x_keypad_scan_rotary(keypad);
++
++ if (pdata->direct_key_map == NULL)
++ return;
++
++ new_state = KPDK_DK(kpdk) & keypad->direct_key_mask;
++ bits_changed = keypad->direct_key_state ^ new_state;
++
++ if (bits_changed == 0)
++ return;
++
++ for (i = 0; i < pdata->direct_key_num; i++) {
++ if (bits_changed & (1 << i))
++ input_report_key(keypad->input_dev,
++ pdata->direct_key_map[i],
++ (new_state & (1 << i)));
++ }
++ input_sync(keypad->input_dev);
++ keypad->direct_key_state = new_state;
++}
++
++static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id)
++{
++ struct pxa27x_keypad *keypad = dev_id;
++ unsigned long kpc = keypad_readl(KPC);
++
++ if (kpc & KPC_DI)
++ pxa27x_keypad_scan_direct(keypad);
++
++ if (kpc & KPC_MI)
++ pxa27x_keypad_scan_matrix(keypad);
++
++ return IRQ_HANDLED;
++}
++
++static void pxa27x_keypad_config(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ unsigned int mask = 0, direct_key_num = 0;
++ unsigned long kpc = 0;
++
++ /* enable matrix keys with automatic scan */
++ if (pdata->matrix_key_rows && pdata->matrix_key_cols) {
++ kpc |= KPC_ASACT | KPC_MIE | KPC_ME | KPC_MS_ALL;
++ kpc |= KPC_MKRN(pdata->matrix_key_rows) |
++ KPC_MKCN(pdata->matrix_key_cols);
++ }
++
++ /* enable rotary key, debounce interval same as direct keys */
++ if (pdata->enable_rotary0) {
++ mask |= 0x03;
++ direct_key_num = 2;
++ kpc |= KPC_REE0;
++ }
++
++ if (pdata->enable_rotary1) {
++ mask |= 0x0c;
++ direct_key_num = 4;
++ kpc |= KPC_REE1;
++ }
++
++ if (pdata->direct_key_num > direct_key_num)
++ direct_key_num = pdata->direct_key_num;
++
++ keypad->direct_key_mask = ((2 << direct_key_num) - 1) & ~mask;
++
++ /* enable direct key */
++ if (direct_key_num)
++ kpc |= KPC_DE | KPC_DIE | KPC_DKN(direct_key_num);
++
++ keypad_writel(KPC, kpc | KPC_RE_ZERO_DEB);
++ keypad_writel(KPREC, DEFAULT_KPREC);
++ keypad_writel(KPKDI, pdata->debounce_interval);
++}
++
++static int pxa27x_keypad_open(struct input_dev *dev)
++{
++ struct pxa27x_keypad *keypad = input_get_drvdata(dev);
++
++ /* Enable unit clock */
++ clk_enable(keypad->clk);
++ pxa27x_keypad_config(keypad);
++
++ return 0;
++}
++
++static void pxa27x_keypad_close(struct input_dev *dev)
++{
++ struct pxa27x_keypad *keypad = input_get_drvdata(dev);
++
++ /* Disable clock unit */
++ clk_disable(keypad->clk);
++}
++
++#ifdef CONFIG_PM
++static int pxa27x_keypad_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++
++ clk_disable(keypad->clk);
++ return 0;
++}
++
++static int pxa27x_keypad_resume(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++ struct input_dev *input_dev = keypad->input_dev;
++
++ mutex_lock(&input_dev->mutex);
++
++ if (input_dev->users) {
++ /* Enable unit clock */
++ clk_enable(keypad->clk);
++ pxa27x_keypad_config(keypad);
++ }
++
++ mutex_unlock(&input_dev->mutex);
++
++ return 0;
++}
++#else
++#define pxa27x_keypad_suspend NULL
++#define pxa27x_keypad_resume NULL
++#endif
++
++#define res_size(res) ((res)->end - (res)->start + 1)
++
++static int __devinit pxa27x_keypad_probe(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad;
++ struct input_dev *input_dev;
++ struct resource *res;
++ int irq, error;
++
++ keypad = kzalloc(sizeof(struct pxa27x_keypad), GFP_KERNEL);
++ if (keypad == NULL) {
++ dev_err(&pdev->dev, "failed to allocate driver data\n");
++ return -ENOMEM;
++ }
++
++ keypad->pdata = pdev->dev.platform_data;
++ if (keypad->pdata == NULL) {
++ dev_err(&pdev->dev, "no platform data defined\n");
++ error = -EINVAL;
++ goto failed_free;
++ }
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq < 0) {
++ dev_err(&pdev->dev, "failed to get keypad irq\n");
++ error = -ENXIO;
++ goto failed_free;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (res == NULL) {
++ dev_err(&pdev->dev, "failed to get I/O memory\n");
++ error = -ENXIO;
++ goto failed_free;
++ }
++
++ res = request_mem_region(res->start, res_size(res), pdev->name);
++ if (res == NULL) {
++ dev_err(&pdev->dev, "failed to request I/O memory\n");
++ error = -EBUSY;
++ goto failed_free;
++ }
++
++ keypad->mmio_base = ioremap(res->start, res_size(res));
++ if (keypad->mmio_base == NULL) {
++ dev_err(&pdev->dev, "failed to remap I/O memory\n");
++ error = -ENXIO;
++ goto failed_free_mem;
++ }
++
++ keypad->clk = clk_get(&pdev->dev, "KBDCLK");
++ if (IS_ERR(keypad->clk)) {
++ dev_err(&pdev->dev, "failed to get keypad clock\n");
++ error = PTR_ERR(keypad->clk);
++ goto failed_free_io;
++ }
++
++ /* Create and register the input driver. */
++ input_dev = input_allocate_device();
++ if (!input_dev) {
++ dev_err(&pdev->dev, "failed to allocate input device\n");
++ error = -ENOMEM;
++ goto failed_put_clk;
++ }
++
++ input_dev->name = pdev->name;
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->open = pxa27x_keypad_open;
++ input_dev->close = pxa27x_keypad_close;
++ input_dev->dev.parent = &pdev->dev;
++
++ keypad->input_dev = input_dev;
++ input_set_drvdata(input_dev, keypad);
++
++ input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) |
++ BIT_MASK(EV_REL);
++
++ pxa27x_keypad_build_keycode(keypad);
++ platform_set_drvdata(pdev, keypad);
++
++ error = request_irq(irq, pxa27x_keypad_irq_handler, IRQF_DISABLED,
++ pdev->name, keypad);
++ if (error) {
++ dev_err(&pdev->dev, "failed to request IRQ\n");
++ goto failed_free_dev;
++ }
++
++ /* Register the input device */
++ error = input_register_device(input_dev);
++ if (error) {
++ dev_err(&pdev->dev, "failed to register input device\n");
++ goto failed_free_irq;
++ }
++
++ return 0;
++
++failed_free_irq:
++ free_irq(irq, pdev);
++ platform_set_drvdata(pdev, NULL);
++failed_free_dev:
++ input_free_device(input_dev);
++failed_put_clk:
++ clk_put(keypad->clk);
++failed_free_io:
++ iounmap(keypad->mmio_base);
++failed_free_mem:
++ release_mem_region(res->start, res_size(res));
++failed_free:
++ kfree(keypad);
++ return error;
++}
++
++static int __devexit pxa27x_keypad_remove(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++ struct resource *res;
++
++ free_irq(platform_get_irq(pdev, 0), pdev);
++
++ clk_disable(keypad->clk);
++ clk_put(keypad->clk);
++
++ input_unregister_device(keypad->input_dev);
++ input_free_device(keypad->input_dev);
++
++ iounmap(keypad->mmio_base);
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ release_mem_region(res->start, res_size(res));
++
++ platform_set_drvdata(pdev, NULL);
++ kfree(keypad);
++ return 0;
++}
++
++static struct platform_driver pxa27x_keypad_driver = {
++ .probe = pxa27x_keypad_probe,
++ .remove = __devexit_p(pxa27x_keypad_remove),
++ .suspend = pxa27x_keypad_suspend,
++ .resume = pxa27x_keypad_resume,
++ .driver = {
++ .name = "pxa27x-keypad",
++ },
++};
++
++static int __init pxa27x_keypad_init(void)
++{
++ return platform_driver_register(&pxa27x_keypad_driver);
++}
++
++static void __exit pxa27x_keypad_exit(void)
++{
++ platform_driver_unregister(&pxa27x_keypad_driver);
++}
++
++module_init(pxa27x_keypad_init);
++module_exit(pxa27x_keypad_exit);
++
++MODULE_DESCRIPTION("PXA27x Keypad Controller Driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keyboard.h
+===================================================================
+--- linux-2.6.23-z-input.orig/include/asm-arm/arch-pxa/pxa27x_keyboard.h 2007-10-09 22:31:38.000000000 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,13 +0,0 @@
+-#define PXAKBD_MAXROW 8
+-#define PXAKBD_MAXCOL 8
+-
+-struct pxa27x_keyboard_platform_data {
+- int nr_rows, nr_cols;
+- int keycodes[PXAKBD_MAXROW][PXAKBD_MAXCOL];
+- int gpio_modes[PXAKBD_MAXROW + PXAKBD_MAXCOL];
+-
+-#ifdef CONFIG_PM
+- u32 reg_kpc;
+- u32 reg_kprec;
+-#endif
+-};
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keypad.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keypad.h 2008-02-18 01:43:28.000000000 +0100
+@@ -0,0 +1,58 @@
++#ifndef __ASM_ARCH_PXA27x_KEYPAD_H
++#define __ASM_ARCH_PXA27x_KEYPAD_H
++
++#include <linux/input.h>
++
++#define MAX_MATRIX_KEY_ROWS (8)
++#define MAX_MATRIX_KEY_COLS (8)
++
++/* pxa3xx keypad platform specific parameters
++ *
++ * NOTE:
++ * 1. direct_key_num indicates the number of keys in the direct keypad
++ * _plus_ the number of rotary-encoder sensor inputs, this can be
++ * left as 0 if only rotary encoders are enabled, the driver will
++ * automatically calculate this
++ *
++ * 2. direct_key_map is the key code map for the direct keys, if rotary
++ * encoder(s) are enabled, direct key 0/1(2/3) will be ignored
++ *
++ * 3. rotary can be either interpreted as a relative input event (e.g.
++ * REL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT)
++ *
++ * 4. matrix key and direct key will use the same debounce_interval by
++ * default, which should be sufficient in most cases
++ */
++struct pxa27x_keypad_platform_data {
++
++ /* code map for the matrix keys */
++ unsigned int matrix_key_rows;
++ unsigned int matrix_key_cols;
++ unsigned int *matrix_key_map;
++ int matrix_key_map_size;
++
++ /* direct keys */
++ int direct_key_num;
++ unsigned int direct_key_map[8];
++
++ /* rotary encoders 0 */
++ int enable_rotary0;
++ int rotary0_rel_code;
++ int rotary0_up_key;
++ int rotary0_down_key;
++
++ /* rotary encoders 1 */
++ int enable_rotary1;
++ int rotary1_rel_code;
++ int rotary1_up_key;
++ int rotary1_down_key;
++
++ /* key debounce interval */
++ unsigned int debounce_interval;
++};
++
++#define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val))
++
++extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
++
++#endif /* __ASM_ARCH_PXA27x_KEYPAD_H */
+Index: linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keyboard.c
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/pxa27x_keyboard.c 2008-02-18 01:43:28.000000000 +0100
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,273 +0,0 @@
+-/*
+- * linux/drivers/input/keyboard/pxa27x_keyboard.c
+- *
+- * Driver for the pxa27x matrix keyboard controller.
+- *
+- * Created: Feb 22, 2007
+- * Author: Rodolfo Giometti <giometti@linux.it>
+- *
+- * Based on a previous implementations by Kevin O'Connor
+- * <kevin_at_koconnor.net> and Alex Osborne <bobofdoom@gmail.com> and
+- * on some suggestions by Nicolas Pitre <nico@cam.org>.
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+- */
+-
+-
+-#include <linux/kernel.h>
+-#include <linux/module.h>
+-#include <linux/init.h>
+-#include <linux/interrupt.h>
+-#include <linux/input.h>
+-#include <linux/device.h>
+-#include <linux/platform_device.h>
+-#include <linux/clk.h>
+-#include <linux/err.h>
+-
+-#include <asm/mach-types.h>
+-#include <asm/mach/arch.h>
+-#include <asm/mach/map.h>
+-
+-#include <asm/arch/hardware.h>
+-#include <asm/arch/pxa-regs.h>
+-#include <asm/arch/irqs.h>
+-#include <asm/arch/pxa27x_keyboard.h>
+-
+-#define DRIVER_NAME "pxa27x-keyboard"
+-
+-#define KPASMKP(col) (col/2 == 0 ? KPASMKP0 : \
+- col/2 == 1 ? KPASMKP1 : \
+- col/2 == 2 ? KPASMKP2 : KPASMKP3)
+-#define KPASMKPx_MKC(row, col) (1 << (row + 16 * (col % 2)))
+-
+-static struct clk *pxakbd_clk;
+-
+-static irqreturn_t pxakbd_irq_handler(int irq, void *dev_id)
+-{
+- struct platform_device *pdev = dev_id;
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+- unsigned long kpc = KPC;
+- int p, row, col, rel;
+-
+- if (kpc & KPC_DI) {
+- unsigned long kpdk = KPDK;
+-
+- if (!(kpdk & KPDK_DKP)) {
+- /* better luck next time */
+- } else if (kpc & KPC_REE0) {
+- unsigned long kprec = KPREC;
+- KPREC = 0x7f;
+-
+- if (kprec & KPREC_OF0)
+- rel = (kprec & 0xff) + 0x7f;
+- else if (kprec & KPREC_UF0)
+- rel = (kprec & 0xff) - 0x7f - 0xff;
+- else
+- rel = (kprec & 0xff) - 0x7f;
+-
+- if (rel) {
+- input_report_rel(input_dev, REL_WHEEL, rel);
+- input_sync(input_dev);
+- }
+- }
+- }
+-
+- if (kpc & KPC_MI) {
+- /* report the status of every button */
+- for (row = 0; row < pdata->nr_rows; row++) {
+- for (col = 0; col < pdata->nr_cols; col++) {
+- p = KPASMKP(col) & KPASMKPx_MKC(row, col) ?
+- 1 : 0;
+- pr_debug("keycode %x - pressed %x\n",
+- pdata->keycodes[row][col], p);
+- input_report_key(input_dev,
+- pdata->keycodes[row][col], p);
+- }
+- }
+- input_sync(input_dev);
+- }
+-
+- return IRQ_HANDLED;
+-}
+-
+-static int pxakbd_open(struct input_dev *dev)
+-{
+- /* Set keypad control register */
+- KPC |= (KPC_ASACT |
+- KPC_MS_ALL |
+- (2 << 6) | KPC_REE0 | KPC_DK_DEB_SEL |
+- KPC_ME | KPC_MIE | KPC_DE | KPC_DIE);
+-
+- KPC &= ~KPC_AS; /* disable automatic scan */
+- KPC &= ~KPC_IMKP; /* do not ignore multiple keypresses */
+-
+- /* Set rotary count to mid-point value */
+- KPREC = 0x7F;
+-
+- /* Enable unit clock */
+- clk_enable(pxakbd_clk);
+-
+- return 0;
+-}
+-
+-static void pxakbd_close(struct input_dev *dev)
+-{
+- /* Disable clock unit */
+- clk_disable(pxakbd_clk);
+-}
+-
+-#ifdef CONFIG_PM
+-static int pxakbd_suspend(struct platform_device *pdev, pm_message_t state)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+-
+- /* Save controller status */
+- pdata->reg_kpc = KPC;
+- pdata->reg_kprec = KPREC;
+-
+- return 0;
+-}
+-
+-static int pxakbd_resume(struct platform_device *pdev)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+-
+- mutex_lock(&input_dev->mutex);
+-
+- if (input_dev->users) {
+- /* Restore controller status */
+- KPC = pdata->reg_kpc;
+- KPREC = pdata->reg_kprec;
+-
+- /* Enable unit clock */
+- clk_disable(pxakbd_clk);
+- clk_enable(pxakbd_clk);
+- }
+-
+- mutex_unlock(&input_dev->mutex);
+-
+- return 0;
+-}
+-#else
+-#define pxakbd_suspend NULL
+-#define pxakbd_resume NULL
+-#endif
+-
+-static int __devinit pxakbd_probe(struct platform_device *pdev)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev;
+- int i, row, col, error;
+-
+- pxakbd_clk = clk_get(&pdev->dev, "KBDCLK");
+- if (IS_ERR(pxakbd_clk)) {
+- error = PTR_ERR(pxakbd_clk);
+- goto err_clk;
+- }
+-
+- /* Create and register the input driver. */
+- input_dev = input_allocate_device();
+- if (!input_dev) {
+- printk(KERN_ERR "Cannot request keypad device\n");
+- error = -ENOMEM;
+- goto err_alloc;
+- }
+-
+- input_dev->name = DRIVER_NAME;
+- input_dev->id.bustype = BUS_HOST;
+- input_dev->open = pxakbd_open;
+- input_dev->close = pxakbd_close;
+- input_dev->dev.parent = &pdev->dev;
+-
+- input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL);
+- input_dev->relbit[LONG(REL_WHEEL)] = BIT(REL_WHEEL);
+- for (row = 0; row < pdata->nr_rows; row++) {
+- for (col = 0; col < pdata->nr_cols; col++) {
+- int code = pdata->keycodes[row][col];
+- if (code > 0)
+- set_bit(code, input_dev->keybit);
+- }
+- }
+-
+- error = request_irq(IRQ_KEYPAD, pxakbd_irq_handler, IRQF_DISABLED,
+- DRIVER_NAME, pdev);
+- if (error) {
+- printk(KERN_ERR "Cannot request keypad IRQ\n");
+- goto err_free_dev;
+- }
+-
+- platform_set_drvdata(pdev, input_dev);
+-
+- /* Register the input device */
+- error = input_register_device(input_dev);
+- if (error)
+- goto err_free_irq;
+-
+- /* Setup GPIOs. */
+- for (i = 0; i < pdata->nr_rows + pdata->nr_cols; i++)
+- pxa_gpio_mode(pdata->gpio_modes[i]);
+-
+- /*
+- * Store rows/cols info into keyboard registers.
+- */
+-
+- KPC |= (pdata->nr_rows - 1) << 26;
+- KPC |= (pdata->nr_cols - 1) << 23;
+-
+- for (col = 0; col < pdata->nr_cols; col++)
+- KPC |= KPC_MS0 << col;
+-
+- return 0;
+-
+- err_free_irq:
+- platform_set_drvdata(pdev, NULL);
+- free_irq(IRQ_KEYPAD, pdev);
+- err_free_dev:
+- input_free_device(input_dev);
+- err_alloc:
+- clk_put(pxakbd_clk);
+- err_clk:
+- return error;
+-}
+-
+-static int __devexit pxakbd_remove(struct platform_device *pdev)
+-{
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+-
+- input_unregister_device(input_dev);
+- free_irq(IRQ_KEYPAD, pdev);
+- clk_put(pxakbd_clk);
+- platform_set_drvdata(pdev, NULL);
+-
+- return 0;
+-}
+-
+-static struct platform_driver pxakbd_driver = {
+- .probe = pxakbd_probe,
+- .remove = __devexit_p(pxakbd_remove),
+- .suspend = pxakbd_suspend,
+- .resume = pxakbd_resume,
+- .driver = {
+- .name = DRIVER_NAME,
+- },
+-};
+-
+-static int __init pxakbd_init(void)
+-{
+- return platform_driver_register(&pxakbd_driver);
+-}
+-
+-static void __exit pxakbd_exit(void)
+-{
+- platform_driver_unregister(&pxakbd_driver);
+-}
+-
+-module_init(pxakbd_init);
+-module_exit(pxakbd_exit);
+-
+-MODULE_DESCRIPTION("PXA27x Matrix Keyboard Driver");
+-MODULE_LICENSE("GPL");
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/zylonite.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/zylonite.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/zylonite.c 2008-02-19 01:31:33.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include <asm/arch/gpio.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/zylonite.h>
++#include <asm/arch/pxa27x_keypad.h>
+
+ #include "generic.h"
+
+@@ -173,6 +174,72 @@
+ static inline void zylonite_init_lcd(void) {}
+ #endif
+
++#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
++static unsigned int zylonite_matrix_key_map[] = {
++ /* KEY(row, col, key_code) */
++ KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D),
++ KEY(1, 0, KEY_E), KEY(1, 1, KEY_F), KEY(1, 2, KEY_G), KEY(1, 5, KEY_H),
++ KEY(2, 0, KEY_I), KEY(2, 1, KEY_J), KEY(2, 2, KEY_K), KEY(2, 5, KEY_L),
++ KEY(3, 0, KEY_M), KEY(3, 1, KEY_N), KEY(3, 2, KEY_O), KEY(3, 5, KEY_P),
++ KEY(5, 0, KEY_Q), KEY(5, 1, KEY_R), KEY(5, 2, KEY_S), KEY(5, 5, KEY_T),
++ KEY(6, 0, KEY_U), KEY(6, 1, KEY_V), KEY(6, 2, KEY_W), KEY(6, 5, KEY_X),
++ KEY(7, 1, KEY_Y), KEY(7, 2, KEY_Z),
++
++ KEY(4, 4, KEY_0), KEY(1, 3, KEY_1), KEY(4, 1, KEY_2), KEY(1, 4, KEY_3),
++ KEY(2, 3, KEY_4), KEY(4, 2, KEY_5), KEY(2, 4, KEY_6), KEY(3, 3, KEY_7),
++ KEY(4, 3, KEY_8), KEY(3, 4, KEY_9),
++
++ KEY(4, 5, KEY_SPACE),
++ KEY(5, 3, KEY_KPASTERISK), /* * */
++ KEY(5, 4, KEY_KPDOT), /* #" */
++
++ KEY(0, 7, KEY_UP),
++ KEY(1, 7, KEY_DOWN),
++ KEY(2, 7, KEY_LEFT),
++ KEY(3, 7, KEY_RIGHT),
++ KEY(2, 6, KEY_HOME),
++ KEY(3, 6, KEY_END),
++ KEY(6, 4, KEY_DELETE),
++ KEY(6, 6, KEY_BACK),
++ KEY(6, 3, KEY_CAPSLOCK), /* KEY_LEFTSHIFT), */
++
++ KEY(4, 6, KEY_ENTER), /* scroll push */
++ KEY(5, 7, KEY_ENTER), /* keypad action */
++
++ KEY(0, 4, KEY_EMAIL),
++ KEY(5, 6, KEY_SEND),
++ KEY(4, 0, KEY_CALENDAR),
++ KEY(7, 6, KEY_RECORD),
++ KEY(6, 7, KEY_VOLUMEUP),
++ KEY(7, 7, KEY_VOLUMEDOWN),
++
++ KEY(0, 6, KEY_F22), /* soft1 */
++ KEY(1, 6, KEY_F23), /* soft2 */
++ KEY(0, 3, KEY_AUX), /* contact */
++};
++
++static struct pxa27x_keypad_platform_data zylonite_keypad_info = {
++ .matrix_key_rows = 8,
++ .matrix_key_cols = 8,
++ .matrix_key_map = zylonite_matrix_key_map,
++ .matrix_key_map_size = ARRAY_SIZE(zylonite_matrix_key_map),
++
++ .enable_rotary0 = 1,
++ .rotary0_up_key = KEY_UP,
++ .rotary0_down_key = KEY_DOWN,
++
++ .debounce_interval = 30,
++};
++
++static void __init zylonite_init_keypad(void)
++{
++ pxa_set_keypad_info(&zylonite_keypad_info);
++}
++#else
++static inline void zylonite_init_keypad(void) {}
++#endif
++
++
+ static void __init zylonite_init(void)
+ {
+ /* board-processor specific initialization */
+@@ -190,6 +257,7 @@
+ platform_device_register(&touch_device);
+
+ zylonite_init_lcd();
++ zylonite_init_keypad();
+ }
+
+ MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/devices.h
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/devices.h 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/devices.h 2008-02-18 01:43:28.000000000 +0100
+@@ -12,3 +12,4 @@
+
+ extern struct platform_device pxa27x_device_i2c_power;
+ extern struct platform_device pxa27x_device_ohci;
++extern struct platform_device pxa27x_device_keypad;
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/generic.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/generic.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/generic.c 2008-02-18 01:43:28.000000000 +0100
+@@ -450,3 +450,34 @@
+ .name = "sa1100-rtc",
+ .id = -1,
+ };
++
++static struct resource pxa27x_resource_keypad[] = {
++ [0] = {
++ .start = 0x41500000,
++ .end = 0x4150004c,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_KEYPAD,
++ .end = IRQ_KEYPAD,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device pxa27x_device_keypad = {
++ .name = "pxa27x-keypad",
++ .id = -1,
++ .resource = pxa27x_resource_keypad,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_keypad),
++};
++
++void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
++{
++ int ret;
++
++ pxa27x_device_keypad.dev.platform_data = info;
++
++ ret = platform_device_register(&pxa27x_device_keypad);
++ if (ret)
++ dev_err(&pxa27x_device_keypad.dev, "unable to register device: %d\n", ret);
++}
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa27x.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa27x.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa27x.c 2008-02-18 01:43:28.000000000 +0100
+@@ -148,7 +148,7 @@
+
+ INIT_CKEN("USBCLK", USB, 48000000, 0, &pxa27x_device_ohci.dev),
+ INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
+- INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
++ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
+
+ /*
+ INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa3xx.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa3xx.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa3xx.c 2008-02-19 01:32:40.000000000 +0100
+@@ -159,6 +159,7 @@
+ static struct clk pxa3xx_clks[] = {
+ INIT_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
+ INIT_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
++ INIT_CK("KBDCLK", KEYPAD, &clk_pxa3xx_hsio_ops, &pxa27x_device_keypad.dev),
+
+ INIT_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
+ INIT_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/irqs.h
+===================================================================
+--- linux-2.6.23-z-input.orig/include/asm-arm/arch-pxa/irqs.h 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/include/asm-arm/arch-pxa/irqs.h 2008-02-18 01:43:28.000000000 +0100
+@@ -13,7 +13,7 @@
+
+ #define PXA_IRQ(x) (x)
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */
+ #define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */
+ #define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa300.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa300.c 2008-02-19 01:33:58.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa300.c 2008-02-19 01:34:35.000000000 +0100
+@@ -23,8 +23,10 @@
+
+ MFP_ADDR_X(GPIO0, GPIO2, 0x00b4),
+ MFP_ADDR_X(GPIO3, GPIO26, 0x027c),
+- MFP_ADDR_X(GPIO27, GPIO127, 0x0400),
+- MFP_ADDR_X(GPIO0_2, GPIO6_2, 0x02ec),
++ MFP_ADDR_X(GPIO27, GPIO98, 0x0400),
++ MFP_ADDR_X(GPIO99, GPIO127, 0x0600),
++ MFP_ADDR_X(GPIO0_2, GPIO1_2, 0x0674),
++ MFP_ADDR_X(GPIO2_2, GPIO6_2, 0x02dc),
+
+ MFP_ADDR(nBE0, 0x0204),
+ MFP_ADDR(nBE1, 0x0208),
diff --git a/packages/linux/linux-rp-2.6.23/zylonite_mtd-r0.patch b/packages/linux/linux-rp-2.6.23/zylonite_mtd-r0.patch
new file mode 100644
index 0000000000..cb5a9c5f72
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.23/zylonite_mtd-r0.patch
@@ -0,0 +1,4093 @@
+Gross hacks to make the Zylonite boot from flash in VGA.
+
+Flash driver forward ported to 2.6.14
+
+Index: linux-2.6.23/drivers/mtd/nand/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/mtd/nand/Kconfig 2007-10-09 21:31:38.000000000 +0100
++++ linux-2.6.23/drivers/mtd/nand/Kconfig 2008-02-13 00:59:45.000000000 +0000
+@@ -223,6 +223,10 @@
+ tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
+ depends on ARCH_PXA
+
++config MTD_NAND_ZYLONITE
++ tristate "Support for NAND Flash on Zylonite"
++ depends on ARCH_PXA
++
+ config MTD_NAND_BASLER_EXCITE
+ tristate "Support for NAND Flash on Basler eXcite"
+ depends on BASLER_EXCITE
+Index: linux-2.6.23/drivers/mtd/nand/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/mtd/nand/Makefile 2007-10-09 21:31:38.000000000 +0100
++++ linux-2.6.23/drivers/mtd/nand/Makefile 2008-02-13 00:59:45.000000000 +0000
+@@ -19,6 +19,7 @@
+ obj-$(CONFIG_MTD_NAND_H1900) += h1910.o
+ obj-$(CONFIG_MTD_NAND_RTC_FROM4) += rtc_from4.o
+ obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o
++obj-$(CONFIG_MTD_NAND_ZYLONITE) += mhn_nand.o
+ obj-$(CONFIG_MTD_NAND_TS7250) += ts7250.o
+ obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
+ obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
+Index: linux-2.6.23/drivers/mtd/nand/mhn_nand.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/mtd/nand/mhn_nand.c 2008-02-13 00:59:45.000000000 +0000
+@@ -0,0 +1,3869 @@
++/*
++ * drivers/mtd/nand/mhn_nand.c
++ *
++ * Copyright (C) 2005 Intel Coporation (chao.xie@intel.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.
++ *
++ * Overview:
++ * This is a device driver for the NAND flash device on zylonite board
++ * which utilizes the Samsung K9K1216Q0C parts. This is a 64Mibit NAND
++ * flash device.
++
++ *(C) Copyright 2006 Marvell International Ltd.
++ * All Rights Reserved
++ */
++
++#include <linux/slab.h>
++#include <linux/module.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/nand.h>
++#include <linux/mtd/partitions.h>
++#include <linux/interrupt.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/dma-mapping.h>
++#include <asm/hardware.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/delay.h>
++#include <asm/dma.h>
++#include <asm/arch/mfp.h>
++//#include <asm/arch/cpu-freq-voltage-mhn.h>
++
++//#define NDCR 0xf0000000
++//#define NDCR (*((volatile u32 *)0xf0000000))
++//#define NDCR __REG_2(0x43100000) /* Data Flash Control register */
++#define NDCR_SPARE_EN (0x1<<31)
++#define NDCR_ECC_EN (0x1<<30)
++#define NDCR_DMA_EN (0x1<<29)
++#define NDCR_ND_RUN (0x1<<28)
++#define NDCR_DWIDTH_C (0x1<<27)
++#define NDCR_DWIDTH_M (0x1<<26)
++#define NDCR_PAGE_SZ (0x1<<24)
++#define NDCR_NCSX (0x1<<23)
++#define NDCR_ND_MODE (0x3<<21)
++#define NDCR_NAND_MODE 0x0
++#define NDCR_CLR_PG_CNT (0x1<<20)
++#define NDCR_CLR_ECC ( 0x1<<19)
++#define NDCR_RD_ID_CNT_MASK (0x7<<16)
++#define NDCR_RD_ID_CNT(x) (((x) << 16) & NDCR_RD_ID_CNT_MASK)
++#define NDCR_RA_START (0x1<<15)
++#define NDCR_PG_PER_BLK (0x1<<14)
++#define NDCR_ND_ARB_EN (0x1<<12)
++
++//#define NDSR (*((volatile u32 *)0xf0000014))
++//#define NDSR __REG_2(0x43100014) /* Data Controller Status Register */
++#define NDSR_RDY (0x1<<11)
++#define NDSR_CS0_PAGED (0x1<<10)
++#define NDSR_CS1_PAGED (0x1<<9)
++#define NDSR_CS0_CMDD (0x1<<8)
++#define NDSR_CS1_CMDD (0x1<<7)
++#define NDSR_CS0_BBD (0x1<<6)
++#define NDSR_CS1_BBD (0x1<<5)
++#define NDSR_DBERR (0x1<<4)
++#define NDSR_SBERR (0x1<<3)
++#define NDSR_WRDREQ (0x1<<2)
++#define NDSR_RDDREQ (0x1<<1)
++#define NDSR_WRCMDREQ (0x1)
++
++#define OSCR __REG(0x40A00010) /* OS Timer Counter Register */
++//#define NDCB0 __REG_2(0x43100048) /* Data Controller Command Buffer0 */
++//#define NDCB1 __REG_2(0x4310004C) /* Data Controller Command Buffer1 */
++//#define NDCB2 __REG_2(0x43100050) /* Data Controller Command Buffer2 */
++#define NDCB0_AUTO_RS (0x1<<25)
++#define NDCB0_CSEL (0x1<<24)
++#define NDCB0_CMD_TYPE_MASK (0x7<<21)
++#define NDCB0_CMD_TYPE(x) (((x) << 21) & NDCB0_CMD_TYPE_MASK)
++#define NDCB0_NC (0x1<<20)
++#define NDCB0_DBC (0x1<<19)
++#define NDCB0_ADDR_CYC_MASK (0x7<<16)
++#define NDCB0_ADDR_CYC(x) (((x) << 16) & NDCB0_ADDR_CYC_MASK)
++#define NDCB0_CMD2_MASK (0xff<<8)
++#define NDCB0_CMD1_MASK (0xff)
++#define NDCB0_ADDR_CYC_SHIFT (16)
++#define DCMD0 __REG(0x4000020c) /* DMA Command Address Register Channel 0 */
++#define DCMD1 __REG(0x4000021c) /* DMA Command Address Register Channel 1 */
++#define DCMD2 __REG(0x4000022c) /* DMA Command Address Register Channel 2 */
++#define DCMD3 __REG(0x4000023c) /* DMA Command Address Register Channel 3 */
++#define DCMD4 __REG(0x4000024c) /* DMA Command Address Register Channel 4 */
++#define DCMD5 __REG(0x4000025c) /* DMA Command Address Register Channel 5 */
++#define DCMD6 __REG(0x4000026c) /* DMA Command Address Register Channel 6 */
++#define DCMD7 __REG(0x4000027c) /* DMA Command Address Register Channel 7 */
++#define DCMD8 __REG(0x4000028c) /* DMA Command Address Register Channel 8 */
++#define DCMD9 __REG(0x4000029c) /* DMA Command Address Register Channel 9 */
++#define DCMD10 __REG(0x400002ac) /* DMA Command Address Register Channel 10 */
++#define DCMD11 __REG(0x400002bc) /* DMA Command Address Register Channel 11 */
++#define DCMD12 __REG(0x400002cc) /* DMA Command Address Register Channel 12 */
++#define DCMD13 __REG(0x400002dc) /* DMA Command Address Register Channel 13 */
++#define DCMD14 __REG(0x400002ec) /* DMA Command Address Register Channel 14 */
++#define DCMD15 __REG(0x400002fc) /* DMA Command Address Register Channel 15 */
++#define DCMD(x) __REG2(0x4000020c, (x) << 4)
++#define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */
++#define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */
++#define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */
++#define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */
++#define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */
++#define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */
++#define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */
++#define DCMD_BURST8 (1 << 16) /* 8 byte burst */
++#define DCMD_BURST16 (2 << 16) /* 16 byte burst */
++#define DCMD_BURST32 (3 << 16) /* 32 byte burst */
++#define DCMD_WIDTH1 (1 << 14) /* 1 byte width */
++#define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */
++#define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */
++#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
++#define DCMD_RXPCDR (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
++#define DCMD_RXMCDR (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
++#define DCMD_TXPCDR (DCMD_INCSRCADDR|DCMD_FLOWTRG|DCMD_BURST32|DCMD_WIDTH4)
++#define DRCMR(n) __REG2(0x40000100, (n)<<2)
++#define DRCMR97 __REG(0x40001184) /* Request to Channel Map Register for NAND interface data transmit & receive Request */
++#define DRCMR98 __REG(0x40001188) /* Reserved */
++#define DRCMR99 __REG(0x4000118C) /* Request to Channel Map Register for NAND interface command transmit Request */
++#define DRCMRRXSADR DRCMR2
++#define DRCMRTXSADR DRCMR3
++#define DRCMRRXBTRBR DRCMR4
++#define DRCMRTXBTTHR DRCMR5
++#define DRCMRRXFFRBR DRCMR6
++#define DRCMRTXFFTHR DRCMR7
++#define DRCMRRXMCDR DRCMR8
++#define DRCMRRXMODR DRCMR9
++#define DRCMRTXMODR DRCMR10
++#define DRCMRRXPCDR DRCMR11
++#define DRCMRTXPCDR DRCMR12
++#define DRCMRRXSSDR DRCMR13
++#define DRCMRTXSSDR DRCMR14
++#define DRCMRRXICDR DRCMR17
++#define DRCMRTXICDR DRCMR18
++#define DRCMRRXSTRBR DRCMR19
++#define DRCMRTXSTTHR DRCMR20
++#define DRCMRRXMMC DRCMR21
++#define DRCMRTXMMC DRCMR22
++#define DRCMRRXMMC2 DRCMR93
++#define DRCMRTXMMC2 DRCMR94
++#define DRCMRRXMMC3 DRCMR100
++#define DRCMRTXMMC3 DRCMR101
++#define DRCMRUDC(x) DRCMR((x) + 24)
++#define DRCMR_MAPVLD (1 << 7) /* Map Valid (read / write) */
++#define DRCMR_CHLNUM 0x1f /* mask for Channel Number (read / write) */
++#define DCSR0 __REG(0x40000000) /* DMA Control / Status Register for Channel 0 */
++#define DCSR1 __REG(0x40000004) /* DMA Control / Status Register for Channel 1 */
++#define DCSR2 __REG(0x40000008) /* DMA Control / Status Register for Channel 2 */
++#define DCSR3 __REG(0x4000000c) /* DMA Control / Status Register for Channel 3 */
++#define DCSR4 __REG(0x40000010) /* DMA Control / Status Register for Channel 4 */
++#define DCSR5 __REG(0x40000014) /* DMA Control / Status Register for Channel 5 */
++#define DCSR6 __REG(0x40000018) /* DMA Control / Status Register for Channel 6 */
++#define DCSR7 __REG(0x4000001c) /* DMA Control / Status Register for Channel 7 */
++#define DCSR8 __REG(0x40000020) /* DMA Control / Status Register for Channel 8 */
++#define DCSR9 __REG(0x40000024) /* DMA Control / Status Register for Channel 9 */
++#define DCSR10 __REG(0x40000028) /* DMA Control / Status Register for Channel 10 */
++#define DCSR11 __REG(0x4000002c) /* DMA Control / Status Register for Channel 11 */
++#define DCSR12 __REG(0x40000030) /* DMA Control / Status Register for Channel 12 */
++#define DCSR13 __REG(0x40000034) /* DMA Control / Status Register for Channel 13 */
++#define DCSR14 __REG(0x40000038) /* DMA Control / Status Register for Channel 14 */
++#define DCSR15 __REG(0x4000003c) /* DMA Control / Status Register for Channel 15 */
++#define DCSR16 __REG(0x40000040) /* DMA Control / Status Register for Channel 16 */
++#define DCSR17 __REG(0x40000044) /* DMA Control / Status Register for Channel 17 */
++#define DCSR18 __REG(0x40000048) /* DMA Control / Status Register for Channel 18 */
++#define DCSR19 __REG(0x4000004c) /* DMA Control / Status Register for Channel 19 */
++#define DCSR20 __REG(0x40000050) /* DMA Control / Status Register for Channel 20 */
++#define DCSR21 __REG(0x40000054) /* DMA Control / Status Register for Channel 21 */
++#define DCSR22 __REG(0x40000058) /* DMA Control / Status Register for Channel 22 */
++#define DCSR23 __REG(0x4000005c) /* DMA Control / Status Register for Channel 23 */
++#define DCSR24 __REG(0x40000060) /* DMA Control / Status Register for Channel 24 */
++#define DCSR25 __REG(0x40000064) /* DMA Control / Status Register for Channel 25 */
++#define DCSR26 __REG(0x40000068) /* DMA Control / Status Register for Channel 26 */
++#define DCSR27 __REG(0x4000006c) /* DMA Control / Status Register for Channel 27 */
++#define DCSR28 __REG(0x40000070) /* DMA Control / Status Register for Channel 28 */
++#define DCSR29 __REG(0x40000074) /* DMA Control / Status Register for Channel 29 */
++#define DCSR30 __REG(0x40000078) /* DMA Control / Status Register for Channel 30 */
++#define DCSR31 __REG(0x4000007c) /* DMA Control / Status Register for Channel 31 */
++#define DCSR(x) __REG2(0x40000000, (x) << 2)
++#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) */
++#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_EORINTR (1 << 9) /* The end of Receive */
++#define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */
++#define DCSR_RASINTR (1 << 4) /* Request After Channel Stopped */
++#define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */
++#define DCSR_ENDINTR (1 << 2) /* End Interrupt (read / write) */
++#define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */
++#define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */
++#define DDADR(x) __REG2(0x40000200, (x) << 4)
++//#define __REG_2(x) (*((volatile u32 *)io_p2v_2(x)))
++#define IRQ_NAND PXA_IRQ(45)
++#define CKEN_NAND 4 ///< NAND Flash Controller Clock Enable
++
++/* #define CONFIG_MTD_NAND_MONAHANS_DEBUG */
++#ifdef CONFIG_MTD_NAND_MONAHANS_DEBUG
++#define D1(x) do { \
++ printk(KERN_DEBUG "%s: ", __FUNCTION__); \
++ x; \
++ }while(0)
++
++#define DPRINTK(fmt,args...) printk(KERN_DEBUG fmt, ##args )
++#define PRINT_BUF(buf, num) print_buf(buf, num)
++#else
++#define D1(x)
++#define DPRINTK(fmt,args...)
++#define PRINT_BUF(buf, num)
++#endif
++
++/* DFC timing 0 register */
++#define DFC_TIMING_tRP 0
++#define DFC_TIMING_tRH 3
++#define DFC_TIMING_tWP 8
++#define DFC_TIMING_tWH 11
++#define DFC_TIMING_tCS 16
++#define DFC_TIMING_tCH 19
++
++/* DFC timing 1 register */
++#define DFC_TIMING_tAR 0
++#define DFC_TIMING_tWHR 4
++#define DFC_TIMING_tR 16
++
++/* max value for each timing setting in DFC */
++#define DFC_TIMING_MAX_tCH 7
++#define DFC_TIMING_MAX_tCS 7
++#define DFC_TIMING_MAX_tWH 7
++#define DFC_TIMING_MAX_tWP 7
++#define DFC_TIMING_MAX_tRH 7
++#define DFC_TIMING_MAX_tRP 7
++#define DFC_TIMING_MAX_tR 65535
++#define DFC_TIMING_MAX_tWHR 15
++#define DFC_TIMING_MAX_tAR 15
++
++/*
++ * The Data Flash Controller Flash timing structure
++ * For NAND flash used on Zylonite board(Samsung K9K1216Q0C),
++ * user should use value at end of each row of following member
++ * bracketed.
++ */
++struct dfc_flash_timing {
++ uint32_t tCH; /* Enable signal hold time */
++ uint32_t tCS; /* Enable signal setup time */
++ uint32_t tWH; /* ND_nWE high duration */
++ uint32_t tWP; /* ND_nWE pulse time */
++ uint32_t tRH; /* ND_nRE high duration */
++ uint32_t tRP; /* ND_nRE pulse width */
++ uint32_t tR; /* ND_nWE high to ND_nRE low for read */
++ uint32_t tWHR;/* ND_nWE high to ND_nRE low delay for status read */
++ uint32_t tAR; /* ND_ALE low to ND_nRE low delay */
++};
++
++/* DFC command type */
++enum {
++ DFC_CMD_READ = 0x00000000,
++ DFC_CMD_PROGRAM = 0x00200000,
++ DFC_CMD_ERASE = 0x00400000,
++ DFC_CMD_READ_ID = 0x00600000,
++ DFC_CMD_STATUS_READ = 0x00800000,
++ DFC_CMD_RESET = 0x00a00000
++};
++
++/*
++ * The Data Flash Controller Flash specification structure
++ * For NAND flash used on Zylonite board(Samsung K9K1216Q0C),
++ * user should use value at end of each row of following member
++ * bracketed.
++ */
++struct dfc_flash_info {
++ struct dfc_flash_timing timing; /* NAND Flash timing */
++
++ int enable_arbiter;/* Data flash bus arbiter enable (ND_ARB_EN) */
++ uint32_t page_per_block;/* Pages per block (PG_PER_BLK) */
++ uint32_t row_addr_start;/* Row address start position (RA_START) */
++ uint32_t read_id_bytes; /* returned ID bytes(RD_ID_CNT) */
++ uint32_t dfc_mode; /* NAND, CARBONDALE, PIXLEY... (ND_MODE) */
++ uint32_t ncsx; /* Chip select don't care bit (NCSX) */
++ uint32_t page_size; /* Page size in bytes (PAGE_SZ) */
++ uint32_t oob_size; /* OOB size */
++ uint32_t flash_width; /* Width of Flash memory (DWIDTH_M) */
++ uint32_t dfc_width; /* Width of flash controller(DWIDTH_C) */
++ uint32_t num_blocks; /* Number of physical blocks in Flash */
++ uint32_t chip_id;
++
++ /* command codes */
++ uint32_t read1; /* Read */
++ uint32_t read2; /* unused, DFC don't support yet */
++ uint32_t program; /* two cycle command */
++ uint32_t read_status;
++ uint32_t read_id;
++ uint32_t erase; /* two cycle command */
++ uint32_t reset;
++ uint32_t lock; /* lock whole flash */
++ uint32_t unlock; /* two cycle command, supporting partial unlock */
++ uint32_t lock_status; /* read block lock status */
++
++ /* addr2ndcb1 - encode address cycles into register NDCB1 */
++ /* ndbbr2addr - convert register NDBBR to bad block address */
++ int (*addr2ndcb1)(uint16_t cmd, uint32_t addr, uint32_t *p);
++ int (*ndbbr2addr)(uint16_t cmd, uint32_t ndbbr,uint32_t *p);
++};
++
++enum {
++ DFC_FLASH_NULL = 0 ,
++ DFC_FLASH_Samsung_512Mb_X_16 = 1,
++ DFC_FLASH_Micron_1Gb_X_8 = 2,
++ DFC_FLASH_Micron_1Gb_X_16 = 3,
++ DFC_FLASH_STM_1Gb_X_16 = 4,
++ DFC_FLASH_STM_2Gb_X_16 = 5,
++ DFC_FLASH_END,
++};
++
++static int dfc_get_flash_info(int type, struct dfc_flash_info **flash_info);
++
++#define DFC_NDCR 0
++#define DFC_NDTR0CS0 1
++#define DFC_NDTR1CS0 3
++#define DFC_NDSR 5
++#define DFC_NDPCR 6
++#define DFC_NDBDR0 7
++#define DFC_NDBDR1 8
++#define DFC_NDDB 16
++#define DFC_NDCB0 18
++#define DFC_NDCB1 19
++#define DFC_NDCB2 20
++
++/* The Data Flash Controller Mode structure */
++struct dfc_mode {
++ int enable_dma; /* DMA, or nonDMA mode */
++ int enable_ecc; /* ECC on/off */
++ int enable_spare; /* Spare enable */
++ int chip_select; /* CS0 or CS1 */
++};
++
++/* The Data Flash Controller Context structure */
++struct dfc_context {
++ unsigned char __iomem *membase; /* DFC register base */
++ struct dfc_mode *dfc_mode; /* DFC mode */
++ int data_dma_ch; /* Data DMA channel number */
++ int cmd_dma_ch; /* CMD DMA channel number */
++ struct dfc_flash_info *flash_info; /* Flash Spec */
++ struct mtd_info *mtd;
++};
++
++#define NDCB0_DMA_ADDR 0x43100048
++#define NDDB_DMA_ADDR 0x43100040
++
++#define NDSR_MASK 0xFFF
++
++/* The following data is a rough evaluation */
++
++/* microsecond, for readID/readStatus/reset */
++#define NAND_OTHER_TIMEOUT 10
++/* microsecond, for readID/readStatus/reset */
++#define NAND_CMD_TIMEOUT 10
++
++#define BBT_BLOCK_BAD 0x03
++#define BBT_BLOCK_GOOD 0x00
++#define BBT_BLOCK_REV1 0x01
++#define BBT_BLOCK_REV2 0x02
++
++#define BUFLEN (2048 + 64)
++
++/*
++ * DFC data size enumeration transfered from/to controller,
++ * including padding (zero)to be a multiple of 32.
++ */
++enum {
++ DFC_DATA_SIZE_STATUS = 8, /* ReadStatus/ReadBlockLockStatus */
++ DFC_DATA_SIZE_ID = 7, /* ReadID */
++
++ DFC_DATA_SIZE_32 = 32,
++ DFC_DATA_SIZE_512 = 512, /* R/W disabling spare area */
++ DFC_DATA_SIZE_520 = 520, /* Spare=1, ECC=1 */
++ DFC_DATA_SIZE_528 = 528, /* Spare=1, ECC=0 */
++ DFC_DATA_SIZE_544 = 544, /* R/W enabling spare area.(DMA mode)*/
++
++ DFC_DATA_SIZE_64 = 64,
++ DFC_DATA_SIZE_2048 = 2048, /* R/W disabling spare area */
++ DFC_DATA_SIZE_2088 = 2088, /* R/W enabling spare area with ecc */
++ DFC_DATA_SIZE_2112 = 2112, /* R/W enabling spare area without ecc*/
++ DFC_DATA_SIZE_2096 = 2096, /* R/W enabling spare area */
++ DFC_DATA_SIZE_UNUSED = 0xFFFF
++};
++
++/* DFC padding size enumeration transfered from/to controller */
++enum {
++ /*
++ * ReadStatus/ReadBlockLockStatus/ReadID/
++ * Read/Program disabling spare area(Both 512 and 2048)
++ * Read/Program enabling spare area, disabling ECC
++ */
++ DFC_PADDING_SIZE_0 = 0,
++
++ /* Read/program with SPARE_EN=1, ECC_EN=0, pgSize=512 */
++ DFC_PADDING_SIZE_16 = 16,
++ /* for read/program with SPARE_EN=1, ECC_EN=1, pgSize=512 and 2048 */
++ DFC_PADDING_SIZE_24 = 24,
++ DFC_PADDING_SIZE_UNUSED = 0xFFFF
++};
++
++static unsigned int flash_config = DFC_FLASH_NULL;
++
++void dfc_set_timing(struct dfc_context *context, struct dfc_flash_timing *t);
++void dfc_set_dma(struct dfc_context *context);
++void dfc_set_ecc(struct dfc_context *context);
++void dfc_set_spare(struct dfc_context *context);
++
++int dfc_get_pattern(struct dfc_context *context, uint16_t cmd,
++ int *data_size, int *padding);
++
++static int dfc_wait_event(struct dfc_context *context, uint32_t event,
++ uint32_t *event_out, uint32_t timeout, int enable_int);
++
++int dfc_send_cmd(struct dfc_context *context, uint16_t cmd,
++ uint32_t addr, int num_pages);
++
++void dfc_stop(struct dfc_context *context);
++void dfc_read_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size);
++void dfc_write_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size);
++
++void dfc_read_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes);
++void dfc_write_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes);
++
++void dfc_read_badblock_addr(struct dfc_context *context, uint32_t *bbaddr);
++
++void dfc_clear_int(struct dfc_context *context, uint32_t int_mask);
++void dfc_enable_int(struct dfc_context *context, uint32_t int_mask);
++void dfc_disable_int(struct dfc_context *context, uint32_t int_mask);
++
++/* high level primitives */
++int dfc_init(struct dfc_context *context, int type);
++int dfc_init_no_gpio(struct dfc_context *context, int type);
++
++int dfc_reset_flash(struct dfc_context *context);
++
++int dfc_setup_cmd_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t addr, int num_pages,
++ uint32_t *buf, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc);
++
++int dfc_setup_data_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc);
++
++void dfc_start_cmd_dma(struct dfc_context *context,
++ struct pxa_dma_desc *dma_desc);
++void dfc_start_data_dma(struct dfc_context *context,
++ struct pxa_dma_desc *dma_desc);
++static int monahans_df_dev_ready(struct mtd_info *mtd);
++
++#ifdef CONFIG_DVFM
++static int mhn_nand_dvfm_notifier(unsigned cmd, void *client_data, void *info);
++static struct mhn_fv_notifier dvfm_notifier = {
++ .name = "monahans-nand-flash",
++ .priority = 0,
++ .notifier_call = mhn_nand_dvfm_notifier,
++};
++#endif
++
++static unsigned short search_rel_block(int block, struct mtd_info *mtd);
++
++/*****************************************************************************
++ * The DFC registers read/write routines
++ *****************************************************************************/
++static inline void dfc_write(struct dfc_context *context, int offset,
++ unsigned long value)
++{
++ offset <<= 2;
++ writel(value, context->membase + offset);
++}
++
++static inline unsigned int dfc_read(struct dfc_context *context, int offset)
++{
++ offset <<= 2;
++ return __raw_readl(context->membase + offset);
++}
++
++/****************************************************************************
++ * Flash Information
++ ***************************************************************************/
++
++static int Samsung512MbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Samsung512MbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info samsung512MbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 0, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 40, /* tWP, ND_nWE pulse time */
++ .tRH = 30, /* tRH, ND_nRE high duration */
++ .tRP = 40, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 11123,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 110,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 32, /* Pages per block */
++ .row_addr_start = 0, /* Second cycle start, Row address start position */
++ .read_id_bytes = 2, /* 2 bytes, returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 512, /* Page size in bytes */
++ .oob_size = 16, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 4096, /* Number of physical blocks in Flash */
++ .chip_id = 0x46ec,
++
++ /* command codes */
++ .read1 = 0x0000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Samsung512MbX16Addr2NDCB1,
++ .ndbbr2addr = Samsung512MbX16NDBBR2Addr,
++};
++
++static int Samsung512MbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++
++ if (addr >= 0x4000000) return -EINVAL;
++
++ if (cmd == samsung512MbX16.read1 || cmd == samsung512MbX16.program) {
++ ndcb1 = (addr & 0xFF) | ((addr >> 1) & 0x01FFFF00);
++ } else if (cmd == samsung512MbX16.erase) {
++ ndcb1 = ((addr >> 9) & 0x00FFFFFF);
++ }
++
++ *p = ndcb1;
++ return 0;
++
++}
++
++static int Samsung512MbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ *p = ndbbr << 9;
++ return 0;
++}
++
++static int Micron1GbX8Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Micron1GbX8NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info micron1GbX8 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 25, /* tCS, Enable signal setup time */
++ .tWH = 15, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 15, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 8, /* Width of Flash memory */
++ .dfc_width = 8, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xa12c,
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Micron1GbX8Addr2NDCB1,
++ .ndbbr2addr = Micron1GbX8NDBBR2Addr,
++};
++
++static int Micron1GbX8Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / micron1GbX8.page_size;
++ addr = (page / micron1GbX8.page_per_block) << 18 |
++ (page % micron1GbX8.page_per_block) << 12;
++
++ if (cmd == micron1GbX8.read1 || cmd == micron1GbX8.program) {
++ ndcb1 = (addr & 0xFFF) | ((addr << 4) & 0xFFFF0000);
++ }
++ else if (cmd == micron1GbX8.erase) {
++ ndcb1 = ((addr >> 18) << 6) & 0xFFFF;
++ }
++
++ *p = ndcb1;
++ return 0;
++}
++
++static int Micron1GbX8NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == micron1GbX8.read1 || cmd == micron1GbX8.program) {
++ *p = ((ndbbr & 0xF) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == micron1GbX8.erase) {
++ *p = (ndbbr >> 6) << 18;
++ }
++
++
++ return 0;
++}
++
++
++static int Micron1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Micron1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info micron1GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 25, /* tCS, Enable signal setup time */
++ .tWH = 15, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 15, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xb12c,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Micron1GbX16Addr2NDCB1,
++ .ndbbr2addr = Micron1GbX16NDBBR2Addr,
++};
++
++static int Micron1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / micron1GbX16.page_size;
++ addr = (page / micron1GbX16.page_per_block) << 17 |
++ (page % micron1GbX16.page_per_block) << 11;
++
++ if (cmd == micron1GbX16.read1 || cmd == micron1GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == micron1GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int Micron1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == micron1GbX16.read1 || cmd == micron1GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == micron1GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static int STM1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int STM1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info stm1GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 10, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 20, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xb120,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = STM1GbX16Addr2NDCB1,
++ .ndbbr2addr = STM1GbX16NDBBR2Addr,
++};
++
++static int STM1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / stm1GbX16.page_size;
++ addr = (page / stm1GbX16.page_per_block) << 17 |
++ (page % stm1GbX16.page_per_block) << 11;
++
++ if (cmd == stm1GbX16.read1 || cmd == stm1GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == stm1GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int STM1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == stm1GbX16.read1 || cmd == stm1GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == stm1GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static int STM2GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int STM2GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info stm2GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 10, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 20, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 2048, /* Number of physical blocks in Flash */
++ .chip_id = 0xca20,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = STM2GbX16Addr2NDCB1,
++ .ndbbr2addr = STM2GbX16NDBBR2Addr,
++};
++
++static int STM2GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / stm2GbX16.page_size;
++ addr = (page / stm2GbX16.page_per_block) << 17 |
++ (page % stm2GbX16.page_per_block) << 11;
++
++ if (cmd == stm2GbX16.read1 || cmd == stm2GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == stm2GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int STM2GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == stm2GbX16.read1 || cmd == stm2GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == stm2GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static struct {
++ int type;
++ struct dfc_flash_info *flash_info;
++} type_info[] = {
++ { DFC_FLASH_Samsung_512Mb_X_16, &samsung512MbX16},
++ { DFC_FLASH_Micron_1Gb_X_8, &micron1GbX8},
++ { DFC_FLASH_Micron_1Gb_X_16, &micron1GbX16},
++ { DFC_FLASH_STM_1Gb_X_16, &stm1GbX16},
++ { DFC_FLASH_STM_2Gb_X_16, &stm2GbX16},
++ { DFC_FLASH_NULL, NULL},
++};
++
++int dfc_get_flash_info(int type, struct dfc_flash_info **flash_info)
++{
++ uint32_t i = 0;
++
++ while(type_info[i].type != DFC_FLASH_NULL) {
++ if (type_info[i].type == type) {
++ *flash_info = type_info[i].flash_info;
++ return 0;
++ }
++ i++;
++ }
++ *flash_info = NULL;
++ return -EINVAL;
++}
++
++/******************************************************************************
++ dfc_set_timing
++
++ Description:
++ This function sets flash timing property in DFC timing register
++ according to input timing value embodied in context structure.
++ It is called once during the hardware initialization.
++ Input Parameters:
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++//#if defined(CONFIG_CPU_MONAHANS_L) || defined(CONFIG_CPU_MONAHANS_LV)
++#define DFC_CLOCK 208
++//#else
++//#define DFC_CLOCK 104
++//#endif
++#define CLOCK_NS DFC_CLOCK/1000
++
++void dfc_set_timing(struct dfc_context *context, struct dfc_flash_timing *t)
++{
++ struct dfc_flash_timing timing = *t;
++
++ uint32_t r0 = 0;
++ uint32_t r1 = 0;
++
++ /*
++ * num of clock cycles = time (ns) / one clock sycle (ns) + 1
++ * - integer division will truncate the result, so add a 1 in all cases
++ * - subtract the extra 1 cycle added to all register timing values
++ */
++ timing.tCH = min(((int) (timing.tCH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tCH);
++ timing.tCS = min(((int) (timing.tCS * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tCS);
++ timing.tWH = min(((int) (timing.tWH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWH);
++ timing.tWP = min(((int) (timing.tWP * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWP);
++ timing.tRH = min(((int) (timing.tRH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tRH);
++ timing.tRP = min(((int) (timing.tRP * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tRP);
++
++ r0 = (timing.tCH << DFC_TIMING_tCH) |
++ (timing.tCS << DFC_TIMING_tCS) |
++ (timing.tWH << DFC_TIMING_tWH) |
++ (timing.tWP << DFC_TIMING_tWP) |
++ (timing.tRH << DFC_TIMING_tRH) |
++ (timing.tRP << DFC_TIMING_tRP);
++
++ dfc_write(context, DFC_NDTR0CS0, r0);
++
++ timing.tR = min(((int) (timing.tR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tR);
++ timing.tWHR = min(((int) (timing.tWHR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWHR);
++ timing.tAR = min(((int) (timing.tAR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tAR);
++
++ r1 = (timing.tR << DFC_TIMING_tR) |
++ (timing.tWHR << DFC_TIMING_tWHR) |
++ (timing.tAR << DFC_TIMING_tAR);
++
++ dfc_write(context, DFC_NDTR1CS0, r1);
++ return;
++}
++
++/******************************************************************************
++ dfc_set_dma
++
++ Description:
++ Enables or Disables DMA in line with setting in DFC mode of context
++ structure. DMA mode of DFC. Performs a read-modify-write operation that
++ only changes the driven DMA_EN bit field In DMA mode, all commands and
++ data are transferred by DMA. DMA can be enable/disable on the fly.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_dma(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_dma)
++ ndcr |= NDCR_DMA_EN;
++ else
++ ndcr &= ~NDCR_DMA_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++
++/******************************************************************************
++ dfc_set_ecc
++
++ Description:
++ This function enables or disables hardware ECC capability of DFC in line
++ with setting in DFC mode of context structure.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_ecc(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_ecc)
++ ndcr |= NDCR_ECC_EN;
++ else
++ ndcr &= ~NDCR_ECC_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_set_spare
++
++ Description:
++ This function enables or disables accesses to spare area of NAND Flash
++ through DFC in line with setting in DFC mode of context structure.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_spare(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_spare)
++ ndcr |= NDCR_SPARE_EN;
++ else
++ ndcr &= ~NDCR_SPARE_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++static unsigned int get_delta (unsigned int start)
++{
++ unsigned int stop = OSCR;
++ return (stop - start);
++}
++
++static int dfc_wait_event(struct dfc_context *context, uint32_t event,
++ uint32_t *event_out, uint32_t timeout, int enable_int)
++{
++ uint32_t ndsr;
++ uint32_t to = 3 * timeout; /* 3 ticks ~ 1us */
++ int status;
++ int start = OSCR;
++
++ if (enable_int)
++ dfc_enable_int(context, event);
++
++ while (1) {
++ ndsr = dfc_read(context, DFC_NDSR);
++ ndsr &= NDSR_MASK;
++ if (ndsr & event) {
++ /* event happened */
++ *event_out = ndsr & event;
++ dfc_clear_int(context, *event_out);
++ status = 0;
++ break;
++ } else if (get_delta(start) > to) {
++ status = -ETIME;
++ break;
++ }
++ }
++
++ if (enable_int)
++ dfc_disable_int(context, event);
++ return status;
++}
++
++/******************************************************************************
++ dfc_get_pattern
++
++ Description:
++ This function is used to retrieve buffer size setting for a transaction
++ based on cmd.
++ Input Parameters:
++ context - Pointer to DFC context structure
++ cmd
++ Specifies type of command to be sent to NAND flash .The LSB of this
++ parameter defines the first command code for 2-cycles command. The
++ MSB defines the second command code for 2-cycles command. If MSB is
++ set to zero, this indicates that one cycle command
++ Output Parameters:
++ data_size
++ It is used to retrieve length of data transferred to/from DFC,
++ which includes padding bytes
++ padding
++ It is used to retrieve how many padding bytes there should be
++ in buffer of data_size.
++ Returns:
++ 0
++ If size setting is returned successfully
++ -EINVAL
++ If page size specified in flash spec of context structure is not 512 or
++ 2048;If specified command index is not read1/program/erase/reset/readID/
++ readStatus.
++*******************************************************************************/
++int dfc_get_pattern(struct dfc_context *context, uint16_t cmd,
++ int *data_size, int *padding)
++{
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++ struct dfc_flash_info * flash_info = context->flash_info;
++ uint32_t page_size = context->flash_info->page_size; /* 512 or 2048 */
++
++ if (cmd == flash_info->read1 ||
++ cmd == flash_info->program) {
++ if (512 == page_size) {
++ /* add for DMA */
++ if (dfc_mode->enable_dma) {
++ *data_size = DFC_DATA_SIZE_544;
++ if (dfc_mode->enable_ecc)
++ *padding = DFC_PADDING_SIZE_24;
++ else
++ *padding = DFC_PADDING_SIZE_16;
++ } else if (!dfc_mode->enable_spare) {
++ *data_size = DFC_DATA_SIZE_512;
++ *padding = DFC_PADDING_SIZE_0;
++ } else {
++
++ if (dfc_mode->enable_ecc)
++ *data_size = DFC_DATA_SIZE_520;
++ else
++ *data_size = DFC_DATA_SIZE_528;
++
++ *padding = DFC_PADDING_SIZE_0;
++ }
++ } else if (2048 == page_size) {
++ /* add for DMA */
++ if (dfc_mode->enable_dma) {
++ *data_size = DFC_DATA_SIZE_2112;
++ if (dfc_mode->enable_ecc)
++ *padding = DFC_PADDING_SIZE_24;
++ else
++ *padding = DFC_PADDING_SIZE_0;
++ } else if (!dfc_mode->enable_spare) {
++ *data_size = DFC_DATA_SIZE_2048;
++ *padding = DFC_PADDING_SIZE_0;
++ } else {
++
++ if (dfc_mode->enable_ecc)
++ *data_size = DFC_DATA_SIZE_2088;
++ else
++ *data_size = DFC_DATA_SIZE_2112;
++
++ *padding = DFC_PADDING_SIZE_0;
++ }
++ } else /* if the page_size is neither 512 or 2048 */
++ return -EINVAL;
++ } else if (cmd == flash_info->read_id) {
++ *data_size = DFC_DATA_SIZE_ID;
++ *padding = DFC_PADDING_SIZE_0;
++ } else if(cmd == flash_info->read_status) {
++ *data_size = DFC_DATA_SIZE_STATUS;
++ *padding = DFC_PADDING_SIZE_0;
++ } else if (cmd == flash_info->erase || cmd == flash_info->reset) {
++ *data_size = DFC_DATA_SIZE_UNUSED;
++ *padding = DFC_PADDING_SIZE_UNUSED;
++ } else
++ return -EINVAL;
++ return 0;
++}
++
++
++/******************************************************************************
++ dfc_send_cmd
++
++ Description:
++ This function configures DFC to send command through DFC to NAND flash
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ cmd
++ Specifies type of command to be sent to NAND flash .The LSB of this
++ parameter defines the first command code for 2-cycles command. The
++ MSB defines the second command code for 2-cycles command. If MSB is
++ set to zero, this indicates that one cycle command
++ addr
++ Address sent out to the flash device withthis command. For page read/
++ program commands , 4-cycles address is sent. For erase command only
++ 3-cycles address is sent. If it is equal to 0xFFFFFFFF, the address
++ should not be used.
++ num_pages
++ It specifies the number of pages of data to be transferred for
++ a program or read commands. Unused for any other commands than
++ read/program.
++
++ Output Parameters:
++ None
++ Returns:
++ 0
++ If size setting is returned successfully
++ -EINVAL
++ If specified command index is not read1/program/erase/reset/readID/
++ readStatus.
++*******************************************************************************/
++int dfc_send_cmd(struct dfc_context *context, uint16_t cmd,
++ uint32_t addr, int num_pages)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ struct dfc_mode *dfc_mode = context->dfc_mode;
++ uint8_t cmd2;
++ uint32_t event_out;
++ uint32_t ndcb0=0, ndcb1=0, ndcb2=0, ndcr;
++ int status;
++
++ /* It is a must to set ND_RUN firstly, then write command buffer
++ * If conversely,it does not work
++ */
++ dfc_write(context, DFC_NDSR, NDSR_MASK);
++
++ /* Set ND_RUN */
++ ndcr = dfc_read(context, DFC_NDCR);
++ dfc_write(context, DFC_NDCR, (ndcr | NDCR_ND_RUN));
++
++ // Wait for write command request
++ status = dfc_wait_event(context, NDSR_WRCMDREQ,
++ &event_out, NAND_CMD_TIMEOUT, 0);
++
++ if (status) /* Timeout */
++ return status;
++
++ cmd2 = (cmd>>8) & 0xFF;
++ ndcb0 = cmd | (dfc_mode->chip_select<<24) | ((cmd2?1:0)<<19);
++
++ if (cmd == flash_info->read1) {
++ if (0xFFFFFFFF != addr) {
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages - 1) << 8;
++ }
++ } else if (cmd == flash_info->program) {
++ ndcb0 |= NDCB0_CMD_TYPE(1) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ } else if (cmd == flash_info->erase) {
++ ndcb0 |= NDCB0_CMD_TYPE(2) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(3);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ } else if (cmd == flash_info->read_id) {
++ ndcb0 |= NDCB0_CMD_TYPE(3);
++ } else if(cmd == flash_info->read_status) {
++ ndcb0 |= NDCB0_CMD_TYPE(4);
++ } else if(cmd == flash_info->reset) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else if (cmd == flash_info->lock) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else
++ return -EINVAL;
++
++ /* Write to DFC command register */
++ dfc_write(context, DFC_NDCB0, ndcb0);
++ dfc_write(context, DFC_NDCB0, ndcb1);
++ dfc_write(context, DFC_NDCB0, ndcb2);
++
++ return 0;
++}
++
++/******************************************************************************
++ dfc_stop
++
++ Description:
++ This function clears ND_RUN bit of NDCR.
++ Input Parameters:
++ context--Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_stop(struct dfc_context *context)
++{
++ unsigned int ndcr;
++ ndcr = dfc_read(context, DFC_NDCR);
++ dfc_write(context, DFC_NDCR, (ndcr & ~NDCR_ND_RUN));
++ ndcr = dfc_read(context, DFC_NDCR);
++
++ return;
++}
++
++int dfc_setup_cmd_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t addr, int num_pages,
++ uint32_t *buf, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ struct dfc_mode *dfc_mode = context->dfc_mode;
++ uint8_t cmd2;
++ uint32_t event_out;
++ uint32_t ndcb0=0, ndcb1=0, ndcb2=0, ndcr;
++ int status;
++
++ /*
++ * It is a must to set ND_RUN firstly, then write command buffer
++ * If conversely,it does not work
++ */
++ dfc_write(context, DFC_NDSR, NDSR_MASK);
++
++ /* Set ND_RUN */
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_ND_RUN;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Wait for write command request */
++ status = dfc_wait_event(context, NDSR_WRCMDREQ,
++ &event_out, NAND_CMD_TIMEOUT, 0);
++
++ if (status)
++ return status; /* Timeout */
++
++ cmd2 = (cmd>>8) & 0xFF;
++ ndcb0 = cmd | (dfc_mode->chip_select<<24) | ((cmd2?1:0)<<19);
++
++ if (cmd == flash_info->read1) {
++ if (0xFFFFFFFF != addr) {
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ }
++ } else if (cmd == flash_info->program) {
++ ndcb0 |= NDCB0_CMD_TYPE(1) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ } else if (cmd == flash_info->erase) {
++ ndcb0 |= NDCB0_CMD_TYPE(2) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(3);
++
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ } else if (cmd == flash_info->read_id) {
++ ndcb0 |= NDCB0_CMD_TYPE(3);
++ } else if (cmd == flash_info->read_status) {
++ ndcb0 |= NDCB0_CMD_TYPE(4);
++ } else if (cmd == flash_info->reset) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else if (cmd == flash_info->lock) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else
++ return -EINVAL;
++
++ *((uint32_t *)buf) = ndcb0;
++ *((uint32_t *)buf + 1) = ndcb1;
++ *((uint32_t *)buf + 2) = ndcb2;
++
++ dma_int_en &= (DCMD_STARTIRQEN | DCMD_ENDIRQEN);
++
++ dma_desc->ddadr = next_desc_phys;
++ dma_desc->dsadr = buf_phys;
++ dma_desc->dtadr = NDCB0_DMA_ADDR;
++ dma_desc->dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST16 | 12;
++ return 0;
++}
++
++int dfc_setup_data_dma(struct dfc_context* context,
++ uint16_t cmd, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc* dma_desc)
++{
++ struct dfc_flash_info * flash_info = context->flash_info;
++ int data_size, padding;
++
++ dfc_get_pattern(context, cmd, &data_size, &padding);
++
++ dma_desc->ddadr = next_desc_phys;
++ dma_int_en &= (DCMD_STARTIRQEN | DCMD_ENDIRQEN);
++
++ if (cmd == flash_info->program) {
++
++ dma_desc->dsadr = buf_phys;
++ dma_desc->dtadr = NDDB_DMA_ADDR;
++ dma_desc->dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST32 | data_size;
++
++ } else if (cmd == flash_info->read1 || cmd == flash_info->read_id ||
++ cmd == flash_info->read_status) {
++
++ dma_desc->dsadr = NDDB_DMA_ADDR;
++ dma_desc->dtadr = buf_phys;
++ dma_desc->dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST32 | data_size;
++ }
++ else
++ return -EINVAL;
++ return 0;
++}
++
++void dfc_start_cmd_dma(struct dfc_context* context, struct pxa_dma_desc* dma_desc)
++{
++ DRCMR99 = DRCMR_MAPVLD | context->cmd_dma_ch; /* NAND CMD DRCMR */
++ DDADR(context->cmd_dma_ch) = (uint32_t)dma_desc;
++ DCSR(context->cmd_dma_ch) |= DCSR_RUN;
++}
++
++void dfc_start_data_dma(struct dfc_context* context, struct pxa_dma_desc* dma_desc)
++{
++ DRCMR97 = DRCMR_MAPVLD | context->data_dma_ch;
++ DDADR(context->data_dma_ch) = (uint32_t)dma_desc;
++ DCSR(context->data_dma_ch) |= DCSR_RUN;
++}
++
++/******************************************************************************
++ dfc_read_fifo_partial
++
++ Description:
++ This function reads data from data buffer of DFC.Bytes can be any less than
++ or equal to data_size, the left is ignored by ReadFIFO though they will be
++ read from NDDB to clear data buffer.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ Output Parameters:
++ pBuffer
++ Pointer to the data buffer where data should be placed.
++ Returns:
++ None
++*******************************************************************************/
++void dfc_read_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size)
++{
++ uint32_t data = 0;
++ uint32_t i = 0;
++ uint32_t bytes_multi;
++ uint32_t bytes_remain;
++
++
++ if (1 == data_size) {
++ data = dfc_read(context, DFC_NDDB) & 0xFF;
++ *buffer++ = (uint8_t)data;
++ } else if (2 == data_size) {
++ data = dfc_read(context, DFC_NDDB) & 0xFFFF;
++ *buffer++ = data & 0xFF;
++ *buffer++ = (data >> 8) & 0xFF;
++ } else {
++ bytes_multi = (nbytes & 0xFFFFFFFC);
++ bytes_remain = nbytes & 0x03;
++
++ i = 0;
++ /* Read the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ data = dfc_read(context, DFC_NDDB);
++ /* FIXME: we don't know whether the buffer
++ * align to 4 bytes or not. Cast the buffer
++ * to int is not safe here. Especially under
++ * gcc 4.x. Used memcpy here. But the memcpy
++ * may be not correct on BE architecture.
++ * --by Yin, Fengwei
++ */
++ memcpy(buffer, &data, sizeof(data));
++ i += sizeof(data);
++ buffer += sizeof(data);
++ }
++
++ /* Read the left bytes_remain bytes data */
++ if (bytes_remain) {
++ data = dfc_read(context, DFC_NDDB);
++ for (i = 0; i < bytes_remain; i++)
++ *buffer++ = (uint8_t)((data >> (8*i)) & 0xFF);
++ }
++
++ /* When read the remain bytes, we always read 4 bytes data
++ * to DFC. So the data_size should subtract following number.
++ */
++ data_size -= bytes_multi + (bytes_remain ? sizeof(data) : 0);
++
++ /* We need Read data_size bytes data totally */
++ while (data_size > 0) {
++ data = dfc_read(context, DFC_NDDB);
++ data_size -= sizeof(data);
++ }
++
++/*
++ while(i < ((uint32_t)data_size) ) {
++ if (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ *temp = dfc_reg->nddb;
++ } else if (i == bytes_multi && bytes_remain){
++ uint32_t j = 0;
++ data = dfc_reg->nddb;
++ while (j++ < bytes_remain) {
++ *buffer++ = (uint8_t) \
++ ((data>>(8*j)) & 0xFF);
++ }
++ } else {
++ data = dfc_reg->nddb;
++ }
++ i += 4;
++ buffer += 4;
++ }
++*/
++ }
++ return;
++}
++
++/******************************************************************************
++ dfc_write_fifo_partial
++
++ Description:
++ Write to data buffer of DFC from a buffer. Bytes can be same as
++ data_size, also can be data_size-padding, but can¡¯t be random value,
++ the left will be automatically padded by WriteFIFO.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ bytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ buffer
++ Pointer to the data buffer where data will be taken from to be written
++ to DFC data buffer
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_write_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size)
++{
++ uint32_t i = 0;
++
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t temp;
++ /*
++ * caller guarantee buffer contains appropriate data thereby
++ * it is impossible for nbytes not to be a multiple of 4 byte
++ */
++
++ /* Write the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = buffer[0] | buffer[1] << 8 |
++ buffer[2] << 16 | buffer[3] << 24;
++ dfc_write(context, DFC_NDDB, temp);
++ buffer += 4;
++ i += 4;
++ }
++
++ /* Write the left bytes_remain bytes data */
++ if (bytes_remain) {
++ temp = 0xFFFFFFFF;
++ for (i = 0; i < bytes_remain; i++)
++ temp &= *buffer++ << i*8;
++
++ dfc_write(context, DFC_NDDB, temp);
++ }
++
++ /* When write the remain bytes, we always write 4 bytes data
++ * to DFC. So the data_size should subtract following number.
++ */
++ data_size -= bytes_multi + (bytes_remain ? sizeof(temp) : 0);
++
++ while (data_size > 0) {
++ dfc_write(context, DFC_NDDB, 0xFFFFFFFF);
++ data_size -= 4;
++ }
++
++/*
++ while (i < ((uint32_t)data_size)) {
++ if (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ dfc_reg->nddb = *temp;
++ }
++ else if (i == bytes_multi && bytes_remain) {
++ uint32_t j = 0, data = 0xFFFFFFFF;
++ while (j < bytes_remain) {
++ data &= (uint8_t)(*buffer) << j;
++ buffer++;
++ j++;
++ }
++ dfc_reg->nddb = data;
++ }
++ else {
++ dfc_reg->nddb = 0xFFFFFFFF;
++ }
++ i += 4;
++ buffer += 4;
++ }
++*/
++
++ return;
++}
++
++/******************************************************************************
++ dfc_read_fifo
++ Description:
++ This function reads data from data buffer of DFC.Bytes can be any less
++ than or equal to data_size, the left is ignored by ReadFIFO though they
++ will be read from NDDB to clear data buffer.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ Output Parameters:
++ buffer
++ Pointer to the data buffer where data should be placed.
++ Returns:
++ None
++*******************************************************************************/
++
++void dfc_read_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes)
++{
++ uint32_t i = 0;
++
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t temp;
++
++ /* Read the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = dfc_read(context, DFC_NDDB);
++ /* FIXME: we don't know whether the buffer
++ * align to 4 bytes or not. Cast the buffer
++ * to int is not safe here. Especially under
++ * gcc 4.x. Used memcpy here. But the memcpy
++ * may be not correct on BE architecture.
++ * --by Yin, Fengwei
++ */
++ memcpy(buffer, &temp, sizeof(temp));
++ i += sizeof(temp);
++ buffer += sizeof(temp);
++ }
++
++ /* Read the left bytes_remain bytes data */
++ temp = dfc_read(context, DFC_NDDB);
++ for (i = 0; i < bytes_remain; i++) {
++ *buffer++ = (uint8_t)((temp >> (8*i)) & 0xFF);
++ }
++
++/*
++ while (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ *temp = dfc_reg->nddb;
++ i += 4;
++ buffer += 4;
++ }
++
++ if (bytes_remain) {
++ data = dfc_reg->nddb;
++ for (i = 0; i < bytes_remain; i++) {
++ *buffer++ = (uint8_t)((data>>(8*i)) & 0xFF);
++ }
++ }
++*/
++
++ return;
++}
++
++/******************************************************************************
++ dfc_write_fifo
++ Description:
++ Write to data buffer of DFC from a buffer.Bytes can be same as data_size,
++ also can be data_size-padding, but can¡¯t be random value, the left will
++ be automatically padded by WriteFIFO.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ buffer
++ Pointer to the data buffer where data will be taken from to be written to
++ DFC data buffer
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_write_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes)
++{
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t i=0;
++ uint32_t temp;
++
++ /* Write the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = buffer[0] | buffer[1] << 8 |
++ buffer[2] << 16 | buffer[3] << 24;
++ dfc_write(context, DFC_NDDB, temp);
++ buffer += 4;
++ i += 4;
++ }
++
++ /* Write the left bytes_remain bytes data */
++ temp = 0xFFFFFFFF;
++ for (i = 0; i < bytes_remain; i++)
++ temp &= *buffer++ << i*8;
++ dfc_write(context, DFC_NDDB, temp);
++
++/*
++ while (i < nbytes) {
++ temp = (uint32_t *)buffer;
++ dfc_reg->nddb = *temp;
++ i += 4;
++ buffer += 4;
++ }
++*/
++}
++
++/******************************************************************************
++ dfc_read_badblock_addr
++
++ Description:
++ This function reads bad block address in units of block starting from 0
++ if bad block is detected. It takes into the account if the operation is
++ for CS0 or CS1 depending on settings of chip_select parameter of DFC
++ Mode structure.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ pBadBlockAddr
++ Used to retrieve bad block address back to caller if bad block is
++ detected
++ Returns:
++ None
++*******************************************************************************/
++void dfc_read_badblock_addr(struct dfc_context *context, uint32_t *bbaddr)
++{
++ uint32_t ndbdr;
++ if (0 == context->dfc_mode->chip_select)
++ ndbdr = dfc_read(context, DFC_NDBDR0);
++ else
++ ndbdr = dfc_read(context, DFC_NDBDR1);
++
++ if (512 == context->flash_info->page_size) {
++ ndbdr = (ndbdr >> 5) & 0xFFF;
++ *bbaddr = ndbdr;
++ } else if (2048 == context->flash_info->page_size) {
++ /* 16 bits LB */
++ ndbdr = (ndbdr >> 8);
++ *bbaddr = ndbdr;
++ }
++ return;
++}
++
++/******************************************************************************
++ dfc_enable_int
++
++ Description:
++ This function is used to enable DFC interrupts. The bits in int_mask
++ will be used to unmask NDCR register to enable corresponding interrupts.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to enable
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_enable_int(struct dfc_context *context, uint32_t int_mask)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~int_mask;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_disable_int
++
++ Description:
++ This function is used to disable DFC interrupts.
++ The bits inint_mask will be used to mask NDCR register to disable
++ corresponding interrupts.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to disable
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_disable_int(struct dfc_context *context, uint32_t int_mask)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= int_mask;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_clear_int
++
++ Description:
++ This function is used to disable DFC interrupts.
++ The bits in int_mask will be used to clear corresponding interrupts
++ in NDCR register
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to clear
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_clear_int(struct dfc_context *context, uint32_t int_mask)
++{
++ dfc_write(context, DFC_NDSR, int_mask);
++
++ dfc_read(context, DFC_NDSR);
++ return;
++}
++
++/*
++ * high level primitives
++ */
++
++/******************************************************************************
++ dfc_init
++
++ Description:
++ This function does entire DFC initialization according to the NAND
++ flash type currently used with platform, including setting MFP, set
++ flash timing, set DFC mode, configuring specified flash parameters
++ in DFC, clear ECC logic and page count register.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ if MFPRs are set correctly
++ -EINVAL
++ if specified flash is not support by check bytes per page and pages per
++ block
++******************************************************************************/
++
++static mfp_cfg_t pxa300_nand_cfg[] = {
++ /* NAND */
++ MFP_CFG_X(DF_INT_RnB, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nRE_nOE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nWE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_CLE_nOE, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nADV1_ALE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS0, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS1, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_IO0, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO1, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO2, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO3, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO4, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO5, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO6, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO7, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO8, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO9, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO10, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO11, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO12, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO13, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO14, AF1, DS08X, PULL_LOW),
++};
++
++#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
++
++int dfc_init(struct dfc_context* context, int type)
++{
++ int status;
++ struct dfc_flash_info * flash_info;
++ uint32_t ndcr = 0x00000FFF; /* disable all interrupts */
++
++ status = dfc_get_flash_info(type, &flash_info);
++ if (status)
++ return status;
++ context->flash_info = flash_info;
++
++ pxa3xx_mfp_config(ARRAY_AND_SIZE(pxa300_nand_cfg));
++ //enable_dfc_pins();
++
++ dfc_set_timing(context, &context->flash_info->timing);
++
++ if (flash_info->enable_arbiter)
++ ndcr |= NDCR_ND_ARB_EN;
++
++ if (64 == flash_info->page_per_block)
++ ndcr |= NDCR_PG_PER_BLK;
++ else if (32 != flash_info->page_per_block)
++ return -EINVAL;
++
++ if (flash_info->row_addr_start)
++ ndcr |= NDCR_RA_START;
++
++ ndcr |= (flash_info->read_id_bytes)<<16;
++
++ ndcr |= (flash_info->dfc_mode) << 21;
++
++ if (flash_info->ncsx)
++ ndcr |= NDCR_NCSX;
++
++ if (2048 == flash_info->page_size)
++ ndcr |= NDCR_PAGE_SZ;
++ else if (512 != flash_info->page_size)
++ return -EINVAL;
++
++ if (16 == flash_info->flash_width)
++ ndcr |= NDCR_DWIDTH_M;
++ else if (8 != flash_info->flash_width)
++ return -EINVAL;
++
++ if (16 == flash_info->dfc_width)
++ ndcr |= NDCR_DWIDTH_C;
++ else if (8 != flash_info->dfc_width)
++ return -EINVAL;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ dfc_set_dma(context);
++ dfc_set_ecc(context);
++ dfc_set_spare(context);
++
++ return 0;
++}
++
++/******************************************************************************
++ dfc_init_no_gpio
++
++ Description:
++ This function does entire DFC initialization according to the NAND
++ flash type currently used with platform, including set flash timing,
++ set DFC mode, configuring specified flash parameters in DFC, clear
++ ECC logic and page count register. The only difference with dfc_init
++ is that it does not set MFP&GPIO, very useful in OS loader
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ if MFPRs are set correctly
++ -EINVAL
++ if specified flash is not support by check bytes per page and pages
++ per block
++******************************************************************************/
++int dfc_init_no_gpio(struct dfc_context* context, int type)
++{
++ struct dfc_flash_info * flash_info;
++ uint32_t ndcr = 0x00000FFF; /* disable all interrupts */
++ int status;
++
++ status = dfc_get_flash_info(type, &flash_info);
++ if (status)
++ return status;
++ context->flash_info = flash_info;
++
++ dfc_set_timing(context, &context->flash_info->timing);
++
++ if (flash_info->enable_arbiter)
++ ndcr |= NDCR_ND_ARB_EN;
++
++ if (64 == flash_info->page_per_block)
++ ndcr |= NDCR_PG_PER_BLK;
++ else if (32 != flash_info->page_per_block)
++ return -EINVAL;
++
++ if (flash_info->row_addr_start)
++ ndcr |= NDCR_RA_START;
++
++ ndcr |= (flash_info->read_id_bytes)<<16;
++
++ ndcr |= (flash_info->dfc_mode) << 21;
++
++ if (flash_info->ncsx)
++ ndcr |= NDCR_NCSX;
++
++ if (2048 == flash_info->page_size)
++ ndcr |= NDCR_PAGE_SZ;
++ else if (512 != flash_info->page_size)
++ return -EINVAL;
++
++ if (16 == flash_info->flash_width)
++ ndcr |= NDCR_DWIDTH_M;
++ else if (8 != flash_info->flash_width)
++ return -EINVAL;
++
++ if (16 == flash_info->dfc_width)
++ ndcr |= NDCR_DWIDTH_C;
++ else if (8 != flash_info->dfc_width)
++ return -EINVAL;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ dfc_set_dma(context);
++ dfc_set_ecc(context);
++ dfc_set_spare(context);
++
++ return 0;
++}
++
++/*
++ * This macro will be used in following NAND operation functions.
++ * It is used to clear command buffer to ensure cmd buffer is empty
++ * in case of operation is timeout
++ */
++#define ClearCMDBuf() do { \
++ dfc_stop(context); \
++ udelay(NAND_OTHER_TIMEOUT); \
++ } while (0)
++
++/******************************************************************************
++ dfc_reset_flash
++
++ Description:
++ It reset the flash. The function can be called at any time when the
++ device is in Busy state during random read/program/erase mode and
++ reset operation will abort all these operations. After reset operation
++ the device is ready to wait for next command
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ execution succeeds
++ -ETIME
++ if timeout
++*******************************************************************************/
++int dfc_reset_flash(struct dfc_context *context)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ uint32_t event, event_out;
++ unsigned long timeo;
++ int status;
++
++ /* Send command */
++ dfc_send_cmd(context, (uint16_t)flash_info->reset, 0xFFFFFFFF, 0);
++
++ event = (context->dfc_mode->chip_select)? \
++ NDSR_CS1_CMDD : NDSR_CS0_CMDD;
++
++ /* Wait for CMDDM(command done successfully) */
++ status = dfc_wait_event(context, event, &event_out,
++ NAND_OTHER_TIMEOUT, 0);
++
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++
++
++ /* Wait until flash device is stable or timeout (10ms) */
++ timeo = jiffies + HZ;
++ do {
++ if (monahans_df_dev_ready(context->mtd))
++ break;
++ } while (time_before(jiffies, timeo));
++
++ return 0;
++}
++
++int dfc_readid(struct dfc_context *context, uint32_t *id)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ uint32_t event_out;
++ int status;
++ char tmp[DFC_DATA_SIZE_ID];
++
++ /* Send command */
++ status = dfc_send_cmd(context, (uint16_t)flash_info->read_id,
++ 0xFFFFFFFF, 0);
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++
++ /* Wait for CMDDM(command done successfully) */
++ status = dfc_wait_event(context, NDSR_RDDREQ, &event_out,
++ NAND_OTHER_TIMEOUT, 0);
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++ dfc_read_fifo_partial(context, (unsigned char *)tmp,
++ context->flash_info->read_id_bytes, DFC_DATA_SIZE_ID);
++
++ *id = tmp[0] | (tmp[1] << 8);
++ return 0;
++}
++
++#define ERR_NONE 0x0
++#define ERR_DMABUSERR (-0x01)
++#define ERR_SENDCMD (-0x02)
++#define ERR_DBERR (-0x03)
++#define ERR_BBERR (-0x04)
++#define ERR_BUSY (-0x05)
++
++#define STATE_CMD_SEND 0x1
++#define STATE_CMD_HANDLE 0x2
++#define STATE_DMA_TRANSFER 0x3
++#define STATE_DMA_DONE 0x4
++#define STATE_READY 0x5
++#define STATE_SUSPENDED 0x6
++#define STATE_DATA_TRANSFER 0x7
++
++#define NAND_RELOC_MAX 127
++#define NAND_RELOC_HEADER 0x524e
++#define MAX_CHIP 1
++#define NAND_CMD_DMA_LEN 12
++
++#define MAX_TIM_SIZE 0x1000
++#define MAX_BBT_SLOTS 24
++
++struct reloc_item {
++ unsigned short from;
++ unsigned short to;
++};
++
++struct reloc_table {
++ unsigned short header;
++ unsigned short total;
++ struct reloc_item reloc[NAND_RELOC_MAX];
++};
++
++struct monahans_dfc_info {
++ unsigned int state;
++ struct dfc_context *context;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ dma_addr_t data_buf_addr;
++ char *data_buf;
++ int data_dma;
++ struct pxa_dma_desc *data_desc;
++ dma_addr_t data_desc_addr;
++ dma_addr_t cmd_buf_addr;
++ char *cmd_buf;
++ int cmd_dma;
++ struct pxa_dma_desc *cmd_desc;
++ dma_addr_t cmd_desc_addr;
++ u64 dma_mask;
++#else
++ char *data_buf;
++#endif
++ u32 current_slot;
++ struct reloc_table table;
++ unsigned int table_init;
++ /* relate to the command */
++ unsigned int cmd;
++ unsigned int addr;
++ unsigned int column;
++ int retcode;
++ unsigned int buf_count;
++ struct completion cmd_complete;
++};
++
++static struct dfc_mode dfc_mode =
++{
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ 1, /* enable DMA */
++#else
++ 0,
++#endif
++ 1, /* enable ECC */
++ 1, /* enable SPARE */
++ 0, /* CS0 */
++};
++
++
++struct dfc_context dfc_context =
++{
++ 0, /* Initialized at function monahans_df_init() */
++ &dfc_mode,
++ 0, /* data dma channel */
++ 0, /* cmd dma channel */
++ NULL, /* &zylonite_flashinfo */
++};
++
++
++/*
++ * MTD structure for Zylonite board
++ */
++static struct mtd_info *monahans_mtd = NULL;
++
++/*
++ * BootRom and XDB will use last 127 block, and they will keep all the status
++ * of the bootloader and image, so skip the first 2M size and last 2M size
++ */
++static struct mtd_partition partition_info[] = {
++ {
++ name: "Bootloader",
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ size: 0x00060000,
++//#else
++// size: 0x00040000,
++//#endif
++ offset: 0,
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ },{
++ name: "Kernel",
++ size: 0x00200000,
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ offset: 0x00060000,
++//#else
++// offset: 0x00040000,
++//#endif
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ },{
++ name: "Filesystem",
++ size: 0x05000000,
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ offset: 0x00260000,
++//#else
++// offset: 0x00240000,
++//#endif
++ }, {
++ name: "MassStorage",
++ size: 0x0, /* It will be set at probe function */
++ offset: MTDPART_OFS_APPEND /* Append after fs section */
++ }, {
++ name: "BBT",
++ size: 0x0, /* It will be set at probe function */
++ offset: MTDPART_OFS_APPEND,/* Append after fs section */
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ }
++};
++
++#define PART_NUM ARRAY_SIZE(partition_info)
++
++/* MHN_OBM_V2 is related to BBT in MOBM V2
++ * MHN_OBM_V3 is related to BBT in MOBM V3
++ */
++enum {
++ MHN_OBM_NULL = 0,
++ MHN_OBM_V1,
++ MHN_OBM_V2,
++ MHN_OBM_V3,
++ MHN_OBM_INVAL
++} MHN_OBM_TYPE;
++
++static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
++static uint8_t scan_main_bbt_pattern[] = { 'p', 'x', 'a', '1' };
++static uint8_t scan_mirror_bbt_pattern[] = { '0', 'a', 'x', 'p' };
++
++static struct nand_bbt_descr monahans_bbt_default = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .maxblocks = 2,
++ .len = 2,
++ .offs = 0,
++ .pattern = scan_ff_pattern,
++};
++
++static struct nand_bbt_descr monahans_bbt_main = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 6,
++ .maxblocks = 2,
++ .offs = 2,
++ .len = 4,
++ .pattern = scan_main_bbt_pattern,
++};
++
++static struct nand_bbt_descr monahans_bbt_mirror = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 6,
++ .maxblocks = 2,
++ .offs = 2,
++ .len = 4,
++ .pattern = scan_mirror_bbt_pattern,
++};
++
++#if 0
++static struct nand_bbt_descr monahans_bbt_main = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 2,
++ .maxblocks = 2,
++ .offs = 0x0,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++static struct nand_bbt_descr monahans_bbt_mirror = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 2,
++ .maxblocks = 2,
++ .offs = 0x0,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++#endif
++
++static struct nand_ecclayout monahans_lb_nand_oob = {
++ .eccbytes = 24,
++ .eccpos = {
++ 40, 41, 42, 43, 44, 45, 46, 47,
++ 48, 49, 50, 51, 52, 53, 54, 55,
++ 56, 57, 58, 59, 60, 61, 62, 63},
++ .oobfree = { {2, 38} }
++};
++
++/*
++ * Monahans OOB size is only 8 bytes, and the rest 8 bytes is controlled by
++ * hardware for ECC. We construct virutal ECC buffer. Acutally, ECC is 6 bytes
++ * and the remain 2 bytes are reserved.
++ */
++static struct nand_ecclayout monahans_sb_nand_oob = {
++ .eccbytes = 6,
++ .eccpos = {8, 9, 10, 11, 12, 13 },
++ .oobfree = { {2, 6} }
++};
++
++
++static inline int is_buf_blank(u8 * buf, int size)
++{
++ int i = 0;
++ while(i < size) {
++ if (*((unsigned long *)(buf + i)) != 0xFFFFFFFF)
++ return 0;
++ i += 4;
++ }
++ if (i > size) {
++ i -= 4;
++ while( i < size) {
++ if(*(buf + i) != 0xFF)
++ return 0;
++ i++;
++ }
++ }
++ return 1;
++}
++
++static void print_buf(char *buf, int num)
++{
++ int i = 0;
++
++ while (i < num) {
++ printk(KERN_ERR "0x%08x: %02x %02x %02x %02x %02x %02x %02x"
++ " %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
++ (unsigned int) (i), buf[i], buf[i+1], buf[i+2],
++ buf[i+3], buf[i+4], buf[i+5], buf[i+6], buf[i+7],
++ buf[i+8], buf[i+9], buf[i+10],buf[i+11], buf[i+12],
++ buf[i+13], buf[i+14], buf[i+15]);
++ i += 16;
++ }
++}
++
++static int inline enable_dfc_dma(struct dfc_context *context, int enable)
++{
++ int ret = dfc_mode.enable_dma;
++ unsigned long ndcr;
++
++ if (!enable) {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~NDCR_DMA_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_dma = 0;
++ } else {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_DMA_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_dma = 1;
++ }
++ return ret;
++}
++
++
++static void inline dump_info(struct monahans_dfc_info *info)
++{
++ if (!info)
++ return;
++
++ printk(KERN_ERR "cmd:0x%x; addr:0x%x; retcode:%d; state:%d \n",
++ info->cmd, info->addr, info->retcode, info->state);
++}
++
++static void inline enable_hw_ecc(struct dfc_context* context, int enable)
++{
++ unsigned long ndcr;
++
++ if (!enable) {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~NDCR_ECC_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_ecc = 0;
++ }
++ else {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_ECC_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_ecc = 1;
++ }
++}
++
++/*
++ * Now, we are not sure that the NDSR_RDY mean the flash is ready.
++ * Need more test.
++ */
++static int monahans_df_dev_ready(struct mtd_info *mtd)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ struct dfc_context* context = info->context;
++
++ return ((dfc_read(context, DFC_NDSR) & NDSR_RDY));
++}
++
++/* each read, we can only read 4bytes from NDDB, we must buffer it */
++static u_char monahans_df_read_byte(struct mtd_info *mtd)
++{
++ char retval = 0xFF;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (info->column < info->buf_count) {
++ /* Has just send a new command? */
++ retval = info->data_buf[info->column++];
++ }
++ return retval;
++}
++
++static void monahans_df_write_byte(struct mtd_info *mtd, u8 byte)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ info->data_buf[info->column++] = byte;
++}
++
++static u16 monahans_df_read_word(struct mtd_info *mtd)
++{
++ u16 retval = 0xFFFF;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (!(info->column & 0x01) && info->column < info->buf_count) {
++ retval = *((u16 *)(info->data_buf+info->column));
++ info->column += 2;
++ }
++ return retval;
++}
++
++static void monahans_df_write_word(struct mtd_info *mtd, u16 word)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (!(info->column & 0x01) && info->column < info->buf_count) {
++ *((u16 *)(info->data_buf+info->column)) = word;
++ info->column += 2;
++ }
++}
++
++static void monahans_df_read_buf(struct mtd_info *mtd, u_char *buf, int len)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int real_len = min((unsigned int)len, info->buf_count - info->column);
++
++ memcpy(buf, info->data_buf + info->column, real_len);
++ info->column += real_len;
++}
++
++static void monahans_df_write_buf(struct mtd_info *mtd,
++ const u_char *buf, int len)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int real_len = min((unsigned int)len, info->buf_count - info->column);
++
++ memcpy(info->data_buf + info->column, buf, real_len);
++ info->column += real_len;
++}
++
++static int monahans_df_verify_buf(struct mtd_info *mtd,
++ const u_char *buf, int len)
++{
++ return 0;
++}
++
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++static void monahans_dfc_cmd_dma_irq(int channel, void *data,
++ struct pt_regs *regs)
++{
++ unsigned int dcsr;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)data;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++ unsigned int intm;
++
++ dcsr = DCSR(channel);
++ DCSR(channel) = dcsr;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ D1(printk("cmd dma interrupt, channel:%d, DCSR:0x%08x\n", \
++ channel, dcsr));
++
++ if (dcsr & DCSR_BUSERR) {
++ info->retcode = ERR_DMABUSERR;
++ complete(&info->cmd_complete);
++ } else {
++ if ((info->cmd == NAND_CMD_READ0) ||
++ (info->cmd == NAND_CMD_READOOB)|| \
++ (info->cmd == NAND_CMD_READID) || \
++ (info->cmd == NAND_CMD_STATUS)) {
++ dfc_enable_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ } else if (info->cmd == NAND_CMD_PAGEPROG)
++ dfc_enable_int(context, NDSR_WRDREQ);
++ else if (info->cmd == NAND_CMD_ERASE1)
++ dfc_enable_int(context, intm);
++ }
++
++ return;
++}
++
++
++static void monahans_dfc_data_dma_irq(int channel, void *data,
++ struct pt_regs *regs)
++{
++ unsigned int dcsr, intm;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)data;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++
++ dcsr = DCSR(channel);
++ DCSR(channel) = dcsr;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ D1(printk("data dma interrupt, channel:%d, DCSR:0x%08x\n",
++ channel, dcsr));
++ if (dcsr & DCSR_BUSERR) {
++ info->retcode = ERR_DMABUSERR;
++ complete(&info->cmd_complete);
++ }
++
++ if (info->cmd == NAND_CMD_PAGEPROG) {
++ /* DMA interrupt may be interrupted by other IRQs*/
++ info->state = STATE_DMA_DONE;
++ dfc_enable_int(context, intm);
++ } else {
++ info->state = STATE_READY;
++ complete(&info->cmd_complete);
++ }
++
++}
++#endif
++
++static irqreturn_t monahans_dfc_irq(int irq, void *devid)
++{
++ unsigned int status, event, intm, cmd;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)devid;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++ event = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ status = dfc_read(context, DFC_NDSR);
++ D1(printk("DFC irq, NDSR:0x%x\n", status));
++ if (status & (NDSR_RDDREQ | NDSR_DBERR)) {
++ if (status & NDSR_DBERR) {
++ info->retcode = ERR_DBERR;
++ }
++
++ dfc_disable_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ dfc_clear_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ if (info->cmd == NAND_CMD_READID)
++ cmd = context->flash_info->read_id;
++ else if (info->cmd == NAND_CMD_STATUS)
++ cmd = context->flash_info->read_status;
++ else if (info->cmd == NAND_CMD_READ0 ||
++ info->cmd == NAND_CMD_READOOB)
++ cmd = context->flash_info->read1;
++ else {
++ printk(KERN_ERR "No according command:0x%x happens\n",
++ info->cmd);
++ goto out;
++ }
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->state = STATE_DMA_TRANSFER;
++ dfc_start_data_dma(context,
++ (struct pxa_dma_desc*)info->data_desc_addr);
++#else
++ info->state = STATE_DATA_TRANSFER;
++ complete(&info->cmd_complete);
++#endif
++ } else if (status & NDSR_WRDREQ) {
++ dfc_disable_int(context, NDSR_WRDREQ);
++ dfc_clear_int(context, NDSR_WRDREQ);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->state = STATE_DMA_TRANSFER;
++ dfc_start_data_dma(context,
++ (struct pxa_dma_desc*)info->data_desc_addr);
++#else
++ info->state = STATE_DATA_TRANSFER;
++ complete(&info->cmd_complete);
++#endif
++ } else if (status & event) {
++ if (status & NDSR_CS0_BBD) {
++ info->retcode = ERR_BBERR;
++ }
++
++ dfc_disable_int(context, intm);
++ dfc_clear_int(context, event);
++ info->state = STATE_READY;
++ complete(&info->cmd_complete);
++ }
++out:
++ return IRQ_HANDLED;
++}
++
++static int dfc_send_command(struct mtd_info *mtd, unsigned int cmd,
++ unsigned int addr, unsigned int num_pages,
++ unsigned int event)
++{
++
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ struct dfc_context* context = info->context;
++ int status;
++ int ret;
++
++ D1(printk("ready send command, cmd:0x%x, at address:0x%x,"
++ " num_pages:%d, wait event:0x%x\n", cmd, addr, num_pages, event));
++
++ info->state = STATE_CMD_SEND;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ status = dfc_setup_cmd_dma(context, cmd, addr, num_pages,
++ (uint32_t *)info->cmd_buf, info->cmd_buf_addr,
++ DDADR_STOP, DCMD_ENDIRQEN, info->cmd_desc);
++#else
++ status = dfc_send_cmd(context, cmd, addr, num_pages);
++#endif
++ if (status) {
++ info->retcode = ERR_SENDCMD;
++ dfc_stop(context);
++ udelay(20);
++ printk(KERN_ERR "fail send command\n");
++ return info->retcode;
++ }
++ info->state = STATE_CMD_HANDLE;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_setup_data_dma(context, cmd, info->data_buf_addr,
++ DDADR_STOP, DCMD_ENDIRQEN, info->data_desc);
++ dfc_start_cmd_dma(context, (struct pxa_dma_desc*)info->cmd_desc_addr);
++#endif
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_enable_int(context, event);
++#endif
++ ret = wait_for_completion_timeout(&info->cmd_complete, 2*HZ);
++ if (!ret){
++ printk(KERN_ERR "Command time out\n");
++ dump_info(info);
++ }
++ D1(printk("command return, cmd:0x%x, retcode:%d\n",
++ info->cmd, info->retcode));
++ return 0;
++}
++
++static void monahans_df_command(struct mtd_info *mtd, unsigned command,
++ int column, int page_addr )
++{
++ struct nand_chip *this = (struct nand_chip *)(mtd->priv);
++ struct monahans_dfc_info *info =
++ (struct monahans_dfc_info *)(this->priv);
++ struct dfc_context *context = info->context;
++ struct dfc_flash_info * flash_info = context->flash_info;
++ int ret, pages_shift;
++ int status;
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ int datasize;
++ int paddingsize;
++#endif
++ unsigned int to;
++
++ D1(printk("command:0x%x at address:0x%x, column:0x%x\n",
++ command, page_addr, column));
++
++ if (info->state != STATE_READY) {
++ printk(KERN_ERR "CHIP is not ready.\n");
++ dump_info(info);
++ info->retcode = ERR_BUSY;
++ return;
++ }
++ info->retcode = ERR_NONE;
++ pages_shift = this->phys_erase_shift - this->page_shift;
++ if (info->table_init) {
++ to = search_rel_block((page_addr >> pages_shift), mtd);
++ if (to) {
++ page_addr = (to << pages_shift) | (page_addr
++ & ((1 << pages_shift) - 1));
++ }
++ }
++
++ switch ( command ) {
++ case NAND_CMD_READOOB:
++ /*
++ * DFC has mark the last 8 bytes OOB data if HARDEARE_ECC is
++ * enabled. We must first disable the HARDWARE_ECC for getting
++ * all the 16 bytes OOB
++ */
++ enable_hw_ecc(context, 0);
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ info->column = mtd->writesize + column;
++ info->cmd = command;
++ info->addr = page_addr << this->page_shift;
++ ret = dfc_send_command(mtd, flash_info->read1, info->addr,
++ 1, NDSR_RDDREQ | NDSR_DBERR);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read1, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ min(info->buf_count, datasize), datasize);
++ info->state = STATE_READY;
++#endif
++ /* We only are OOB, so if the data has error, does not matter */
++ if (info->retcode == ERR_DBERR)
++ info->retcode = ERR_NONE;
++ enable_hw_ecc(context, 1);
++ break;
++
++ case NAND_CMD_READ0:
++ enable_hw_ecc(context, 1);
++ info->column = column;
++ info->cmd = command;
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ memset(info->data_buf, 0xFF, info->buf_count);
++ info->addr = page_addr << this->page_shift;
++
++ ret = dfc_send_command(mtd, flash_info->read1, info->addr,
++ 1, NDSR_RDDREQ | NDSR_DBERR);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read1, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ min(info->buf_count, datasize), datasize);
++ info->state = STATE_READY;
++#endif
++ /* When the data buf is blank, the DFC will report DB error */
++ if (info->retcode == ERR_DBERR && is_buf_blank(info->data_buf,
++ mtd->writesize))
++ info->retcode = ERR_NONE;
++
++ if (info->retcode == ERR_DBERR) {
++ printk(KERN_ERR "DB error at address 0x%x\n",
++ info->addr);
++ print_buf(info->data_buf, info->buf_count);
++ }
++ break;
++ case NAND_CMD_SEQIN:
++ /* Write only OOB? */
++
++ info->cmd = command;
++ if (column >= mtd->writesize) {
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ enable_hw_ecc(context, 0);
++ } else {
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ enable_hw_ecc(context, 1);
++ }
++ memset(info->data_buf, 0xFF, mtd->writesize + mtd->oobsize);
++ info->column = column;
++ info->addr = page_addr << this->page_shift;
++ break;
++ case NAND_CMD_PAGEPROG:
++ /* prevois command is NAND_CMD_SEIN ?*/
++ if (info->cmd != NAND_CMD_SEQIN) {
++ info->cmd = command;
++ info->retcode = ERR_SENDCMD;
++ printk(KERN_ERR "Monahans NAND device: "
++ "No NAND_CMD_SEQIN executed before.\n");
++ enable_hw_ecc(context, 1);
++ break;
++ }
++ info->cmd = command;
++ ret = dfc_send_command(mtd, flash_info->program, info->addr,
++ 1, NDSR_WRDREQ);
++
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ if (ret != 0)
++ break;
++
++ dfc_get_pattern(info->context, flash_info->program, &datasize,
++ &paddingsize);
++ dfc_write_fifo_partial(info->context, info->data_buf, datasize,
++ datasize);
++
++ if (info->context->dfc_mode->chip_select)
++ dfc_enable_int(info->context,
++ NDSR_CS1_BBD | NDSR_CS1_CMDD);
++ else
++ dfc_enable_int(info->context,
++ NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ ret = wait_for_completion_timeout(&info->cmd_complete, 2*HZ);
++ if (!ret){
++ printk(KERN_ERR "Programm Command time out\n");
++ dump_info(info);
++ }
++
++ if (info->retcode == ERR_BBERR) {
++ mtd->block_markbad(mtd, info->addr);
++ }
++#endif
++ break;
++ case NAND_CMD_ERASE1:
++ info->cmd = command;
++ info->addr = (page_addr >> pages_shift) << this->phys_erase_shift;
++
++ if (info->context->dfc_mode->chip_select)
++ ret = dfc_send_command(mtd, flash_info->erase,
++ info->addr, 0, NDSR_CS1_BBD | NDSR_CS1_CMDD);
++ else
++ ret = dfc_send_command(mtd, flash_info->erase,
++ info->addr, 0, NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ if (info->retcode == ERR_BBERR) {
++ mtd->block_markbad(mtd, info->addr);
++ }
++ break;
++ case NAND_CMD_ERASE2:
++ break;
++ case NAND_CMD_READID:
++ info->cmd = command;
++ info->buf_count = flash_info->read_id_bytes;
++ info->column = 0;
++ info->addr = 0xFFFFFFFF;
++ ret = dfc_send_command(mtd, flash_info->read_id, info->addr,
++ 0, NDSR_RDDREQ);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read_id, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ info->buf_count, datasize);
++ info->state = STATE_READY;
++#endif
++ D1(printk("ReadID, [1]:0x%x, [2]:0x%x\n",
++ info->data_buf[0], info->data_buf[1]));
++ break;
++ case NAND_CMD_STATUS:
++ info->cmd = command;
++ info->buf_count = 1;
++ info->column = 0;
++ info->addr = 0xFFFFFFFF;
++ ret = dfc_send_command(mtd, flash_info->read_status,
++ info->addr, 0, NDSR_RDDREQ);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read_status,
++ &datasize, &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ info->buf_count, datasize);
++ info->state = STATE_READY;
++#endif
++ break;
++
++ case NAND_CMD_RESET:
++ status = dfc_reset_flash(&dfc_context);
++ if (status) {
++ printk(KERN_WARNING "Monahans NAND device:"
++ "NAND_CMD_RESET error\n");
++ }
++ break;
++ default:
++ printk(KERN_WARNING "Monahans NAND device:"
++ "Non-support the command.\n");
++ break;
++ }
++
++ if (info->retcode != ERR_NONE)
++ dfc_stop(info->context);
++}
++
++static void monahans_df_select_chip(struct mtd_info *mtd, int chip)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (chip <= MAX_CHIP)
++ info->context->dfc_mode->chip_select = chip;
++ else
++ printk(KERN_ERR "Monahans NAND device:"
++ "not select the NAND chips!\n");
++}
++
++static int monahans_df_waitfunc(struct mtd_info *mtd,
++ struct nand_chip *this)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ /* monahans_df_send_command has waited for command complete */
++ if (this->state == FL_WRITING || this->state == FL_ERASING) {
++ if (info->retcode == ERR_NONE)
++ return 0;
++ else {
++ /*
++ * any error make it return 0x01 which will tell
++ * the caller the erase and write fail
++ */
++ return 0x01;
++ }
++ }
++
++ return 0;
++}
++
++static int monahans_df_calculate_ecc(struct mtd_info *mtd,
++ const u_char *dat, u_char *ecc_code)
++{
++ return 0;
++}
++
++static int monahans_df_correct_data(struct mtd_info *mtd,
++ u_char *dat, u_char *read_ecc, u_char *calc_ecc)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ /*
++ * Any error include ERR_SEND_CMD, ERR_DBERR, ERR_BUSERR, we
++ * consider it as a ecc error which will tell the caller the
++ * read fail We have distinguish all the errors, but the
++ * nand_read_ecc only check this function return value
++ */
++ if (info->retcode != ERR_NONE)
++ return -1;
++
++ return 0;
++}
++
++static void monahans_df_enable_hwecc(struct mtd_info *mtd, int mode)
++{
++ return;
++}
++
++/*
++ * The relocation table management is different between MOBM V2 and V3.
++ *
++ * MOBM V2 is applied on chips taped out before MhnLV A0.
++ * MOBM V3 is applied on chips taped out after MhnLV A0. It's also applied
++ * on MhnLV A0.
++ */
++static int calc_obm_ver(void)
++{
++ unsigned int cpuid;
++ /* read CPU ID */
++ __asm__ (
++ "mrc p15, 0, %0, c0, c0, 0\n"
++ : "=r" (cpuid)
++ );
++ /* It's not xscale chip. */
++ if ((cpuid & 0xFFFF0000) != 0x69050000)
++ return MHN_OBM_INVAL;
++ /* It's MhnP Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006420)
++ return MHN_OBM_V2;
++ /* It's MhnP Bx */
++ if ((cpuid & 0x0000FFF0) == 0x00006820) {
++ if ((cpuid & 0x0F) <= 5)
++ return MHN_OBM_V2;
++ else
++ return MHN_OBM_V3;
++ }
++ /* It's MhnL Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006880) {
++ if ((cpuid & 0x0F) == 0)
++ return MHN_OBM_V2;
++ else
++ return MHN_OBM_V3;
++ }
++ /* It's MhnLV Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006890)
++ return MHN_OBM_V3;
++ return MHN_OBM_INVAL;
++}
++
++
++/*
++ * MOBM maintains a relocation table. It's used to replace bad blocks.
++ * If block A is bad, it will use block B instead.
++ * There're 127 relocated blocks. All of them reside in the bottom of NAND
++ * flash. So they're reserved and can't be calculated in mtd size and chip
++ * size.
++ */
++static int read_reloc_table(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct dfc_context *context = NULL;
++ struct reloc_table *table = NULL;
++ int page, maxslot;
++ int obm, valid;
++
++ obm = calc_obm_ver();
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ context = info->context;
++
++ mtd->size -= (NAND_RELOC_MAX * mtd->erasesize);
++ this->chipsize -= (NAND_RELOC_MAX << this->phys_erase_shift);
++ page = (1 << (this->phys_erase_shift - this->page_shift)) - 1;
++
++ this->select_chip(mtd, 0);
++ valid = 0;
++ if (obm == MHN_OBM_V2) {
++ /* On MOBM V2, the relocation table resides in the last page
++ * of the first block.
++ */
++ memset(info->data_buf, 0, BUFLEN);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ memcpy(((unsigned char *)&(info->table)), info->data_buf,
++ sizeof(struct reloc_table));
++ if (info->table.header == NAND_RELOC_HEADER)
++ valid = 1;
++ } else if (obm == MHN_OBM_V3) {
++ /* On MOBM V3, there're several relocation tables in the first
++ * block.
++ * When new bad blocks are found, a new relocation table will
++ * be generated and written back to the first block. But the
++ * original relocation table won't be erased. Even if the new
++ * relocation table is written wrong, system can still find an
++ * old one.
++ * One page contains one slot.
++ */
++ maxslot = 1 << (this->phys_erase_shift - this->page_shift);
++ page = maxslot - MAX_BBT_SLOTS;
++ for (; page < maxslot; page++) {
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ table = (struct reloc_table *)info->data_buf;
++ if (info->retcode == ERR_NONE) {
++ if (table->header != NAND_RELOC_HEADER) {
++ continue;
++ } else {
++ memcpy(((unsigned char *)&(info->table)),
++ table, sizeof(struct reloc_table));
++ valid = 1;
++ break;
++ }
++ }
++ }
++
++ } else {
++ printk(KERN_ERR "The version of MOBM isn't supported\n");
++ }
++ if (valid) {
++ memcpy(((unsigned char *)&(info->table)), info->data_buf,
++ sizeof(struct reloc_table));
++ printk(KERN_DEBUG "relocation table at page:%d\n", page);
++ PRINT_BUF((unsigned char *)&(info->table),
++ sizeof(struct reloc_table));
++ info->table_init = 1;
++ } else {
++ /* There should be a valid relocation table slot at least. */
++ printk(KERN_ERR "NO VALID relocation table can be \
++ recognized\n");
++ printk(KERN_ERR "CAUTION: It may cause unpredicated error\n");
++ printk(KERN_ERR "Please re-initialize the NAND flash.\n");
++ memset((unsigned char *)&(info->table), 0,
++ sizeof(struct reloc_table));
++ info->table_init = 0;
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/* add the relocation entry into the relocation table
++ * It's valid on MOBM V3.
++ * If the relocated block is bad, an new entry will be added into the
++ * bottom of the relocation table.
++ */
++static int update_rel_table(struct mtd_info *mtd, int block)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct reloc_table *table = NULL;
++ int obm, reloc_block;
++
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ obm = calc_obm_ver();
++ if (obm == MHN_OBM_V3) {
++ table = &info->table;
++ if (info->table_init == 0) {
++ printk(KERN_ERR "Error: the initial relocation \
++ table can't be read\n");
++ memset(table, 0, sizeof(struct reloc_table));
++ table->header = NAND_RELOC_HEADER;
++ info->table_init = 1;
++ }
++ if (table->total == 0) {
++ /* Point to the first relocated block.
++ * It resides in the last block of flash.
++ * the relocation entry has calculated in
++ * chipsize
++ */
++ reloc_block = (this->chipsize
++ >> this->phys_erase_shift)
++ + NAND_RELOC_MAX - 1;
++ } else if (table->total < NAND_RELOC_MAX) {
++ reloc_block = table->reloc[table->total - 1].to - 1;
++ } else {
++ printk(KERN_ERR "Relocation table exceed max number, \
++ cannot mark block 0x%x as bad block\n", block);
++ return -ENOSPC;
++ }
++ /* Make sure that reloc_block is pointing to a valid block */
++ for (; ; reloc_block--) {
++ /* The relocate table is full */
++ if (reloc_block < (this->chipsize
++ >> this->phys_erase_shift))
++ return -ENOSPC;
++ this->cmdfunc(mtd, NAND_CMD_ERASE1, 0, reloc_block
++ << (this->phys_erase_shift
++ - this->page_shift));
++ if (info->retcode == ERR_NONE)
++ break;
++ }
++ /* Create the relocated block information in the table */
++ table->reloc[table->total].from = block;
++ table->reloc[table->total].to = reloc_block;
++ table->total++;
++ }
++ return 0;
++}
++
++/* Write the relocation table back to device, if there's room. */
++static int sync_rel_table(struct mtd_info *mtd, int *idx)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ int obm, start_page, len;
++
++ if (*idx >= MAX_BBT_SLOTS) {
++ printk(KERN_ERR "Can't write relocation table to device \
++ any more.\n");
++ return -1;
++ }
++ if (*idx < 0) {
++ printk(KERN_ERR "Wrong Slot is specified.\n");
++ return -1;
++ }
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ len = 4;
++ len += info->table.total << 2;
++ obm = calc_obm_ver();
++ if (obm == MHN_OBM_V3) {
++ /* write to device */
++ start_page = 1 << (this->phys_erase_shift - this->page_shift);
++ start_page = start_page - 1 - *idx;
++ memset(&(info->data_buf), 0xFF, BUFLEN);
++ memcpy(&(info->data_buf), &(info->table), len);
++
++ printk(KERN_DEBUG "DUMP relocation table before write. \
++ page:0x%x\n", start_page);
++ monahans_df_command(mtd, NAND_CMD_SEQIN, 0, start_page);
++ monahans_df_command(mtd, NAND_CMD_PAGEPROG, 0, start_page);
++ /* write to idx */
++ (*idx)++;
++ /* dump it */
++ memset(&(info->data_buf), 0, BUFLEN);
++ monahans_df_command(mtd, NAND_CMD_READOOB, 0, start_page);
++ PRINT_BUF(info->data_buf, len);
++ }
++ return 0;
++}
++
++
++/* Find the relocated block of the bad one.
++ * If it's a good block, return 0. Otherwise, return a relocated one.
++ * idx points to the next relocation entry
++ * If the relocated block is bad, an new entry will be added into the
++ * bottom of the relocation table.
++ */
++static unsigned short search_rel_block(int block, struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct reloc_table *table = NULL;
++ int i, max, reloc_block = 0;
++
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ table = &(info->table);
++ if ((block <= 0) || (block > this->chipsize)
++ || (info->table_init == 0) || (table->total == 0))
++ return 0;
++ if (table->total > NAND_RELOC_MAX)
++ table->total = NAND_RELOC_MAX;
++ max = table->total;
++ for (i = 0; i < max; i++) {
++ if (block == table->reloc[i].from)
++ reloc_block = table->reloc[i].to;
++ }
++ return reloc_block;
++}
++
++/*
++ * Check whether the block is a bad one.
++ * At first, it will search the relocation table.
++ * If necessary, it will search the BBT. Because relocation table can only
++ * maintain limited record. If there're more bad blocks, they can't be
++ * recorded in relocation table. They can only be recorded in BBT.
++ */
++static int monahans_df_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
++{
++ struct nand_chip *this = NULL;
++ int page, block, reloc_block, chipnr, res = 0;
++ u16 bad;
++
++ /* At here, we only support one flash chip */
++ this = (struct nand_chip *)mtd->priv;
++ block = (int)(ofs >> this->phys_erase_shift);
++ /* search the block in the relocation table */
++ reloc_block = search_rel_block(block, mtd);
++ if (reloc_block) {
++ ofs = ((reloc_block << this->phys_erase_shift) |
++ (ofs & ((1 << this->phys_erase_shift) - 1)));
++ }
++
++ /* search BBT
++ * Maybe the relocation table is full, but some bad blocks aren't
++ * recordered in it.
++ * The below code are copied from nand_block_bad().
++ */
++ if (getchip) {
++ page = (int)(ofs >> this->page_shift);
++ chipnr = (int)(ofs >> this->chip_shift);
++
++ /* Select the NAND chips */
++ this->select_chip(mtd, chipnr);
++ } else
++ page = (int)ofs;
++
++ if (this->options & NAND_BUSWIDTH_16) {
++ this->cmdfunc(mtd, NAND_CMD_READOOB, this->badblockpos & 0xFE,
++ page & this->pagemask);
++ bad = cpu_to_le16(this->read_word(mtd));
++ if (this->badblockpos & 0x1)
++ bad >>= 1;
++ if ((bad & 0xFF) != 0xFF)
++ res = 1;
++ } else {
++ this->cmdfunc(mtd, NAND_CMD_READOOB, this->badblockpos,
++ page & this->pagemask);
++ if (this->read_byte(mtd) != 0xFF)
++ res = 1;
++ }
++
++ return res;
++}
++
++static int monahans_df_block_markbad(struct mtd_info *mtd, loff_t ofs)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ unsigned char buf[2] = {0, 0};
++ int block, reloc_block, page, ret;
++
++ this = (struct nand_chip *)mtd->priv;
++ info = (struct monahans_dfc_info *)(this->priv);
++ /* Get block number */
++ block = ((int)ofs) >> this->bbt_erase_shift;
++ ret = update_rel_table(mtd, block);
++ if (!ret) {
++ sync_rel_table(mtd, &(info->current_slot));
++ return 0;
++ } else {
++ reloc_block = search_rel_block(block, mtd);
++ if (reloc_block)
++ block = reloc_block;
++ if (this->bbt)
++ this->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);
++ }
++
++ /* Do we have a flash based bad block table ? */
++ if (this->options & NAND_USE_FLASH_BBT)
++ return nand_update_bbt(mtd, ofs);
++
++ /* mark the bad block flag at the first two pages */
++ page = block << (this->phys_erase_shift - this->page_shift);
++ ofs = mtd->writesize + this->badblockpos;
++ this->cmdfunc(mtd, NAND_CMD_SEQIN, ofs, page);
++ this->write_buf(mtd, buf, 2);
++ this->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
++ page++;
++ this->cmdfunc(mtd, NAND_CMD_SEQIN, ofs, page);
++ this->write_buf(mtd, buf, 2);
++ this->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
++ return 0;
++}
++
++static int dump_bbt_flash(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ int block, page, totlen;
++
++ this = (struct nand_chip *)mtd->priv;
++ info = (struct monahans_dfc_info *)this->priv;
++ block = (this->chipsize >> this->phys_erase_shift) - 1;
++ totlen = (this->chipsize >> this->phys_erase_shift) >> 2;
++ printk(KERN_ERR "totlen:0x%x\n", totlen);
++ this->select_chip(mtd, 0);
++ if (this->bbt_td) {
++ printk(KERN_ERR "BBT page:0x%x\n", this->bbt_td->pages[0]);
++ page = this->bbt_td->pages[0];
++ if (this->bbt_td->pages[0] <= 0) {
++ page = block << (this->phys_erase_shift
++ - this->page_shift);
++ }
++ while (totlen > 0) {
++ printk(KERN_ERR "page:0x%x\n", page);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ printk(KERN_ERR "read result:0x%x\n", info->retcode);
++ PRINT_BUF(info->data_buf, BUFLEN);
++ totlen -= (1 << this->page_shift);
++ page++;
++ }
++ }
++ if (this->bbt_md) {
++ printk(KERN_ERR "BBT page:0x%x\n", this->bbt_md->pages[0]);
++ page = this->bbt_md->pages[0];
++ if (this->bbt_td->pages[0] <= 0) {
++ page = block << (this->phys_erase_shift
++ - this->page_shift);
++ }
++ while (totlen > 0) {
++ printk(KERN_ERR "page:0x%x\n", page);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ printk(KERN_ERR "read result:0x%x\n", info->retcode);
++ PRINT_BUF(info->data_buf, BUFLEN);
++ totlen -= (1 << this->page_shift);
++ page++;
++ }
++
++ }
++ return 0;
++}
++
++static int dump_bbt_mem(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++
++ this = (struct nand_chip *)mtd->priv;
++ PRINT_BUF(this->bbt, 225);
++ return 0;
++}
++
++static int monahans_df_scan_bbt(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ int ret;
++
++ this = (struct nand_chip *)mtd->priv;
++ ret = read_reloc_table(mtd);
++ if (ret) {
++ printk(KERN_ERR "Failed to get relocation table\n");
++ printk(KERN_ERR "Try to build a new BBT. It may result \
++ unpredicated error.\n");
++ /* Create new memory based and flash based BBT */
++ }
++ nand_scan_bbt(mtd, &monahans_bbt_default);
++ //dump_bbt_flash(mtd);
++ dump_bbt_mem(mtd);
++ return 0;
++#if 0
++ /* Read flashed based BBT from device */
++ return (nand_scan_bbt(mtd, &monahans_bbt_main));
++#endif
++}
++
++
++static int monahans_df_probe(struct platform_device *pdev)
++{
++ struct nand_chip *this;
++ struct monahans_dfc_info *info;
++ int status = -1;
++ unsigned int data_buf_len;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ unsigned int buf_len;
++#endif
++ int i, ret = 0;
++
++ printk(KERN_ERR "Nand driver probe\n");
++
++ dfc_context.membase = ioremap_nocache(0x43100000, 0x100000);
++ if (!dfc_context.membase)
++ printk(KERN_ERR "Couldn't ioremap\n");
++
++ pxa_set_cken(CKEN_NAND, 1);
++
++ for (i = DFC_FLASH_NULL + 1; i < DFC_FLASH_END; i++)
++ {
++ uint32_t id;
++
++ status = dfc_init(&dfc_context, i);
++ if (status)
++ continue;
++ status = dfc_readid(&dfc_context, &id);
++ if (status)
++ continue;
++ printk(KERN_DEBUG "id:0x%x, chipid:0x%x\n",
++ id, dfc_context.flash_info->chip_id);
++ if (id == dfc_context.flash_info->chip_id)
++ break;
++ }
++
++ if(i == DFC_FLASH_END) {
++ printk(KERN_ALERT "Monahans NAND device:"
++ "Nand Flash initialize failure!\n");
++ ret = -ENXIO;
++ goto out;
++ }
++ flash_config = i;
++
++ monahans_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip) +
++ sizeof(struct monahans_dfc_info) , GFP_KERNEL);
++ if (!monahans_mtd) {
++ printk (KERN_ERR "Monahans NAND device:"
++ "Unable to allocate NAND MTD device structure.\n");
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ /* Get pointer to private data */
++ this = (struct nand_chip *)((void *)monahans_mtd + sizeof(struct mtd_info));
++ info = (struct monahans_dfc_info *)((void *)this + sizeof(struct nand_chip));
++ dfc_context.mtd = monahans_mtd;
++
++ monahans_mtd->priv = this;
++ this->priv = info;
++ data_buf_len = dfc_context.flash_info->page_size +
++ dfc_context.flash_info->oob_size;
++ info->state = STATE_READY;
++ init_completion(&info->cmd_complete);
++ info->table_init = 0;
++ memset(&info->table, 0x0, sizeof(struct reloc_table));
++ printk(KERN_DEBUG "%s: this->controller: 0x%x, &this->controller: 0x%x\n",__func__, (unsigned int)this->controller, (unsigned int)&(this->controller));
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->dma_mask = 0xffffffffUL;
++
++ dev->dma_mask = &info->dma_mask;
++ dev->coherent_dma_mask = 0xffffffffUL;
++
++ /* alloc dma data buffer for data
++ * buffer + 2*descriptor + command buffer
++ */
++ buf_len = ALIGN(2*sizeof(struct pxa_dma_desc), 32) +
++ ALIGN(data_buf_len, 32) + ALIGN(NAND_CMD_DMA_LEN, 32);
++
++ printk(KERN_INFO "Try to allocate dma buffer(len:%d)"
++ "for data buffer + 2*descriptor + command buffer\n", buf_len);
++ info->data_desc = (struct pxa_dma_desc*)dma_alloc_writecombine(dev,
++ buf_len, &info->data_desc_addr, GFP_KERNEL);
++ if (!info->data_desc) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma buffer\n");
++ ret = -ENOMEM;
++ goto free_mtd;
++ }
++
++ info->cmd_desc = (struct pxa_dma_desc*)((char *)info->data_desc +
++ sizeof(struct pxa_dma_desc));
++ info->cmd_desc_addr = (dma_addr_t)((char *)info->data_desc_addr +
++ sizeof(struct pxa_dma_desc));
++ info->data_buf = (char *)info->data_desc +
++ ALIGN(2*sizeof(struct pxa_dma_desc), 32);
++ info->data_buf_addr = (dma_addr_t)((char *)info->data_desc_addr +
++ ALIGN(2*sizeof(struct pxa_dma_desc), 32));
++ info->cmd_buf = (char *)info->data_buf + ALIGN(data_buf_len, 32);
++ info->cmd_buf_addr = (dma_addr_t)((char *)info->data_buf_addr +
++ ALIGN(data_buf_len, 32));
++
++ D1(printk("Get dma buffer for data dma descriptor, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->data_desc, info->data_desc_addr));
++ D1(printk("Get dma buffer for command dma descriptors, virt:0x%x,"
++ "phys0x:%x\n", (unsigned int)info->cmd_desc, info->cmd_desc_addr));
++ D1(printk("Get dma buffer for data, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->data_buf, info->data_buf_addr));
++ D1(printk("Get dma buffer for command, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->cmd_buf, info->cmd_buf_addr));
++
++ D1(printk("Try to allocate dma channel for data\n"));
++
++ info->data_dma = pxa_request_dma("NAND DATA", DMA_PRIO_LOW,
++ monahans_dfc_data_dma_irq, info);
++ if (info->data_dma < 0) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma channel for data\n");
++ ret = info->data_dma;
++ goto free_buf;
++ }
++ D1(printk("Get dma channel:%d for data\n", info->data_dma));
++
++ D1(printk("Try to allocate dma channel for command\n"));
++ info->cmd_dma = pxa_request_dma("NAND CMD", DMA_PRIO_LOW,
++ monahans_dfc_cmd_dma_irq, info);
++ if (info->cmd_dma < 0) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma channel for command\n");
++ ret = info->cmd_dma;
++ goto free_data_dma;
++ }
++ D1(printk("Get dma channel:%d for command\n", info->cmd_dma));
++
++ dfc_context.cmd_dma_ch = info->cmd_dma;
++ dfc_context.data_dma_ch = info->data_dma;
++#else
++ printk(KERN_DEBUG "Try to allocate data buffer(len:%d)\n", data_buf_len);
++ info->data_buf = kmalloc(data_buf_len, GFP_KERNEL);
++ if (!info->data_buf) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc data buffer\n");
++ ret = -ENOMEM;
++ goto free_mtd;
++ }
++#endif
++
++ D1(printk("Try to request irq:%d\n", IRQ_NAND));
++ ret = request_irq(IRQ_NAND, monahans_dfc_irq, 0, pdev->name, info);
++ if (ret < 0) {
++ printk(KERN_ERR "Monahans NAND device: Unable to request irq\n");
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ goto free_cmd_dma;
++#else
++ goto free_buf;
++#endif
++ }
++
++ D1(printk("Success request irq\n"));
++
++ /* set address of NAND IO lines */
++ this->options = (dfc_context.flash_info->flash_width == 16)? \
++ NAND_BUSWIDTH_16: 0 | NAND_USE_FLASH_BBT;
++
++ /* this->IO_ADDR_R = this->IO_ADDR_W = NDDB */
++ this->waitfunc = monahans_df_waitfunc;
++ this->select_chip = monahans_df_select_chip;
++ this->dev_ready = monahans_df_dev_ready;
++ this->cmdfunc = monahans_df_command;
++ this->read_word= monahans_df_read_word;
++ /*this->write_word= monahans_df_write_word;*/
++ this->read_byte = monahans_df_read_byte;
++ this->read_buf = monahans_df_read_buf;
++ this->write_buf = monahans_df_write_buf;
++ this->verify_buf = monahans_df_verify_buf;
++ this->ecc.hwctl = monahans_df_enable_hwecc;
++ this->ecc.calculate = monahans_df_calculate_ecc;
++ this->ecc.correct = monahans_df_correct_data;
++ this->block_bad = monahans_df_block_bad;
++ this->block_markbad = monahans_df_block_markbad;
++ this->scan_bbt = monahans_df_scan_bbt;
++ this->chip_delay= 25;
++ this->bbt_td = &monahans_bbt_main;
++ this->bbt_md = &monahans_bbt_mirror;
++
++ /* If the NAND flash is small block flash, only 512-byte pagesize
++ * is supported.
++ * Adjust parameters of BBT what is depended on large block nand
++ * flash or small block nand flash.
++ */
++ if (dfc_context.flash_info->oob_size > 16) {
++ this->ecc.layout = &monahans_lb_nand_oob;
++ this->ecc.mode = NAND_ECC_HW;
++ this->ecc.size = 2048;
++ this->ecc.bytes = 24;
++ this->bbt_td->offs = 2;
++ this->bbt_td->veroffs = 6;
++ this->bbt_md->offs = 2;
++ this->bbt_md->veroffs = 6;
++ this->badblockpos = NAND_LARGE_BADBLOCK_POS;
++ monahans_bbt_default.offs = NAND_LARGE_BADBLOCK_POS;
++ monahans_bbt_default.len = 2;
++ /* when scan_bbt() is executed, bbt version can get */
++ monahans_bbt_default.veroffs = 2;
++ } else {
++ this->ecc.layout = &monahans_sb_nand_oob;
++ this->ecc.mode = NAND_ECC_HW;
++ this->ecc.size = 512;
++ this->ecc.bytes = 6;
++ this->bbt_td->offs = 8;
++ this->bbt_td->veroffs = 12;
++ this->bbt_md->offs = 8;
++ this->bbt_md->veroffs = 12;
++ this->badblockpos = NAND_SMALL_BADBLOCK_POS;
++ monahans_bbt_default.offs = NAND_SMALL_BADBLOCK_POS;
++ monahans_bbt_default.len = 1;
++ monahans_bbt_default.veroffs = 8;
++ }
++
++ info->context = &dfc_context;
++ /* TODO: allocate dma buffer and channel */
++
++ platform_set_drvdata(pdev, monahans_mtd);
++
++ if (nand_scan(monahans_mtd, 1)) {
++ printk(KERN_ERR "Nand scan failed\n");
++ ret = -ENXIO;
++ goto free_irq;
++ }
++
++ /* There is a potential limitation that no more partition can be
++ * added between MassStorage and BBT(last block).
++ *
++ * The last 127 blocks is reserved for relocation table, they aren't
++ * statistical data of mtd size and chip size.
++ *
++ * BBT partitions contains 4 blocks. Two blocks are used to store
++ * main descriptor, the other two are used to store mirror descriptor.
++ */
++ partition_info[PART_NUM - 1].size = (monahans_bbt_main.maxblocks
++ + monahans_bbt_mirror.maxblocks)
++ << this->phys_erase_shift;
++ partition_info[PART_NUM - 1].offset = this->chipsize
++ - partition_info[PART_NUM - 1].size;
++ partition_info[PART_NUM - 2].offset = partition_info[PART_NUM - 3].offset
++ + partition_info[PART_NUM - 3].size;
++ partition_info[PART_NUM - 2].size = this->chipsize
++ - partition_info[PART_NUM - 2].offset
++ - partition_info[PART_NUM - 1].size;
++ add_mtd_partitions(monahans_mtd, partition_info, PART_NUM);
++
++#ifdef CONFIG_DVFM
++ dvfm_notifier.client_data = info;
++ mhn_fv_register_notifier(&dvfm_notifier);
++#endif
++
++ return 0;
++
++free_irq:
++ free_irq(IRQ_NAND, info);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++free_cmd_dma:
++ pxa_free_dma(info->cmd_dma);
++free_data_dma:
++ pxa_free_dma(info->data_dma);
++free_buf:
++ dma_free_writecombine(dev, buf_len, info->data_desc, info->data_desc_addr);
++#else
++free_buf:
++ kfree(info->data_buf);
++#endif
++free_mtd:
++ kfree(monahans_mtd);
++out:
++ return ret;
++
++}
++
++static int __devexit monahans_df_remove(struct platform_device *dev)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ unsigned int data_buf_len = dfc_context.flash_info->page_size +
++ dfc_context.flash_info->oob_size;
++ unsigned int buf_len = ALIGN(2*sizeof(struct pxa_dma_desc), 32) +
++ ALIGN(data_buf_len, 32) + ALIGN(NAND_CMD_DMA_LEN, 32);
++#endif
++
++#ifdef CONFIG_DVFM
++ mhn_fv_unregister_notifier(&dvfm_notifier);
++#endif
++
++ platform_set_drvdata(dev, NULL);
++
++ del_mtd_device(mtd);
++ del_mtd_partitions(mtd);
++ free_irq(IRQ_NAND, info);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ pxa_free_dma(info->cmd_dma);
++ pxa_free_dma(info->data_dma);
++ dma_free_writecombine(dev, buf_len, info->data_desc,
++ info->data_desc_addr);
++#else
++ kfree(info->data_buf);
++#endif
++ kfree(mtd);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int monahans_df_suspend(struct platform_device *dev, pm_message_t state, u32 level)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if( SUSPEND_DISABLE == level){ /*SUSPEND_NOTIFY*/
++ if (info->state != STATE_READY) {
++ printk(KERN_ERR "current state is %d\n", info->state);
++ return -EAGAIN;
++ }
++ info->state = STATE_SUSPENDED;
++ /*
++ * The PM code need read the mobm from NAND.
++ * So the NAND clock can't be stop here.
++ * The PM code will cover this.
++ */
++ /* pxa_set_cken(CKEN_NAND, 0); */
++ }
++ return 0;
++}
++
++static int monahans_df_resume(struct platform_device *dev, u32 level)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int status;
++
++ if(RESUME_ENABLE == level){
++ if (info->state != STATE_SUSPENDED)
++ printk(KERN_WARNING "Error State after resume back\n");
++
++ info->state = STATE_READY;
++
++ pxa_set_cken(CKEN_NAND, 1);
++
++ status = dfc_init(&dfc_context, flash_config);
++ if (status) {
++ printk(KERN_ALERT "Monahans NAND device:"
++ "Nand Flash initialize failure!\n");
++ return -ENXIO;
++ }
++ }
++ return 0;
++}
++#endif
++
++#ifdef CONFIG_DVFM
++static int mhn_nand_dvfm_notifier(unsigned cmd, void *client_data, void *info)
++{
++ struct monahans_dfc_info *dfc_info =
++ (struct monahans_dfc_info *)client_data;
++
++ switch (cmd) {
++ case FV_NOTIFIER_QUERY_SET :
++ if (dfc_info->state != STATE_READY)
++ return -1;
++ break;
++
++ case FV_NOTIFIER_PRE_SET :
++ break;
++
++ case FV_NOTIFIER_POST_SET :
++ break;
++ }
++
++ return 0;
++}
++#endif
++
++static struct platform_driver monahans_df_driver = {
++ .probe = monahans_df_probe,
++ .remove = __devexit_p(monahans_df_remove),
++#ifdef CONFIG_PM
++ .suspend = monahans_df_suspend,
++ .resume = monahans_df_resume,
++#endif
++ .driver = {
++ .name = "monahans-nand-flash",
++ }
++};
++
++static void __exit monahans_df_cleanup(void)
++{
++ printk(KERN_ERR "Nand driver registered\n");
++ platform_driver_unregister(&monahans_df_driver);
++}
++
++static int __init monahans_df_init(void)
++{
++ return platform_driver_register(&monahans_df_driver);
++}
++
++module_init(monahans_df_init);
++module_exit(monahans_df_cleanup);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jingqing.xu (jingqing.xu@intel.com)");
++MODULE_DESCRIPTION("Glue logic layer for NAND flash on monahans DFC");
++
++
+Index: linux-2.6.23/arch/arm/mach-pxa/zylonite.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/zylonite.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/arch/arm/mach-pxa/zylonite.c 2008-02-13 09:11:02.000000000 +0000
+@@ -29,6 +29,8 @@
+ #include "generic.h"
+
+ int gpio_backlight;
++int gpio_vsync;
++int gpio_vsync1;
+ int gpio_eth_irq;
+
+ int lcd_id;
+@@ -54,6 +56,16 @@
+ .resource = smc91x_resources,
+ };
+
++static struct platform_device nand_device = {
++ .name = "monahans-nand-flash",
++ .id = -1,
++};
++
++static struct platform_device touch_device = {
++ .name = "pxa2xx-touch",
++ .id = -1,
++};
++
+ #if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULES)
+ static void zylonite_backlight_power(int on)
+ {
+@@ -96,7 +108,7 @@
+ };
+
+ static struct pxafb_mode_info sharp_ls037_modes[] = {
+- [0] = {
++ [1] = {
+ .pixclock = 158000,
+ .xres = 240,
+ .yres = 320,
+@@ -109,8 +121,8 @@
+ .lower_margin = 3,
+ .sync = 0,
+ },
+- [1] = {
+- .pixclock = 39700,
++ [0] = {
++ .pixclock = 45000,
+ .xres = 480,
+ .yres = 640,
+ .bpp = 16,
+@@ -137,6 +149,11 @@
+ /* backlight GPIO: output, default on */
+ gpio_direction_output(gpio_backlight, 1);
+
++ gpio_direction_output(gpio_vsync, 0);
++ gpio_direction_output(gpio_vsync1, 0);
++
++ printk(KERN_ERR "LCD ID is %x\n", lcd_id);
++
+ if (lcd_id & 0x20) {
+ set_pxa_fb_info(&zylonite_sharp_lcd_info);
+ return;
+@@ -169,6 +186,8 @@
+ smc91x_resources[1].start = gpio_to_irq(gpio_eth_irq);
+ smc91x_resources[1].end = gpio_to_irq(gpio_eth_irq);
+ platform_device_register(&smc91x_device);
++ platform_device_register(&nand_device);
++ platform_device_register(&touch_device);
+
+ zylonite_init_lcd();
+ }
+Index: linux-2.6.23/arch/arm/mach-pxa/zylonite_pxa300.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/zylonite_pxa300.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/arch/arm/mach-pxa/zylonite_pxa300.c 2008-02-13 14:01:13.000000000 +0000
+@@ -62,12 +62,12 @@
+ GPIO110_UART3_RXD,
+
+ /* AC97 */
+- GPIO23_AC97_nACRESET,
++ /*GPIO23_AC97_nACRESET,
+ GPIO24_AC97_SYSCLK,
+ GPIO29_AC97_BITCLK,
+ GPIO25_AC97_SDATA_IN_0,
+ GPIO27_AC97_SDATA_OUT,
+- GPIO28_AC97_SYNC,
++ GPIO28_AC97_SYNC,*/
+
+ /* Keypad */
+ GPIO107_KP_DKIN_0,
+@@ -104,6 +104,41 @@
+ /* Ethernet */
+ GPIO2_nCS3,
+ GPIO99_GPIO,
++
++ /* NAND */
++ MFP_CFG_X(DF_INT_RnB, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nRE_nOE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nWE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_CLE_nOE, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nADV1_ALE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS0, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS1, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_IO0, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO1, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO2, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO3, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO4, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO5, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO6, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO7, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO8, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO9, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO10, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO11, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO12, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO13, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO14, AF1, DS08X, PULL_LOW),
++
++ /* AC97 */
++ MFP_CFG_X(GPIO23, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO27, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO28, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO29, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO25, AF1, DS03X, PULL_LOW),
++
++ MFP_CFG_X(GPIO26, AF0, DS01X, PULL_LOW), /* Interrupt */
++ MFP_CFG_X(GPIO24, AF0, DS03X, PULL_LOW), /*SYSCLK external */
++ MFP_CFG_X(GPIO11, AF0, DS01X, PULL_LOW),
+ };
+
+ static mfp_cfg_t pxa310_mfp_cfg[] __initdata = {
+@@ -163,6 +198,9 @@
+ pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]);
+ }
+
++extern int gpio_vsync;
++extern int gpio_vsync1;
++
+ void __init zylonite_pxa300_init(void)
+ {
+ if (cpu_is_pxa300() || cpu_is_pxa310()) {
+@@ -174,6 +212,8 @@
+
+ /* GPIO pin assignment */
+ gpio_backlight = mfp_to_gpio(MFP_PIN_GPIO20);
++ gpio_vsync = mfp_to_gpio(GPIO76_LCD_VSYNC);
++ gpio_vsync1 = mfp_to_gpio(GPIO71_LCD_LDD_17);
+ }
+
+ if (cpu_is_pxa300()) {
+Index: linux-2.6.23/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.23.orig/drivers/video/pxafb.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/drivers/video/pxafb.c 2008-02-13 00:59:45.000000000 +0000
+@@ -1543,9 +1543,9 @@
+ if (inf->lccr0 & LCCR0_INVALID_CONFIG_MASK)
+ dev_warn(&dev->dev, "machine LCCR0 setting contains illegal bits: %08x\n",
+ inf->lccr0 & LCCR0_INVALID_CONFIG_MASK);
+- if (inf->lccr3 & LCCR3_INVALID_CONFIG_MASK)
+- dev_warn(&dev->dev, "machine LCCR3 setting contains illegal bits: %08x\n",
+- inf->lccr3 & LCCR3_INVALID_CONFIG_MASK);
++ //if (inf->lccr3 & LCCR3_INVALID_CONFIG_MASK)
++ // dev_warn(&dev->dev, "machine LCCR3 setting contains illegal bits: %08x\n",
++ // inf->lccr3 & LCCR3_INVALID_CONFIG_MASK);
+ if (inf->lccr0 & LCCR0_DPD &&
+ ((inf->lccr0 & LCCR0_PAS) != LCCR0_Pas ||
+ (inf->lccr0 & LCCR0_SDS) != LCCR0_Sngl ||
+Index: linux-2.6.23/include/asm-arm/arch-pxa/mfp-pxa300.h
+===================================================================
+--- linux-2.6.23.orig/include/asm-arm/arch-pxa/mfp-pxa300.h 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/include/asm-arm/arch-pxa/mfp-pxa300.h 2008-02-13 00:59:45.000000000 +0000
+@@ -175,13 +175,13 @@
+ #define GPIO68_LCD_LDD_14 MFP_CFG_DRV(GPIO68, AF1, DS01X)
+ #define GPIO69_LCD_LDD_15 MFP_CFG_DRV(GPIO69, AF1, DS01X)
+ #define GPIO70_LCD_LDD_16 MFP_CFG_DRV(GPIO70, AF1, DS01X)
+-#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF1, DS01X)
++#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF0, DS01X)
+ #define GPIO62_LCD_CS_N MFP_CFG_DRV(GPIO62, AF2, DS01X)
+ #define GPIO72_LCD_FCLK MFP_CFG_DRV(GPIO72, AF1, DS01X)
+ #define GPIO73_LCD_LCLK MFP_CFG_DRV(GPIO73, AF1, DS01X)
+ #define GPIO74_LCD_PCLK MFP_CFG_DRV(GPIO74, AF1, DS01X)
+ #define GPIO75_LCD_BIAS MFP_CFG_DRV(GPIO75, AF1, DS01X)
+-#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF2, DS01X)
++#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF0, DS01X)
+
+ #define GPIO15_LCD_CS_N MFP_CFG_DRV(GPIO15, AF2, DS01X)
+ #define GPIO127_LCD_CS_N MFP_CFG_DRV(GPIO127, AF1, DS01X)
diff --git a/packages/linux/linux-rp-2.6.23/zylonite_touch-r0.patch b/packages/linux/linux-rp-2.6.23/zylonite_touch-r0.patch
new file mode 100644
index 0000000000..1c00696051
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.23/zylonite_touch-r0.patch
@@ -0,0 +1,1548 @@
+Index: linux-2.6.23/drivers/input/touchscreen/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/input/touchscreen/Kconfig 2008-02-13 01:12:29.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/Kconfig 2008-02-13 01:13:20.000000000 +0000
+@@ -54,6 +54,12 @@
+ To compile this driver as a module, choose M here: the
+ module will be called corgi_ts.
+
++config TOUCHSCREEN_ZYLONITE
++ tristate "Zylonite touchscreen driver"
++ default y
++ help
++ Say Y here for the Zylonite touchscreen driver
++
+ config TOUCHSCREEN_FUJITSU
+ tristate "Fujitsu serial touchscreen"
+ select SERIO
+Index: linux-2.6.23/drivers/input/touchscreen/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/input/touchscreen/Makefile 2008-02-13 01:12:29.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/Makefile 2008-02-13 01:13:38.000000000 +0000
+@@ -19,3 +19,4 @@
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_TSC2101) += tsc2101_ts.o
++obj-$(CONFIG_TOUCHSCREEN_ZYLONITE) += zylonite-ts.o
+Index: linux-2.6.23/drivers/input/touchscreen/zylonite-ts.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/zylonite-ts.c 2008-02-13 16:19:15.000000000 +0000
+@@ -0,0 +1,1517 @@
++/*
++ * drivers/input/touchscreen/mhn_audio_touch.c.
++ *
++ * Author: bridge.wu@marvell.com
++ * Created: Nov 17, 2006
++ * Copyright: Marvell Corporation.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/delay.h>
++
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/initval.h>
++
++#include <asm/semaphore.h>
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/gpio.h>
++#include <asm/arch/mfp.h>
++//#include <asm/arch/ipmc.h>
++#include <linux/suspend.h>
++#include <linux/spinlock.h>
++
++//#include <asm/arch/codec/acodec.h>
++//#include <asm/arch/mhn_audio_plat.h>
++
++#define OSCC __REG(0x41350000) /* Oscillator Configuration Register */
++#define AC97_DIV __REG(0x41340014)
++
++#define ALSA_ZY_CARD_DEBUG
++#undef ALSA_ZY_CARD_DEBUG
++
++#define WM_9713_ID 0x4C13 /* this should be the 7E register value */
++
++#ifdef ALSA_ZY_CARD_DEBUG
++#define dbg(format, arg...) printk(KERN_DEBUG format, ##arg)
++#else
++#define dbg(format, arg...)
++#endif
++
++#define DEBUG
++#undef DEBUG
++#ifdef DEBUG
++unsigned int start_time;
++unsigned int end_time;
++unsigned int time;
++#define PRINT_TIME() do {\
++ time = ((end_time > start_time))?\
++ (end_time - start_time)*100/325:\
++ (0xffffffff - start_time + end_time)*100/325;\
++ printk("\n%s:%dus\n", __FUNCTION__, time);\
++} while(0)
++#endif
++
++
++
++
++/* 9713 specific
++ * Register Name Index
++ */
++#define RESET 0X00
++#define SPEAKER_VOLUME 0X02
++#define HEADPHONE_VOLUME 0X04
++#define OUT3_OUT4_VOLUME 0X06
++#define MONOVOL_MONOINPGA_ROUTE 0X08
++#define LINE_IN_PGA_VOL_ROUTE 0X0A
++#define DAC_PGA_VOL_ROUTE 0X0C
++#define MIC_PGA_VOLUME 0X0E
++#define MIC_ROUTING 0X10
++#define REC_PGA_VOL 0X12
++#define REC_ROUTE_MUX_SEL 0X14
++#define PCBEEP_VOL_ROUTE 0X16
++#define VXDAC_VOLUME_ROUTE 0X18
++#define AUX_DAC_VOL_ROUTE 0X1A
++#define OUTPUT_PGA_MUX 0X1C
++#define DAC_3D_CTRL_INV_MUX_SEL 0X1E
++#define DAC_TONE_CTRL 0X20
++#define MIC_BIAS 0X22
++#define OUTPUT_VOL_MAPPING_JACK 0X24
++#define POWERDOWN_CTRL_STAT 0X26
++#define EXTENDED_AUD_ID 0X28
++#define EXTENDED_AUD_STAT_CTRL 0X2A
++#define AUDIO_DAC_RATE 0X2C
++#define AUX_DAC_RATE 0X2E
++#define AUDIO_ADC_RATE 0X32
++#define PCM_CODEC_CTRL 0X36
++#define SPDIF_CTRL 0X3A
++#define POWER_DOWN_1 0X3C
++#define POWER_DOWN_2 0X3E
++#define GENERAL_PURPOSE_WM_13 0X40
++#define FAST_POWERUP_CTRL 0X42
++#define MCLK_PLL_CTRL_1 0X44
++#define MCLK_PLL_CTRL_2 0X46
++#define GPIO_PIN_CFG 0X4C
++#define GPIO_PIN_POL_TYPE 0X4E
++#define GPIO_PIN_STICKY 0X50
++#define GPIO_PIN_WAKEUP 0X52
++#define GPIO_PIN_STATUS 0X54
++#define GPIO_PIN_SHARING 0X56
++#define GPIO_PULL_UP_DOWN_CTRL 0X58
++#define ADD_FUNC_1 0X5A
++#define ADD_FUNC_2 0X5C
++#define ALC_CTRL 0X60
++#define ALC_NOISE_GATE_CTRL 0X62
++#define AUX_DAC_INPUT_CTRL 0X64
++#define TEST_REG_1 0X68
++#define TEST_REG_2 0X6A
++#define TEST_REG_3 0X6C
++#define TEST_REG_4 0X6E
++#define DIGITIZER_1_WM13 0x74
++#define DIGITIZER_2_WM13 0x76
++#define DIGITIZER_3_WM13 0x78
++#define DIGITIZER_READ_BACK 0x7a
++#define VENDOR_ID1 0x7c
++#define VENDOR_ID2 0x7e
++
++#define ZY_TOUCH_SAMPLE_X 1
++#define ZY_TOUCH_SAMPLE_Y 2
++
++#define ZY_EVENT_TYPE_NONE 0
++#define ZY_EVENT_TYPE_PDN 1
++
++
++typedef enum _zy_acodec_error_t {
++ ZY_ACODEC_SUCCESS = 0, /* successful completion of a function */
++ ZY_ACODEC_GENERAL_SW_ERR, /* null pointer to registers or other software error */
++ ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT, /* time-out for waiting for respponse */
++ ZY_ACODEC_SAMPLERATE_NOT_SUPPORTED, /* the sample rate is not supported either in controller or codec */
++ ZY_ACODEC_FEATURE_NO_SUPPORTED, /* this codec feature is not supported */
++ ZY_ACODEC_GENERAL_HW_ERR ,/* other hardware error besides time out */
++ ZY_ACODEC_ROUTE_NO_SUPPORTED, /* the codec can not set the route required */
++ ZY_ACODEC_SLEEP /* the codec is sleep */
++} zy_acodec_error_t;
++
++typedef unsigned int zy_acodec_device_id_t;
++
++typedef enum _codec_state {
++ ZY_CODEC_SLEEP = 0,
++ ZY_CODEC_WAKEUP = 1
++} acodec_state_t;
++
++typedef enum {
++ ZY_FM = 0,
++ ZY_MIC1 = 1,
++ ZY_MIC2 = 2,
++ ZY_SPEAKER =3,
++ ZY_HEADSET =4,
++ ZY_HANDSET =5,
++} vol_port_type_t;
++
++typedef struct _context_t {
++ int use_count; /* probe/remove and suspend/resume usage count, sync among multiple devices */
++ zy_acodec_device_id_t acodec_id;/* - an ID that uniquely identifies the codec to be used */
++ unsigned long init_number; /* used by driver to track whether it is inited or not */
++
++ void *p_voice_reg; /* pointer to Monahans registers that has PCM interface to codec */
++ void *p_hifi_reg; /* pointer to Monahans registers that has hifi interface to codec */
++ void *p_ctrl_reg; /* pointer to Monahans registers that has control interface to codec */
++ int *p_ost_regs; /* needed for time out */
++ void *p_save_memory; /* pointer to a memory region to save context while suspend */
++ void *p_zy_scenario; /* pointer to the scenario data structure */
++ long u_max_read_write_time_out_ms;/* input the max time to wait in milliseconds before giving up on a read or write operation */
++ long u_max_setup_time_out_ms; /* input the maximum time in milliseconds to wait during initial setup of the ACODEC controller and codec */
++
++ /* member functions these pointers must be set by */
++ zy_acodec_error_t (* g_pfn_codec_specific_init) (struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_codec_specific_dinit) (struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_acodec_read) (struct _context_t *p_dev_context, unsigned short reg_addr, unsigned short *p_reg_value);
++ zy_acodec_error_t (* g_pfn_acodec_write) (struct _context_t *p_dev_context, unsigned short reg_addr, unsigned short reg_value);
++
++ /* add for route */
++ zy_acodec_error_t (* g_pfn_set_route) (struct _context_t *p_device_context, unsigned short * rout_map ,unsigned short* current_map);
++ /* add for sleep the codec */
++ zy_acodec_error_t (* g_pfn_sleep_codec) (struct _context_t *p_device_context);
++ /* add for Wake up the codec */
++ zy_acodec_error_t (* g_pfn_wake_codec) (struct _context_t *p_device_context);
++ /* add for get codec state */
++ zy_acodec_error_t (* g_pfn_get_state) (struct _context_t *p_device_context, acodec_state_t *p_state);
++ /* add for volume */
++ zy_acodec_error_t (* g_pfn_get_vol)(struct _context_t *p_device_context, vol_port_type_t port, unsigned short *gain_in_db);
++ zy_acodec_error_t (* g_pfn_set_vol)(struct _context_t *p_device_context, vol_port_type_t port, unsigned short gain_in_db);
++
++ void (* g_pfn_get_event)(struct _context_t *p_device_context, unsigned char * event_type);
++ void (* g_pfn_event_ack)(struct _context_t *p_device_context, unsigned char event_type);
++ zy_acodec_error_t (* g_pfn_enable_touch)(struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_disable_touch)(struct _context_t *p_device_context);
++} zy_acocec_context_t, *p_zy_acocec_context_t;
++
++
++
++
++
++static p_zy_acocec_context_t p_zy_codec_ctxt = NULL;
++
++#include <linux/input.h>
++//#include <asm/arch/codec/wm9713.h>
++
++#define PEN_DOWN 1
++#define PEN_UP 0
++#define TS_SAMPLE_INTERVAL 1
++
++typedef struct {
++ struct input_dev *idev;
++ struct timer_list *timer;
++ int use_count;
++} codec_zy_ts_t;
++
++codec_zy_ts_t codec_zy_ts;
++
++static struct input_dev *codec_zy_ts_input;
++
++#ifdef CONFIG_PM
++static volatile int touch_suspend = 0 ;
++#endif
++
++#define ZY_AC97_CODEC_REGS_NUM 0x40
++
++typedef struct
++{ // Register symbol // Usage
++ volatile unsigned long pocr; // PCM Out Control Register
++ volatile unsigned long picr; // PCM In Control Register
++ volatile unsigned long mccr; // Mic In Control Register
++ volatile unsigned long gcr; // Global Control Register
++ volatile unsigned long posr; // PCM Out Status Register
++ volatile unsigned long pisr; // PCM In Status Register
++ volatile unsigned long mcsr; // Mic In Status Register
++ volatile unsigned long gsr; // Global Status Register
++ volatile unsigned long car; // CODEC Access Register
++ volatile unsigned long pcscr; // PCM Surround Out Control
++ volatile unsigned long pcssr; // PCM Surround Out Status
++ volatile unsigned long pcsdr; // PCM Surround Out Data
++ volatile unsigned long pcclcr; // PCM Center/LFE Out Control
++ volatile unsigned long pcclsr; // PCM Center/LFE Out Status
++ volatile unsigned long pccldr; // PCM Center/LFE Out Data
++ volatile unsigned long reserved1; //
++ volatile unsigned long pcdr; // PCM FIFO Data Register
++ volatile unsigned long reserved2 [0x7]; // 0x4050-0044 through 0x4050-005C
++ volatile unsigned long mcdr; // Mic-in FIFO Data Register
++ volatile unsigned long reserved3 [0x27]; // 0x4050-0064 through 0x4050-00FC
++ volatile unsigned long mocr; // MODEM Out Control Register
++ volatile unsigned long reserved4;
++ volatile unsigned long micr; // MODEM In Control Register
++ volatile unsigned long reserved5;
++ volatile unsigned long mosr; // MODEM Out Status Register
++ volatile unsigned long reserved6;
++ volatile unsigned long misr; // MODEM In Status Register
++ volatile unsigned long reserved7 [0x9]; // 0x4050-011C through 0x4050-013C
++ volatile unsigned long modr; // MODEM FIFO Data Register
++ volatile unsigned long reserved8 [0x2F]; // 0x4050-0144 through 0x4050-01FC
++ // Primary Audio CODEC registers access
++ volatile unsigned long codec_regs_primary_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 01 Audio CODEC registers access
++ volatile unsigned long codec_regs_secondary_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Primary MODEM CODEC registers access
++ volatile unsigned long codec_regs_primary_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 01 MODEM CODEC registers access
++ volatile unsigned long codec_regs_secondary_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 10 MODEM CODEC registers access
++ volatile unsigned long codec_regs_third_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 11 MODEM CODEC registers access
++ volatile unsigned long codec_regs_fouth_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 10 Audio CODEC registers access
++ volatile unsigned long codec_regs_third_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 11 Audio CODEC registers access
++ volatile unsigned long codec_regs_fouth_aud [ZY_AC97_CODEC_REGS_NUM];
++} zy_ac97_acodec_t, *p_zy_ac97acodec_t ;
++
++
++/* Constants for the Global Control Register and Global Status Register */
++
++// AC97 Global Control Register bit mask constants
++
++#define ZY_AC97_GCR_GIE_MSK (1u << 0 )
++#define ZY_AC97_GCR_COLD_RESET_MSK (1u << 1 )
++#define ZY_AC97_GCR_WARM_RESET_MSK (1u << 2 )
++#define ZY_AC97_GCR_LINK_OFF_MSK (1u << 3 )
++#define ZY_AC97_GCR_PCRSM_IEN_MSK (1u << 4 )
++#define ZY_AC97_GCR_SCRSM_IEN_MSK (1u << 5 )
++#define ZY_AC97_GCR_PCRDY_IEN_MSK (1u << 8 )
++#define ZY_AC97_GCR_SCRDY_IEN_MSK (1u << 9 )
++#define ZY_AC97_GCR_SDONE_IE_MSK (1u << 18)
++#define ZY_AC97_GCR_CDONE_IE_MSK (1u << 19)
++#define ZY_AC97_GCR_nDMAEN_MSK (1u << 24)
++#define ZY_AC97_GCR_CLKBPB_MSK (1u << 31)
++#define ZY_AC97_GCR_FRCRST_MSK (1u << 30)
++// Global Status Register bit mask constants
++
++#define ZY_AC97_GSR_GSCI_MSK (1u << 0 )
++#define ZY_AC97_GSR_MIINT_MSK (1u << 1 )
++#define ZY_AC97_GSR_MOINT_MSK (1u << 2 )
++#define ZY_AC97_GSR_ACOFFD_MSK (1u << 3 )
++#define ZY_AC97_GSR_PIINT_MSK (1u << 5 )
++#define ZY_AC97_GSR_POINT_MSK (1u << 6 )
++#define ZY_AC97_GSR_MINT_MSK (1u << 7 )
++#define ZY_AC97_GSR_PCRDY_MSK (1u << 8 )
++#define ZY_AC97_GSR_SCRDY_MSK (1u << 9 )
++#define ZY_AC97_GSR_PCRSM_MSK (1u << 10)
++#define ZY_AC97_GSR_SCRSM_MSK (1u << 11)
++#define ZY_AC97_GSR_SLT12_BITS_MSK (7u << 12)
++#define ZY_AC97_GSR_RCS_ERR_MSK (1u << 15)
++#define ZY_AC97_GSR_SDONE_MSK (1u << 18)
++#define ZY_AC97_GSR_CDONE_MSK (1u << 19)
++
++
++// Bit mask and values for CAIP bit in car register.
++#define ZY_AC97_CAR_CAIP_MSK (0x1<<0)
++#define ZY_AC97_CAR_CAIP_LOCKED (0x1<<0)
++#define ZY_AC97_CAR_CAIP_CLEAR (0<<0)
++
++/* Constants for FIFO status reporting and control */
++
++// One bit location is used to report FIFO error conditions and clear
++// interrupts on those conditions in the various non-global status registers.
++
++// ZY_AC97_FIFOSTAT_FIFOE is used in:
++ // posr
++ // pisr
++ // mcsr
++ // mosr
++ // misr
++
++#define ZY_AC97_FIFOSTAT_FIFOE (1u << 4)
++#define ZY_AC97_FIFOSTAT_EOC (1u << 3)
++#define ZY_AC97_FIFOSTAT_FSR (1u << 2)
++
++// A different bit location is used to enable or disable interrupts based on
++// FIFO error conditions in the various non-global control registers.
++
++// ZY_AC97_FIFOCTRL_FEIE is used in:
++ // pocr
++ // picr
++ // mccr
++ // mocr
++ // micr
++
++#define ZY_AC97_FIFOCTRL_FEIE (1u << 3)
++#define ZY_AC97_FIFOCTRL_FSRIE (1u << 1)
++
++/*
++*******************************************************************************
++ AC'97 Codec Registers Location and Bit Definition
++*******************************************************************************
++*/
++
++/* */
++
++ // Includes symbolic values for certain proprietary register asssignments
++ // in AC'97 devices that might be used with ZY_AC97.
++
++ // Valid for subset of R 2.1 specification.
++ // Leading "e" in comment means it is an "expanded" register definition as
++ // found in one or more of the Appendices A-D of the R 2.1 specification.
++ // Appendix identifier will immediately follow the "e", such as "eA"
++ // R/O indicates read-only
++ // Registers not supported by the assumed controller will be commented out.
++
++#define ZY_AC97_CR_RESET_ID 0x00 // RESET CODEC TO DEFAULT, get ID info
++#define ZY_AC97_CR_MASTER_VOLUME 0x02 // LINE OUT VOLUME
++#define ZY_AC97_CR_HEADPHONE_VOLUME 0x04 //
++#define ZY_AC97_CR_MASTER_VOLUME_MONO 0x06 //
++#define ZY_AC97_CR_MASTER_TONE_R_L 0x08 //
++#define ZY_AC97_CR_PC_BEEP_VOLUME 0x0A //
++#define ZY_AC97_CR_PHONE_VOLUME 0x0C //
++#define ZY_AC97_CR_MIC_VOLUME 0x0E // micrOPHONE VOLUME/ AGC
++#define ZY_AC97_CR_LINE_IN_VOLUME 0x10 // LINE IN VOLUME
++#define ZY_AC97_CR_CD_VOLUME 0x12 //
++#define ZY_AC97_CR_VIDEO_VOLUME 0x14 //
++#define ZY_AC97_CR_AUX_VOLUME 0x16 //
++#define ZY_AC97_CR_PCM_OUT_VOLUME 0x18 //
++#define ZY_AC97_CR_RECORD_SELECT 0x1A // SELECT LINE IN OR micrOPHONE
++#define ZY_AC97_CR_RECORD_GAIN 0x1C //
++#define ZY_AC97_CR_RECORD_GAIN_MIC 0x1E //
++#define ZY_AC97_CR_GENERAL_PURPOSE 0x20 //
++#define ZY_AC97_CR_CONTROL_3D 0x22 //
++#define ZY_AC97_CR_POWERDOWN_CTRL_STAT 0x26 // POWER MANAGEMENT
++#define ZY_AC97_CR_E_AUDIO_ID 0x28 // eA Extended audio sprt info, R/O
++#define ZY_AC97_CR_E_AUDIO_CTRL_STAT 0x2A // eA Extended audio stat + control
++
++//
++// Audio Sample Rate Control Registers, 0x2C - 0x34
++//
++ // eA PCM Front DAC rate control
++#define ZY_AC97_CR_E_ASR_PCM_FRNT_DAC_RT 0x2C // (output slots 3, 4, 6)
++#define ZY_AC97_CR_E_ASR_PCM_LR_ADC_RT 0x32 // eA PCM L+R ADC rate control (3+4)
++#define ZY_AC97_CR_E_ASR_MIC_ADC_RT 0x34 // eA PCM Mic ADC rate control (5)
++
++
++#define ZY_AC97_CR_E_MDM_GPIO_PIN_STAT 0x54
++//
++// 5Ah-7Ah: Vendor Reserved
++//
++//
++// 7Ch-7Eh: Vendor ID registers. Optional but standardized for Plug'n'Play
++//
++#define ZY_AC97_CR_VENDOR_ID1 0x7C
++#define ZY_AC97_CR_VENDOR_ID2 0x7E
++
++#define ZY_AC97_CR_MAX ZY_AC97_CR_VENDOR_ID2
++
++#define ZY_AC97_CR_END_OF_LIST (ZY_AC97_CR_MAX + 2)
++
++
++
++/* Other Constants */
++
++// For accessing the Codec mixer registers, each increment of one 32-bit word
++// in processor space increments the addressed mixer register by two.
++// This does not cause any ambiguities because only even mixer register
++// addresses are currently supported (AC '97 spec, R 2.2)
++#define ZY_AC97_CODEC_REGS_PER_WORD 2
++
++/* Default timeout and holdtime settings */
++
++// timeout in reading and writing codec registers through AC link
++#define ZY_AC97_RW_TIMEOUT_DEF 200 //unit is us
++
++// timeout in waiting for codec's ready signal during setup process
++#define ZY_AC97_SETUP_TIMEOUT_DEF 500 //unit is us
++
++// timeout in waiting for locking the link successfully
++#define ZY_AC97_LOCK_TIMEOUT_DEF 300 //unit is us
++
++// timeout in shutting down the link
++#define ZY_AC97_LINKOFF_TIMEOUT_DEF 500 //unit is us
++
++// holdtime for keeping nReset signal active(low) in AC link
++#define ZY_AC97_COLD_HOLDTIME 100 //unit is us
++
++/*
++*******************************************************************************
++ ZY AC97 data structure used in function interface
++*******************************************************************************
++*/
++
++typedef struct
++{
++ unsigned long pocr; // PCM Out Control Register
++ unsigned long picr; // PCM In Control Register
++ unsigned long mccr; // Mic In Control Register
++ unsigned long gcr; // Global Control Register
++ unsigned long pcscr; // PCM Surround Out Control
++ unsigned long pcclcr; // PCM Center/LFE Out Control
++ unsigned long mocr; // MODEM Out Control Register
++ unsigned long micr; // MODEM In Control Register
++}zy_ac97_save_context_t;
++
++
++#define AC97_SAVE_CONTEXT_SIZE (sizeof(zy_ac97_save_context_t))
++
++static int zy_ac97_acodec_link_lock(p_zy_ac97acodec_t p_ac97_reg)
++{
++ int status = 1;
++ volatile unsigned long car_tmp;
++
++ car_tmp = p_ac97_reg->car;
++ if (car_tmp & ZY_AC97_CAR_CAIP_MSK) /* "1" in CAIP bit means lock failed. */
++ {
++ status = 0;
++ }
++ return (status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_write (zy_acocec_context_t *p_dev_context, unsigned short offset, unsigned short data)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ int got_link;
++ unsigned long time_remaining;
++ volatile unsigned long * p_codec_reg;
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_dev_context->p_ctrl_reg);
++ unsigned long max_rw_time_out_us = (p_dev_context->u_max_read_write_time_out_ms) * 1000;
++
++
++ if(offset == ZY_AC97_CR_E_MDM_GPIO_PIN_STAT)
++ {/* it is a special register and sent out on slot 12 */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_mdm[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++ /* The data will be sent out on slot 12. */
++ *p_codec_reg = (unsigned long)data;
++ goto done;
++ }
++
++ /* Point to specified register within area mapped to target codec regs */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_aud[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++
++
++ /* Lock the ACLINK */
++ time_remaining = ZY_AC97_LOCK_TIMEOUT_DEF;
++ do
++ {
++ got_link = zy_ac97_acodec_link_lock(p_ac97_reg);
++ if (0 == got_link) /* 1 usec is a long time. Skip delay if possible. */
++ {
++ udelay(1);
++ }
++ } /* Wait while time remaining and ACLINK not available */
++ while (time_remaining-- && (0 == got_link));
++
++ if (0 == got_link) /* Didn't get the ACLINK */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ printk(KERN_ERR "AC97 Write Link Timeout\n");
++ }
++ else /* We got the link. Perform the write operation and don't wait. */
++ {
++ /* First, clear old write status indication CDONE by writing a ONE to that bit. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_CDONE_MSK;
++
++ *p_codec_reg = (unsigned long)data; /* Now the write! */
++
++ /* Wait until write cycle is complete. There should be a way
++ * to do this speculatively at the beginning of the procedure.
++ * Need to discover it. Too inefficient to always wait.
++ */
++
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and command I/O still incomplete. */
++ while ( (time_remaining--) && !(p_ac97_reg->gsr & ZY_AC97_GSR_CDONE_MSK));
++ if (!(p_ac97_reg->gsr & ZY_AC97_GSR_CDONE_MSK))
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ p_ac97_reg->car = ZY_AC97_CAR_CAIP_CLEAR;
++ }
++ } /* Got AC link */
++
++done:
++ return(status);
++} /* Ac97CtrlCodecWrite() */
++
++#define CKENA __REG(0x4134000C) /* A Clock Enable Register */
++#define CKENB __REG(0x41340010)
++
++zy_acodec_error_t zy_ac97_acodec_read (zy_acocec_context_t *p_dev_context, unsigned short offset, unsigned short *pdata)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ int got_link;
++ unsigned long time_remaining;
++ volatile unsigned long * p_codec_reg;
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_dev_context->p_ctrl_reg);
++ unsigned long max_rw_time_out_us = (p_dev_context->u_max_read_write_time_out_ms) * 1000;
++
++ /* Point to specified register within area mapped to target codec regs */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_aud[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++
++ /* Lock the ACLINK */
++ time_remaining = ZY_AC97_LOCK_TIMEOUT_DEF;
++ do
++ {
++ got_link = zy_ac97_acodec_link_lock(p_ac97_reg);
++ if (0 == got_link) /* 1 usec is a long time. Skip delay if possible. */
++ {
++ udelay(1);
++ }
++ } /* Wait while time remaining and ACLINK not available */
++ while (time_remaining-- && (0 == got_link));
++
++ if (0 == got_link) /* Didn't get the ACLINK */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ printk(KERN_ERR "AC97 Read Link Timeout\n");
++ }
++ else /* We got the link. Perform the write operation and don't wait. */
++ {
++ /* First, clear old read status indications. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_SDONE_MSK | ZY_AC97_GSR_RCS_ERR_MSK;
++
++ *pdata = (unsigned short)(*p_codec_reg); /* This is THE DUMMY READ. */
++
++ /* Wait for read I/O with codec to complete before doing real read. */
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and read I/O still incomplete */
++ while( (time_remaining--) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK)) );
++
++ if ((p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_RCS_ERR_MSK)) )
++ {
++ if (p_ac97_reg->gsr & ZY_AC97_GSR_RCS_ERR_MSK)
++ {/* timeout indicated by RCS bit */
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++ /* succeed in reading. clear status bits first. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_SDONE_MSK | ZY_AC97_GSR_RCS_ERR_MSK;
++ *pdata = (unsigned short)(*p_codec_reg); /* THE REAL READ. */
++ if (*pdata == 0xffff)
++ {/* timeout indicated by returned value */
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++ /* check later: is second waiting really needed? */
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and read I/O still incomplete */
++ while( (time_remaining--) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK)) );
++ //printk(KERN_ERR "AC97 Read Result %d\n", (p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK) );
++ }
++ else /* failed */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ p_ac97_reg->car = ZY_AC97_CAR_CAIP_CLEAR;
++ //printk(KERN_ERR "AC97 Read Link Timeout2 %x %x %x\n", CKENA, OSCC, CKENB);
++ } /* else (OK to do real read) */
++
++ } /* else (We got the link. Perform the read operations.) */
++
++ return (status);
++}
++
++
++
++zy_acodec_error_t zy_acodec_get_adc_sample(zy_acocec_context_t *p_device_context, unsigned short *p_sample_data, unsigned short adc_type, int *p_pen_down)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++ unsigned long wait;
++
++ if (adc_type == ZY_TOUCH_SAMPLE_X)
++ {
++ value = 0x202;
++ }
++ else
++ {/* Y sample */
++ value = 0x204;
++ }
++
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_1_WM13, value);
++
++ wait = 0;
++ do
++ {
++ status = zy_ac97_acodec_read(p_device_context, DIGITIZER_1_WM13, &value);
++ if ( !(value & 0x200 ) )
++ {
++ break;
++ }
++ }while ( 100 > wait++ );
++
++ status = zy_ac97_acodec_read(p_device_context, DIGITIZER_READ_BACK, &value);
++ if (value & 0x8000)
++ {/* means pen down */
++ *p_pen_down = 1;
++ }
++ else
++ {
++ *p_pen_down = 0;
++ }
++ *p_sample_data = value & 0xfff;
++
++ return status;
++}
++
++
++
++/*
++ * add a touch event
++ */
++static int codec_zy_ts_evt_add(codec_zy_ts_t* ts, u16 pressure, u16 x, u16 y)
++{
++ /* add event and remove adc src bits */
++ static u16 pre_press = 0;
++
++ input_report_abs(ts->idev, ABS_X, x & 0xfff);
++ input_report_abs(ts->idev, ABS_Y, y & 0xfff);
++ if (pressure == pre_press){
++ pressure--;
++ }
++ pre_press = pressure;
++ input_report_abs(ts->idev, ABS_PRESSURE, pressure & 0xfff);
++ input_sync(ts->idev);
++#ifdef CONFIG_IPM
++ ipm_event_notify(IPM_EVENT_UI, IPM_EVENT_DEVICE_TSI, NULL, 0);
++#endif
++ return 0;
++}
++
++/*
++ * add a pen up event
++ */
++static void codec_zy_ts_evt_release(codec_zy_ts_t* ts)
++{
++ input_report_abs(ts->idev, ABS_PRESSURE, 0);
++ input_sync(ts->idev);
++
++#ifdef CONFIG_IPM
++ ipm_event_notify(IPM_EVENT_UI, IPM_EVENT_DEVICE_TSI, NULL, 0);
++#endif
++ p_zy_codec_ctxt->g_pfn_event_ack(p_zy_codec_ctxt,ZY_EVENT_TYPE_PDN);
++}
++
++/*
++ * Kill the touchscreen thread and stop
++ * the touch digitiser.
++ */
++static void codec_zy_ts_input_close(struct input_dev *idev)
++{
++ codec_zy_ts_t *ts = (codec_zy_ts_t *) &codec_zy_ts;
++
++#ifdef CONFIG_PM
++ if(touch_suspend){
++ pr_info("touch is suspended!\n");
++ return -1;
++ }
++#endif
++ dbg("close ts input!\n");
++ if (--ts->use_count == 0) {
++ del_timer(ts->timer);
++ if (ts->timer != NULL)
++ kfree(ts->timer);
++ p_zy_codec_ctxt->g_pfn_disable_touch(p_zy_codec_ctxt);
++ }
++}
++
++/*
++ * Sample the touchscreen
++ */
++int ac97_poll_touch(codec_zy_ts_t *ts)
++{
++ unsigned short x=0, y=0;
++ int if_down= 0;
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++
++#ifdef DEBUG
++ start_time = OSCR;
++#endif
++
++ /* get x value */
++ status = zy_acodec_get_adc_sample(p_zy_codec_ctxt, &x, ZY_TOUCH_SAMPLE_X, &if_down);
++ if (ZY_ACODEC_SUCCESS != status ){
++ return -EIO;
++ }
++ dbg("x:0x%x\n", x);
++
++ /* the pen is up */
++ if (1 != if_down){
++ return PEN_UP;
++ }
++
++ /* get y vaule */
++ status = zy_acodec_get_adc_sample(p_zy_codec_ctxt, &y, ZY_TOUCH_SAMPLE_Y, &if_down);
++ if (ZY_ACODEC_SUCCESS != status ){
++ return -EIO;
++ }
++ dbg("y:0x%x\n",y);
++
++ /* the pen is up */
++ if (1 != if_down){
++ return PEN_UP;
++ }
++
++ /* the pen is down, can not get the pressure value,
++ * so if pen is down, give the max pressure value
++ */
++ codec_zy_ts_evt_add(ts,0xfff, x, y);
++
++#ifdef DEBUG
++ end_time = OSCR;
++ PRINT_TIME();
++#endif
++
++ return PEN_DOWN;
++}
++
++static void touch_timer_handler(unsigned long unused)
++{
++ int event;
++ codec_zy_ts_t *ts = &codec_zy_ts;
++
++ event = ac97_poll_touch(ts);
++
++ if (event == PEN_DOWN) {
++ dbg("pen down!\n");
++ ts->timer->expires = jiffies + TS_SAMPLE_INTERVAL;
++ add_timer(ts->timer);
++ } else if(event == PEN_UP) {
++ dbg("pen up!\n");
++ codec_zy_ts_evt_release(ts);
++ } else if(event == -EIO) {
++ printk(KERN_ERR "Access touch interface error!\n");
++ }
++ return;
++}
++
++static zy_acodec_error_t zy_ac97_acodec_cold_reset(zy_acocec_context_t * p_ac97_ctxt)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ p_zy_ac97acodec_t p_ac97 = (p_zy_ac97acodec_t)(p_ac97_ctxt->p_ctrl_reg);
++ int pri_codec_ready;
++ unsigned long time_remaining;
++
++ p_ac97->gcr = 0;
++ p_ac97->gcr |= ZY_AC97_GCR_CLKBPB_MSK;
++ /* Hold reset active for a minimum time */
++ udelay(ZY_AC97_COLD_HOLDTIME);
++ p_ac97->gcr &= ~ZY_AC97_GCR_CLKBPB_MSK;
++
++ /* Deactivate cold reset condition */
++ p_ac97->gcr |= (ZY_AC97_GCR_COLD_RESET_MSK | ZY_AC97_GCR_WARM_RESET_MSK);
++
++
++ pri_codec_ready = 0;
++ time_remaining = (p_ac97_ctxt->u_max_setup_time_out_ms) * 10;
++ do
++ {
++ udelay(1);
++ if (p_ac97->gsr & ZY_AC97_GSR_PCRDY_MSK)
++ pri_codec_ready = 1;
++ }
++ while (time_remaining-- && (pri_codec_ready == 0));
++
++ /* Timeout status if some of the devices weren't ready. */
++ if (pri_codec_ready == 0)
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++
++ return (status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_init(zy_acocec_context_t *p_ac97_ctxt)
++{
++ zy_acodec_error_t status ;
++
++ status = zy_ac97_acodec_cold_reset(p_ac97_ctxt);
++
++ return (status);
++}
++
++
++/*
++ * Start the touchscreen thread and
++ * the touch digitiser.
++ */
++static int codec_zy_ts_input_open(struct input_dev *idev)
++{
++ codec_zy_ts_t *ts = (codec_zy_ts_t *) &codec_zy_ts;
++
++#ifdef CONFIG_PM
++ if(touch_suspend){
++ pr_info("touch is suspended!\n");
++ return -1;
++ }
++#endif
++
++ if (ts->use_count++ > 0)
++ return 0;
++
++ dbg("Touch is opened. Use count: %d\n", ts->use_count);
++ ts->idev = idev;
++ ts->timer = kmalloc(sizeof(struct timer_list), GFP_KERNEL);
++ if (!ts->timer) {
++ printk(KERN_ERR "Alloc memory error for timer!\n");
++ return -ENOMEM;
++ }
++
++ init_timer(ts->timer);
++ ts->timer->function = touch_timer_handler;
++ ts->timer->data = 0;
++ p_zy_codec_ctxt->g_pfn_enable_touch(p_zy_codec_ctxt);
++
++ return 0;
++}
++
++/*
++ * initilze the pxa touch screen
++ */
++static int alsa_ts_init( void )
++{
++ codec_zy_ts_t* ts = &codec_zy_ts;
++
++ memset(ts, 0, sizeof(codec_zy_ts_t));
++
++ codec_zy_ts_input = input_allocate_device();
++ if (!codec_zy_ts_input)
++ return -ENOMEM;
++
++
++ /* tell input system what we events we accept and register */
++ codec_zy_ts_input->name = "codec zy touchscreen";
++ codec_zy_ts_input->open = codec_zy_ts_input_open;
++ codec_zy_ts_input->close = codec_zy_ts_input_close;
++ __set_bit(EV_ABS, codec_zy_ts_input->evbit);
++ __set_bit(ABS_X, codec_zy_ts_input->absbit);
++ __set_bit(ABS_Y, codec_zy_ts_input->absbit);
++ __set_bit(ABS_PRESSURE, codec_zy_ts_input->absbit);
++ input_register_device(codec_zy_ts_input);
++
++ return 0;
++}
++
++static irqreturn_t pxa_touch_irq(int irq, void *dev)
++{
++ unsigned char event_type;
++
++ //printk(KERN_ERR "%s: enter codec event handler\n", __FUNCTION__);
++
++ dbg("%s: enter codec event handler\n", __FUNCTION__);
++ p_zy_codec_ctxt->g_pfn_get_event(p_zy_codec_ctxt, &event_type);
++ switch (event_type) {
++ case ZY_EVENT_TYPE_PDN:
++ {
++ codec_zy_ts_t *ts = &codec_zy_ts;
++ /*if the touch is not open need not acknowledge the event*/
++ if (ts->use_count <= 0)
++ break;
++ ts->timer->expires = jiffies + TS_SAMPLE_INTERVAL;
++ add_timer(ts->timer);
++ break;
++ }
++ default:
++ printk("unsupported codec event:0x%x\n", event_type);
++ }
++
++ return IRQ_HANDLED;
++}
++
++
++
++
++
++
++
++
++
++static mfp_cfg_t extra_cfg[] = {
++ MFP_CFG_X(GPIO17, AF3, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO25, AF0, DS01X, PULL_LOW),
++};
++
++#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
++
++extern void dump_mfp(void);
++
++zy_acodec_error_t zy_ac97_acodec_mfp_init(zy_acocec_context_t *p_device_context)
++{
++ unsigned short codec_id;
++
++ //mhn_mfp_set_afds(MFP_RSVD_AC97_SDATA_IN_0, MFP_AF0, MFP_DS03X);
++ //enable_ac97_pins();
++ zy_ac97_acodec_init(p_device_context);
++ if (zy_ac97_acodec_read(p_device_context, 0x0, &codec_id)){
++
++ /*
++ * there is a bug on MonahansL/MonhansPL PC card: AC97_SDATA_IN is not connected to CODEC
++ * ECO 72: Connect PWM_0(MFP_RSVD_AC97_SDATA_IN_0) to CODEC as AC97_SDATA_IN
++ */
++
++ //mhn_mfp_set_afds(MFP_RSVD_AC97_SDATA_IN_0, MFP_RSVD_AC97_SDATA_IN_0_AF, MFP_DS03X);
++ //mhn_mfp_set_afds(MFP_AC97_SDATA_IN_0, MFP_AF0, MFP_DS01X);
++
++ gpio_direction_output(mfp_to_gpio(MFP_PIN_GPIO17), 0);
++ pxa3xx_mfp_config(ARRAY_AND_SIZE(extra_cfg));
++ gpio_direction_input(mfp_to_gpio(MFP_PIN_GPIO25));
++ }
++
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++#define ZY_AC97_WM9713_GPIO_PIN_PDN ( 0x1 << 13 ) /* Pen down */
++
++/*power enable bit in 3ch and 3eh */
++/*3ch */
++#define ZY_AC97_9713_PWR_PADCPD ( 0x1 << 15 )
++#define ZY_AC97_9713_PWR_VMID ( 0x1 << 14 )
++#define ZY_AC97_9713_PWR_TSHUT ( 0x1 << 13 )
++#define ZY_AC97_9713_PWR_VXDAC ( 0x1 << 12 )
++#define ZY_AC97_9713_PWR_AUXDAC ( 0x1 << 11 )
++#define ZY_AC97_9713_PWR_MBIAS ( 0x1 << 10 )
++#define ZY_AC97_9713_PWR_PLL ( 0x1 << 9 )
++#define ZY_AC97_9713_PWR_DACL ( 0x1 << 7 )
++#define ZY_AC97_9713_PWR_DACR ( 0x1 << 6 )
++#define ZY_AC97_9713_PWR_ADCL ( 0x1 << 5 )
++#define ZY_AC97_9713_PWR_ADCR ( 0x1 << 4 )
++#define ZY_AC97_9713_PWR_HPLX ( 0x1 << 3 )
++#define ZY_AC97_9713_PWR_HPRX ( 0x1 << 2 )
++#define ZY_AC97_9713_PWR_SPKX ( 0x1 << 1 )
++#define ZY_AC97_9713_PWR_MX ( 0x1 << 0 )
++
++/*3EH */
++#define ZY_AC97_9713_PWR_MCD ( 0x1 << 15 )
++#define ZY_AC97_9713_PWR_MICBIAS ( 0x1 << 14 )
++#define ZY_AC97_9713_PWR_MONO ( 0x1 << 13 )
++#define ZY_AC97_9713_PWR_OUT4 ( 0x1 << 12 )
++#define ZY_AC97_9713_PWR_OUT3 ( 0x1 << 11 )
++#define ZY_AC97_9713_PWR_HPL ( 0x1 << 10 )
++#define ZY_AC97_9713_PWR_HPR ( 0x1 << 9 )
++#define ZY_AC97_9713_PWR_SPKL ( 0x1 << 8 )
++#define ZY_AC97_9713_PWR_SPKR ( 0x1 << 7 )
++#define ZY_AC97_9713_PWR_LL ( 0x1 << 6 )
++#define ZY_AC97_9713_PWR_LR ( 0x1 << 5 )
++#define ZY_AC97_9713_PWR_MOIN ( 0x1 << 4 )
++#define ZY_AC97_9713_PWR_MA ( 0x1 << 3 )
++#define ZY_AC97_9713_PWR_MB ( 0x1 << 2 )
++#define ZY_AC97_9713_PWR_MPA ( 0x1 << 1 )
++#define ZY_AC97_9713_PWR_MPB ( 0x1 << 0 )
++
++
++void zy_wm9713_get_event(zy_acocec_context_t *p_device_context, unsigned char * event_type)
++{
++ unsigned short event_state = 0;
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ if(event_state & ZY_AC97_WM9713_GPIO_PIN_PDN){
++ *event_type = ZY_EVENT_TYPE_PDN;
++ return;
++ }
++ return;
++}
++
++void zy_wm9713_event_ack(zy_acocec_context_t *p_device_context, unsigned char event_type)
++{
++ unsigned short event_state = 0;
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ if( event_type == ZY_EVENT_TYPE_PDN){
++ zy_ac97_acodec_write(p_device_context,
++ GPIO_PIN_STATUS,
++ (event_state & (~ZY_AC97_WM9713_GPIO_PIN_PDN)));
++ }
++
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ return;
++}
++
++static void * p_saved_memory = NULL;
++static void * p_zy_scenario = NULL;
++static p_zy_acocec_context_t p_zy_ctxt = NULL;
++
++#define WM9713_SAVE_REGISTER_NO (64-11)
++typedef struct {
++ unsigned short wm9713RegisterContext [WM9713_SAVE_REGISTER_NO + 1]; /* Fixed (data misalignment error) */
++}ZY_9713_CONTEXT_SAVE_T;
++
++
++/**
++ * alsa_prepare_for_zy - create and initialize the p_zy_acocec_context_t
++ * open the clock of data link
++ * @p_p_zy_ctxt: return the data structure p_zy_acocec_context_t
++ * return: 0 success ; -ENOMEM
++ **/
++int alsa_prepare_for_zy(p_zy_acocec_context_t * p_p_zy_ctxt)
++{
++ if (p_zy_ctxt) {
++ p_zy_ctxt->use_count++;
++ *p_p_zy_ctxt = p_zy_ctxt;
++ return 0;
++ }
++
++ p_zy_ctxt = kzalloc(sizeof(zy_acocec_context_t), GFP_KERNEL);
++ if (!p_zy_ctxt)
++ return -ENOMEM;
++
++ /* enable CLK_POUT as CODEC clock input */
++ OSCC |= 0x800;
++
++ p_saved_memory = kzalloc(sizeof(ZY_9713_CONTEXT_SAVE_T) +
++ sizeof(zy_ac97_save_context_t), GFP_KERNEL);
++ if (NULL == p_saved_memory) {
++ if (p_zy_ctxt)
++ kfree(p_zy_ctxt);
++ return -ENOMEM;
++ }
++
++ p_zy_ctxt->acodec_id = (zy_acodec_device_id_t) (WM_9713_ID);
++ p_zy_ctxt->use_count++;
++ /*
++ p_zy_ctxt->pMfpRegBase = (unsigned long) (MFP_BASE);
++ p_zy_ctxt->pMfpRmDb = ZY_MFP_RM_DATABASE;
++ p_zy_ctxt->p_ost_regs = OST_BASE;
++ */
++ p_zy_ctxt->p_voice_reg = NULL;
++ p_zy_ctxt->p_hifi_reg = (void *) (&POCR);
++ p_zy_ctxt->p_ctrl_reg = (void *) (&POCR);
++ p_zy_ctxt->u_max_read_write_time_out_ms = ZY_AC97_RW_TIMEOUT_DEF;
++ p_zy_ctxt->u_max_setup_time_out_ms = ZY_AC97_SETUP_TIMEOUT_DEF;
++ p_zy_ctxt->p_save_memory = p_saved_memory;
++ p_zy_ctxt->p_zy_scenario = p_zy_scenario;
++// pxa_set_cken(24, 1);
++ CKENA |= (1 << 24);
++ AC97_DIV = 1625<<12 | 128;
++#ifdef DEBUG_ALSA_ZY
++ debug_pac97ctxt = p_zy_ctxt;
++ misc_register(&audio_dev);
++#endif
++
++ (*p_p_zy_ctxt) = p_zy_ctxt;
++
++ return 0;
++}
++
++
++/* this is platform specific */
++/* do later: not to enable recording route and playback route in this function,
++ * leave it to driver to call other function
++ */
++zy_acodec_error_t zy_wm9713_specific_init (zy_acocec_context_t *p_device_context)
++{
++
++ unsigned short value;
++
++ /* this assumes that the aclink is initialized wait some time and then
++ * do a warm reset to enabled the ACLINK, required for wm9713
++ * (not wm9712 or ucb1400)
++ */
++
++ /* pay attention: whether the workaround is still needed? */
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_device_context->p_ctrl_reg);
++
++ p_ac97_reg->gcr |= ZY_AC97_GCR_WARM_RESET_MSK;
++
++ mdelay(5);
++
++ /* power on all the necessary unit */
++ zy_ac97_acodec_write(p_device_context,POWERDOWN_CTRL_STAT, 0x000); /*26*/
++ /* open left headphone mixer */
++ /* open right headphone mixer */
++ /* open right/left dac */
++ /* open right/left adc */
++ /* open temperature sensor */
++ /* enable reference generator */
++ zy_ac97_acodec_write(p_device_context,POWER_DOWN_1, 0xda00); /*3c */
++ /* open microphone bias */
++ /* open HPL output PGA */
++ /* open HPR output PGA */
++ /* open mic PGA MA */
++ /* open mic pre-amp MPA */
++ /* if here we enable SPKL and SPKR PGA, then Touch screen will doesn't work */
++ zy_ac97_acodec_write(p_device_context,POWER_DOWN_2,0xb9f5); /*3e */
++
++ /* recording route and microphone input */
++ /* microphone selection, now fixed to MIC1 input and mic bias output */
++ /* MIC1 only, MICBIAS enable */
++ zy_ac97_acodec_write (p_device_context, MIC_BIAS, 0xC440); /*0x22h*/
++
++ /* mic pga setting to mixer (side tone) */
++ /* comment the below code to make MICA/B play back volume gain + 0db */
++ /* zy_ac97_acodec_write (p_device_context, MIC_PGA_VOLUME, 0x0000); */ /*0x0eh*/
++
++ /* recording side tone and ADC boost, now fixed to default (14h) */
++ /* recording volume 0dB */
++ zy_ac97_acodec_write(p_device_context, REC_PGA_VOL, 0x0); /*12*/
++
++ /* hifi playback route and output mixer */
++ /* by default, fixed to enable headphone only */
++
++ /* comment the below code to make SPEAKER default MUTE */
++ zy_ac97_acodec_write (p_device_context, SPEAKER_VOLUME, 0x0); /*02*/
++
++ /* comment the below code to make OUT3_OUT4 default MUTE */
++ /* zy_ac97_acodec_write (p_device_context, OUT3_OUT4_VOLUME, 0x8000); */ /*06*/
++
++ /* remove all the mute bit volume gain + 0db */
++ zy_ac97_acodec_write(p_device_context, HEADPHONE_VOLUME, 0x0); /*04*/
++
++ /* DAC route */
++ /* open DAC to headphone mixer path */
++ /* left DAC gain +0db */
++ /* right DAC gain +0db */
++ zy_ac97_acodec_write(p_device_context, DAC_PGA_VOL_ROUTE,0x0808); /*0c*/
++
++ /* out3 configure, invert to HPMIXR */
++ /* zy_ac97_acodec_write(p_device_context,DAC_3D_CTRL_INV_MUX_SEL, 0x8000); */ /*1e*/
++
++ /* output control */
++ /* select HPMIXR HPMIXL out */
++ /* other out are all VIM */
++ zy_ac97_acodec_write(p_device_context,OUTPUT_PGA_MUX, 0x9BA8); /*1c*/
++
++ /* set sample rates */
++ /* enable variable rate conversion */
++ zy_ac97_acodec_write(p_device_context, EXTENDED_AUD_STAT_CTRL , 0x1); /*2a*/
++ /* DAC 44kHZ */
++ zy_ac97_acodec_write(p_device_context,AUDIO_DAC_RATE,0xac44); /*2c*/
++ /* ADC 16KHZ */
++ zy_ac97_acodec_write(p_device_context,AUDIO_ADC_RATE,0x3E80); /*32*/
++
++ /* clock scheme, use external clock, it is 24MHZ from MCLK_A */
++
++
++ zy_ac97_acodec_read(p_device_context, MCLK_PLL_CTRL_1, &value);
++ zy_ac97_acodec_write(p_device_context, MCLK_PLL_CTRL_1, value | 0x2);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_wm9713_specific_deinit (zy_acocec_context_t *p_device_context)
++{/* do later: shut down all power */
++ unsigned short value = 0;
++
++ /* close the power of all units */
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, 0xffff);
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_2, 0xffff);
++ zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value &= ~(ZY_AC97_9713_PWR_MBIAS);
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_acodec_set_pen_down_interrupt(zy_acocec_context_t *p_device_context, int enable)
++{/* disable/enable pen down interrupt in the codec. This function is not implemented for Wm9713 */
++ /* because the pen down detection could not be disabled in codec */
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_wm9713_enable_touch(zy_acocec_context_t *p_device_context)
++{/* enable touch functionality in the codec */
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++
++ /* power setting */
++ status = zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value &= ~(ZY_AC97_9713_PWR_PADCPD);
++ status = zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ /* basic touch setting */
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_3_WM13, 0xc008);
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_2_WM13, 0x6);
++
++
++ /* 9713 powerdown virtual gpio setting (polarity, sticky, wakeup) */
++ /* 9713 gpio 2(pin45) route to IRQ */
++ /* Notes: Can use defaults for IRQ polarity, PENDOWN polarity in IRQ, */
++ /* sticky for PENDOWN in IRQ and wakeup for PENDOWN. */
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_CFG, &value);
++ value &= ~(0x4);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_CFG, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_SHARING, &value);
++ value &= ~(0x4);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_SHARING, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_WAKEUP, &value);
++ value |= (0x2000);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_WAKEUP, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_STICKY, &value);
++ value |= (0x2000);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_STICKY, value);
++
++ return status;
++}
++
++zy_acodec_error_t zy_wm9713_disable_touch(zy_acocec_context_t *p_device_context)
++{/* disable touch functionality in the codec */
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++
++ /* power setting */
++ status = zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value |= (ZY_AC97_9713_PWR_PADCPD);
++ status = zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ return status;
++}
++zy_acodec_error_t zy_ac97_acodec_mfp_deinit(zy_acocec_context_t *p_device_context)
++{/* do later: free all MFP resources. */
++ return ZY_ACODEC_SUCCESS;
++}
++
++static zy_acodec_error_t zy_ac97_acodec_shut_down_aclink(p_zy_ac97acodec_t p_ac97_reg, int * p_ost_regs)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned long time_remaining = ZY_AC97_LINKOFF_TIMEOUT_DEF;
++
++ p_ac97_reg->gcr |= ZY_AC97_GCR_LINK_OFF_MSK;
++ p_ac97_reg->gcr |= ZY_AC97_GCR_CLKBPB_MSK;
++
++ while (!(p_ac97_reg->gsr & ZY_AC97_GSR_ACOFFD_MSK))
++ {
++ time_remaining --;
++ if (0 == time_remaining)
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ break;
++ }
++ udelay(1);
++ }
++ p_ac97_reg->gcr |= ZY_AC97_GCR_FRCRST_MSK;
++ /* check later: any delay needed */
++ p_ac97_reg->gcr &= ~ZY_AC97_GCR_FRCRST_MSK;
++ p_ac97_reg->gcr &= ~ZY_AC97_GCR_CLKBPB_MSK;
++
++ return(status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_deinit(zy_acocec_context_t * p_ac97_ctxt)
++{
++ zy_acodec_error_t status ;
++
++ status = zy_ac97_acodec_shut_down_aclink((p_zy_ac97acodec_t)(p_ac97_ctxt->p_ctrl_reg), p_ac97_ctxt->p_ost_regs);
++
++ return (status);
++}
++
++zy_acodec_error_t zy_acodec_deinit(zy_acocec_context_t *p_device_context)
++{
++ /* power down codec by codec specific power down function */
++ if (p_device_context->g_pfn_codec_specific_dinit)
++ {
++ p_device_context->g_pfn_codec_specific_dinit(p_device_context);
++ }
++ /* call bus deinit function */
++ zy_ac97_acodec_deinit(p_device_context);
++ /* restore MFP, set GPIO to suitable value */
++ zy_ac97_acodec_mfp_deinit(p_device_context);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++void alsa_zy_codec_put(p_zy_acocec_context_t p_acodectxt)
++{
++
++ zy_acodec_deinit(p_acodectxt);
++ //pxa_set_cken(24, 0);
++ CKENA &= ~(1 << 24);
++
++ if(p_acodectxt->p_save_memory){
++ kfree(p_saved_memory);
++ }
++ if(p_acodectxt->p_zy_scenario){
++ kfree(p_zy_scenario);
++ }
++}
++
++
++zy_acodec_error_t zy_acodec_init(zy_acocec_context_t *p_device_context, int hw_init)
++{
++ /* set codec specific functions
++ * set mfp for Zylonite platform
++ * call bus init function (AC97, I2S, I2C, SSP)
++ * call specific init of codec
++ */
++ zy_acodec_error_t retval = ZY_ACODEC_SUCCESS;
++
++ if (p_device_context->acodec_id != WM_9713_ID)
++ {/* on Zylonite, it is Wolfson 9713 codec only */
++ return ZY_ACODEC_GENERAL_SW_ERR;
++ }
++
++ if (1 == hw_init)
++ {
++ zy_ac97_acodec_mfp_init(p_device_context);
++ zy_ac97_acodec_init(p_device_context); /* codec init common to ac97 */
++ }
++
++ /* wm9713-specific functions */
++ (p_device_context->g_pfn_codec_specific_init) = zy_wm9713_specific_init;
++ (p_device_context->g_pfn_codec_specific_dinit) = zy_wm9713_specific_deinit;
++ (p_device_context->g_pfn_acodec_read) = zy_ac97_acodec_read;
++ (p_device_context->g_pfn_acodec_write) = zy_ac97_acodec_write;
++
++ (p_device_context->g_pfn_event_ack) = zy_wm9713_event_ack;
++ (p_device_context->g_pfn_get_event) = zy_wm9713_get_event;
++ (p_device_context->g_pfn_disable_touch) = zy_wm9713_disable_touch;
++ (p_device_context->g_pfn_enable_touch) = zy_wm9713_enable_touch;
++
++ if (1 == hw_init)
++ {
++ retval = p_device_context->g_pfn_codec_specific_init(p_device_context);
++ }
++
++ return retval;
++}
++
++static int __devinit touch_codec_zy_probe(struct platform_device *dev)
++{
++ int ret = 0;
++ struct snd_card *card = NULL;
++ zy_acodec_error_t status;
++
++ /* will increase codec context use count */
++ ret = alsa_prepare_for_zy(&p_zy_codec_ctxt);
++ if (ret)
++ goto err;
++
++ /* codec specific initialization, audio will do it either */
++ if (1 == p_zy_codec_ctxt->use_count) {
++ status = zy_acodec_init(p_zy_codec_ctxt, 1);
++ if (ZY_ACODEC_SUCCESS != status) {
++ printk(KERN_ERR "initialize codec error\n");
++ ret = -EIO;
++ goto err;
++ }
++
++ /* power down the units of the acodec, sleep the acodec, zy_acodec_init()
++ * will open all the units' power of the codec while ALSA need all the codec
++ * units power down and the codec should sleep if it can.
++ * So on the zylonite platform we call below function to power down and sleep
++ * wm9713 codec.
++ */
++ p_zy_codec_ctxt->g_pfn_codec_specific_dinit(p_zy_codec_ctxt);
++
++ }
++
++ alsa_ts_init();
++
++ //mhn_mfp_set_afds(MFP_AC97_INT_N_GPIO,0,0);
++ //mhn_gpio_set_direction(MFP_AC97_INT_N_GPIO, GPIO_DIR_IN);
++ //mhn_gpio_clear_edge_detect_status(MFP_AC97_INT_N_GPIO);
++ gpio_direction_input(mfp_to_gpio(MFP_PIN_GPIO26));
++ ret = request_irq(IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO26)),
++ pxa_touch_irq, IRQF_TRIGGER_RISING,
++ "wm9713 touch event interrupt", NULL);
++ if (ret) {
++ printk(KERN_ERR "Request IRQ for touch failed (%d).\n", ret);
++ goto err;
++ }
++
++ return 0;
++err:
++ if (p_zy_codec_ctxt && (!--p_zy_codec_ctxt->use_count)) {
++ zy_acodec_deinit(p_zy_codec_ctxt);
++ //pxa_set_cken(24, 0);
++ CKENA &= ~(1 << 24);
++ kfree(p_zy_codec_ctxt);
++ p_zy_codec_ctxt = NULL;
++ }
++
++ if (card)
++ snd_card_free(card);
++
++ return ret;
++}
++
++static int __devexit touch_codec_zy_remove(struct platform_device *dev)
++{
++ struct snd_card *card = platform_get_drvdata(dev);
++
++ input_unregister_device(codec_zy_ts_input);
++
++ if (p_zy_codec_ctxt && (!--p_zy_codec_ctxt->use_count)) {
++ alsa_zy_codec_put(p_zy_codec_ctxt);
++ kfree(p_zy_codec_ctxt);
++ p_zy_codec_ctxt = NULL;
++ }
++
++ if (card) {
++ snd_card_free(card);
++ platform_set_drvdata(dev, NULL);
++ }
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int touch_codec_zy_suspend(struct platform_device *_dev, pm_message_t state, u32 level)
++{
++ int ret=0;
++
++ if (level == SUSPEND_DISABLE) {
++ ret = audio_codec_zy_do_suspend(NULL, SNDRV_CTL_POWER_D3cold, p_zy_codec_ctxt);
++ touch_suspend = 1;
++ }
++ return ret;
++}
++
++static int touch_codec_zy_resume(struct platform_device *_dev, u32 level)
++{
++ int ret = 0;
++
++ if (level == RESUME_ENABLE) {
++ ret = audio_codec_zy_do_resume(NULL, SNDRV_CTL_POWER_D0, p_zy_codec_ctxt);
++ touch_suspend = 0;
++ }
++ return ret;
++}
++#else
++#define touch_codec_zy_suspend NULL
++#define touch_codec_zy_resume NULL
++#endif
++
++static struct platform_driver touch_codec_zy_driver = {
++ .probe = touch_codec_zy_probe,
++ .remove = __devexit_p(touch_codec_zy_remove),
++ .suspend= touch_codec_zy_suspend,
++ .resume = touch_codec_zy_resume,
++ .driver = {
++ .name = "pxa2xx-touch",
++ },
++};
++
++static int __init touch_codec_zy_init(void)
++{
++ return platform_driver_register(&touch_codec_zy_driver);
++}
++
++static void __exit touch_code_zy_exit(void)
++{
++ platform_driver_unregister(&touch_codec_zy_driver);
++}
++module_init(touch_codec_zy_init);
++module_exit(touch_code_zy_exit);
++
++EXPORT_SYMBOL(p_zy_codec_ctxt);
++
++MODULE_AUTHOR("bridge.wu@marvell.com");
++MODULE_DESCRIPTION("zylonite audio touch codec driver on ALSA");
++MODULE_LICENSE("GPL");
++
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-akita b/packages/linux/linux-rp-2.6.24/defconfig-akita
index 3e187cfbff..32bfa9dfcf 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-akita
+++ b/packages/linux/linux-rp-2.6.24/defconfig-akita
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -917,7 +917,7 @@ CONFIG_I2C_BOARDINFO=y
#
# I2C Algorithms
#
-CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOBIT is not set
# CONFIG_I2C_ALGOPCF is not set
# CONFIG_I2C_ALGOPCA is not set
@@ -1676,7 +1676,7 @@ CONFIG_DEBUG_ERRORS=y
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_MANAGER=m
@@ -1691,7 +1691,7 @@ CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
@@ -1707,13 +1707,13 @@ CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_LZO=m
-CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_TEST=m
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-bootcdx86 b/packages/linux/linux-rp-2.6.24/defconfig-bootcdx86
index d37295b6a4..397468a366 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-bootcdx86
+++ b/packages/linux/linux-rp-2.6.24/defconfig-bootcdx86
@@ -51,7 +51,7 @@ CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-c7x0 b/packages/linux/linux-rp-2.6.24/defconfig-c7x0
index e323f4f901..4b54f9fc70 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-c7x0
+++ b/packages/linux/linux-rp-2.6.24/defconfig-c7x0
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -1682,7 +1682,7 @@ CONFIG_DEBUG_ERRORS=y
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_MANAGER=m
@@ -1697,7 +1697,7 @@ CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
@@ -1713,13 +1713,13 @@ CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_LZO=m
-CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_TEST=m
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-collie b/packages/linux/linux-rp-2.6.24/defconfig-collie
index 847fef882c..4d3f9f8782 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-collie
+++ b/packages/linux/linux-rp-2.6.24/defconfig-collie
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -221,7 +221,8 @@ CONFIG_PCMCIA_SA1100=m
CONFIG_PREEMPT=y
CONFIG_NO_IDLE_HZ=y
CONFIG_HZ=100
-# CONFIG_AEABI is not set
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
CONFIG_NODES_SHIFT=2
CONFIG_SELECT_MEMORY_MODEL=y
@@ -326,6 +327,7 @@ CONFIG_INET_TCP_DIAG=m
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
@@ -1058,7 +1060,7 @@ CONFIG_USB_G_SERIAL=m
# CONFIG_USB_MIDI_GADGET is not set
CONFIG_MMC=m
# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
+CONFIG_MMC_UNSAFE_RESUME=y
#
# MMC/SD Card Drivers
@@ -1308,7 +1310,7 @@ CONFIG_INSTRUMENTATION=y
# CONFIG_PRINTK_TIME is not set
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
-# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-htcuniversal b/packages/linux/linux-rp-2.6.24/defconfig-htcuniversal
index f121ddea90..7703594672 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-htcuniversal
+++ b/packages/linux/linux-rp-2.6.24/defconfig-htcuniversal
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-hx2000 b/packages/linux/linux-rp-2.6.24/defconfig-hx2000
index 7b08f287c9..d023ffecac 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-hx2000
+++ b/packages/linux/linux-rp-2.6.24/defconfig-hx2000
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-poodle b/packages/linux/linux-rp-2.6.24/defconfig-poodle
index db792d069c..4d40205111 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-poodle
+++ b/packages/linux/linux-rp-2.6.24/defconfig-poodle
@@ -1,4 +1,3 @@
-
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24-rc8
# Fri Jan 25 22:13:14 2008
@@ -34,7 +33,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -1171,7 +1170,7 @@ CONFIG_SND_SOC_WM8731=m
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
+# CONFIG_AC97_BUS is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
# CONFIG_HID_DEBUG is not set
@@ -1688,7 +1687,7 @@ CONFIG_DEBUG_ERRORS=y
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_MANAGER=m
@@ -1703,7 +1702,7 @@ CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
@@ -1719,13 +1718,13 @@ CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_LZO=m
-CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_TEST=m
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-qemuarm b/packages/linux/linux-rp-2.6.24/defconfig-qemuarm
index 7d984d8523..ae7ef52d31 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-qemuarm
+++ b/packages/linux/linux-rp-2.6.24/defconfig-qemuarm
@@ -33,7 +33,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-qemux86 b/packages/linux/linux-rp-2.6.24/defconfig-qemux86
index 3242d622d0..d1012b5c72 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-qemux86
+++ b/packages/linux/linux-rp-2.6.24/defconfig-qemux86
@@ -51,7 +51,7 @@ CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-spitz b/packages/linux/linux-rp-2.6.24/defconfig-spitz
index 7ad2c01127..d97e13faf4 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-spitz
+++ b/packages/linux/linux-rp-2.6.24/defconfig-spitz
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -1677,7 +1677,7 @@ CONFIG_DEBUG_ERRORS=y
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_MANAGER=m
@@ -1692,7 +1692,7 @@ CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
@@ -1708,13 +1708,13 @@ CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_LZO=m
-CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_TEST=m
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-tosa b/packages/linux/linux-rp-2.6.24/defconfig-tosa
index 128812721f..379b8bc44e 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-tosa
+++ b/packages/linux/linux-rp-2.6.24/defconfig-tosa
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24
-# Mon Feb 25 01:57:38 2008
+# Wed Jun 4 12:21:16 2008
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -158,7 +158,6 @@ CONFIG_PXA_SHARPSL=y
# CONFIG_MACH_ARMCORE is not set
CONFIG_PXA_SHARPSL_25x=y
# CONFIG_PXA_SHARPSL_27x is not set
-# CONFIG_MACH_HTCUNIVERSAL is not set
# CONFIG_MACH_POODLE is not set
# CONFIG_MACH_CORGI is not set
# CONFIG_MACH_SHEPHERD is not set
@@ -225,7 +224,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_PREEMPT=y
CONFIG_HZ=100
CONFIG_AEABI=y
-CONFIG_OABI_COMPAT=y
+# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
@@ -278,8 +277,6 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
#
# At least one emulation must be selected
#
-# CONFIG_FPE_NWFPE is not set
-# CONFIG_FPE_FASTFPE is not set
#
# Userspace binary formats
@@ -658,7 +655,7 @@ CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
-CONFIG_BLK_DEV_IDECS=y
+CONFIG_BLK_DEV_IDECS=m
CONFIG_BLK_DEV_IDECD=m
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -1000,8 +997,6 @@ CONFIG_MFD_CORE=y
# CONFIG_MFD_TC6387XB is not set
CONFIG_MFD_TC6393XB=y
# CONFIG_MFD_SM501 is not set
-# CONFIG_HTC_ASIC3 is not set
-# CONFIG_HTC_ASIC3_DS1WM is not set
#
# Multimedia devices
@@ -1535,7 +1530,7 @@ CONFIG_JFFS2_SUMMARY=y
# CONFIG_JFFS2_SYSFS is not set
CONFIG_JFFS2_COMPRESSION_OPTIONS=y
CONFIG_JFFS2_ZLIB=y
-# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_LZO=y
CONFIG_JFFS2_RTIME=y
CONFIG_JFFS2_RUBIN=y
# CONFIG_JFFS2_CMODE_NONE is not set
@@ -1666,7 +1661,7 @@ CONFIG_FRAME_POINTER=y
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_MANAGER=m
@@ -1681,7 +1676,7 @@ CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_LRW is not set
@@ -1697,13 +1692,13 @@ CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_DEFLATE=m
# CONFIG_CRYPTO_LZO is not set
-CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CAMELLIA is not set
CONFIG_CRYPTO_TEST=m
@@ -1722,6 +1717,8 @@ CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-zylonite b/packages/linux/linux-rp-2.6.24/defconfig-zylonite
index d75619ce0e..bdf6a3be8a 100644
--- a/packages/linux/linux-rp-2.6.24/defconfig-zylonite
+++ b/packages/linux/linux-rp-2.6.24/defconfig-zylonite
@@ -34,7 +34,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
diff --git a/packages/linux/linux-rp-2.6.24/hrw-hostapcard.patch b/packages/linux/linux-rp-2.6.24/hrw-hostapcard.patch
new file mode 100644
index 0000000000..67fc5b7c70
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/hrw-hostapcard.patch
@@ -0,0 +1,34 @@
+
+From: Marcin Juszkiewicz <openembedded@haerwu.biz>
+
+Card reported by Ångström user:
+http://bugs.openembedded.net/show_bug.cgi?id=3236
+
+Socket 1:
+ product info: "Wireless LAN", "11Mbps PC Card", "Version 01.02", ""
+ manfid: 0x0156, 0x0002
+ function: 6 (network)
+
+Signed-off-by: Marcin Juszkiewicz <openembedded@haerwu.biz>
+Acked-by: Pavel Roskin <proski@gnu.org>
+
+---
+ drivers/net/wireless/hostap/hostap_cs.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- linux-2.6.24.orig/drivers/net/wireless/hostap/hostap_cs.c
++++ linux-2.6.24/drivers/net/wireless/hostap/hostap_cs.c
+@@ -892,10 +892,13 @@ static struct pcmcia_device_id hostap_cs
+ 0xa21501a, 0x59868926, 0xc9049a39),
+ PCMCIA_DEVICE_PROD_ID1234(
+ "The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P",
+ "RevA",
+ 0xa5f472c2, 0x9c05598d, 0xc9049a39, 0x57a66194),
++ PCMCIA_DEVICE_PROD_ID123(
++ "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
++ 0x4b8870ff, 0x70e946d1, 0x4b74baa0),
+ PCMCIA_DEVICE_NULL
+ };
+ MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
+
+
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/.mtn2git_empty b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/.mtn2git_empty
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/binutils-buildid-arm.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/binutils-buildid-arm.patch
new file mode 100644
index 0000000000..68e35e89e1
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/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-rp-2.6.25+2.6.26-rc4/connectplus-prevent-oops-HACK.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/connectplus-prevent-oops-HACK.patch
new file mode 100644
index 0000000000..b5439c62e7
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/connectplus-prevent-oops-HACK.patch
@@ -0,0 +1,17 @@
+Index: linux-2.6.21/drivers/net/wireless/hostap/hostap_hw.c
+===================================================================
+--- linux-2.6.21.orig/drivers/net/wireless/hostap/hostap_hw.c 2007-07-07 12:45:39.000000000 +0100
++++ linux-2.6.21/drivers/net/wireless/hostap/hostap_hw.c 2007-07-07 12:47:30.000000000 +0100
+@@ -2666,6 +2666,12 @@
+ iface = netdev_priv(dev);
+ local = iface->local;
+
++ if(dev->base_addr == 0)
++ {
++ printk(KERN_DEBUG "%s: IRQ before base_addr set\n", dev->name);
++ return IRQ_HANDLED;
++ }
++
+ prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0);
+
+ if (local->func->card_present && !local->func->card_present(local)) {
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/connectplus-remove-ide-HACK.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/connectplus-remove-ide-HACK.patch
new file mode 100644
index 0000000000..4414b21191
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/connectplus-remove-ide-HACK.patch
@@ -0,0 +1,12 @@
+Index: linux-2.6.13/drivers/ide/legacy/ide-cs.c
+===================================================================
+--- linux-2.6.13.orig/drivers/ide/legacy/ide-cs.c 2005-09-01 22:43:46.000000000 +0100
++++ linux-2.6.13/drivers/ide/legacy/ide-cs.c 2005-09-01 22:45:46.000000000 +0100
+@@ -488,7 +488,6 @@
+ PCMCIA_DEVICE_PROD_ID123("KODAK Picture Card ", "KODAK ", "V100K", 0x94a0d8f3, 0xe4fc3ea0, 0xe5e7eed4),
+ PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
+ PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
+- PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
+ PCMCIA_DEVICE_NULL,
+ };
+ MODULE_DEVICE_TABLE(pcmcia, ide_ids);
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-akita b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-akita
new file mode 100644
index 0000000000..e630a9abff
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-akita
@@ -0,0 +1,1741 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:29:33 2008
+#
+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=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=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_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# 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/PXA3xx 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=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_PXA_SHARPSL_25x is not set
+CONFIG_PXA_SHARPSL_27x=y
+# CONFIG_MACH_HX2750 is not set
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# 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
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=m
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=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_SPARSEMEM_VMEMMAP_ENABLE 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=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ 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=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# 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=y
+# 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=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# 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 is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=m
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+CONFIG_KEYBOARD_SPITZ=y
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=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 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# 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=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# 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_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_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=y
+# 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_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 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# 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_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 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
+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_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_AC97_CODEC is not set
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_I2S=m
+CONFIG_SND_PXA2XX_SOC_SPITZ=m
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM8750=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+# CONFIG_AC97_BUS is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+# 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_ATMEL_USBA 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_PXA27X=y
+CONFIG_USB_PXA27X=m
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_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
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_SPITZ=y
+# CONFIG_LEDS_TOSA is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# 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 is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-bootcdx86 b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-bootcdx86
new file mode 100644
index 0000000000..35e9b5cd22
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-bootcdx86
@@ -0,0 +1,1994 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:34:58 2008
+#
+# CONFIG_64BIT is not set
+CONFIG_X86_32=y
+# CONFIG_X86_64 is not set
+CONFIG_X86=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_QUICKLIST=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+# CONFIG_GENERIC_TIME_VSYSCALL is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+# CONFIG_ZONE_DMA32 is not set
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_AUDIT_ARCH is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_AUDIT_TREE=y
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=15
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+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_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# 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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Processor type and features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_SMP=y
+CONFIG_X86_PC=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_GENERICARCH is not set
+# CONFIG_X86_ES7000 is not set
+# CONFIG_X86_VSMP is not set
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+# CONFIG_PARAVIRT_GUEST is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+CONFIG_M686=y
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+# CONFIG_MPSC is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_GENERIC_CPU is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_XADD=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_TSC=y
+CONFIG_X86_CMOV=y
+CONFIG_X86_MINIMUM_CPU_FAMILY=4
+CONFIG_HPET_TIMER=y
+CONFIG_NR_CPUS=8
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_BKL=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_NONFATAL=y
+CONFIG_X86_MCE_P4THERMAL=y
+CONFIG_VM86=y
+# CONFIG_TOSHIBA is not set
+# CONFIG_I8K is not set
+# CONFIG_X86_REBOOTFIXUPS is not set
+# CONFIG_MICROCODE is not set
+# CONFIG_X86_MSR is not set
+# CONFIG_X86_CPUID is not set
+CONFIG_NOHIGHMEM=y
+# CONFIG_HIGHMEM4G is not set
+# CONFIG_HIGHMEM64G is not set
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_3G_OPT is not set
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_2G_OPT is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_X86_PAE is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_SPARSEMEM_STATIC=y
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_NR_QUICK=1
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MTRR=y
+# CONFIG_EFI is not set
+CONFIG_IRQBALANCE=y
+CONFIG_SECCOMP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_KEXEC=y
+CONFIG_PHYSICAL_START=0x100000
+# CONFIG_RELOCATABLE is not set
+CONFIG_PHYSICAL_ALIGN=0x100000
+CONFIG_HOTPLUG_CPU=y
+CONFIG_COMPAT_VDSO=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_SMP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_HIBERNATION_SMP_POSSIBLE=y
+# CONFIG_HIBERNATION is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_SLEEP=y
+# CONFIG_ACPI_PROCFS is not set
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
+CONFIG_ACPI_PROC_EVENT=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_BATTERY=y
+CONFIG_ACPI_BUTTON=y
+# CONFIG_ACPI_VIDEO is not set
+CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_DOCK is not set
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_ASUS is not set
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_BLACKLIST_YEAR=0
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+CONFIG_ACPI_CONTAINER=y
+# CONFIG_ACPI_SBS is not set
+# CONFIG_APM is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+# CONFIG_PCI_GODIRECT is not set
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_LEGACY=y
+CONFIG_HT_IRQ=y
+CONFIG_ISA_DMA_API=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
+# CONFIG_MCA is not set
+# CONFIG_SCx200 is not set
+CONFIG_K8_NB=y
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats / Emulations
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=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=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+# CONFIG_NSC_FIR is not set
+# CONFIG_WINBOND_FIR is not set
+# CONFIG_TOSHIBA_FIR is not set
+# CONFIG_SMC_IRCC_FIR is not set
+# CONFIG_ALI_FIR is not set
+# CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_FIR is not set
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+# CONFIG_PARPORT_SERIAL is not set
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
+# CONFIG_PARPORT_GSC is not set
+# CONFIG_PARPORT_AX88796 is not set
+# CONFIG_PARPORT_1284 is not set
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+# CONFIG_ISAPNP is not set
+# CONFIG_PNPBIOS is not set
+CONFIG_PNPACPI=y
+CONFIG_BLK_DEV=y
+CONFIG_BLK_DEV_FD=y
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# 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=65536
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_IBM_ASM is not set
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ASUS_LAPTOP is not set
+# CONFIG_FUJITSU_LAPTOP is not set
+# CONFIG_MSI_LAPTOP is not set
+# CONFIG_SONY_LAPTOP is not set
+# CONFIG_THINKPAD_ACPI is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_BLK_DEV_IDEACPI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+CONFIG_BLK_DEV_CMD640=y
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_IDEPNP is not set
+
+#
+# PCI IDE chipsets support
+#
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+CONFIG_IDEPCI_PCIBUS_ORDER=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_RZ1000=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_ATIIXP is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_CS5535 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+CONFIG_BLK_DEV_PIIX=y
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
+# CONFIG_IDE_ARM is not set
+
+#
+# Other IDE chipsets support
+#
+
+#
+# Note: most of these also require special kernel boot parameters
+#
+# CONFIG_BLK_DEV_4DRIVES is not set
+# CONFIG_BLK_DEV_ALI14XX is not set
+# CONFIG_BLK_DEV_DTC2278 is not set
+# CONFIG_BLK_DEV_HT6560B is not set
+# CONFIG_BLK_DEV_QD65XX is not set
+# CONFIG_BLK_DEV_UMC8672 is not set
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD 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=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 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=m
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 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_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_PPA is not set
+# CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS 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_SEAGATE is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_NET_SB1000 is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+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=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+# CONFIG_EL3 is not set
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+CONFIG_LANCE=m
+CONFIG_NET_VENDOR_SMC=y
+CONFIG_WD80x3=m
+CONFIG_ULTRA=m
+CONFIG_SMC9194=m
+# CONFIG_NET_VENDOR_RACAL is not set
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=m
+CONFIG_TULIP_MWI=y
+CONFIG_TULIP_MMIO=y
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_ULI526X=m
+CONFIG_AT1700=m
+CONFIG_DEPCA=m
+CONFIG_HP100=m
+CONFIG_NET_ISA=y
+# CONFIG_E2100 is not set
+# CONFIG_EWRK3 is not set
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+CONFIG_NE2000=y
+# CONFIG_ZNET is not set
+# CONFIG_SEEQ8005 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_PCNET32_NAPI=y
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+CONFIG_ADAPTEC_STARFIRE_NAPI=y
+CONFIG_AC3200=m
+CONFIG_APRICOT=m
+CONFIG_B44=m
+CONFIG_B44_PCI_AUTOSELECT=y
+CONFIG_B44_PCICORE_AUTOSELECT=y
+CONFIG_B44_PCI=y
+CONFIG_FORCEDETH=m
+CONFIG_FORCEDETH_NAPI=y
+CONFIG_CS89x0=m
+CONFIG_EEPRO100=m
+CONFIG_E100=m
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=y
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+CONFIG_8139TOO_PIO=y
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+CONFIG_SUNDANCE_MMIO=y
+CONFIG_TLAN=m
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_RHINE_NAPI=y
+CONFIG_SC92031=m
+# CONFIG_NET_POCKET is not set
+CONFIG_NETDEV_1000=y
+CONFIG_ACENIC=m
+CONFIG_ACENIC_OMIT_TIGON_I=y
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_SIS190=m
+CONFIG_SKGE=m
+CONFIG_SKY2=m
+CONFIG_SK98LIN=m
+CONFIG_VIA_VELOCITY=m
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
+CONFIG_QLA3XXX=m
+CONFIG_ATL1=m
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
+# CONFIG_IXGB is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_LIBERTAS is not set
+# CONFIG_AIRO is not set
+CONFIG_HERMES=m
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_NORTEL_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+# CONFIG_HOSTAP_PLX is not set
+# CONFIG_HOSTAP_PCI is not set
+# CONFIG_BCM43XX 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 is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_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
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=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_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_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TABLET=y
+# CONFIG_TABLET_USB_ACECAD is not set
+# CONFIG_TABLET_USB_AIPTEK is not set
+# CONFIG_TABLET_USB_GTCO is not set
+# CONFIG_TABLET_USB_KBTAB is not set
+CONFIG_TABLET_USB_WACOM=y
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+# CONFIG_INPUT_WISTRON_BTNS is not set
+# CONFIG_INPUT_ATLAS_BTNS is not set
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+# CONFIG_SERIO_PCIPS2 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=y
+# CONFIG_SERIAL_8250_CONSOLE is not set
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_PRINTER=y
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_SONYPI is not set
+# CONFIG_MWAVE is not set
+# CONFIG_PC8736x_GPIO is not set
+# CONFIG_NSC_GPIO is not set
+# CONFIG_CS5535_GPIO is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
+# CONFIG_HANGCHECK_TIMER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C 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_BATTERY_DS2760 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+CONFIG_SSB=m
+CONFIG_SSB_PCIHOST_POSSIBLE=y
+CONFIG_SSB_PCIHOST=y
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
+CONFIG_SSB_DRIVER_PCICORE=y
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_VIDEO_BWQCAM is not set
+# CONFIG_VIDEO_CQCAM is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_STRADIS is not set
+CONFIG_V4L_USB_DRIVERS=y
+# 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_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_RADIO_SF16FMR2 is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_AGP=m
+CONFIG_AGP_ALI=m
+CONFIG_AGP_ATI=m
+CONFIG_AGP_AMD=m
+CONFIG_AGP_AMD64=m
+CONFIG_AGP_INTEL=m
+CONFIG_AGP_NVIDIA=m
+CONFIG_AGP_SIS=m
+CONFIG_AGP_SWORKS=m
+CONFIG_AGP_VIA=m
+CONFIG_AGP_EFFICEON=m
+CONFIG_DRM=m
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_R128 is not set
+# CONFIG_DRM_RADEON is not set
+# CONFIG_DRM_I810 is not set
+# CONFIG_DRM_I830 is not set
+# CONFIG_DRM_I915 is not set
+# CONFIG_DRM_MGA is not set
+# CONFIG_DRM_SIS is not set
+# CONFIG_DRM_VIA is not set
+# CONFIG_DRM_SAVAGE 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=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ARC is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 is not set
+CONFIG_FB_UVESA=m
+# CONFIG_FB_VESA is not set
+# CONFIG_FB_EFI is not set
+# CONFIG_FB_HECUBA is not set
+# CONFIG_FB_HGA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_I810 is not set
+# CONFIG_FB_LE80578 is not set
+# CONFIG_FB_INTEL is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_CYBLA is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_GEODE is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+# CONFIG_BACKLIGHT_PROGEAR is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+CONFIG_VIDEO_SELECT=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_SEQUENCER=y
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_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=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_MTS64 is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_PORTMAN2X4 is not set
+
+#
+# ISA devices
+#
+# CONFIG_SND_ADLIB is not set
+# CONFIG_SND_AD1816A is not set
+# CONFIG_SND_AD1848 is not set
+# CONFIG_SND_ALS100 is not set
+# CONFIG_SND_AZT2320 is not set
+# CONFIG_SND_CMI8330 is not set
+# CONFIG_SND_CS4231 is not set
+# CONFIG_SND_CS4232 is not set
+# CONFIG_SND_CS4236 is not set
+# CONFIG_SND_DT019X is not set
+# CONFIG_SND_ES968 is not set
+# CONFIG_SND_ES1688 is not set
+# CONFIG_SND_ES18XX is not set
+# CONFIG_SND_SC6000 is not set
+# CONFIG_SND_GUSCLASSIC is not set
+# CONFIG_SND_GUSEXTREME is not set
+# CONFIG_SND_GUSMAX is not set
+# CONFIG_SND_INTERWAVE is not set
+# CONFIG_SND_INTERWAVE_STB is not set
+# CONFIG_SND_OPL3SA2 is not set
+# CONFIG_SND_OPTI92X_AD1848 is not set
+# CONFIG_SND_OPTI92X_CS4231 is not set
+# CONFIG_SND_OPTI93X is not set
+# CONFIG_SND_MIRO is not set
+# CONFIG_SND_SB8 is not set
+# CONFIG_SND_SB16 is not set
+# CONFIG_SND_SBAWE is not set
+# CONFIG_SND_SGALAXY is not set
+# CONFIG_SND_SSCAPE is not set
+# CONFIG_SND_WAVEFRONT 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_CS5530 is not set
+# CONFIG_SND_CS5535AUDIO 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=y
+# 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
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_USX2Y 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=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW 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=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_SPLIT_ISO=y
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED 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=y
+CONFIG_USB_SL811_HCD=m
+# 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=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+# CONFIG_USB_USS720 is not set
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+# CONFIG_LEDS_TRIGGERS is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+CONFIG_VIRTUALIZATION=y
+# CONFIG_KVM is not set
+# CONFIG_LGUEST is not set
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# Firmware Drivers
+#
+# CONFIG_EDD is not set
+# CONFIG_DELL_RBU is not set
+# CONFIG_DCDBAS is not set
+CONFIG_DMIID=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 is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# 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=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=y
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLBFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+# 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_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=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=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_KPROBES is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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 is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_EARLY_PRINTK=y
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+CONFIG_DOUBLEFAULT=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+# CONFIG_CRYPTO_TWOFISH_586 is not set
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_AES_586 is not set
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_AUDIT_GENERIC=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-c7x0 b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-c7x0
new file mode 100644
index 0000000000..6c188e7b57
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-c7x0
@@ -0,0 +1,1747 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:27:11 2008
+#
+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=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=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_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# 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/PXA3xx 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=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA_SHARPSL_25x=y
+# CONFIG_PXA_SHARPSL_27x is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_POODLE is not set
+CONFIG_MACH_CORGI=y
+CONFIG_MACH_SHEPHERD=y
+CONFIG_MACH_HUSKY=y
+# CONFIG_MACH_TOSA is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SHARP_C7xx=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# 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 is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=m
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=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_SPARSEMEM_VMEMMAP_ENABLE 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=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+CONFIG_CPU_FREQ_PXA25x=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+
+#
+# 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 is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# 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=y
+# 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=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# 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 is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=m
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_CORGI=y
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=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 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# 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=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# 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_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_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=y
+# 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_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 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB 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_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# 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 is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=y
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_AC97_CODEC is not set
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_I2S=m
+CONFIG_SND_PXA2XX_SOC_CORGI=m
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM8731=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+# CONFIG_AC97_BUS is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X 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_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_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
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_CORGI=y
+# CONFIG_LEDS_TOSA is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# 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 is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-collie b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-collie
new file mode 100644
index 0000000000..271bfd5881
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-collie
@@ -0,0 +1,1437 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Mon Jan 21 22:14:20 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+# CONFIG_GENERIC_CLOCKEVENTS is not set
+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=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=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 is not set
+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_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# 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 is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_SA1100=y
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_SA1100_CERF is not set
+CONFIG_SA1100_COLLIE=y
+# CONFIG_SA1100_H3100 is not set
+# CONFIG_SA1100_H3600 is not set
+# CONFIG_SA1100_H3800 is not set
+# CONFIG_SA1100_BADGE4 is not set
+# CONFIG_SA1100_JORNADA720 is not set
+# CONFIG_SA1100_HACKKIT is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_SSP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA1100=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_SHARP_LOCOMO=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+# CONFIG_I82365 is not set
+# CONFIG_TCIC is not set
+CONFIG_PCMCIA_SA1100=m
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_NODES_SHIFT=2
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE 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_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttySA0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 mem=32M fbcon=rotate:1 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ 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=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=m
+CONFIG_INPUT_APMPOWER=m
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=m
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+# CONFIG_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_SA1100_FIR=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+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=m
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+CONFIG_MTD_SHARP=y
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_SA1100=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+# CONFIG_PNP is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES is not set
+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_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_IDE_GENERIC is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+
+#
+# Other IDE chipsets support
+#
+
+#
+# Note: most of these also require special kernel boot parameters
+#
+# CONFIG_BLK_DEV_4DRIVES is not set
+# CONFIG_BLK_DEV_ALI14XX is not set
+# CONFIG_BLK_DEV_DTC2278 is not set
+# CONFIG_BLK_DEV_HT6560B is not set
+# CONFIG_BLK_DEV_QD65XX is not set
+# CONFIG_BLK_DEV_UMC8672 is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_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=m
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+CONFIG_NETDEV_1000=y
+CONFIG_NETDEV_10000=y
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_PCMCIA_RAYCS=m
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_CS=m
+CONFIG_LIBERTAS_SDIO=m
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_ATMEL=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_LOCOMO=m
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# 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=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SA1100=y
+CONFIG_SERIAL_SA1100_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_MCP=y
+CONFIG_MCP_SA11X0=y
+CONFIG_MCP_UCB1200=y
+CONFIG_MCP_UCB1200_TS=m
+# CONFIG_MCP_COLLIE_TS is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_VIDEO_CPIA is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_RADIO_SF16FMR2 is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_SA1100=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+# CONFIG_LCD_LTV350QV is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_LOCOMO=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO 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_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_DUMMY=m
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+
+#
+# SPI devices
+#
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF 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_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+# CONFIG_USB_SUPPORT is not set
+CONFIG_MMC=m
+CONFIG_MMC_DEBUG=y
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_SPI=m
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+CONFIG_LEDS_LOCOMO=m
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+# CONFIG_LEDS_TRIGGER_IDE_DISK is not set
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=m
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP 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_FS_MBCACHE=m
+# 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=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="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_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_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_CAMELLIA is not set
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_CRC7=m
+CONFIG_LIBCRC32C=m
+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-rp-2.6.25+2.6.26-rc4/defconfig-htcuniversal b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-htcuniversal
new file mode 100644
index 0000000000..8b2a31dbb0
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-htcuniversal
@@ -0,0 +1,1308 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 21:46:02 2008
+#
+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=""
+# 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_PID_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=16
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+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_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=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 is not set
+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
+CONFIG_DMABOUNCE=y
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+CONFIG_ARCH_LUBBOCK=y
+# 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_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA25x=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# 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
+CONFIG_SA1111=y
+CONFIG_FORCE_MAX_ZONEORDER=9
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=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_SPARSEMEM_VMEMMAP_ENABLE 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_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+CONFIG_CPU_FREQ_PXA25x=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+# CONFIG_SUSPEND is not set
+CONFIG_APM_EMULATION=y
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# 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_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS 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=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=y
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=y
+# CONFIG_IRNET is not set
+CONFIG_IRCOMM=y
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+CONFIG_IRDA_DEBUG=y
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=y
+
+#
+# Dongle support
+#
+# CONFIG_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_PXA_FICP=y
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# 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_UEVENT_HELPER_PATH="/sbin/hotplug"
+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=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+# CONFIG_MTD_CHAR is not set
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# 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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_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=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_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_VETH is not set
+# CONFIG_NET_ETHERNET is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+CONFIG_NET_RADIO=y
+# CONFIG_NET_WIRELESS_RTNETLINK is not set
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+CONFIG_ACX=m
+CONFIG_ACX_MEM=y
+# CONFIG_ACX_CS is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=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
+# 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 is not set
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_POWER 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_GPIO=y
+CONFIG_KEYBOARD_ASIC3=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 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 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# 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_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# 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 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=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
+
+#
+# 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=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_DS1WM=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_HTC_ASIC3=y
+CONFIG_HTC_ASIC3_DS1WM=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# 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_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL 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
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_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_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_AC97 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_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X 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_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=y
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_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
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+# CONFIG_MMC_PXA is not set
+CONFIG_MMC_ASIC3=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+CONFIG_LEDS_ASIC3=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# 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_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_SQUASHFS 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_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 is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 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=y
+CONFIG_NLS_CODEPAGE_1251=y
+# 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
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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=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
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+CONFIG_DEBUG_USER=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_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+# 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 is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# 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 is not set
+# 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_SEED is not set
+CONFIG_CRYPTO_DEFLATE=y
+# CONFIG_CRYPTO_LZO 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_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C 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-rp-2.6.25+2.6.26-rc4/defconfig-hx2000 b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-hx2000
new file mode 100644
index 0000000000..0f2557c0f7
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-hx2000
@@ -0,0 +1,1733 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:10:53 2008
+#
+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=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_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_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# 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/PXA3xx 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_HX2750=y
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SSP=y
+CONFIG_PXA_KEYS=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
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=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_SPARSEMEM_VMEMMAP_ENABLE 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=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ 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=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+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_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PXA2XX is not set
+# 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 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=8192
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# 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=m
+# 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_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_TOUCHSCREEN_TSC2101=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=m
+
+#
+# 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=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# 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_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_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=y
+# 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_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 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_MFD_TSC2101=y
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# 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_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=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_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_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
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# 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 is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-poodle b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-poodle
new file mode 100644
index 0000000000..7d41252b15
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-poodle
@@ -0,0 +1,1757 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 22:47:47 2008
+#
+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=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=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_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# 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/PXA3xx 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=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA_SHARPSL_25x=y
+# CONFIG_PXA_SHARPSL_27x is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+CONFIG_MACH_POODLE=y
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+# CONFIG_MACH_TOSA is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# 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 is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_LOCOMO=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=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_SPARSEMEM_VMEMMAP_ENABLE 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=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+CONFIG_CPU_FREQ_PXA25x=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+
+#
+# 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 is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# 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=y
+# 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=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# 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 is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_LOCOMO=y
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=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 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# 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=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# 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_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_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=y
+# 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_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 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# 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_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_LOCOMO=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_AC97_CODEC is not set
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_I2S=m
+CONFIG_SND_PXA2XX_SOC_POODLE=m
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM8731=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+# CONFIG_AC97_BUS is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X 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_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_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
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_LOCOMO=y
+# CONFIG_LEDS_TOSA is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# 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 is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-qemuarm b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-qemuarm
new file mode 100644
index 0000000000..e636b6c671
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-qemuarm
@@ -0,0 +1,1582 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 22:28:17 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_GENERIC_GPIO is not set
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_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_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+CONFIG_ARCH_VERSATILE=y
+# 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 is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Versatile platform type
+#
+CONFIG_ARCH_VERSATILE_PB=y
+# CONFIG_MACH_VERSATILE_AB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_V6 is not set
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_ARM_VIC=y
+CONFIG_ICST307=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_PCI=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
+# CONFIG_PCI_DEBUG is not set
+# 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_GENERIC_CLOCKEVENTS_BUILD=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_SPARSEMEM_VMEMMAP_ENABLE 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_LEDS=y
+CONFIG_LEDS_CPU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyAMA0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=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
+CONFIG_VFP=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+# CONFIG_APM_EMULATION is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=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=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+# CONFIG_TOSHIBA_FIR is not set
+# CONFIG_VLSI_FIR is not set
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_AFS_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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY 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_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_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=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=m
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_CAFE is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=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=51200
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
+#
+# 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=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_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_ADVANSYS 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=y
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+CONFIG_SCSI_SYM53C8XX_MMIO=y
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_NORTEL_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+# CONFIG_HOSTAP_PLX is not set
+# CONFIG_HOSTAP_PCI is not set
+# CONFIG_BCM43XX 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 is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_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
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# 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 is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TABLET=y
+# CONFIG_TABLET_USB_ACECAD is not set
+# CONFIG_TABLET_USB_AIPTEK is not set
+# CONFIG_TABLET_USB_GTCO is not set
+# CONFIG_TABLET_USB_KBTAB is not set
+CONFIG_TABLET_USB_WACOM=y
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_AMBAKMI=y
+# CONFIG_SERIO_PCIPS2 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_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_STRADIS is not set
+CONFIG_V4L_USB_DRIVERS=y
+# 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_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# CONFIG_DRM 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+CONFIG_FB_ARMCLCD=y
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_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=m
+# 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=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_RTC_DRV_PL031 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 is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# 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 is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=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=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-qemux86 b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-qemux86
new file mode 100644
index 0000000000..42f6740201
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-qemux86
@@ -0,0 +1,1993 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:20:37 2008
+#
+# CONFIG_64BIT is not set
+CONFIG_X86_32=y
+# CONFIG_X86_64 is not set
+CONFIG_X86=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_QUICKLIST=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+# CONFIG_GENERIC_TIME_VSYSCALL is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+# CONFIG_ZONE_DMA32 is not set
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_AUDIT_ARCH is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_AUDIT_TREE=y
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=15
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+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_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# 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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Processor type and features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_SMP=y
+CONFIG_X86_PC=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_GENERICARCH is not set
+# CONFIG_X86_ES7000 is not set
+# CONFIG_X86_VSMP is not set
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+# CONFIG_PARAVIRT_GUEST is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+CONFIG_M686=y
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+# CONFIG_MPSC is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_GENERIC_CPU is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_XADD=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_TSC=y
+CONFIG_X86_CMOV=y
+CONFIG_X86_MINIMUM_CPU_FAMILY=4
+# CONFIG_HPET_TIMER is not set
+CONFIG_NR_CPUS=8
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_BKL=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_NONFATAL=y
+CONFIG_X86_MCE_P4THERMAL=y
+CONFIG_VM86=y
+# CONFIG_TOSHIBA is not set
+# CONFIG_I8K is not set
+# CONFIG_X86_REBOOTFIXUPS is not set
+# CONFIG_MICROCODE is not set
+# CONFIG_X86_MSR is not set
+# CONFIG_X86_CPUID is not set
+CONFIG_NOHIGHMEM=y
+# CONFIG_HIGHMEM4G is not set
+# CONFIG_HIGHMEM64G is not set
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_3G_OPT is not set
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_2G_OPT is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_X86_PAE is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_SPARSEMEM_STATIC=y
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_NR_QUICK=1
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MTRR=y
+# CONFIG_EFI is not set
+CONFIG_IRQBALANCE=y
+CONFIG_SECCOMP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_KEXEC=y
+CONFIG_PHYSICAL_START=0x100000
+# CONFIG_RELOCATABLE is not set
+CONFIG_PHYSICAL_ALIGN=0x100000
+CONFIG_HOTPLUG_CPU=y
+CONFIG_COMPAT_VDSO=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_SMP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_HIBERNATION_SMP_POSSIBLE=y
+# CONFIG_HIBERNATION is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_SLEEP=y
+# CONFIG_ACPI_PROCFS is not set
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
+CONFIG_ACPI_PROC_EVENT=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_BATTERY=y
+CONFIG_ACPI_BUTTON=y
+# CONFIG_ACPI_VIDEO is not set
+CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_DOCK is not set
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_ASUS is not set
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_BLACKLIST_YEAR=0
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+CONFIG_ACPI_CONTAINER=y
+# CONFIG_ACPI_SBS is not set
+# CONFIG_APM is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+# CONFIG_PCI_GODIRECT is not set
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
+CONFIG_PCI_LEGACY=y
+CONFIG_HT_IRQ=y
+CONFIG_ISA_DMA_API=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
+# CONFIG_MCA is not set
+# CONFIG_SCx200 is not set
+CONFIG_K8_NB=y
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats / Emulations
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=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=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+# CONFIG_NSC_FIR is not set
+# CONFIG_WINBOND_FIR is not set
+# CONFIG_TOSHIBA_FIR is not set
+# CONFIG_SMC_IRCC_FIR is not set
+# CONFIG_ALI_FIR is not set
+# CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_FIR is not set
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+# CONFIG_PARPORT_SERIAL is not set
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
+# CONFIG_PARPORT_GSC is not set
+# CONFIG_PARPORT_AX88796 is not set
+# CONFIG_PARPORT_1284 is not set
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+# CONFIG_ISAPNP is not set
+# CONFIG_PNPBIOS is not set
+CONFIG_PNPACPI=y
+CONFIG_BLK_DEV=y
+CONFIG_BLK_DEV_FD=y
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# 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=65536
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_IBM_ASM is not set
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ASUS_LAPTOP is not set
+# CONFIG_FUJITSU_LAPTOP is not set
+# CONFIG_MSI_LAPTOP is not set
+# CONFIG_SONY_LAPTOP is not set
+# CONFIG_THINKPAD_ACPI is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_BLK_DEV_IDEACPI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+CONFIG_BLK_DEV_CMD640=y
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_IDEPNP is not set
+
+#
+# PCI IDE chipsets support
+#
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+CONFIG_IDEPCI_PCIBUS_ORDER=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_RZ1000=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_ATIIXP is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_CS5535 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+CONFIG_BLK_DEV_PIIX=y
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
+# CONFIG_IDE_ARM is not set
+
+#
+# Other IDE chipsets support
+#
+
+#
+# Note: most of these also require special kernel boot parameters
+#
+# CONFIG_BLK_DEV_4DRIVES is not set
+# CONFIG_BLK_DEV_ALI14XX is not set
+# CONFIG_BLK_DEV_DTC2278 is not set
+# CONFIG_BLK_DEV_HT6560B is not set
+# CONFIG_BLK_DEV_QD65XX is not set
+# CONFIG_BLK_DEV_UMC8672 is not set
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD 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=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 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=m
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 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_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_PPA is not set
+# CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS 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_SEAGATE is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_NET_SB1000 is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+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=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+# CONFIG_EL3 is not set
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+CONFIG_LANCE=m
+CONFIG_NET_VENDOR_SMC=y
+CONFIG_WD80x3=m
+CONFIG_ULTRA=m
+CONFIG_SMC9194=m
+# CONFIG_NET_VENDOR_RACAL is not set
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=m
+CONFIG_TULIP_MWI=y
+CONFIG_TULIP_MMIO=y
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_ULI526X=m
+CONFIG_AT1700=m
+CONFIG_DEPCA=m
+CONFIG_HP100=m
+CONFIG_NET_ISA=y
+# CONFIG_E2100 is not set
+# CONFIG_EWRK3 is not set
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+CONFIG_NE2000=y
+# CONFIG_ZNET is not set
+# CONFIG_SEEQ8005 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_PCNET32_NAPI=y
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+CONFIG_ADAPTEC_STARFIRE_NAPI=y
+CONFIG_AC3200=m
+CONFIG_APRICOT=m
+CONFIG_B44=m
+CONFIG_B44_PCI_AUTOSELECT=y
+CONFIG_B44_PCICORE_AUTOSELECT=y
+CONFIG_B44_PCI=y
+CONFIG_FORCEDETH=m
+CONFIG_FORCEDETH_NAPI=y
+CONFIG_CS89x0=m
+CONFIG_EEPRO100=m
+CONFIG_E100=m
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=y
+# CONFIG_8139CP is not set
+CONFIG_8139TOO=y
+CONFIG_8139TOO_PIO=y
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139TOO_8129 is not set
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+CONFIG_SUNDANCE_MMIO=y
+CONFIG_TLAN=m
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_RHINE_NAPI=y
+CONFIG_SC92031=m
+# CONFIG_NET_POCKET is not set
+CONFIG_NETDEV_1000=y
+CONFIG_ACENIC=m
+CONFIG_ACENIC_OMIT_TIGON_I=y
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_SIS190=m
+CONFIG_SKGE=m
+CONFIG_SKY2=m
+CONFIG_SK98LIN=m
+CONFIG_VIA_VELOCITY=m
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
+CONFIG_QLA3XXX=m
+CONFIG_ATL1=m
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
+# CONFIG_IXGB is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_LIBERTAS is not set
+# CONFIG_AIRO is not set
+CONFIG_HERMES=m
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_NORTEL_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+# CONFIG_HOSTAP_PLX is not set
+# CONFIG_HOSTAP_PCI is not set
+# CONFIG_BCM43XX 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 is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_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
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# 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=m
+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_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TABLET=y
+# CONFIG_TABLET_USB_ACECAD is not set
+# CONFIG_TABLET_USB_AIPTEK is not set
+# CONFIG_TABLET_USB_GTCO is not set
+# CONFIG_TABLET_USB_KBTAB is not set
+CONFIG_TABLET_USB_WACOM=y
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+# CONFIG_INPUT_WISTRON_BTNS is not set
+# CONFIG_INPUT_ATLAS_BTNS is not set
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+# CONFIG_SERIO_PCIPS2 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=y
+# CONFIG_SERIAL_8250_CONSOLE is not set
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_PRINTER=y
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_SONYPI is not set
+# CONFIG_MWAVE is not set
+# CONFIG_PC8736x_GPIO is not set
+# CONFIG_NSC_GPIO is not set
+# CONFIG_CS5535_GPIO is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
+# CONFIG_HANGCHECK_TIMER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C 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_BATTERY_DS2760 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+CONFIG_SSB=m
+CONFIG_SSB_PCIHOST_POSSIBLE=y
+CONFIG_SSB_PCIHOST=y
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
+CONFIG_SSB_DRIVER_PCICORE=y
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_VIDEO_BWQCAM is not set
+# CONFIG_VIDEO_CQCAM is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_STRADIS is not set
+CONFIG_V4L_USB_DRIVERS=y
+# 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_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_RADIO_SF16FMR2 is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_AGP=m
+CONFIG_AGP_ALI=m
+CONFIG_AGP_ATI=m
+CONFIG_AGP_AMD=m
+CONFIG_AGP_AMD64=m
+CONFIG_AGP_INTEL=m
+CONFIG_AGP_NVIDIA=m
+CONFIG_AGP_SIS=m
+CONFIG_AGP_SWORKS=m
+CONFIG_AGP_VIA=m
+CONFIG_AGP_EFFICEON=m
+CONFIG_DRM=m
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_R128 is not set
+# CONFIG_DRM_RADEON is not set
+# CONFIG_DRM_I810 is not set
+# CONFIG_DRM_I830 is not set
+# CONFIG_DRM_I915 is not set
+# CONFIG_DRM_MGA is not set
+# CONFIG_DRM_SIS is not set
+# CONFIG_DRM_VIA is not set
+# CONFIG_DRM_SAVAGE 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=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ARC is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 is not set
+CONFIG_FB_UVESA=m
+# CONFIG_FB_VESA is not set
+# CONFIG_FB_EFI is not set
+# CONFIG_FB_HECUBA is not set
+# CONFIG_FB_HGA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_I810 is not set
+# CONFIG_FB_LE80578 is not set
+# CONFIG_FB_INTEL is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_CYBLA is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_GEODE is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+# CONFIG_BACKLIGHT_PROGEAR is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+CONFIG_VIDEO_SELECT=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_SEQUENCER=y
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_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=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_MTS64 is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_PORTMAN2X4 is not set
+
+#
+# ISA devices
+#
+# CONFIG_SND_ADLIB is not set
+# CONFIG_SND_AD1816A is not set
+# CONFIG_SND_AD1848 is not set
+# CONFIG_SND_ALS100 is not set
+# CONFIG_SND_AZT2320 is not set
+# CONFIG_SND_CMI8330 is not set
+# CONFIG_SND_CS4231 is not set
+# CONFIG_SND_CS4232 is not set
+# CONFIG_SND_CS4236 is not set
+# CONFIG_SND_DT019X is not set
+# CONFIG_SND_ES968 is not set
+# CONFIG_SND_ES1688 is not set
+# CONFIG_SND_ES18XX is not set
+# CONFIG_SND_SC6000 is not set
+# CONFIG_SND_GUSCLASSIC is not set
+# CONFIG_SND_GUSEXTREME is not set
+# CONFIG_SND_GUSMAX is not set
+# CONFIG_SND_INTERWAVE is not set
+# CONFIG_SND_INTERWAVE_STB is not set
+# CONFIG_SND_OPL3SA2 is not set
+# CONFIG_SND_OPTI92X_AD1848 is not set
+# CONFIG_SND_OPTI92X_CS4231 is not set
+# CONFIG_SND_OPTI93X is not set
+# CONFIG_SND_MIRO is not set
+# CONFIG_SND_SB8 is not set
+# CONFIG_SND_SB16 is not set
+# CONFIG_SND_SBAWE is not set
+# CONFIG_SND_SGALAXY is not set
+# CONFIG_SND_SSCAPE is not set
+# CONFIG_SND_WAVEFRONT 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_CS5530 is not set
+# CONFIG_SND_CS5535AUDIO 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=y
+# 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
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_USX2Y 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=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW 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=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_SPLIT_ISO=y
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED 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=y
+CONFIG_USB_SL811_HCD=m
+# 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=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+# CONFIG_USB_USS720 is not set
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+# CONFIG_LEDS_TRIGGERS is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+CONFIG_VIRTUALIZATION=y
+# CONFIG_KVM is not set
+# CONFIG_LGUEST is not set
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# Firmware Drivers
+#
+# CONFIG_EDD is not set
+# CONFIG_DELL_RBU is not set
+# CONFIG_DCDBAS is not set
+CONFIG_DMIID=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 is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# 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=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=y
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLBFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+# 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_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=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=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_KPROBES is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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 is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_EARLY_PRINTK=y
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+CONFIG_DOUBLEFAULT=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+# CONFIG_CRYPTO_TWOFISH_586 is not set
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_AES_586 is not set
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_AUDIT_GENERIC=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-spitz b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-spitz
new file mode 100644
index 0000000000..9c8f0ae8a1
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-spitz
@@ -0,0 +1,1834 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.26-rc4
+# Sun Jun 1 18:56:45 2008
+#
+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_ARCH_SUPPORTS_AOUT=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=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=m
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# 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_ORION5X 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
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_PXA_SHARPSL_25x is not set
+CONFIG_PXA_SHARPSL_27x=y
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# 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_PABRT_NOIFAR=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
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=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_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+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=ttyS0,115200n8 console=tty1 noinitrd root=/dev/hda1 rootfstype=ext3 rootdelay=1 rw fbcon=rotate:1 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ 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=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+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
+# CONFIG_MTD_AR7_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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=m
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=m
+# 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=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# 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=m
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=m
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# 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 is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_BLK_DEV_HD_ONLY is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+CONFIG_KEYBOARD_SPITZ=y
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=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 is not set
+# CONFIG_TOUCHSCREEN_WM97XX is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# 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_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# 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_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_IPWIRELESS is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV 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
+# CONFIG_I2C_PCA_PLATFORM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+# CONFIG_DEBUG_GPIO is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_COMMON=m
+CONFIG_VIDEO_ALLOW_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=m
+# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
+CONFIG_MEDIA_TUNER_SIMPLE=m
+CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA9887=m
+CONFIG_MEDIA_TUNER_TEA5761=m
+CONFIG_MEDIA_TUNER_TEA5767=m
+CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_XC2028=m
+CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+# CONFIG_USB_STKWEBCAM is not set
+# CONFIG_SOC_CAMERA is not set
+# CONFIG_VIDEO_PXA27x is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_USB_SI470X is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_AM200EPD is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 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
+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_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_I2S=m
+CONFIG_SND_PXA2XX_SOC_SPITZ=m
+
+#
+# ALSA SoC audio for Freescale SOCs
+#
+
+#
+# SoC Audio for the Texas Instruments OMAP
+#
+CONFIG_SND_SOC_WM8750=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+# CONFIG_USB_WDM is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_EZUSB=y
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+# CONFIG_USB_SERIAL_IUU is not set
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_MOTOROLA is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_SPCP8X5 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+CONFIG_USB_GADGET=m
+# 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_ATMEL_USBA 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_PXA27X=y
+CONFIG_USB_PXA27X=m
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_SPITZ=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_UIO 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 is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# 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=m
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_NULL=m
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_AUTHENC=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=m
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+# CONFIG_CRYPTO_TGR192 is not set
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_KHAZAD=m
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-zylonite b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-zylonite
new file mode 100644
index 0000000000..cc2fc482ae
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/defconfig-zylonite
@@ -0,0 +1,1740 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:42:35 2008
+#
+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=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=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_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=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=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# 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/PXA3xx Implementations
+#
+
+#
+# Supported PXA3xx Processor Variants
+#
+CONFIG_CPU_PXA300=y
+CONFIG_CPU_PXA310=y
+CONFIG_CPU_PXA320=y
+# 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_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+CONFIG_MACH_ZYLONITE=y
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA3xx=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSC3=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
+CONFIG_IO_36=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=m
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=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_SPARSEMEM_VMEMMAP_ENABLE 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=ttyS0,38400 root=/dev/mtdblock2 rootfstype=jffs2 mem=64M dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ 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=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=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=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+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_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# 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 is not set
+# 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_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA 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_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=m
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+CONFIG_USB_NET_CDC_SUBSET=m
+# CONFIG_USB_ALI_M5632 is not set
+# CONFIG_USB_AN2720 is not set
+# CONFIG_USB_BELKIN is not set
+CONFIG_USB_ARMLINUX=y
+# CONFIG_USB_EPSON2888 is not set
+# CONFIG_USB_KC2190 is not set
+# CONFIG_USB_NET_ZAURUS is not set
+# CONFIG_NET_PCMCIA is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# 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_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# 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_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_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=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=m
+
+#
+# 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=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# 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_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_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=y
+# 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_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 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# 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_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# 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_LCD_QVGA is not set
+CONFIG_FB_PXA_LCD_VGA=y
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_SL811_HCD 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=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_M66592=y
+CONFIG_USB_M66592=y
+# CONFIG_USB_GADGET_PXA27X 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_S3C2410 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 is not set
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_GADGETFS is not set
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_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
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# 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 is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/hostap-monitor-mode.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/hostap-monitor-mode.patch
new file mode 100644
index 0000000000..641fd19e50
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/hostap-monitor-mode.patch
@@ -0,0 +1,209 @@
+This is a patch that I've been maintaining for a few years, and I'd
+really like to see it added to the mainstream zaurus kernel so I can
+finally stop distributing my own.
+
+This patch only effects the card while in monitor mode, and does not
+cause any known stability issues.
+
+http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
+
+Rick Farina (Zero_Chaos)
+
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_80211_tx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_80211_tx.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_80211_tx.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_80211_tx.c 2006-09-21 01:30:18.000000000 -0400
+@@ -69,6 +69,9 @@
+ iface = netdev_priv(dev);
+ local = iface->local;
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ goto xmit;
++
+ if (skb->len < ETH_HLEN) {
+ printk(KERN_DEBUG "%s: hostap_data_start_xmit: short skb "
+ "(len=%d)\n", dev->name, skb->len);
+@@ -234,6 +237,7 @@
+ memcpy(skb_put(skb, ETH_ALEN), &hdr.addr4, ETH_ALEN);
+ }
+
++xmit:
+ iface->stats.tx_packets++;
+ iface->stats.tx_bytes += skb->len;
+
+@@ -404,8 +408,6 @@
+ }
+
+ if (skb->len < 24) {
+- printk(KERN_DEBUG "%s: hostap_master_start_xmit: short skb "
+- "(len=%d)\n", dev->name, skb->len);
+ ret = 0;
+ iface->stats.tx_dropped++;
+ goto fail;
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_cs.c.orig
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_cs.c.rej
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_hw.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_hw.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_hw.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_hw.c 2006-09-21 01:30:18.000000000 -0400
+@@ -1005,6 +1005,35 @@
+ return fid;
+ }
+
++static int prism2_monitor_enable(struct net_device *dev)
++{
++ if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE, 5)) {
++ printk(KERN_DEBUG "Port type setting for monitor mode "
++ "failed\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hfa384x_cmd(dev, HFA384X_CMDCODE_TEST | (0x0a << 8),
++ 0, NULL, NULL)) {
++ printk(KERN_DEBUG "Could not enter testmode 0x0a\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS,
++ HFA384X_WEPFLAGS_PRIVACYINVOKED |
++ HFA384X_WEPFLAGS_HOSTENCRYPT |
++ HFA384X_WEPFLAGS_HOSTDECRYPT)) {
++ printk(KERN_DEBUG "WEP flags setting failed\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE, 1)) {
++ printk(KERN_DEBUG "Could not set promiscuous mode\n");
++ return -EOPNOTSUPP;
++ }
++
++ return 0;
++}
+
+ static int prism2_reset_port(struct net_device *dev)
+ {
+@@ -1031,6 +1060,10 @@
+ "port\n", dev->name);
+ }
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ /* force mode 0x0a after port 0 reset */
++ return prism2_monitor_enable(dev);
++
+ /* It looks like at least some STA firmware versions reset
+ * fragmentation threshold back to 2346 after enable command. Restore
+ * the configured value, if it differs from this default. */
+@@ -1466,6 +1499,10 @@
+ return 1;
+ }
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ /* force mode 0x0a after port 0 reset */
++ prism2_monitor_enable(dev);
++
+ local->hw_ready = 1;
+ local->hw_reset_tries = 0;
+ local->hw_resetting = 0;
+@@ -3156,6 +3193,7 @@
+ local->func->hw_config = prism2_hw_config;
+ local->func->hw_reset = prism2_hw_reset;
+ local->func->hw_shutdown = prism2_hw_shutdown;
++ local->func->monitor_enable = prism2_monitor_enable;
+ local->func->reset_port = prism2_reset_port;
+ local->func->schedule_reset = prism2_schedule_reset;
+ #ifdef PRISM2_DOWNLOAD_SUPPORT
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_hw.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_ioctl.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_ioctl.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_ioctl.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_ioctl.c 2006-09-21 01:30:18.000000000 -0400
+@@ -1104,33 +1104,7 @@
+
+ printk(KERN_DEBUG "Enabling monitor mode\n");
+ hostap_monitor_set_type(local);
+-
+- if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
+- HFA384X_PORTTYPE_PSEUDO_IBSS)) {
+- printk(KERN_DEBUG "Port type setting for monitor mode "
+- "failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- /* Host decrypt is needed to get the IV and ICV fields;
+- * however, monitor mode seems to remove WEP flag from frame
+- * control field */
+- if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS,
+- HFA384X_WEPFLAGS_HOSTENCRYPT |
+- HFA384X_WEPFLAGS_HOSTDECRYPT)) {
+- printk(KERN_DEBUG "WEP flags setting failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- if (local->func->reset_port(dev) ||
+- local->func->cmd(dev, HFA384X_CMDCODE_TEST |
+- (HFA384X_TEST_MONITOR << 8),
+- 0, NULL, NULL)) {
+- printk(KERN_DEBUG "Setting monitor mode failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- return 0;
++ return local->func->reset_port(dev);
+ }
+
+
+@@ -1199,7 +1173,7 @@
+ local->iw_mode = *mode;
+
+ if (local->iw_mode == IW_MODE_MONITOR)
+- hostap_monitor_mode_enable(local);
++ return hostap_monitor_mode_enable(local);
+ else if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt &&
+ !local->fw_encrypt_ok) {
+ printk(KERN_DEBUG "%s: defaulting to host-based encryption as "
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_main.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_main.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_main.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_main.c 2006-09-21 01:30:18.000000000 -0400
+@@ -331,7 +331,7 @@
+ if (local->iw_mode == IW_MODE_REPEAT)
+ return HFA384X_PORTTYPE_WDS;
+ if (local->iw_mode == IW_MODE_MONITOR)
+- return HFA384X_PORTTYPE_PSEUDO_IBSS;
++ return 5; /*HFA384X_PORTTYPE_PSEUDO_IBSS;*/
+ return HFA384X_PORTTYPE_HOSTAP;
+ }
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_main.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_pci.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_pci.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_pci.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_pci.c 2006-09-21 01:30:18.000000000 -0400
+@@ -48,6 +48,8 @@
+ { 0x1260, 0x3873, PCI_ANY_ID, PCI_ANY_ID },
+ /* Samsung MagicLAN SWL-2210P */
+ { 0x167d, 0xa000, PCI_ANY_ID, PCI_ANY_ID },
++ /* NETGEAR MA311 */
++ { 0x1385, 0x3872, PCI_ANY_ID, PCI_ANY_ID },
+ { 0 }
+ };
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_pci.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_plx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_plx.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_plx.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_plx.c 2006-09-21 01:30:18.000000000 -0400
+@@ -101,6 +101,7 @@
+ { 0xc250, 0x0002 } /* EMTAC A2424i */,
+ { 0xd601, 0x0002 } /* Z-Com XI300 */,
+ { 0xd601, 0x0005 } /* Zcomax XI-325H 200mW */,
++ { 0xd601, 0x0010 } /* Zcomax XI-325H 100mW */,
+ { 0, 0}
+ };
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_plx.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_wlan.h linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_wlan.h
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_wlan.h 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_wlan.h 2006-09-21 01:30:18.000000000 -0400
+@@ -575,6 +575,7 @@
+ int (*hw_config)(struct net_device *dev, int initial);
+ void (*hw_reset)(struct net_device *dev);
+ void (*hw_shutdown)(struct net_device *dev, int no_disable);
++ int (*monitor_enable)(struct net_device *dev);
+ int (*reset_port)(struct net_device *dev);
+ void (*schedule_reset)(local_info_t *local);
+ int (*download)(local_info_t *local,
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/hrw-hostapcard.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/hrw-hostapcard.patch
new file mode 100644
index 0000000000..67fc5b7c70
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/hrw-hostapcard.patch
@@ -0,0 +1,34 @@
+
+From: Marcin Juszkiewicz <openembedded@haerwu.biz>
+
+Card reported by Ångström user:
+http://bugs.openembedded.net/show_bug.cgi?id=3236
+
+Socket 1:
+ product info: "Wireless LAN", "11Mbps PC Card", "Version 01.02", ""
+ manfid: 0x0156, 0x0002
+ function: 6 (network)
+
+Signed-off-by: Marcin Juszkiewicz <openembedded@haerwu.biz>
+Acked-by: Pavel Roskin <proski@gnu.org>
+
+---
+ drivers/net/wireless/hostap/hostap_cs.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- linux-2.6.24.orig/drivers/net/wireless/hostap/hostap_cs.c
++++ linux-2.6.24/drivers/net/wireless/hostap/hostap_cs.c
+@@ -892,10 +892,13 @@ static struct pcmcia_device_id hostap_cs
+ 0xa21501a, 0x59868926, 0xc9049a39),
+ PCMCIA_DEVICE_PROD_ID1234(
+ "The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P",
+ "RevA",
+ 0xa5f472c2, 0x9c05598d, 0xc9049a39, 0x57a66194),
++ PCMCIA_DEVICE_PROD_ID123(
++ "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
++ 0x4b8870ff, 0x70e946d1, 0x4b74baa0),
+ PCMCIA_DEVICE_NULL
+ };
+ MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
+
+
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/htcuni-acx.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/htcuni-acx.patch
new file mode 100644
index 0000000000..1ccebddc8d
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/htcuni-acx.patch
@@ -0,0 +1,33527 @@
+---
+ drivers/net/wireless/Kconfig | 31
+ drivers/net/wireless/Makefile | 2
+ drivers/net/wireless/acx/Kconfig | 113
+ drivers/net/wireless/acx/Makefile | 21
+ drivers/net/wireless/acx/acx.h | 14
+ drivers/net/wireless/acx/acx_config.h | 50
+ drivers/net/wireless/acx/acx_func.h | 710 ++
+ drivers/net/wireless/acx/acx_hw.h | 18
+ drivers/net/wireless/acx/acx_struct.h | 2114 ++++++++
+ drivers/net/wireless/acx/common.c | 7388 ++++++++++++++++++++++++++++
+ drivers/net/wireless/acx/conv.c | 504 +
+ drivers/net/wireless/acx/cs.c | 5703 +++++++++++++++++++++
+ drivers/net/wireless/acx/htcsable_acx.c | 118
+ drivers/net/wireless/acx/htcuniversal_acx.c | 108
+ drivers/net/wireless/acx/hx4700_acx.c | 108
+ drivers/net/wireless/acx/ioctl.c | 2748 ++++++++++
+ drivers/net/wireless/acx/mem.c | 5363 ++++++++++++++++++++
+ drivers/net/wireless/acx/pci.c | 4234 ++++++++++++++++
+ drivers/net/wireless/acx/rx3000_acx.c | 110
+ drivers/net/wireless/acx/setrate.c | 213
+ drivers/net/wireless/acx/usb.c | 1922 +++++++
+ drivers/net/wireless/acx/wlan.c | 424 +
+ drivers/net/wireless/acx/wlan_compat.h | 260
+ drivers/net/wireless/acx/wlan_hdr.h | 497 +
+ drivers/net/wireless/acx/wlan_mgmt.h | 582 ++
+ 25 files changed, 33355 insertions(+)
+
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_config.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_config.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,50 @@
++#define ACX_RELEASE "v0.3.36"
++
++/*
++ * Test out all the channels in reg domain 0x10
++ */
++#define ACX_ALLOW_ALLCHANNELS
++
++/* set to 0 if you don't want any debugging code to be compiled in */
++/* set to 1 if you want some debugging */
++/* set to 2 if you want extensive debug log */
++#define ACX_DEBUG 0
++
++/*
++ * Since we'll be changing channels a lot
++#define ACX_DEFAULT_MSG (L_ASSOC|L_INIT)
++*/
++#define ACX_DEFAULT_MSG (L_ASSOC|L_INIT)
++
++/* assume 32bit I/O width
++ * (16bit is also compatible with Compact Flash) */
++#define ACX_IO_WIDTH 32
++
++/* Set this to 1 if you want monitor mode to use
++ * phy header. Currently it is not useful anyway since we
++ * don't know what useful info (if any) is in phy header.
++ * If you want faster/smaller code, say 0 here */
++#define WANT_PHY_HDR 0
++
++/* whether to do Tx descriptor cleanup in softirq (i.e. not in IRQ
++ * handler) or not. Note that doing it later does slightly increase
++ * system load, so still do that stuff in the IRQ handler for now,
++ * even if that probably means worse latency */
++#define TX_CLEANUP_IN_SOFTIRQ 0
++
++/* if you want very experimental 802.11 power save mode features */
++#define POWER_SAVE_80211 0
++
++/* if you want very early packet fragmentation bits and pieces */
++#define ACX_FRAGMENTATION 0
++
++/* Locking: */
++/* very talkative */
++/* #define PARANOID_LOCKING 1 */
++/* normal (use when bug-free) */
++#define DO_LOCKING 1
++/* else locking is disabled! */
++
++/* 0 - normal mode */
++/* 1 - development/debug: probe for IEs on modprobe */
++#define CMD_DISCOVERY 0
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_func.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_func.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,710 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++
++/***********************************************************************
++** LOGGING
++**
++** - Avoid SHOUTING needlessly. Avoid excessive verbosity.
++** Gradually remove messages which are old debugging aids.
++**
++** - Use printk() for messages which are to be always logged.
++** Supply either 'acx:' or '<devname>:' prefix so that user
++** can figure out who's speaking among other kernel chatter.
++** acx: is for general issues (e.g. "acx: no firmware image!")
++** while <devname>: is related to a particular device
++** (think about multi-card setup). Double check that message
++** is not confusing to the average user.
++**
++** - use printk KERN_xxx level only if message is not a WARNING
++** but is INFO, ERR etc.
++**
++** - Use printk_ratelimited() for messages which may flood
++** (e.g. "rx DUP pkt!").
++**
++** - Use log() for messages which may be omitted (and they
++** _will_ be omitted in non-debug builds). Note that
++** message levels may be disabled at compile-time selectively,
++** thus select them wisely. Example: L_DEBUG is the lowest
++** (most likely to be compiled out) -> use for less important stuff.
++**
++** - Do not print important stuff with log(), or else people
++** will never build non-debug driver.
++**
++** Style:
++** hex: capital letters, zero filled (e.g. 0x02AC)
++** str: dont start from capitals, no trailing periods ("tx: queue is stopped")
++*/
++#if ACX_DEBUG > 1
++
++void log_fn_enter(const char *funcname);
++void log_fn_exit(const char *funcname);
++void log_fn_exit_v(const char *funcname, int v);
++
++#define FN_ENTER \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_enter(__func__); \
++ } \
++ } while (0)
++
++#define FN_EXIT1(v) \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_exit_v(__func__, v); \
++ } \
++ } while (0)
++#define FN_EXIT0 \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_exit(__func__); \
++ } \
++ } while (0)
++
++#else
++
++#define FN_ENTER
++#define FN_EXIT1(v)
++#define FN_EXIT0
++
++#endif /* ACX_DEBUG > 1 */
++
++
++#if ACX_DEBUG
++
++#define log(chan, args...) \
++ do { \
++ if (acx_debug & (chan)) \
++ printk(KERN_DEBUG args); \
++ } while (0)
++#define printk_ratelimited(args...) printk(args)
++
++#else /* Non-debug build: */
++
++#define log(chan, args...)
++/* Standard way of log flood prevention */
++#define printk_ratelimited(args...) \
++do { \
++ if (printk_ratelimit()) \
++ printk(args); \
++} while (0)
++
++#endif /* ACX_DEBUG */
++
++void acx_print_mac(const char *head, const u8 *mac, const char *tail);
++
++/* Optimized out to nothing in non-debug build */
++static inline void
++acxlog_mac(int level, const char *head, const u8 *mac, const char *tail)
++{
++ if (acx_debug & level) {
++ acx_print_mac(head, mac, tail);
++ }
++}
++
++
++/***********************************************************************
++** MAC address helpers
++*/
++static inline void
++MAC_COPY(u8 *mac, const u8 *src)
++{
++ *(u32*)mac = *(u32*)src;
++ ((u16*)mac)[2] = ((u16*)src)[2];
++ /* kernel's memcpy will do the same: memcpy(dst, src, ETH_ALEN); */
++}
++
++static inline void
++MAC_FILL(u8 *mac, u8 val)
++{
++ memset(mac, val, ETH_ALEN);
++}
++
++static inline void
++MAC_BCAST(u8 *mac)
++{
++ ((u16*)mac)[2] = *(u32*)mac = -1;
++}
++
++static inline void
++MAC_ZERO(u8 *mac)
++{
++ ((u16*)mac)[2] = *(u32*)mac = 0;
++}
++
++static inline int
++mac_is_equal(const u8 *a, const u8 *b)
++{
++ /* can't beat this */
++ return memcmp(a, b, ETH_ALEN) == 0;
++}
++
++static inline int
++mac_is_bcast(const u8 *mac)
++{
++ /* AND together 4 first bytes with sign-extended 2 last bytes
++ ** Only bcast address gives 0xffffffff. +1 gives 0 */
++ return ( *(s32*)mac & ((s16*)mac)[2] ) + 1 == 0;
++}
++
++static inline int
++mac_is_zero(const u8 *mac)
++{
++ return ( *(u32*)mac | ((u16*)mac)[2] ) == 0;
++}
++
++static inline int
++mac_is_directed(const u8 *mac)
++{
++ return (mac[0] & 1)==0;
++}
++
++static inline int
++mac_is_mcast(const u8 *mac)
++{
++ return (mac[0] & 1) && !mac_is_bcast(mac);
++}
++
++#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
++#define MAC(bytevector) \
++ ((unsigned char *)bytevector)[0], \
++ ((unsigned char *)bytevector)[1], \
++ ((unsigned char *)bytevector)[2], \
++ ((unsigned char *)bytevector)[3], \
++ ((unsigned char *)bytevector)[4], \
++ ((unsigned char *)bytevector)[5]
++
++
++/***********************************************************************
++** Random helpers
++*/
++#define TO_STRING(x) #x
++#define STRING(x) TO_STRING(x)
++
++#define CLEAR_BIT(val, mask) ((val) &= ~(mask))
++#define SET_BIT(val, mask) ((val) |= (mask))
++
++/* undefined if v==0 */
++static inline unsigned int
++lowest_bit(u16 v)
++{
++ unsigned int n = 0;
++ while (!(v & 0xf)) { v>>=4; n+=4; }
++ while (!(v & 1)) { v>>=1; n++; }
++ return n;
++}
++
++/* undefined if v==0 */
++static inline unsigned int
++highest_bit(u16 v)
++{
++ unsigned int n = 0;
++ while (v>0xf) { v>>=4; n+=4; }
++ while (v>1) { v>>=1; n++; }
++ return n;
++}
++
++/* undefined if v==0 */
++static inline int
++has_only_one_bit(u16 v)
++{
++ return ((v-1) ^ v) >= v;
++}
++
++
++static inline int
++is_hidden_essid(char *essid)
++{
++ return (('\0' == essid[0]) ||
++ ((' ' == essid[0]) && ('\0' == essid[1])));
++}
++
++/***********************************************************************
++** LOCKING
++** We have adev->sem and adev->lock.
++**
++** We employ following naming convention in order to get locking right:
++**
++** acx_e_xxxx - external entry points called from process context.
++** It is okay to sleep. adev->sem is to be taken on entry.
++** acx_i_xxxx - external entry points possibly called from atomic context.
++** Sleeping is not allowed (and thus down(sem) is not legal!)
++** acx_s_xxxx - potentially sleeping functions. Do not ever call under lock!
++** acx_l_xxxx - functions which expect lock to be already taken.
++** rest - non-sleeping functions which do not require locking
++** but may be run under lock
++**
++** A small number of local helpers do not have acx_[eisl]_ prefix.
++** They are always close to caller and are to be reviewed locally.
++**
++** Theory of operation:
++**
++** All process-context entry points (_e_ functions) take sem
++** immediately. IRQ handler and other 'atomic-context' entry points
++** (_i_ functions) take lock immediately on entry, but dont take sem
++** because that might sleep.
++**
++** Thus *all* code is either protected by sem or lock, or both.
++**
++** Code which must not run concurrently with IRQ takes lock.
++** Such code is marked with _l_.
++**
++** This results in the following rules of thumb useful in code review:
++**
++** + If a function calls _s_ fn, it must be an _s_ itself.
++** + You can call _l_ fn only (a) from another _l_ fn
++** or (b) from _s_, _e_ or _i_ fn by taking lock, calling _l_,
++** and dropping lock.
++** + All IRQ code runs under lock.
++** + Any _s_ fn is running under sem.
++** + Code under sem can race only with IRQ code.
++** + Code under sem+lock cannot race with anything.
++*/
++
++/* These functions *must* be inline or they will break horribly on SPARC, due
++ * to its weird semantics for save/restore flags */
++
++#if defined(PARANOID_LOCKING) /* Lock debugging */
++
++void acx_lock_debug(acx_device_t *adev, const char* where);
++void acx_unlock_debug(acx_device_t *adev, const char* where);
++void acx_down_debug(acx_device_t *adev, const char* where);
++void acx_up_debug(acx_device_t *adev, const char* where);
++void acx_lock_unhold(void);
++void acx_sem_unhold(void);
++
++static inline void
++acx_lock_helper(acx_device_t *adev, unsigned long *fp, const char* where)
++{
++ acx_lock_debug(adev, where);
++ spin_lock_irqsave(&adev->lock, *fp);
++}
++static inline void
++acx_unlock_helper(acx_device_t *adev, unsigned long *fp, const char* where)
++{
++ acx_unlock_debug(adev, where);
++ spin_unlock_irqrestore(&adev->lock, *fp);
++}
++static inline void
++acx_down_helper(acx_device_t *adev, const char* where)
++{
++ acx_down_debug(adev, where);
++}
++static inline void
++acx_up_helper(acx_device_t *adev, const char* where)
++{
++ acx_up_debug(adev, where);
++}
++#define acx_lock(adev, flags) acx_lock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
++#define acx_unlock(adev, flags) acx_unlock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
++#define acx_sem_lock(adev) acx_down_helper(adev, __FILE__ ":" STRING(__LINE__))
++#define acx_sem_unlock(adev) acx_up_helper(adev, __FILE__ ":" STRING(__LINE__))
++
++#elif defined(DO_LOCKING)
++
++#define acx_lock(adev, flags) spin_lock_irqsave(&adev->lock, flags)
++#define acx_unlock(adev, flags) spin_unlock_irqrestore(&adev->lock, flags)
++#define acx_sem_lock(adev) down(&adev->sem)
++#define acx_sem_unlock(adev) up(&adev->sem)
++#define acx_lock_unhold() ((void)0)
++#define acx_sem_unhold() ((void)0)
++
++#else /* no locking! :( */
++
++#define acx_lock(adev, flags) ((void)0)
++#define acx_unlock(adev, flags) ((void)0)
++#define acx_sem_lock(adev) ((void)0)
++#define acx_sem_unlock(adev) ((void)0)
++#define acx_lock_unhold() ((void)0)
++#define acx_sem_unhold() ((void)0)
++
++#endif
++
++
++/***********************************************************************
++*/
++
++/* Can race with rx path (which is not protected by sem):
++** rx -> process_[re]assocresp() -> set_status(ASSOCIATED) -> wake_queue()
++** Can race with tx_complete IRQ:
++** IRQ -> acxpci_l_clean_txdesc -> acx_wake_queue
++** Review carefully all callsites */
++static inline void
++acx_stop_queue(struct net_device *ndev, const char *msg)
++{
++ if (netif_queue_stopped(ndev))
++ return;
++
++ netif_stop_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: stop queue %s\n", msg);
++}
++
++static inline int
++acx_queue_stopped(struct net_device *ndev)
++{
++ return netif_queue_stopped(ndev);
++}
++
++/*
++static inline void
++acx_start_queue(struct net_device *ndev, const char *msg)
++{
++ netif_start_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: start queue %s\n", msg);
++}
++*/
++
++static inline void
++acx_wake_queue(struct net_device *ndev, const char *msg)
++{
++ netif_wake_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: wake queue %s\n", msg);
++}
++
++static inline void
++acx_carrier_off(struct net_device *ndev, const char *msg)
++{
++ netif_carrier_off(ndev);
++ if (msg)
++ log(L_BUFT, "tx: carrier off %s\n", msg);
++}
++
++static inline void
++acx_carrier_on(struct net_device *ndev, const char *msg)
++{
++ netif_carrier_on(ndev);
++ if (msg)
++ log(L_BUFT, "tx: carrier on %s\n", msg);
++}
++
++/* This function does not need locking UNLESS you call it
++** as acx_set_status(ACX_STATUS_4_ASSOCIATED), bacause this can
++** wake queue. This can race with stop_queue elsewhere. */
++void acx_set_status(acx_device_t *adev, u16 status);
++
++
++/***********************************************************************
++** Communication with firmware
++*/
++#define CMD_TIMEOUT_MS(n) (n)
++#define ACX_CMD_TIMEOUT_DEFAULT CMD_TIMEOUT_MS(50)
++
++#if ACX_DEBUG
++
++/* We want to log cmd names */
++int acxpci_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++int acxmem_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++int acxusb_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++static inline int
++acx_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++ return acxusb_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++}
++#define acx_s_issue_cmd(adev,cmd,param,len) \
++ acx_s_issue_cmd_timeo_debug(adev,cmd,param,len,ACX_CMD_TIMEOUT_DEFAULT,#cmd)
++#define acx_s_issue_cmd_timeo(adev,cmd,param,len,timeo) \
++ acx_s_issue_cmd_timeo_debug(adev,cmd,param,len,timeo,#cmd)
++int acx_s_configure_debug(acx_device_t *adev, void *pdr, int type, const char* str);
++#define acx_s_configure(adev,pdr,type) \
++ acx_s_configure_debug(adev,pdr,type,#type)
++int acx_s_interrogate_debug(acx_device_t *adev, void *pdr, int type, const char* str);
++#define acx_s_interrogate(adev,pdr,type) \
++ acx_s_interrogate_debug(adev,pdr,type,#type)
++
++#else
++
++int acxpci_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++int acxmem_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++int acxusb_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++static inline int
++acx_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++ return acxusb_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++}
++static inline int
++acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned len)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++ return acxusb_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++}
++int acx_s_configure(acx_device_t *adev, void *pdr, int type);
++int acx_s_interrogate(acx_device_t *adev, void *pdr, int type);
++
++#endif
++
++void acx_s_cmd_start_scan(acx_device_t *adev);
++
++
++/***********************************************************************
++** Ioctls
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++int
++acx100pci_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++
++
++/***********************************************************************
++** /proc
++*/
++#ifdef CONFIG_PROC_FS
++int acx_proc_register_entries(const struct net_device *ndev);
++int acx_proc_unregister_entries(const struct net_device *ndev);
++#else
++static inline int
++acx_proc_register_entries(const struct net_device *ndev) { return OK; }
++static inline int
++acx_proc_unregister_entries(const struct net_device *ndev) { return OK; }
++#endif
++
++
++/***********************************************************************
++*/
++firmware_image_t *acx_s_read_fw(struct device *dev, const char *file, u32 *size);
++int acxpci_s_upload_radio(acx_device_t *adev);
++int acxmem_s_upload_radio(acx_device_t *adev);
++
++
++/***********************************************************************
++** Unsorted yet :)
++*/
++int acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++int acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++int acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++static inline int
++acx_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_read_phy_reg(adev, reg, charbuf);
++ if (IS_PCI(adev))
++ return acxpci_s_read_phy_reg(adev, reg, charbuf);
++ return acxusb_s_read_phy_reg(adev, reg, charbuf);
++}
++
++int acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++int acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++int acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++static inline int
++acx_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_write_phy_reg(adev, reg, value);
++ if (IS_PCI(adev))
++ return acxpci_s_write_phy_reg(adev, reg, value);
++ return acxusb_s_write_phy_reg(adev, reg, value);
++}
++
++tx_t* acxpci_l_alloc_tx(acx_device_t *adev);
++tx_t* acxmem_l_alloc_tx(acx_device_t *adev);
++tx_t* acxusb_l_alloc_tx(acx_device_t *adev);
++static inline tx_t*
++acx_l_alloc_tx(acx_device_t *adev)
++{
++ if (IS_MEM(adev))
++ return acxmem_l_alloc_tx(adev);
++ if (IS_PCI(adev))
++ return acxpci_l_alloc_tx(adev);
++ return acxusb_l_alloc_tx(adev);
++}
++
++void acxusb_l_dealloc_tx(tx_t *tx_opaque);
++void acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque);
++static inline void
++acx_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++#ifdef ACX_MEM
++ acxmem_l_dealloc_tx (adev, tx_opaque);
++#else
++ if (IS_USB(adev))
++ acxusb_l_dealloc_tx(tx_opaque);
++#endif
++}
++
++void* acxpci_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++void* acxmem_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++void* acxusb_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++static inline void*
++acx_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque)
++{
++#if defined (ACX_MEM)
++ return acxmem_l_get_txbuf(adev, tx_opaque);
++#else
++ if (IS_PCI(adev))
++ return acxpci_l_get_txbuf(adev, tx_opaque);
++ return acxusb_l_get_txbuf(adev, tx_opaque);
++#endif
++}
++
++void acxpci_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++void acxmem_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++void acxusb_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++static inline void
++acx_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len)
++{
++#if defined (ACX_MEM)
++ acxmem_l_tx_data(adev, tx_opaque, len);
++#else
++ if (IS_PCI(adev))
++ acxpci_l_tx_data(adev, tx_opaque, len);
++ else
++ acxusb_l_tx_data(adev, tx_opaque, len);
++#endif
++}
++
++static inline wlan_hdr_t*
++acx_get_wlan_hdr(acx_device_t *adev, const rxbuffer_t *rxbuf)
++{
++ return (wlan_hdr_t*)((u8*)&rxbuf->hdr_a3 + adev->phy_header_len);
++}
++
++void acxpci_l_power_led(acx_device_t *adev, int enable);
++int acxpci_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf);
++unsigned int acxpci_l_clean_txdesc(acx_device_t *adev);
++void acxpci_l_clean_txdesc_emergency(acx_device_t *adev);
++int acxpci_s_create_hostdesc_queues(acx_device_t *adev);
++void acxpci_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start);
++void acxpci_free_desc_queues(acx_device_t *adev);
++char* acxpci_s_proc_diag_output(char *p, acx_device_t *adev);
++int acxpci_proc_eeprom_output(char *p, acx_device_t *adev);
++void acxpci_set_interrupt_mask(acx_device_t *adev);
++int acx100pci_s_set_tx_level(acx_device_t *adev, u8 level_dbm);
++
++void acxmem_l_power_led(acx_device_t *adev, int enable);
++int acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf);
++unsigned int acxmem_l_clean_txdesc(acx_device_t *adev);
++void acxmem_l_clean_txdesc_emergency(acx_device_t *adev);
++int acxmem_s_create_hostdesc_queues(acx_device_t *adev);
++void acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start);
++void acxmem_free_desc_queues(acx_device_t *adev);
++char* acxmem_s_proc_diag_output(char *p, acx_device_t *adev);
++int acxmem_proc_eeprom_output(char *p, acx_device_t *adev);
++void acxmem_set_interrupt_mask(acx_device_t *adev);
++int acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm);
++
++void acx_s_msleep(int ms);
++int acx_s_init_mac(acx_device_t *adev);
++void acx_set_reg_domain(acx_device_t *adev, unsigned char reg_dom_id);
++void acx_set_timer(acx_device_t *adev, int timeout_us);
++void acx_update_capabilities(acx_device_t *adev);
++void acx_s_start(acx_device_t *adev);
++
++void acx_s_update_card_settings(acx_device_t *adev);
++void acx_s_parse_configoption(acx_device_t *adev, const acx111_ie_configoption_t *pcfg);
++void acx_l_update_ratevector(acx_device_t *adev);
++
++void acx_init_task_scheduler(acx_device_t *adev);
++void acx_schedule_task(acx_device_t *adev, unsigned int set_flag);
++
++int acx_e_ioctl_old(struct net_device *ndev, struct ifreq *ifr, int cmd);
++
++client_t *acx_l_sta_list_get(acx_device_t *adev, const u8 *address);
++void acx_l_sta_list_del(acx_device_t *adev, client_t *clt);
++
++int acx_l_transmit_disassoc(acx_device_t *adev, client_t *clt);
++void acx_i_timer(unsigned long a);
++int acx_s_complete_scan(acx_device_t *adev);
++
++struct sk_buff *acx_rxbuf_to_ether(acx_device_t *adev, rxbuffer_t *rxbuf);
++int acx_ether_to_txbuf(acx_device_t *adev, void *txbuf, const struct sk_buff *skb);
++
++u8 acx_signal_determine_quality(u8 signal, u8 noise);
++
++void acx_l_process_rxbuf(acx_device_t *adev, rxbuffer_t *rxbuf);
++void acx_l_handle_txrate_auto(acx_device_t *adev, struct client *txc,
++ u16 intended_rate, u8 rate100, u16 rate111, u8 error,
++ int pkts_to_ignore);
++
++void acx_dump_bytes(const void *, int);
++void acx_log_bad_eid(wlan_hdr_t* hdr, int len, wlan_ie_t* ie_ptr);
++
++u8 acx_rate111to100(u16);
++
++void acx_s_set_defaults(acx_device_t *adev);
++
++#if !ACX_DEBUG
++static inline const char* acx_get_packet_type_string(u16 fc) { return ""; }
++#else
++const char* acx_get_packet_type_string(u16 fc);
++#endif
++const char* acx_cmd_status_str(unsigned int state);
++
++int acx_i_start_xmit(struct sk_buff *skb, struct net_device *ndev);
++
++void great_inquisitor(acx_device_t *adev);
++
++void acx_s_get_firmware_version(acx_device_t *adev);
++void acx_display_hardware_details(acx_device_t *adev);
++
++int acx_e_change_mtu(struct net_device *ndev, int mtu);
++struct net_device_stats* acx_e_get_stats(struct net_device *ndev);
++struct iw_statistics* acx_e_get_wireless_stats(struct net_device *ndev);
++
++#ifdef ACX_MEM
++int __init acxmem_e_init_module(void);
++void __exit acxmem_e_cleanup_module(void);
++void acxmem_e_release(struct device *dev);
++#else
++int __init acxpci_e_init_module(void);
++int __init acxusb_e_init_module(void);
++void __exit acxpci_e_cleanup_module(void);
++void __exit acxusb_e_cleanup_module(void);
++#endif
++int __init acx_cs_init(void);
++void __exit acx_cs_cleanup(void);
+Index: linux-2.6.23/drivers/net/wireless/acx/acx.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,14 @@
++#if defined(CONFIG_ACX_MEM) && !defined(ACX_MEM)
++#define ACX_MEM
++#endif
++
++#if defined(CONFIG_ACX_CS) && !defined(ACX_MEM)
++#define ACX_MEM
++#endif
++
++#include "acx_config.h"
++#include "wlan_compat.h"
++#include "wlan_hdr.h"
++#include "wlan_mgmt.h"
++#include "acx_struct.h"
++#include "acx_func.h"
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_hw.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_hw.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,18 @@
++/*
++ * Interface for ACX slave memory driver
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * GPL
++ *
++ */
++
++#ifndef _ACX_HW_H
++#define _ACX_HW_H
++
++struct acx_hardware_data {
++ int (*start_hw)( void );
++ int (*stop_hw)( void );
++};
++
++#endif /* _ACX_HW_H */
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_struct.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_struct.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,2114 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** Forward declarations of types
++*/
++typedef struct tx tx_t;
++typedef struct acx_device acx_device_t;
++typedef struct client client_t;
++typedef struct rxdesc rxdesc_t;
++typedef struct txdesc txdesc_t;
++typedef struct rxhostdesc rxhostdesc_t;
++typedef struct txhostdesc txhostdesc_t;
++
++
++/***********************************************************************
++** Debug / log functionality
++*/
++enum {
++ L_LOCK = (ACX_DEBUG>1)*0x0001, /* locking debug log */
++ L_INIT = (ACX_DEBUG>0)*0x0002, /* special card initialization logging */
++ L_IRQ = (ACX_DEBUG>0)*0x0004, /* interrupt stuff */
++ L_ASSOC = (ACX_DEBUG>0)*0x0008, /* assocation (network join) and station log */
++ L_FUNC = (ACX_DEBUG>1)*0x0020, /* logging of function enter / leave */
++ L_XFER = (ACX_DEBUG>1)*0x0080, /* logging of transfers and mgmt */
++ L_DATA = (ACX_DEBUG>1)*0x0100, /* logging of transfer data */
++ L_DEBUG = (ACX_DEBUG>1)*0x0200, /* log of debug info */
++ L_IOCTL = (ACX_DEBUG>0)*0x0400, /* log ioctl calls */
++ L_CTL = (ACX_DEBUG>1)*0x0800, /* log of low-level ctl commands */
++ L_BUFR = (ACX_DEBUG>1)*0x1000, /* debug rx buffer mgmt (ring buffer etc.) */
++ L_XFER_BEACON = (ACX_DEBUG>1)*0x2000, /* also log beacon packets */
++ L_BUFT = (ACX_DEBUG>1)*0x4000, /* debug tx buffer mgmt (ring buffer etc.) */
++ L_USBRXTX = (ACX_DEBUG>0)*0x8000, /* debug USB rx/tx operations */
++ L_BUF = L_BUFR + L_BUFT,
++ L_ANY = 0xffff
++};
++
++#if ACX_DEBUG
++extern unsigned int acx_debug;
++#else
++enum { acx_debug = 0 };
++#endif
++
++
++/***********************************************************************
++** Random helpers
++*/
++#define ACX_PACKED __attribute__ ((packed))
++
++#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0]))
++
++/* Use worker_queues for 2.5/2.6 kernels and queue tasks for 2.4 kernels
++ (used for the 'bottom half' of the interrupt routine) */
++
++#include <linux/workqueue.h>
++#define USE_WORKER_TASKS
++#define WORK_STRUCT struct work_struct
++#define SCHEDULE_WORK schedule_work
++#define FLUSH_SCHEDULED_WORK flush_scheduled_work
++
++
++/***********************************************************************
++** Constants
++*/
++#define OK 0
++#define NOT_OK 1
++
++/* The supported chip models */
++#define CHIPTYPE_ACX100 1
++#define CHIPTYPE_ACX111 2
++
++#define IS_ACX100(adev) ((adev)->chip_type == CHIPTYPE_ACX100)
++#define IS_ACX111(adev) ((adev)->chip_type == CHIPTYPE_ACX111)
++
++/* Supported interfaces */
++#define DEVTYPE_PCI 0
++#define DEVTYPE_USB 1
++#define DEVTYPE_MEM 2
++
++#if !defined(CONFIG_ACX_PCI) && !defined(CONFIG_ACX_USB) && !defined(CONFIG_ACX_MEM) && !defined(CONFIG_ACX_CS)
++#error Driver must include PCI, USB, PCMCIA or memory mapped interface support. You selected none of them.
++#endif
++
++#if defined(CONFIG_ACX_PCI)
++ #if !defined(CONFIG_ACX_USB)
++ #define IS_PCI(adev) 1
++ #else
++ #define IS_PCI(adev) ((adev)->dev_type == DEVTYPE_PCI)
++ #endif
++#else
++ #define IS_PCI(adev) 0
++#endif
++
++#if defined(CONFIG_ACX_USB)
++ #if !defined(CONFIG_ACX_PCI)
++ #define IS_USB(adev) 1
++ #else
++ #define IS_USB(adev) ((adev)->dev_type == DEVTYPE_USB)
++ #endif
++#else
++ #define IS_USB(adev) 0
++#endif
++
++#if defined(CONFIG_ACX_MEM) || defined(CONFIG_ACX_CS)
++ #define IS_MEM(adev) 1
++#else
++ #define IS_MEM(adev) 0
++#endif
++
++/* Driver defaults */
++#define DEFAULT_DTIM_INTERVAL 10
++/* used to be 2048, but FreeBSD driver changed it to 4096 to work properly
++** in noisy wlans */
++#define DEFAULT_MSDU_LIFETIME 4096
++#define DEFAULT_RTS_THRESHOLD 2312 /* max. size: disable RTS mechanism */
++#define DEFAULT_BEACON_INTERVAL 100
++
++#define ACX100_BAP_DATALEN_MAX 4096
++#define ACX100_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */
++#define ACX100_RIDDATA_MAXLEN ACX100_RID_GUESSING_MAXLEN
++
++/* Support Constants */
++/* Radio type names, found in Win98 driver's TIACXLN.INF */
++#define RADIO_MAXIM_0D 0x0d
++#define RADIO_RFMD_11 0x11
++#define RADIO_RALINK_15 0x15
++/* used in ACX111 cards (WG311v2, WL-121, ...): */
++#define RADIO_RADIA_16 0x16
++/* most likely *sometimes* used in ACX111 cards: */
++#define RADIO_UNKNOWN_17 0x17
++/* FwRad19.bin was found in a Safecom driver; must be an ACX111 radio: */
++#define RADIO_UNKNOWN_19 0x19
++#define RADIO_UNKNOWN_1B 0x1b /* radio in SafeCom SWLUT-54125 USB adapter; entirely unknown!! */
++
++/* Controller Commands */
++/* can be found in table cmdTable in firmware "Rev. 1.5.0" (FW150) */
++#define ACX1xx_CMD_RESET 0x00
++#define ACX1xx_CMD_INTERROGATE 0x01
++#define ACX1xx_CMD_CONFIGURE 0x02
++#define ACX1xx_CMD_ENABLE_RX 0x03
++#define ACX1xx_CMD_ENABLE_TX 0x04
++#define ACX1xx_CMD_DISABLE_RX 0x05
++#define ACX1xx_CMD_DISABLE_TX 0x06
++#define ACX1xx_CMD_FLUSH_QUEUE 0x07
++#define ACX1xx_CMD_SCAN 0x08
++#define ACX1xx_CMD_STOP_SCAN 0x09
++#define ACX1xx_CMD_CONFIG_TIM 0x0a
++#define ACX1xx_CMD_JOIN 0x0b
++#define ACX1xx_CMD_WEP_MGMT 0x0c
++#ifdef OLD_FIRMWARE_VERSIONS
++#define ACX100_CMD_HALT 0x0e /* mapped to unknownCMD in FW150 */
++#else
++#define ACX1xx_CMD_MEM_READ 0x0d
++#define ACX1xx_CMD_MEM_WRITE 0x0e
++#endif
++#define ACX1xx_CMD_SLEEP 0x0f
++#define ACX1xx_CMD_WAKE 0x10
++#define ACX1xx_CMD_UNKNOWN_11 0x11 /* mapped to unknownCMD in FW150 */
++#define ACX100_CMD_INIT_MEMORY 0x12
++#define ACX1FF_CMD_DISABLE_RADIO 0x12 /* new firmware? TNETW1450? */
++#define ACX1xx_CMD_CONFIG_BEACON 0x13
++#define ACX1xx_CMD_CONFIG_PROBE_RESPONSE 0x14
++#define ACX1xx_CMD_CONFIG_NULL_DATA 0x15
++#define ACX1xx_CMD_CONFIG_PROBE_REQUEST 0x16
++#define ACX1xx_CMD_FCC_TEST 0x17
++#define ACX1xx_CMD_RADIOINIT 0x18
++#define ACX111_CMD_RADIOCALIB 0x19
++#define ACX1FF_CMD_NOISE_HISTOGRAM 0x1c /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_RX_RESET 0x1d /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_LNA_CONTROL 0x20 /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_CONTROL_DBG_TRACE 0x21 /* new firmware? TNETW1450? */
++
++/* 'After Interrupt' Commands */
++#define ACX_AFTER_IRQ_CMD_STOP_SCAN 0x01
++#define ACX_AFTER_IRQ_CMD_ASSOCIATE 0x02
++#define ACX_AFTER_IRQ_CMD_RADIO_RECALIB 0x04
++#define ACX_AFTER_IRQ_UPDATE_CARD_CFG 0x08
++#define ACX_AFTER_IRQ_TX_CLEANUP 0x10
++#define ACX_AFTER_IRQ_COMPLETE_SCAN 0x20
++#define ACX_AFTER_IRQ_RESTART_SCAN 0x40
++
++/***********************************************************************
++** Tx/Rx buffer sizes and watermarks
++**
++** This will alloc and use DMAable buffers of
++** WLAN_A4FR_MAXLEN_WEP_FCS * (RX_CNT + TX_CNT) bytes
++** RX/TX_CNT=32 -> ~150k DMA buffers
++** RX/TX_CNT=16 -> ~75k DMA buffers
++**
++** 2005-10-10: reduced memory usage by lowering both to 16
++*/
++#define RX_CNT 16
++#define TX_CNT 16
++
++/* we clean up txdescs when we have N free txdesc: */
++#define TX_CLEAN_BACKLOG (TX_CNT/4)
++#define TX_START_CLEAN (TX_CNT - TX_CLEAN_BACKLOG)
++#define TX_EMERG_CLEAN 2
++/* we stop queue if we have < N free txbufs: */
++#define TX_STOP_QUEUE 3
++/* we start queue if we have >= N free txbufs: */
++#define TX_START_QUEUE 5
++
++/***********************************************************************
++** Interrogate/Configure cmd constants
++**
++** NB: length includes JUST the data part of the IE
++** (does not include size of the (type,len) pair)
++**
++** TODO: seems that acx100, acx100usb, acx111 have some differences,
++** fix code with regard to this!
++*/
++
++#define DEF_IE(name, val, len) enum { ACX##name=val, ACX##name##_LEN=len }
++
++/* Information Elements: Network Parameters, Static Configuration Entities */
++/* these are handled by real_cfgtable in firmware "Rev 1.5.0" (FW150) */
++DEF_IE(1xx_IE_UNKNOWN_00 ,0x0000, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(100_IE_ACX_TIMER ,0x0001, 0x10);
++DEF_IE(1xx_IE_POWER_MGMT ,0x0002, 0x06); /* TNETW1450: length 0x18!! */
++DEF_IE(1xx_IE_QUEUE_CONFIG ,0x0003, 0x1c);
++DEF_IE(100_IE_BLOCK_SIZE ,0x0004, 0x02);
++DEF_IE(1FF_IE_SLOT_TIME ,0x0004, 0x08); /* later firmware versions only? */
++DEF_IE(1xx_IE_MEMORY_CONFIG_OPTIONS ,0x0005, 0x14);
++DEF_IE(1FF_IE_QUEUE_HEAD ,0x0005, 0x14 /* FIXME: length? */);
++DEF_IE(1xx_IE_RATE_FALLBACK ,0x0006, 0x01); /* TNETW1450: length 2 */
++DEF_IE(100_IE_WEP_OPTIONS ,0x0007, 0x03);
++DEF_IE(111_IE_RADIO_BAND ,0x0007, -1);
++DEF_IE(1FF_IE_TIMING_CFG ,0x0007, -1); /* later firmware versions; TNETW1450 only? */
++DEF_IE(100_IE_SSID ,0x0008, 0x20); /* huh? */
++DEF_IE(1xx_IE_MEMORY_MAP ,0x0008, 0x28); /* huh? TNETW1450 has length 0x40!! */
++DEF_IE(1xx_IE_SCAN_STATUS ,0x0009, 0x04); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_ASSOC_ID ,0x000a, 0x02);
++DEF_IE(1xx_IE_UNKNOWN_0B ,0x000b, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_TX_POWER_LEVEL_TABLE ,0x000b, 0x18); /* later firmware versions; TNETW1450 only? */
++DEF_IE(100_IE_UNKNOWN_0C ,0x000c, -1); /* very small implementation in FW150! */
++/* ACX100 has an equivalent struct in the cmd mailbox directly after reset.
++ * 0x14c seems extremely large, will trash stack on failure (memset!)
++ * in case of small input struct --> OOPS! */
++DEF_IE(111_IE_CONFIG_OPTIONS ,0x000c, 0x14c);
++DEF_IE(1xx_IE_FWREV ,0x000d, 0x18);
++DEF_IE(1xx_IE_FCS_ERROR_COUNT ,0x000e, 0x04);
++DEF_IE(1xx_IE_MEDIUM_USAGE ,0x000f, 0x08);
++DEF_IE(1xx_IE_RXCONFIG ,0x0010, 0x04);
++DEF_IE(100_IE_UNKNOWN_11 ,0x0011, -1); /* NONBINARY: large implementation in FW150! link quality readings or so? */
++DEF_IE(111_IE_QUEUE_THRESH ,0x0011, -1);
++DEF_IE(100_IE_UNKNOWN_12 ,0x0012, -1); /* NONBINARY: VERY large implementation in FW150!! */
++DEF_IE(111_IE_BSS_POWER_SAVE ,0x0012, /* -1 */ 2);
++DEF_IE(1xx_IE_FIRMWARE_STATISTICS ,0x0013, 0x9c); /* TNETW1450: length 0x134!! */
++DEF_IE(1FF_IE_RX_INTR_CONFIG ,0x0014, 0x14); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1xx_IE_FEATURE_CONFIG ,0x0015, 0x08);
++DEF_IE(111_IE_KEY_CHOOSE ,0x0016, 0x04); /* for rekeying. really len=4?? */
++DEF_IE(1FF_IE_MISC_CONFIG_TABLE ,0x0017, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_WONE_CONFIG ,0x0018, -1); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_TID_CONFIG ,0x001a, 0x2c); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_CALIB_ASSESSMENT ,0x001e, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_BEACON_FILTER_OPTIONS ,0x001f, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_LOW_RSSI_THRESH_OPT ,0x0020, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_NOISE_HISTOGRAM_RESULTS ,0x0021, 0x30); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_PACKET_DETECT_THRESH ,0x0023, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_TX_CONFIG_OPTIONS ,0x0024, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_CCA_THRESHOLD ,0x0025, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_EVENT_MASK ,0x0026, 0x08); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_DTIM_PERIOD ,0x0027, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_ACI_CONFIG_SET ,0x0029, 0x06); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1FF_IE_EEPROM_VER ,0x0030, 0x04); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1xx_IE_DOT11_STATION_ID ,0x1001, 0x06);
++DEF_IE(100_IE_DOT11_UNKNOWN_1002 ,0x1002, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(111_IE_DOT11_FRAG_THRESH ,0x1002, -1); /* mapped to cfgInvalid in FW150; TNETW1450 has length 2!! */
++DEF_IE(100_IE_DOT11_BEACON_PERIOD ,0x1003, 0x02); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_DOT11_DTIM_PERIOD ,0x1004, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_DOT11_MAX_RX_LIFETIME ,0x1004, -1); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1xx_IE_DOT11_SHORT_RETRY_LIMIT ,0x1005, 0x01); /* TNETW1450: length 2 */
++DEF_IE(1xx_IE_DOT11_LONG_RETRY_LIMIT ,0x1006, 0x01); /* TNETW1450: length 2 */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_WRITE ,0x1007, 0x20); /* configure default keys; TNETW1450 has length 0x24!! */
++DEF_IE(1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME ,0x1008, 0x04);
++DEF_IE(1xx_IE_DOT11_GROUP_ADDR ,0x1009, -1);
++DEF_IE(1xx_IE_DOT11_CURRENT_REG_DOMAIN ,0x100a, 0x02);
++/* It's harmless to have larger struct. Use USB case always. */
++DEF_IE(1xx_IE_DOT11_CURRENT_ANTENNA ,0x100b, 0x02); /* in fact len=1 for PCI */
++DEF_IE(1xx_IE_DOT11_UNKNOWN_100C ,0x100c, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_DOT11_TX_POWER_LEVEL ,0x100d, 0x01); /* TNETW1450 has length 2!! */
++DEF_IE(1xx_IE_DOT11_CURRENT_CCA_MODE ,0x100e, 0x02); /* in fact len=1 for PCI */
++/* USB doesn't return anything - len==0?! */
++DEF_IE(100_IE_DOT11_ED_THRESHOLD ,0x100f, 0x04);
++DEF_IE(1xx_IE_DOT11_WEP_DEFAULT_KEY_SET ,0x1010, 0x01); /* set default key ID; TNETW1450: length 2 */
++DEF_IE(100_IE_DOT11_UNKNOWN_1011 ,0x1011, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_DOT11_CURR_5GHZ_REGDOM ,0x1011, -1); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(100_IE_DOT11_UNKNOWN_1012 ,0x1012, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(100_IE_DOT11_UNKNOWN_1013 ,0x1013, -1); /* mapped to cfgInvalid in FW150 */
++
++#if 0
++/* Experimentally obtained on acx100, fw 1.9.8.b
++** -1 means that fw returned 'invalid IE'
++** 0200 FC00 nnnn... are test read contents: u16 type, u16 len, data
++** (AA are poison bytes marking bytes not written by fw)
++**
++** Looks like acx100 fw does not update len field (thus len=256-4=FC here)
++** A number of IEs seem to trash type,len fields
++** IEs marked 'huge' return gobs of data (no poison bytes remain)
++*/
++DEF_IE(100_IE_INVAL_00, 0x0000, -1);
++DEF_IE(100_IE_INVAL_01, 0x0001, -1); /* IE_ACX_TIMER, len=16 on older fw */
++DEF_IE(100_IE_POWER_MGMT, 0x0002, 4); /* 0200FC00 00040000 AAAAAAAA */
++DEF_IE(100_IE_QUEUE_CONFIG, 0x0003, 28); /* 0300FC00 48060000 9CAD0000 0101AAAA DCB00000 E4B00000 9CAA0000 00AAAAAA */
++DEF_IE(100_IE_BLOCK_SIZE, 0x0004, 2); /* 0400FC00 0001AAAA AAAAAAAA AAAAAAAA */
++/* write only: */
++DEF_IE(100_IE_MEMORY_CONFIG_OPTIONS, 0x0005, 20);
++DEF_IE(100_IE_RATE_FALLBACK, 0x0006, 1); /* 0600FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++/* write only: */
++DEF_IE(100_IE_WEP_OPTIONS, 0x0007, 3);
++DEF_IE(100_IE_MEMORY_MAP, 0x0008, 40); /* huge: 0800FC00 30000000 6CA20000 70A20000... */
++/* gives INVAL on read: */
++DEF_IE(100_IE_SCAN_STATUS, 0x0009, -1);
++DEF_IE(100_IE_ASSOC_ID, 0x000a, 2); /* huge: 0A00FC00 00000000 01040800 00000000... */
++DEF_IE(100_IE_INVAL_0B, 0x000b, -1);
++/* 'command rejected': */
++DEF_IE(100_IE_CONFIG_OPTIONS, 0x000c, -3);
++DEF_IE(100_IE_FWREV, 0x000d, 24); /* 0D00FC00 52657620 312E392E 382E6200 AAAAAAAA AAAAAAAA 05050201 AAAAAAAA */
++DEF_IE(100_IE_FCS_ERROR_COUNT, 0x000e, 4);
++DEF_IE(100_IE_MEDIUM_USAGE, 0x000f, 8); /* E41F0000 2D780300 FCC91300 AAAAAAAA */
++DEF_IE(100_IE_RXCONFIG, 0x0010, 4); /* 1000FC00 00280000 AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_QUEUE_THRESH, 0x0011, 12); /* 1100FC00 AAAAAAAA 00000000 00000000 */
++DEF_IE(100_IE_BSS_POWER_SAVE, 0x0012, 1); /* 1200FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++/* read only, variable len */
++DEF_IE(100_IE_FIRMWARE_STATISTICS, 0x0013, 256); /* 0000AC00 00000000 ... */
++DEF_IE(100_IE_INT_CONFIG, 0x0014, 20); /* 00000000 00000000 00000000 00000000 5D74D105 00000000 AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_FEATURE_CONFIG, 0x0015, 8); /* 1500FC00 16000000 AAAAAAAA AAAAAAAA */
++/* returns 'invalid MAC': */
++DEF_IE(100_IE_KEY_CHOOSE, 0x0016, -4);
++DEF_IE(100_IE_INVAL_17, 0x0017, -1);
++DEF_IE(100_IE_UNKNOWN_18, 0x0018, 0); /* null len?! 1800FC00 AAAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_UNKNOWN_19, 0x0019, 256); /* huge: 1900FC00 9C1F00EA FEFFFFEA FEFFFFEA... */
++DEF_IE(100_IE_INVAL_1A, 0x001A, -1);
++
++DEF_IE(100_IE_DOT11_INVAL_1000, 0x1000, -1);
++DEF_IE(100_IE_DOT11_STATION_ID, 0x1001, 6); /* huge: 0110FC00 58B10E2F 03000000 00000000... */
++DEF_IE(100_IE_DOT11_INVAL_1002, 0x1002, -1);
++DEF_IE(100_IE_DOT11_INVAL_1003, 0x1003, -1);
++DEF_IE(100_IE_DOT11_INVAL_1004, 0x1004, -1);
++DEF_IE(100_IE_DOT11_SHORT_RETRY_LIMIT, 0x1005, 1);
++DEF_IE(100_IE_DOT11_LONG_RETRY_LIMIT, 0x1006, 1);
++/* write only: */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_WRITE, 0x1007, 32);
++DEF_IE(100_IE_DOT11_MAX_XMIT_MSDU_LIFETIME, 0x1008, 4); /* huge: 0810FC00 00020000 F4010000 00000000... */
++/* undoc but returns something */
++DEF_IE(100_IE_DOT11_GROUP_ADDR, 0x1009, 12); /* huge: 0910FC00 00000000 00000000 00000000... */
++DEF_IE(100_IE_DOT11_CURRENT_REG_DOMAIN, 0x100a, 1); /* 0A10FC00 30AAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_CURRENT_ANTENNA, 0x100b, 1); /* 0B10FC00 8FAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_INVAL_100C, 0x100c, -1);
++DEF_IE(100_IE_DOT11_TX_POWER_LEVEL, 0x100d, 2); /* 00000000 0100AAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_CURRENT_CCA_MODE, 0x100e, 1); /* 0E10FC00 0DAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_ED_THRESHOLD, 0x100f, 4); /* 0F10FC00 70000000 AAAAAAAA AAAAAAAA */
++/* set default key ID */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_SET, 0x1010, 1); /* 1010FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_INVAL_1011, 0x1011, -1);
++DEF_IE(100_IE_DOT11_INVAL_1012, 0x1012, -1);
++DEF_IE(100_IE_DOT11_INVAL_1013, 0x1013, -1);
++DEF_IE(100_IE_DOT11_UNKNOWN_1014, 0x1014, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1015, 0x1015, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1016, 0x1016, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1017, 0x1017, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1018, 0x1018, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1019, 0x1019, 256); /* huge */
++#endif
++
++#if 0
++/* Experimentally obtained on PCI acx111 Xterasys XN-2522g, fw 1.2.1.34
++** -1 means that fw returned 'invalid IE'
++** 0400 0800 nnnn... are test read contents: u16 type, u16 len, data
++** (AA are poison bytes marking bytes not written by fw)
++**
++** Looks like acx111 fw reports real len!
++*/
++DEF_IE(111_IE_INVAL_00, 0x0000, -1);
++DEF_IE(111_IE_INVAL_01, 0x0001, -1);
++DEF_IE(111_IE_POWER_MGMT, 0x0002, 12);
++/* write only, variable len: 12 + rxqueue_cnt*8 + txqueue_cnt*4: */
++DEF_IE(111_IE_MEMORY_CONFIG, 0x0003, 24);
++DEF_IE(111_IE_BLOCK_SIZE, 0x0004, 8); /* 04000800 AA00AAAA AAAAAAAA */
++/* variable len: 8 + rxqueue_cnt*8 + txqueue_cnt*8: */
++DEF_IE(111_IE_QUEUE_HEAD, 0x0005, 24);
++DEF_IE(111_IE_RATE_FALLBACK, 0x0006, 1);
++/* acx100 name:WEP_OPTIONS */
++/* said to have len:1 (not true, actually returns 12 bytes): */
++DEF_IE(111_IE_RADIO_BAND, 0x0007, 12); /* 07000C00 AAAA1F00 FF03AAAA AAAAAAAA */
++DEF_IE(111_IE_MEMORY_MAP, 0x0008, 48);
++/* said to have len:4, but gives INVAL on read: */
++DEF_IE(111_IE_SCAN_STATUS, 0x0009, -1);
++DEF_IE(111_IE_ASSOC_ID, 0x000a, 2);
++/* write only, len is not known: */
++DEF_IE(111_IE_UNKNOWN_0B, 0x000b, 0);
++/* read only, variable len. I see 67 byte reads: */
++DEF_IE(111_IE_CONFIG_OPTIONS, 0x000c, 67); /* 0C004300 01160500 ... */
++DEF_IE(111_IE_FWREV, 0x000d, 24);
++DEF_IE(111_IE_FCS_ERROR_COUNT, 0x000e, 4);
++DEF_IE(111_IE_MEDIUM_USAGE, 0x000f, 8);
++DEF_IE(111_IE_RXCONFIG, 0x0010, 4);
++DEF_IE(111_IE_QUEUE_THRESH, 0x0011, 12);
++DEF_IE(111_IE_BSS_POWER_SAVE, 0x0012, 1);
++/* read only, variable len. I see 240 byte reads: */
++DEF_IE(111_IE_FIRMWARE_STATISTICS, 0x0013, 240); /* 1300F000 00000000 ... */
++/* said to have len=17. looks like fw pads it to 20: */
++DEF_IE(111_IE_INT_CONFIG, 0x0014, 20); /* 14001400 00000000 00000000 00000000 00000000 00000000 */
++DEF_IE(111_IE_FEATURE_CONFIG, 0x0015, 8);
++/* said to be name:KEY_INDICATOR, len:4, but gives INVAL on read: */
++DEF_IE(111_IE_KEY_CHOOSE, 0x0016, -1);
++/* said to have len:4, but in fact returns 8: */
++DEF_IE(111_IE_MAX_USB_XFR, 0x0017, 8); /* 17000800 00014000 00000000 */
++DEF_IE(111_IE_INVAL_18, 0x0018, -1);
++DEF_IE(111_IE_INVAL_19, 0x0019, -1);
++/* undoc but returns something: */
++/* huh, fw indicates len=20 but uses 4 more bytes in buffer??? */
++DEF_IE(111_IE_UNKNOWN_1A, 0x001A, 20); /* 1A001400 AA00AAAA 0000020F FF030000 00020000 00000007 04000000 */
++
++DEF_IE(111_IE_DOT11_INVAL_1000, 0x1000, -1);
++DEF_IE(111_IE_DOT11_STATION_ID, 0x1001, 6);
++DEF_IE(111_IE_DOT11_FRAG_THRESH, 0x1002, 2);
++/* acx100 only? gives INVAL on read: */
++DEF_IE(111_IE_DOT11_BEACON_PERIOD, 0x1003, -1);
++/* said to be MAX_RECV_MSDU_LIFETIME: */
++DEF_IE(111_IE_DOT11_DTIM_PERIOD, 0x1004, 4);
++DEF_IE(111_IE_DOT11_SHORT_RETRY_LIMIT, 0x1005, 1);
++DEF_IE(111_IE_DOT11_LONG_RETRY_LIMIT, 0x1006, 1);
++/* acx100 only? gives INVAL on read: */
++DEF_IE(111_IE_DOT11_WEP_DEFAULT_KEY_WRITE, 0x1007, -1);
++DEF_IE(111_IE_DOT11_MAX_XMIT_MSDU_LIFETIME, 0x1008, 4);
++/* undoc but returns something. maybe it's 2 multicast MACs to listen to? */
++DEF_IE(111_IE_DOT11_GROUP_ADDR, 0x1009, 12); /* 09100C00 00000000 00000000 00000000 */
++DEF_IE(111_IE_DOT11_CURRENT_REG_DOMAIN, 0x100a, 1);
++DEF_IE(111_IE_DOT11_CURRENT_ANTENNA, 0x100b, 2);
++DEF_IE(111_IE_DOT11_INVAL_100C, 0x100c, -1);
++DEF_IE(111_IE_DOT11_TX_POWER_LEVEL, 0x100d, 1);
++/* said to have len=1 but gives INVAL on read: */
++DEF_IE(111_IE_DOT11_CURRENT_CCA_MODE, 0x100e, -1);
++/* said to have len=4 but gives INVAL on read: */
++DEF_IE(111_IE_DOT11_ED_THRESHOLD, 0x100f, -1);
++/* set default key ID. write only: */
++DEF_IE(111_IE_DOT11_WEP_DEFAULT_KEY_SET, 0x1010, 1);
++/* undoc but returns something: */
++DEF_IE(111_IE_DOT11_UNKNOWN_1011, 0x1011, 1); /* 11100100 20 */
++DEF_IE(111_IE_DOT11_INVAL_1012, 0x1012, -1);
++DEF_IE(111_IE_DOT11_INVAL_1013, 0x1013, -1);
++#endif
++
++
++/***********************************************************************
++**Information Frames Structures
++*/
++
++/* Used in beacon frames and the like */
++#define DOT11RATEBYTE_1 (1*2)
++#define DOT11RATEBYTE_2 (2*2)
++#define DOT11RATEBYTE_5_5 (5*2+1)
++#define DOT11RATEBYTE_11 (11*2)
++#define DOT11RATEBYTE_22 (22*2)
++#define DOT11RATEBYTE_6_G (6*2)
++#define DOT11RATEBYTE_9_G (9*2)
++#define DOT11RATEBYTE_12_G (12*2)
++#define DOT11RATEBYTE_18_G (18*2)
++#define DOT11RATEBYTE_24_G (24*2)
++#define DOT11RATEBYTE_36_G (36*2)
++#define DOT11RATEBYTE_48_G (48*2)
++#define DOT11RATEBYTE_54_G (54*2)
++#define DOT11RATEBYTE_BASIC 0x80 /* flags rates included in basic rate set */
++
++
++/***********************************************************************
++** rxbuffer_t
++**
++** This is the format of rx data returned by acx
++*/
++
++/* I've hoped it's a 802.11 PHY header, but no...
++ * so far, I've seen on acx111:
++ * 0000 3a00 0000 0000 IBSS Beacons
++ * 0000 3c00 0000 0000 ESS Beacons
++ * 0000 2700 0000 0000 Probe requests
++ * --vda
++ */
++typedef struct phy_hdr {
++ u8 unknown[4];
++ u8 acx111_unknown[4];
++} ACX_PACKED phy_hdr_t;
++
++/* seems to be a bit similar to hfa384x_rx_frame.
++ * These fields are still not quite obvious, though.
++ * Some seem to have different meanings... */
++
++#define RXBUF_HDRSIZE 12
++#define RXBUF_BYTES_RCVD(adev, rxbuf) \
++ ((le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0xfff) - (adev)->phy_header_len)
++#define RXBUF_BYTES_USED(rxbuf) \
++ ((le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0xfff) + RXBUF_HDRSIZE)
++/* USBism */
++#define RXBUF_IS_TXSTAT(rxbuf) (le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0x8000)
++/*
++mac_cnt_rcvd:
++ 12 bits: length of frame from control field to first byte of FCS
++ 3 bits: reserved
++ 1 bit: 1 = it's a tx status info, not a rx packet (USB only)
++
++mac_cnt_mblks:
++ 6 bits: number of memory block used to store frame in adapter memory
++ 1 bit: Traffic Indicator bit in TIM of received Beacon was set
++
++mac_status: 1 byte (bitmap):
++ 7 Matching BSSID
++ 6 Matching SSID
++ 5 BDCST Address 1 field is a broadcast
++ 4 VBM received beacon frame has more than one set bit (?!)
++ 3 TIM Set bit representing this station is set in TIM of received beacon
++ 2 GROUP Address 1 is a multicast
++ 1 ADDR1 Address 1 matches our MAC
++ 0 FCSGD FSC is good
++
++phy_stat_baseband: 1 byte (bitmap):
++ 7 Preamble frame had a long preamble
++ 6 PLCP Error CRC16 error in PLCP header
++ 5 Unsup_Mod unsupported modulation
++ 4 Selected Antenna antenna 1 was used to receive this frame
++ 3 PBCC/CCK frame used: 1=PBCC, 0=CCK modulation
++ 2 OFDM frame used OFDM modulation
++ 1 TI Protection protection frame was detected
++ 0 Reserved
++
++phy_plcp_signal: 1 byte:
++ Receive PLCP Signal field from the Baseband Processor
++
++phy_level: 1 byte:
++ receive AGC gain level (can be used to measure receive signal strength)
++
++phy_snr: 1 byte:
++ estimated noise power of equalized receive signal
++ at input of FEC decoder (can be used to measure receive signal quality)
++
++time: 4 bytes:
++ timestamp sampled from either the Access Manager TSF counter
++ or free-running microsecond counter when the MAC receives
++ first byte of PLCP header.
++*/
++
++typedef struct rxbuffer {
++ u16 mac_cnt_rcvd; /* only 12 bits are len! (0xfff) */
++ u8 mac_cnt_mblks;
++ u8 mac_status;
++ u8 phy_stat_baseband; /* bit 0x80: used LNA (Low-Noise Amplifier) */
++ u8 phy_plcp_signal;
++ u8 phy_level; /* PHY stat */
++ u8 phy_snr; /* PHY stat */
++ u32 time; /* timestamp upon MAC rcv first byte */
++/* 4-byte (acx100) or 8-byte (acx111) phy header will be here
++** if RX_CFG1_INCLUDE_PHY_HDR is in effect:
++** phy_hdr_t phy */
++ wlan_hdr_a3_t hdr_a3;
++ /* maximally sized data part of wlan packet */
++ u8 data_a3[WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN];
++ /* can add hdr/data_a4 if needed */
++} ACX_PACKED rxbuffer_t;
++
++
++/*--- Firmware statistics ----------------------------------------------------*/
++
++/* define a random 100 bytes more to catch firmware versions which
++ * provide a bigger struct */
++#define FW_STATS_FUTURE_EXTENSION 100
++
++typedef struct fw_stats_tx {
++ u32 tx_desc_of;
++} ACX_PACKED fw_stats_tx_t;
++
++typedef struct fw_stats_rx {
++ u32 rx_oom;
++ u32 rx_hdr_of;
++ u32 rx_hw_stuck; /* old: u32 rx_hdr_use_next */
++ u32 rx_dropped_frame;
++ u32 rx_frame_ptr_err;
++ u32 rx_xfr_hint_trig;
++ u32 rx_aci_events; /* later versions only */
++ u32 rx_aci_resets; /* later versions only */
++} ACX_PACKED fw_stats_rx_t;
++
++typedef struct fw_stats_dma {
++ u32 rx_dma_req;
++ u32 rx_dma_err;
++ u32 tx_dma_req;
++ u32 tx_dma_err;
++} ACX_PACKED fw_stats_dma_t;
++
++typedef struct fw_stats_irq {
++ u32 cmd_cplt;
++ u32 fiq;
++ u32 rx_hdrs;
++ u32 rx_cmplt;
++ u32 rx_mem_of;
++ u32 rx_rdys;
++ u32 irqs;
++ u32 tx_procs;
++ u32 decrypt_done;
++ u32 dma_0_done;
++ u32 dma_1_done;
++ u32 tx_exch_complet;
++ u32 commands;
++ u32 rx_procs;
++ u32 hw_pm_mode_changes;
++ u32 host_acks;
++ u32 pci_pm;
++ u32 acm_wakeups;
++} ACX_PACKED fw_stats_irq_t;
++
++typedef struct fw_stats_wep {
++ u32 wep_key_count;
++ u32 wep_default_key_count;
++ u32 dot11_def_key_mib;
++ u32 wep_key_not_found;
++ u32 wep_decrypt_fail;
++ u32 wep_pkt_decrypt;
++ u32 wep_decrypt_irqs;
++} ACX_PACKED fw_stats_wep_t;
++
++typedef struct fw_stats_pwr {
++ u32 tx_start_ctr;
++ u32 no_ps_tx_too_short;
++ u32 rx_start_ctr;
++ u32 no_ps_rx_too_short;
++ u32 lppd_started;
++ u32 no_lppd_too_noisy;
++ u32 no_lppd_too_short;
++ u32 no_lppd_matching_frame;
++} ACX_PACKED fw_stats_pwr_t;
++
++typedef struct fw_stats_mic {
++ u32 mic_rx_pkts;
++ u32 mic_calc_fail;
++} ACX_PACKED fw_stats_mic_t;
++
++typedef struct fw_stats_aes {
++ u32 aes_enc_fail;
++ u32 aes_dec_fail;
++ u32 aes_enc_pkts;
++ u32 aes_dec_pkts;
++ u32 aes_enc_irq;
++ u32 aes_dec_irq;
++} ACX_PACKED fw_stats_aes_t;
++
++typedef struct fw_stats_event {
++ u32 heartbeat;
++ u32 calibration;
++ u32 rx_mismatch;
++ u32 rx_mem_empty;
++ u32 rx_pool;
++ u32 oom_late;
++ u32 phy_tx_err;
++ u32 tx_stuck;
++} ACX_PACKED fw_stats_event_t;
++
++/* mainly for size calculation only */
++typedef struct fw_stats {
++ u16 type;
++ u16 len;
++ fw_stats_tx_t tx;
++ fw_stats_rx_t rx;
++ fw_stats_dma_t dma;
++ fw_stats_irq_t irq;
++ fw_stats_wep_t wep;
++ fw_stats_pwr_t pwr;
++ fw_stats_mic_t mic;
++ fw_stats_aes_t aes;
++ fw_stats_event_t evt;
++ u8 _padding[FW_STATS_FUTURE_EXTENSION];
++} fw_stats_t;
++
++/* Firmware version struct */
++
++typedef struct fw_ver {
++ u16 cmd;
++ u16 size;
++ char fw_id[20];
++ u32 hw_id;
++} ACX_PACKED fw_ver_t;
++
++#define FW_ID_SIZE 20
++
++typedef struct shared_queueindicator {
++ u32 indicator;
++ u16 host_lock;
++ u16 fw_lock;
++} ACX_PACKED queueindicator_t;
++
++/*--- WEP stuff --------------------------------------------------------------*/
++#define DOT11_MAX_DEFAULT_WEP_KEYS 4
++
++/* non-firmware struct, no packing necessary */
++typedef struct wep_key {
++ size_t size; /* most often used member first */
++ u8 index;
++ u8 key[29];
++ u16 strange_filler;
++} wep_key_t; /* size = 264 bytes (33*8) */
++/* FIXME: We don't have size 264! Or is there 2 bytes beyond the key
++ * (strange_filler)? */
++
++/* non-firmware struct, no packing necessary */
++typedef struct key_struct {
++ u8 addr[ETH_ALEN]; /* 0x00 */
++ u16 filler1; /* 0x06 */
++ u32 filler2; /* 0x08 */
++ u32 index; /* 0x0c */
++ u16 len; /* 0x10 */
++ u8 key[29]; /* 0x12; is this long enough??? */
++} key_struct_t; /* size = 276. FIXME: where is the remaining space?? */
++
++
++/*--- Client (peer) info -----------------------------------------------------*/
++/* adev->sta_list[] is used for:
++** accumulating and processing of scan results
++** keeping client info in AP mode
++** keeping AP info in STA mode (AP is the only one 'client')
++** keeping peer info in ad-hoc mode
++** non-firmware struct --> no packing necessary */
++enum {
++ CLIENT_EMPTY_SLOT_0 = 0,
++ CLIENT_EXIST_1 = 1,
++ CLIENT_AUTHENTICATED_2 = 2,
++ CLIENT_ASSOCIATED_3 = 3,
++ CLIENT_JOIN_CANDIDATE = 4
++};
++struct client {
++ /* most frequent access first */
++ u8 used; /* misnamed, more like 'status' */
++ struct client* next;
++ unsigned long mtime; /* last time we heard it, in jiffies */
++ size_t essid_len; /* length of ESSID (without '\0') */
++ u32 sir; /* Standard IR */
++ u32 snr; /* Signal to Noise Ratio */
++ u16 aid; /* association ID */
++ u16 seq; /* from client's auth req */
++ u16 auth_alg; /* from client's auth req */
++ u16 cap_info; /* from client's assoc req */
++ u16 rate_cap; /* what client supports (all rates) */
++ u16 rate_bas; /* what client supports (basic rates) */
++ u16 rate_cfg; /* what is allowed (by iwconfig etc) */
++ u16 rate_cur; /* currently used rate mask */
++ u8 rate_100; /* currently used rate byte (acx100 only) */
++ u8 address[ETH_ALEN];
++ u8 bssid[ETH_ALEN]; /* ad-hoc hosts can have bssid != mac */
++ u8 channel;
++ u8 auth_step;
++ u8 ignore_count;
++ u8 fallback_count;
++ u8 stepup_count;
++ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID and trailing '\0' */
++/* FIXME: this one is too damn big */
++ char challenge_text[WLAN_CHALLENGE_LEN];
++};
++
++
++/***********************************************************************
++** Hardware structures
++*/
++
++/* An opaque typesafe helper type
++ *
++ * Some hardware fields are actually pointers,
++ * but they have to remain u32, since using ptr instead
++ * (8 bytes on 64bit systems!) would disrupt the fixed descriptor
++ * format the acx firmware expects in the non-user area.
++ * Since we cannot cram an 8 byte ptr into 4 bytes, we need to
++ * enforce that pointed to data remains in low memory
++ * (address value needs to fit in 4 bytes) on 64bit systems.
++ *
++ * This is easy to get wrong, thus we are using a small struct
++ * and special macros to access it. Macros will check for
++ * attempts to overflow an acx_ptr with value > 0xffffffff.
++ *
++ * Attempts to use acx_ptr without macros result in compile-time errors */
++
++typedef struct {
++ u32 v;
++} ACX_PACKED acx_ptr;
++
++#if ACX_DEBUG
++#define CHECK32(n) BUG_ON(sizeof(n)>4 && (long)(n)>0xffffff00)
++#else
++#define CHECK32(n) ((void)0)
++#endif
++
++/* acx_ptr <-> integer conversion */
++#define cpu2acx(n) ({ CHECK32(n); ((acx_ptr){ .v = cpu_to_le32(n) }); })
++#define acx2cpu(a) (le32_to_cpu(a.v))
++
++/* acx_ptr <-> pointer conversion */
++#define ptr2acx(p) ({ CHECK32(p); ((acx_ptr){ .v = cpu_to_le32((u32)(long)(p)) }); })
++#define acx2ptr(a) ((void*)le32_to_cpu(a.v))
++
++/* Values for rate field (acx100 only) */
++#define RATE100_1 10
++#define RATE100_2 20
++#define RATE100_5 55
++#define RATE100_11 110
++#define RATE100_22 220
++/* This bit denotes use of PBCC:
++** (PBCC encoding is usable with 11 and 22 Mbps speeds only) */
++#define RATE100_PBCC511 0x80
++
++/* Bit values for rate111 field */
++#define RATE111_1 0x0001 /* DBPSK */
++#define RATE111_2 0x0002 /* DQPSK */
++#define RATE111_5 0x0004 /* CCK or PBCC */
++#define RATE111_6 0x0008 /* CCK-OFDM or OFDM */
++#define RATE111_9 0x0010 /* CCK-OFDM or OFDM */
++#define RATE111_11 0x0020 /* CCK or PBCC */
++#define RATE111_12 0x0040 /* CCK-OFDM or OFDM */
++#define RATE111_18 0x0080 /* CCK-OFDM or OFDM */
++#define RATE111_22 0x0100 /* PBCC */
++#define RATE111_24 0x0200 /* CCK-OFDM or OFDM */
++#define RATE111_36 0x0400 /* CCK-OFDM or OFDM */
++#define RATE111_48 0x0800 /* CCK-OFDM or OFDM */
++#define RATE111_54 0x1000 /* CCK-OFDM or OFDM */
++#define RATE111_RESERVED 0x2000
++#define RATE111_PBCC511 0x4000 /* PBCC mod at 5.5 or 11Mbit (else CCK) */
++#define RATE111_SHORTPRE 0x8000 /* short preamble */
++/* Special 'try everything' value */
++#define RATE111_ALL 0x1fff
++/* These bits denote acx100 compatible settings */
++#define RATE111_ACX100_COMPAT 0x0127
++/* These bits denote 802.11b compatible settings */
++#define RATE111_80211B_COMPAT 0x0027
++
++/* Descriptor Ctl field bits
++ * init value is 0x8e, "idle" value is 0x82 (in idle tx descs)
++ */
++#define DESC_CTL_SHORT_PREAMBLE 0x01 /* preamble type: 0 = long; 1 = short */
++#define DESC_CTL_FIRSTFRAG 0x02 /* this is the 1st frag of the frame */
++#define DESC_CTL_AUTODMA 0x04
++#define DESC_CTL_RECLAIM 0x08 /* ready to reuse */
++#define DESC_CTL_HOSTDONE 0x20 /* host has finished processing */
++#define DESC_CTL_ACXDONE 0x40 /* acx has finished processing */
++/* host owns the desc [has to be released last, AFTER modifying all other desc fields!] */
++#define DESC_CTL_HOSTOWN 0x80
++#define DESC_CTL_ACXDONE_HOSTOWN (DESC_CTL_ACXDONE | DESC_CTL_HOSTOWN)
++
++/* Descriptor Status field
++ */
++#define DESC_STATUS_FULL (1 << 31)
++
++/* NB: some bits may be interesting for Monitor mode tx (aka Raw tx): */
++#define DESC_CTL2_SEQ 0x01 /* don't increase sequence field */
++#define DESC_CTL2_FCS 0x02 /* don't add the FCS */
++#define DESC_CTL2_MORE_FRAG 0x04
++#define DESC_CTL2_RETRY 0x08 /* don't increase retry field */
++#define DESC_CTL2_POWER 0x10 /* don't increase power mgmt. field */
++#define DESC_CTL2_RTS 0x20 /* do RTS/CTS magic before sending */
++#define DESC_CTL2_WEP 0x40 /* encrypt this frame */
++#define DESC_CTL2_DUR 0x80 /* don't increase duration field */
++
++/***********************************************************************
++** PCI structures
++*/
++/* IRQ Constants
++** (outside of "#ifdef PCI" because USB (mis)uses HOST_INT_SCAN_COMPLETE) */
++#define HOST_INT_RX_DATA 0x0001
++#define HOST_INT_TX_COMPLETE 0x0002
++#define HOST_INT_TX_XFER 0x0004
++#define HOST_INT_RX_COMPLETE 0x0008
++#define HOST_INT_DTIM 0x0010
++#define HOST_INT_BEACON 0x0020
++#define HOST_INT_TIMER 0x0040
++#define HOST_INT_KEY_NOT_FOUND 0x0080
++#define HOST_INT_IV_ICV_FAILURE 0x0100
++#define HOST_INT_CMD_COMPLETE 0x0200
++#define HOST_INT_INFO 0x0400
++#define HOST_INT_OVERFLOW 0x0800
++#define HOST_INT_PROCESS_ERROR 0x1000
++#define HOST_INT_SCAN_COMPLETE 0x2000
++#define HOST_INT_FCS_THRESHOLD 0x4000
++#define HOST_INT_UNKNOWN 0x8000
++
++/* Outside of "#ifdef PCI" because USB needs to know sizeof()
++** of txdesc and rxdesc: */
++struct txdesc {
++ acx_ptr pNextDesc; /* pointer to next txdesc */
++ acx_ptr HostMemPtr; /* 0x04 */
++ acx_ptr AcxMemPtr; /* 0x08 */
++ u32 tx_time; /* 0x0c */
++ u16 total_length; /* 0x10 */
++ u16 Reserved; /* 0x12 */
++
++/* The following 16 bytes do not change when acx100 owns the descriptor */
++/* BUG: fw clears last byte of this area which is supposedly reserved
++** for driver use. amd64 blew up. We dare not use it now */
++ u32 dummy[4];
++
++ u8 Ctl_8; /* 0x24, 8bit value */
++ u8 Ctl2_8; /* 0x25, 8bit value */
++ u8 error; /* 0x26 */
++ u8 ack_failures; /* 0x27 */
++
++ union {
++ /*
++ * Packing doesn't work correctly on ARM unless unions are on
++ * 4 byte boundaries.
++ */
++ struct {
++ u8 rts_failures; /* 0x28 */
++ u8 rts_ok; /* 0x29 */
++ u16 d1;
++ } ACX_PACKED rts;
++ struct {
++ u16 d1;
++ u8 rate; /* 0x2a */
++ u8 queue_ctrl; /* 0x2b */
++ } ACX_PACKED r1;
++ struct {
++ u16 d1;
++ u16 rate111; /* 0x2a */
++ } ACX_PACKED r2;
++ } ACX_PACKED u;
++ u32 queue_info; /* 0x2c (acx100, reserved on acx111) */
++} ACX_PACKED; /* size : 48 = 0x30 */
++/* NB: acx111 txdesc structure is 4 byte larger */
++/* All these 4 extra bytes are reserved. tx alloc code takes them into account */
++
++struct rxdesc {
++ acx_ptr pNextDesc; /* 0x00 */
++ acx_ptr HostMemPtr; /* 0x04 */
++ acx_ptr ACXMemPtr; /* 0x08 */
++ u32 rx_time; /* 0x0c */
++ u16 total_length; /* 0x10 */
++ u16 WEP_length; /* 0x12 */
++ u32 WEP_ofs; /* 0x14 */
++
++/* the following 16 bytes do not change when acx100 owns the descriptor */
++ u8 driverWorkspace[16]; /* 0x18 */
++
++ u8 Ctl_8;
++ u8 rate;
++ u8 error;
++ u8 SNR; /* Signal-to-Noise Ratio */
++ u8 RxLevel;
++ u8 queue_ctrl;
++ u16 unknown;
++ u32 unknown2;
++} ACX_PACKED; /* size 52 = 0x34 */
++
++#if defined(ACX_PCI) || defined(ACX_MEM)
++
++/* Register I/O offsets */
++#define ACX100_EEPROM_ID_OFFSET 0x380
++
++/* please add further ACX hardware register definitions only when
++ it turns out you need them in the driver, and please try to use
++ firmware functionality instead, since using direct I/O access instead
++ of letting the firmware do it might confuse the firmware's state
++ machine */
++
++/* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
++** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
++enum {
++ IO_ACX_SOFT_RESET = 0,
++
++ IO_ACX_SLV_MEM_ADDR,
++ IO_ACX_SLV_MEM_DATA,
++ IO_ACX_SLV_MEM_CTL,
++ IO_ACX_SLV_END_CTL,
++
++ IO_ACX_FEMR, /* Function Event Mask */
++
++ IO_ACX_INT_TRIG,
++ IO_ACX_IRQ_MASK,
++ IO_ACX_IRQ_STATUS_NON_DES,
++ IO_ACX_IRQ_STATUS_CLEAR, /* CLEAR = clear on read */
++ IO_ACX_IRQ_ACK,
++ IO_ACX_HINT_TRIG,
++
++ IO_ACX_ENABLE,
++
++ IO_ACX_EEPROM_CTL,
++ IO_ACX_EEPROM_ADDR,
++ IO_ACX_EEPROM_DATA,
++ IO_ACX_EEPROM_CFG,
++
++ IO_ACX_PHY_ADDR,
++ IO_ACX_PHY_DATA,
++ IO_ACX_PHY_CTL,
++
++ IO_ACX_GPIO_OE,
++
++ IO_ACX_GPIO_OUT,
++
++ IO_ACX_CMD_MAILBOX_OFFS,
++ IO_ACX_INFO_MAILBOX_OFFS,
++ IO_ACX_EEPROM_INFORMATION,
++
++ IO_ACX_EE_START,
++ IO_ACX_SOR_CFG,
++ IO_ACX_ECPU_CTRL
++};
++/* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
++** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
++
++/* Values for IO_ACX_INT_TRIG register: */
++/* inform hw that rxdesc in queue needs processing */
++#define INT_TRIG_RXPRC 0x08
++/* inform hw that txdesc in queue needs processing */
++#define INT_TRIG_TXPRC 0x04
++/* ack that we received info from info mailbox */
++#define INT_TRIG_INFOACK 0x02
++/* inform hw that we have filled command mailbox */
++#define INT_TRIG_CMD 0x01
++
++struct txhostdesc {
++ acx_ptr data_phy; /* 0x00 [u8 *] */
++ u16 data_offset; /* 0x04 */
++ u16 reserved; /* 0x06 */
++ u16 Ctl_16; /* 16bit value, endianness!! */
++ u16 length; /* 0x0a */
++ acx_ptr desc_phy_next; /* 0x0c [txhostdesc *] */
++ acx_ptr pNext; /* 0x10 [txhostdesc *] */
++ u32 Status; /* 0x14, unused on Tx */
++/* From here on you can use this area as you want (variable length, too!) */
++ u8 *data;
++} ACX_PACKED;
++
++struct rxhostdesc {
++ acx_ptr data_phy; /* 0x00 [rxbuffer_t *] */
++ u16 data_offset; /* 0x04 */
++ u16 reserved; /* 0x06 */
++ u16 Ctl_16; /* 0x08; 16bit value, endianness!! */
++ u16 length; /* 0x0a */
++ acx_ptr desc_phy_next; /* 0x0c [rxhostdesc_t *] */
++ acx_ptr pNext; /* 0x10 [rxhostdesc_t *] */
++ u32 Status; /* 0x14 */
++/* From here on you can use this area as you want (variable length, too!) */
++ rxbuffer_t *data;
++} ACX_PACKED;
++
++#endif /* ACX_PCI */
++
++/***********************************************************************
++** USB structures and constants
++*/
++#ifdef ACX_USB
++
++/* Used for usb_txbuffer.desc field */
++#define USB_TXBUF_TXDESC 0xA
++/* Size of header (everything up to data[]) */
++#define USB_TXBUF_HDRSIZE 14
++typedef struct usb_txbuffer {
++ u16 desc;
++ u16 mpdu_len;
++ u8 queue_index;
++ u8 rate;
++ u32 hostdata;
++ u8 ctrl1;
++ u8 ctrl2;
++ u16 data_len;
++ /* wlan packet content is placed here: */
++ u8 data[WLAN_A4FR_MAXLEN_WEP_FCS];
++} ACX_PACKED usb_txbuffer_t;
++
++/* USB returns either rx packets (see rxbuffer) or
++** these "tx status" structs: */
++typedef struct usb_txstatus {
++ u16 mac_cnt_rcvd; /* only 12 bits are len! (0xfff) */
++ u8 queue_index;
++ u8 mac_status; /* seen 0x20 on tx failure */
++ u32 hostdata;
++ u8 rate;
++ u8 ack_failures;
++ u8 rts_failures;
++ u8 rts_ok;
++} ACX_PACKED usb_txstatus_t;
++
++typedef struct usb_tx {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ /* actual USB bulk output data block is here: */
++ usb_txbuffer_t bulkout;
++} usb_tx_t;
++
++struct usb_rx_plain {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ rxbuffer_t bulkin;
++};
++
++typedef struct usb_rx {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ rxbuffer_t bulkin;
++ /* Make entire structure 4k. Report if it breaks something. */
++ u8 padding[4*1024 - sizeof(struct usb_rx_plain)];
++} usb_rx_t;
++#endif /* ACX_USB */
++
++
++/* Config Option structs */
++
++typedef struct co_antennas {
++ u8 type;
++ u8 len;
++ u8 list[2];
++} ACX_PACKED co_antennas_t;
++
++typedef struct co_powerlevels {
++ u8 type;
++ u8 len;
++ u16 list[8];
++} ACX_PACKED co_powerlevels_t;
++
++typedef struct co_datarates {
++ u8 type;
++ u8 len;
++ u8 list[8];
++} ACX_PACKED co_datarates_t;
++
++typedef struct co_domains {
++ u8 type;
++ u8 len;
++ u8 list[6];
++} ACX_PACKED co_domains_t;
++
++typedef struct co_product_id {
++ u8 type;
++ u8 len;
++ u8 list[128];
++} ACX_PACKED co_product_id_t;
++
++typedef struct co_manuf_id {
++ u8 type;
++ u8 len;
++ u8 list[128];
++} ACX_PACKED co_manuf_t;
++
++typedef struct co_fixed {
++ char NVSv[8];
++/* u16 NVS_vendor_offs; ACX111-only */
++/* u16 unknown; ACX111-only */
++ u8 MAC[6]; /* ACX100-only */
++ u16 probe_delay; /* ACX100-only */
++ u32 eof_memory;
++ u8 dot11CCAModes;
++ u8 dot11Diversity;
++ u8 dot11ShortPreambleOption;
++ u8 dot11PBCCOption;
++ u8 dot11ChannelAgility;
++ u8 dot11PhyType; /* FIXME: does 802.11 call it "dot11PHYType"? */
++ u8 dot11TempType;
++ u8 table_count;
++} ACX_PACKED co_fixed_t;
++
++typedef struct acx111_ie_configoption {
++ u16 type;
++ u16 len;
++/* Do not access below members directly, they are in fact variable length */
++ co_fixed_t fixed;
++ co_antennas_t antennas;
++ co_powerlevels_t power_levels;
++ co_datarates_t data_rates;
++ co_domains_t domains;
++ co_product_id_t product_id;
++ co_manuf_t manufacturer;
++ u8 _padding[4];
++} ACX_PACKED acx111_ie_configoption_t;
++
++
++/***********************************************************************
++** Main acx per-device data structure
++*/
++#define ACX_STATE_FW_LOADED 0x01
++#define ACX_STATE_IFACE_UP 0x02
++
++/* MAC mode (BSS type) defines
++ * Note that they shouldn't be redefined, since they are also used
++ * during communication with firmware */
++#define ACX_MODE_0_ADHOC 0
++#define ACX_MODE_1_UNUSED 1
++#define ACX_MODE_2_STA 2
++#define ACX_MODE_3_AP 3
++/* These are our own inventions. Sending these to firmware
++** makes it stop emitting beacons, which is exactly what we want
++** for these modes */
++#define ACX_MODE_MONITOR 0xfe
++#define ACX_MODE_OFF 0xff
++/* 'Submode': identifies exact status of ADHOC/STA host */
++#define ACX_STATUS_0_STOPPED 0
++#define ACX_STATUS_1_SCANNING 1
++#define ACX_STATUS_2_WAIT_AUTH 2
++#define ACX_STATUS_3_AUTHENTICATED 3
++#define ACX_STATUS_4_ASSOCIATED 4
++
++/* FIXME: this should be named something like struct acx_priv (typedef'd to
++ * acx_priv_t) */
++
++/* non-firmware struct, no packing necessary */
++struct acx_device {
++ /* most frequent accesses first (dereferencing and cache line!) */
++
++ /*** Locking ***/
++ /* FIXME: try to convert semaphore to more efficient mutex according
++ to Ingo Molnar's docs (but not before driver is in mainline or
++ pre-mutex Linux 2.6.10 is very outdated). */
++ struct semaphore sem;
++ spinlock_t lock;
++#if defined(PARANOID_LOCKING) /* Lock debugging */
++ const char *last_sem;
++ const char *last_lock;
++ unsigned long sem_time;
++ unsigned long lock_time;
++#endif
++#ifdef ACX_MEM
++ spinlock_t txbuf_lock;
++#endif
++
++ /*** Linux network device ***/
++ struct net_device *ndev; /* pointer to linux netdevice */
++
++ /*** Device statistics ***/
++ struct net_device_stats stats; /* net device statistics */
++#ifdef WIRELESS_EXT
++ struct iw_statistics wstats; /* wireless statistics */
++#endif
++ /*** Power managment ***/
++ struct pm_dev *pm; /* PM crap */
++
++ /*** Management timer ***/
++ struct timer_list mgmt_timer;
++
++ /*** Hardware identification ***/
++ const char *chip_name;
++ u8 dev_type;
++ u8 chip_type;
++ u8 form_factor;
++ u8 radio_type;
++ u8 eeprom_version;
++
++ /*** Config retrieved from EEPROM ***/
++ char cfgopt_NVSv[8];
++ u16 cfgopt_NVS_vendor_offs;
++ u8 cfgopt_MAC[6];
++ u16 cfgopt_probe_delay;
++ u32 cfgopt_eof_memory;
++ u8 cfgopt_dot11CCAModes;
++ u8 cfgopt_dot11Diversity;
++ u8 cfgopt_dot11ShortPreambleOption;
++ u8 cfgopt_dot11PBCCOption;
++ u8 cfgopt_dot11ChannelAgility;
++ u8 cfgopt_dot11PhyType;
++ u8 cfgopt_dot11TempType;
++ co_antennas_t cfgopt_antennas;
++ co_powerlevels_t cfgopt_power_levels;
++ co_datarates_t cfgopt_data_rates;
++ co_domains_t cfgopt_domains;
++ co_product_id_t cfgopt_product_id;
++ co_manuf_t cfgopt_manufacturer;
++
++ /*** Firmware identification ***/
++ char firmware_version[FW_ID_SIZE+1];
++ u32 firmware_numver;
++ u32 firmware_id;
++ const u16 *ie_len;
++ const u16 *ie_len_dot11;
++
++ /*** Device state ***/
++ u16 dev_state_mask;
++ u8 led_power; /* power LED status */
++ u32 get_mask; /* mask of settings to fetch from the card */
++ u32 set_mask; /* mask of settings to write to the card */
++
++ /* Barely used in USB case */
++ u16 irq_status;
++
++ u8 after_interrupt_jobs; /* mini job list for doing actions after an interrupt occurred */
++ WORK_STRUCT after_interrupt_task; /* our task for after interrupt actions */
++
++ /*** scanning ***/
++ u16 scan_count; /* number of times to do channel scan */
++ u8 scan_mode; /* 0 == active, 1 == passive, 2 == background */
++ u8 scan_rate;
++ u16 scan_duration;
++ u16 scan_probe_delay;
++#if WIRELESS_EXT > 15
++ struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
++#endif
++
++ /*** Wireless network settings ***/
++ /* copy of the device address (ifconfig hw ether) that we actually use
++ ** for 802.11; copied over from the network device's MAC address
++ ** (ifconfig) when it makes sense only */
++ u8 dev_addr[MAX_ADDR_LEN];
++ u8 bssid[ETH_ALEN]; /* the BSSID after having joined */
++ u8 ap[ETH_ALEN]; /* The AP we want, FF:FF:FF:FF:FF:FF is any */
++ u16 aid; /* The Association ID sent from the AP / last used AID if we're an AP */
++ u16 mode; /* mode from iwconfig */
++ int monitor_type; /* ARPHRD_IEEE80211 or ARPHRD_IEEE80211_PRISM */
++ u16 status; /* 802.11 association status */
++ u8 essid_active; /* specific ESSID active, or select any? */
++ u8 essid_len; /* to avoid dozens of strlen() */
++ /* INCLUDES \0 termination for easy printf - but many places
++ ** simply want the string data memcpy'd plus a length indicator!
++ ** Keep that in mind... */
++ char essid[IW_ESSID_MAX_SIZE+1];
++ /* essid we are going to use for association, in case of "essid 'any'"
++ ** and in case of hidden ESSID (use configured ESSID then) */
++ char essid_for_assoc[IW_ESSID_MAX_SIZE+1];
++ char nick[IW_ESSID_MAX_SIZE+1]; /* see essid! */
++ u8 channel;
++ u8 reg_dom_id; /* reg domain setting */
++ u16 reg_dom_chanmask;
++ u16 auth_or_assoc_retries;
++ u16 scan_retries;
++ unsigned long scan_start; /* YES, jiffies is defined as "unsigned long" */
++
++ /* stations known to us (if we're an ap) */
++ client_t sta_list[32]; /* tab is larger than list, so that */
++ client_t *sta_hash_tab[64]; /* hash collisions are not likely */
++ client_t *ap_client; /* this one is our AP (STA mode only) */
++
++ int dup_count;
++ int nondup_count;
++ unsigned long dup_msg_expiry;
++ u16 last_seq_ctrl; /* duplicate packet detection */
++
++ /* 802.11 power save mode */
++ u8 ps_wakeup_cfg;
++ u8 ps_listen_interval;
++ u8 ps_options;
++ u8 ps_hangover_period;
++ u32 ps_enhanced_transition_time;
++ u32 ps_beacon_rx_time;
++
++ /*** PHY settings ***/
++ u8 fallback_threshold;
++ u8 stepup_threshold;
++ u16 rate_basic;
++ u16 rate_oper;
++ u16 rate_bcast;
++ u16 rate_bcast100;
++ u8 rate_auto; /* false if "iwconfig rate N" (WITHOUT 'auto'!) */
++ u8 preamble_mode; /* 0 == Long Preamble, 1 == Short, 2 == Auto */
++ u8 preamble_cur;
++
++ u8 tx_disabled;
++ u8 tx_level_dbm;
++ /* u8 tx_level_val; */
++ /* u8 tx_level_auto; whether to do automatic power adjustment */
++
++ unsigned long recalib_time_last_success;
++ unsigned long recalib_time_last_attempt;
++ int recalib_failure_count;
++ int recalib_msg_ratelimit;
++ int retry_errors_msg_ratelimit;
++
++ unsigned long brange_time_last_state_change; /* time the power LED was last changed */
++ u8 brange_last_state; /* last state of the LED */
++ u8 brange_max_quality; /* maximum quality that equates to full speed */
++
++ u8 sensitivity;
++ u8 antenna; /* antenna settings */
++ u8 ed_threshold; /* energy detect threshold */
++ u8 cca; /* clear channel assessment */
++
++ u16 rts_threshold;
++ u16 frag_threshold;
++ u32 short_retry;
++ u32 long_retry;
++ u16 msdu_lifetime;
++ u16 listen_interval; /* given in units of beacon interval */
++ u32 beacon_interval;
++
++ u16 capabilities;
++ u8 rate_supported_len;
++ u8 rate_supported[13];
++
++ /*** Encryption settings (WEP) ***/
++ u32 auth_alg; /* used in transmit_authen1 */
++ u8 wep_enabled;
++ u8 wep_restricted;
++ u8 wep_current_index;
++ wep_key_t wep_keys[DOT11_MAX_DEFAULT_WEP_KEYS]; /* the default WEP keys */
++ key_struct_t wep_key_struct[10];
++
++ /*** Unknown ***/
++ u8 dtim_interval;
++
++#ifdef ACX_MEM
++ u32 acx_txbuf_start;
++ int acx_txbuf_numblocks;
++ u32 acx_txbuf_free; /* addr of head of free list */
++ int acx_txbuf_blocks_free; /* how many are still open */
++ queueindicator_t *acx_queue_indicator;
++#endif
++
++ /*** Card Rx/Tx management ***/
++ u16 rx_config_1;
++ u16 rx_config_2;
++ u16 memblocksize;
++ unsigned int tx_free;
++ unsigned int tx_head; /* keep as close as possible to Tx stuff below (cache line) */
++ u16 phy_header_len;
++
++/*************************************************************************
++ *** PCI/USB/... must be last or else hw agnostic code breaks horribly ***
++ *************************************************************************/
++
++ /* hack to let common code compile. FIXME */
++ dma_addr_t rxhostdesc_startphy;
++
++ /*** PCI stuff ***/
++#if defined(ACX_PCI) || defined(ACX_MEM)
++ /* pointers to tx buffers, tx host descriptors (in host memory)
++ ** and tx descs in device memory */
++ unsigned int tx_tail;
++ u8 *txbuf_start;
++ txhostdesc_t *txhostdesc_start;
++ txdesc_t *txdesc_start; /* points to PCI-mapped memory */
++ dma_addr_t txbuf_startphy;
++ dma_addr_t txhostdesc_startphy;
++ /* sizes of above host memory areas */
++ unsigned int txbuf_area_size;
++ unsigned int txhostdesc_area_size;
++
++ unsigned int txdesc_size; /* size of txdesc; ACX111 = ACX100 + 4 */
++ client_t *txc[TX_CNT];
++ u16 txr[TX_CNT];
++
++ /* same for rx */
++ unsigned int rx_tail;
++ rxbuffer_t *rxbuf_start;
++ rxhostdesc_t *rxhostdesc_start;
++ rxdesc_t *rxdesc_start;
++ /* physical addresses of above host memory areas */
++ dma_addr_t rxbuf_startphy;
++ /* dma_addr_t rxhostdesc_startphy; */
++ unsigned int rxbuf_area_size;
++ unsigned int rxhostdesc_area_size;
++
++ u8 need_radio_fw;
++ u8 irqs_active; /* whether irq sending is activated */
++
++ const u16 *io; /* points to ACX100 or ACX111 PCI I/O register address set */
++
++#ifdef ACX_PCI
++ struct pci_dev *pdev;
++#endif
++#ifdef ACX_MEM
++ struct device *dev;
++#endif
++
++#ifdef ACX_PCI
++ unsigned long membase;
++#endif
++#ifdef ACX_MEM
++ volatile u32 *membase;
++#endif
++ unsigned long membase2;
++#ifdef ACX_PCI
++ void __iomem *iobase;
++#endif
++#ifdef ACX_MEM
++ volatile u32 *iobase;
++#endif
++ void __iomem *iobase2;
++ /* command interface */
++ u8 __iomem *cmd_area;
++ u8 __iomem *info_area;
++
++ u16 irq_mask; /* interrupt types to mask out (not wanted) with many IRQs activated */
++ u16 irq_mask_off; /* interrupt types to mask out (not wanted) with IRQs off */
++ unsigned int irq_loops_this_jiffy;
++ unsigned long irq_last_jiffies;
++#endif
++
++ /*** USB stuff ***/
++#ifdef ACX_USB
++ struct usb_device *usbdev;
++
++ rxbuffer_t rxtruncbuf;
++
++ usb_tx_t *usb_tx;
++ usb_rx_t *usb_rx;
++
++ int bulkinep; /* bulk-in endpoint */
++ int bulkoutep; /* bulk-out endpoint */
++ int rxtruncsize;
++#endif
++
++};
++
++static inline acx_device_t*
++ndev2adev(struct net_device *ndev)
++{
++ return netdev_priv(ndev);
++}
++
++
++/* For use with ACX1xx_IE_RXCONFIG */
++/* bit description
++ * 13 include additional header (length etc.) *required*
++ * struct is defined in 'struct rxbuffer'
++ * is this bit acx100 only? does acx111 always put the header,
++ * and bit setting is irrelevant? --vda
++ * 10 receive frames only with SSID used in last join cmd
++ * 9 discard broadcast
++ * 8 receive packets for multicast address 1
++ * 7 receive packets for multicast address 0
++ * 6 discard all multicast packets
++ * 5 discard frames from foreign BSSID
++ * 4 discard frames with foreign destination MAC address
++ * 3 promiscuous mode (receive ALL frames, disable filter)
++ * 2 include FCS
++ * 1 include phy header
++ * 0 ???
++ */
++#define RX_CFG1_INCLUDE_RXBUF_HDR 0x2000 /* ACX100 only */
++#define RX_CFG1_FILTER_SSID 0x0400
++#define RX_CFG1_FILTER_BCAST 0x0200
++#define RX_CFG1_RCV_MC_ADDR1 0x0100
++#define RX_CFG1_RCV_MC_ADDR0 0x0080
++#define RX_CFG1_FILTER_ALL_MULTI 0x0040
++#define RX_CFG1_FILTER_BSSID 0x0020
++#define RX_CFG1_FILTER_MAC 0x0010
++#define RX_CFG1_RCV_PROMISCUOUS 0x0008
++#define RX_CFG1_INCLUDE_FCS 0x0004
++#define RX_CFG1_INCLUDE_PHY_HDR (WANT_PHY_HDR ? 0x0002 : 0)
++/* bit description
++ * 11 receive association requests etc.
++ * 10 receive authentication frames
++ * 9 receive beacon frames
++ * 8 receive contention free packets
++ * 7 receive control frames
++ * 6 receive data frames
++ * 5 receive broken frames
++ * 4 receive management frames
++ * 3 receive probe requests
++ * 2 receive probe responses
++ * 1 receive RTS/CTS/ACK frames
++ * 0 receive other
++ */
++#define RX_CFG2_RCV_ASSOC_REQ 0x0800
++#define RX_CFG2_RCV_AUTH_FRAMES 0x0400
++#define RX_CFG2_RCV_BEACON_FRAMES 0x0200
++#define RX_CFG2_RCV_CONTENTION_FREE 0x0100
++#define RX_CFG2_RCV_CTRL_FRAMES 0x0080
++#define RX_CFG2_RCV_DATA_FRAMES 0x0040
++#define RX_CFG2_RCV_BROKEN_FRAMES 0x0020
++#define RX_CFG2_RCV_MGMT_FRAMES 0x0010
++#define RX_CFG2_RCV_PROBE_REQ 0x0008
++#define RX_CFG2_RCV_PROBE_RESP 0x0004
++#define RX_CFG2_RCV_ACK_FRAMES 0x0002
++#define RX_CFG2_RCV_OTHER 0x0001
++
++/* For use with ACX1xx_IE_FEATURE_CONFIG */
++#define FEATURE1_80MHZ_CLOCK 0x00000040L
++#define FEATURE1_4X 0x00000020L
++#define FEATURE1_LOW_RX 0x00000008L
++#define FEATURE1_EXTRA_LOW_RX 0x00000001L
++
++#define FEATURE2_SNIFFER 0x00000080L
++#define FEATURE2_NO_TXCRYPT 0x00000001L
++
++/*-- get and set mask values --*/
++#define GETSET_LED_POWER 0x00000001L
++#define GETSET_STATION_ID 0x00000002L
++#define SET_TEMPLATES 0x00000004L
++#define SET_STA_LIST 0x00000008L
++#define GETSET_TX 0x00000010L
++#define GETSET_RX 0x00000020L
++#define SET_RXCONFIG 0x00000040L
++#define GETSET_ANTENNA 0x00000080L
++#define GETSET_SENSITIVITY 0x00000100L
++#define GETSET_TXPOWER 0x00000200L
++#define GETSET_ED_THRESH 0x00000400L
++#define GETSET_CCA 0x00000800L
++#define GETSET_POWER_80211 0x00001000L
++#define GETSET_RETRY 0x00002000L
++#define GETSET_REG_DOMAIN 0x00004000L
++#define GETSET_CHANNEL 0x00008000L
++/* Used when ESSID changes etc and we need to scan for AP anew */
++#define GETSET_RESCAN 0x00010000L
++#define GETSET_MODE 0x00020000L
++#define GETSET_WEP 0x00040000L
++#define SET_WEP_OPTIONS 0x00080000L
++#define SET_MSDU_LIFETIME 0x00100000L
++#define SET_RATE_FALLBACK 0x00200000L
++
++/* keep in sync with the above */
++#define GETSET_ALL (0 \
++/* GETSET_LED_POWER */ | 0x00000001L \
++/* GETSET_STATION_ID */ | 0x00000002L \
++/* SET_TEMPLATES */ | 0x00000004L \
++/* SET_STA_LIST */ | 0x00000008L \
++/* GETSET_TX */ | 0x00000010L \
++/* GETSET_RX */ | 0x00000020L \
++/* SET_RXCONFIG */ | 0x00000040L \
++/* GETSET_ANTENNA */ | 0x00000080L \
++/* GETSET_SENSITIVITY */| 0x00000100L \
++/* GETSET_TXPOWER */ | 0x00000200L \
++/* GETSET_ED_THRESH */ | 0x00000400L \
++/* GETSET_CCA */ | 0x00000800L \
++/* GETSET_POWER_80211 */| 0x00001000L \
++/* GETSET_RETRY */ | 0x00002000L \
++/* GETSET_REG_DOMAIN */ | 0x00004000L \
++/* GETSET_CHANNEL */ | 0x00008000L \
++/* GETSET_RESCAN */ | 0x00010000L \
++/* GETSET_MODE */ | 0x00020000L \
++/* GETSET_WEP */ | 0x00040000L \
++/* SET_WEP_OPTIONS */ | 0x00080000L \
++/* SET_MSDU_LIFETIME */ | 0x00100000L \
++/* SET_RATE_FALLBACK */ | 0x00200000L \
++ )
++
++
++/***********************************************************************
++** Firmware loading
++*/
++#include <linux/firmware.h> /* request_firmware() */
++#include <linux/pci.h> /* struct pci_device */
++
++
++/***********************************************************************
++*/
++typedef struct acx100_ie_memblocksize {
++ u16 type;
++ u16 len;
++ u16 size;
++} ACX_PACKED acx100_ie_memblocksize_t;
++
++typedef struct acx100_ie_queueconfig {
++ u16 type;
++ u16 len;
++ u32 AreaSize;
++ u32 RxQueueStart;
++ u8 QueueOptions;
++ u8 NumTxQueues;
++ u8 NumRxDesc; /* for USB only */
++ u8 pad1;
++ u32 QueueEnd;
++ u32 HostQueueEnd; /* QueueEnd2 */
++ u32 TxQueueStart;
++ u8 TxQueuePri;
++ u8 NumTxDesc;
++ u16 pad2;
++} ACX_PACKED acx100_ie_queueconfig_t;
++
++typedef struct acx111_ie_queueconfig {
++ u16 type;
++ u16 len;
++ u32 tx_memory_block_address;
++ u32 rx_memory_block_address;
++ u32 rx1_queue_address;
++ u32 reserved1;
++ u32 tx1_queue_address;
++ u8 tx1_attributes;
++ u16 reserved2;
++ u8 reserved3;
++} ACX_PACKED acx111_ie_queueconfig_t;
++
++typedef struct acx100_ie_memconfigoption {
++ u16 type;
++ u16 len;
++ u32 DMA_config;
++ acx_ptr pRxHostDesc;
++ u32 rx_mem;
++ u32 tx_mem;
++ u16 RxBlockNum;
++ u16 TxBlockNum;
++} ACX_PACKED acx100_ie_memconfigoption_t;
++
++typedef struct acx111_ie_memoryconfig {
++ u16 type;
++ u16 len;
++ u16 no_of_stations;
++ u16 memory_block_size;
++ u8 tx_rx_memory_block_allocation;
++ u8 count_rx_queues;
++ u8 count_tx_queues;
++ u8 options;
++ u8 fragmentation;
++ u16 reserved1;
++ u8 reserved2;
++
++ /* start of rx1 block */
++ u8 rx_queue1_count_descs;
++ u8 rx_queue1_reserved1;
++ u8 rx_queue1_type; /* must be set to 7 */
++ u8 rx_queue1_prio; /* must be set to 0 */
++ acx_ptr rx_queue1_host_rx_start;
++ /* end of rx1 block */
++
++ /* start of tx1 block */
++ u8 tx_queue1_count_descs;
++ u8 tx_queue1_reserved1;
++ u8 tx_queue1_reserved2;
++ u8 tx_queue1_attributes;
++ /* end of tx1 block */
++} ACX_PACKED acx111_ie_memoryconfig_t;
++
++typedef struct acx_ie_memmap {
++ u16 type;
++ u16 len;
++ u32 CodeStart;
++ u32 CodeEnd;
++ u32 WEPCacheStart;
++ u32 WEPCacheEnd;
++ u32 PacketTemplateStart;
++ u32 PacketTemplateEnd;
++ u32 QueueStart;
++ u32 QueueEnd;
++ u32 PoolStart;
++ u32 PoolEnd;
++} ACX_PACKED acx_ie_memmap_t;
++
++typedef struct acx111_ie_feature_config {
++ u16 type;
++ u16 len;
++ u32 feature_options;
++ u32 data_flow_options;
++} ACX_PACKED acx111_ie_feature_config_t;
++
++typedef struct acx111_ie_tx_level {
++ u16 type;
++ u16 len;
++ u8 level;
++} ACX_PACKED acx111_ie_tx_level_t;
++
++#define PS_CFG_ENABLE 0x80
++#define PS_CFG_PENDING 0x40 /* status flag when entering PS */
++#define PS_CFG_WAKEUP_MODE_MASK 0x07
++#define PS_CFG_WAKEUP_BY_HOST 0x03
++#define PS_CFG_WAKEUP_EACH_ITVL 0x02
++#define PS_CFG_WAKEUP_ON_DTIM 0x01
++#define PS_CFG_WAKEUP_ALL_BEAC 0x00
++
++/* Enhanced PS mode: sleep until Rx Beacon w/ the STA's AID bit set
++** in the TIM; newer firmwares only(?) */
++#define PS_OPT_ENA_ENHANCED_PS 0x04
++#define PS_OPT_TX_PSPOLL 0x02 /* send PSPoll frame to fetch waiting frames from AP (on frame with matching AID) */
++#define PS_OPT_STILL_RCV_BCASTS 0x01
++
++typedef struct acx100_ie_powersave {
++ u16 type;
++ u16 len;
++ u8 wakeup_cfg;
++ u8 listen_interval; /* for EACH_ITVL: wake up every "beacon units" interval */
++ u8 options;
++ u8 hangover_period; /* remaining wake time after Tx MPDU w/ PS bit, in values of 1/1024 seconds */
++ u16 enhanced_ps_transition_time; /* rem. wake time for Enh. PS */
++} ACX_PACKED acx100_ie_powersave_t;
++
++typedef struct acx111_ie_powersave {
++ u16 type;
++ u16 len;
++ u8 wakeup_cfg;
++ u8 listen_interval; /* for EACH_ITVL: wake up every "beacon units" interval */
++ u8 options;
++ u8 hangover_period; /* remaining wake time after Tx MPDU w/ PS bit, in values of 1/1024 seconds */
++ u32 beacon_rx_time;
++ u32 enhanced_ps_transition_time; /* rem. wake time for Enh. PS */
++} ACX_PACKED acx111_ie_powersave_t;
++
++
++/***********************************************************************
++** Commands and template structures
++*/
++
++/*
++** SCAN command structure
++**
++** even though acx100 scan rates match RATE100 constants,
++** acx111 ones do not match! Therefore we do not use RATE100 #defines */
++#define ACX_SCAN_RATE_1 10
++#define ACX_SCAN_RATE_2 20
++#define ACX_SCAN_RATE_5 55
++#define ACX_SCAN_RATE_11 110
++#define ACX_SCAN_RATE_22 220
++#define ACX_SCAN_RATE_PBCC 0x80 /* OR with this if needed */
++#define ACX_SCAN_OPT_ACTIVE 0x00 /* a bit mask */
++#define ACX_SCAN_OPT_PASSIVE 0x01
++/* Background scan: we go into Power Save mode (by transmitting
++** NULL data frame to AP with the power mgmt bit set), do the scan,
++** and then exit Power Save mode. A plus is that AP buffers frames
++** for us while we do background scan. Thus we avoid frame losses.
++** Background scan can be active or passive, just like normal one */
++#define ACX_SCAN_OPT_BACKGROUND 0x02
++typedef struct acx100_scan {
++ u16 count; /* number of scans to do, 0xffff == continuous */
++ u16 start_chan;
++ u16 flags; /* channel list mask; 0x8000 == all channels? */
++ u8 max_rate; /* max. probe rate */
++ u8 options; /* bit mask, see defines above */
++ u16 chan_duration;
++ u16 max_probe_delay;
++} ACX_PACKED acx100_scan_t; /* length 0xc */
++
++#define ACX111_SCAN_RATE_6 0x0B
++#define ACX111_SCAN_RATE_9 0x0F
++#define ACX111_SCAN_RATE_12 0x0A
++#define ACX111_SCAN_RATE_18 0x0E
++#define ACX111_SCAN_RATE_24 0x09
++#define ACX111_SCAN_RATE_36 0x0D
++#define ACX111_SCAN_RATE_48 0x08
++#define ACX111_SCAN_RATE_54 0x0C
++#define ACX111_SCAN_OPT_5GHZ 0x04 /* else 2.4GHZ */
++#define ACX111_SCAN_MOD_SHORTPRE 0x01 /* you can combine SHORTPRE and PBCC */
++#define ACX111_SCAN_MOD_PBCC 0x80
++#define ACX111_SCAN_MOD_OFDM 0x40
++typedef struct acx111_scan {
++ u16 count; /* number of scans to do */
++ u8 channel_list_select; /* 0: scan all channels, 1: from chan_list only */
++ u16 reserved1;
++ u8 reserved2;
++ u8 rate; /* rate for probe requests (if active scan) */
++ u8 options; /* bit mask, see defines above */
++ u16 chan_duration; /* min time to wait for reply on one channel (in TU) */
++ /* (active scan only) (802.11 section 11.1.3.2.2) */
++ u16 max_probe_delay; /* max time to wait for reply on one channel (active scan) */
++ /* time to listen on a channel (passive scan) */
++ u8 modulation;
++ u8 channel_list[26]; /* bits 7:0 first byte: channels 8:1 */
++ /* bits 7:0 second byte: channels 16:9 */
++ /* 26 bytes is enough to cover 802.11a */
++} ACX_PACKED acx111_scan_t;
++
++
++/*
++** Radio calibration command structure
++*/
++typedef struct acx111_cmd_radiocalib {
++/* 0x80000000 == automatic calibration by firmware, according to interval;
++ * bits 0..3: select calibration methods to go through:
++ * calib based on DC, AfeDC, Tx mismatch, Tx equilization */
++ u32 methods;
++ u32 interval;
++} ACX_PACKED acx111_cmd_radiocalib_t;
++
++
++/*
++** Packet template structures
++**
++** Packet templates store contents of Beacon, Probe response, Probe request,
++** Null data frame, and TIM data frame. Firmware automatically transmits
++** contents of template at appropriate time:
++** - Beacon: when configured as AP or Ad-hoc
++** - Probe response: when configured as AP or Ad-hoc, whenever
++** a Probe request frame is received
++** - Probe request: when host issues SCAN command (active)
++** - Null data frame: when entering 802.11 power save mode
++** - TIM data: at the end of Beacon frames (if no TIM template
++** is configured, then transmits default TIM)
++** NB:
++** - size field must be set to size of actual template
++** (NOT sizeof(struct) - templates are variable in length),
++** size field is not itself counted.
++** - members flagged with an asterisk must be initialized with host,
++** rest must be zero filled.
++** - variable length fields shown only in comments */
++typedef struct acx_template_tim {
++ u16 size;
++ u8 tim_eid; /* 00 1 TIM IE ID * */
++ u8 len; /* 01 1 Length * */
++ u8 dtim_cnt; /* 02 1 DTIM Count */
++ u8 dtim_period; /* 03 1 DTIM Period */
++ u8 bitmap_ctrl; /* 04 1 Bitmap Control * (except bit0) */
++ /* 05 n Partial Virtual Bitmap * */
++ u8 variable[0x100 - 1-1-1-1-1];
++} ACX_PACKED acx_template_tim_t;
++
++typedef struct acx_template_probereq {
++ u16 size;
++ u16 fc; /* 00 2 fc * */
++ u16 dur; /* 02 2 Duration */
++ u8 da[6]; /* 04 6 Destination Address * */
++ u8 sa[6]; /* 0A 6 Source Address * */
++ u8 bssid[6]; /* 10 6 BSSID * */
++ u16 seq; /* 16 2 Sequence Control */
++ /* 18 n SSID * */
++ /* nn n Supported Rates * */
++ u8 variable[0x44 - 2-2-6-6-6-2];
++} ACX_PACKED acx_template_probereq_t;
++
++typedef struct acx_template_proberesp {
++ u16 size;
++ u16 fc; /* 00 2 fc * (bits [15:12] and [10:8] per 802.11 section 7.1.3.1) */
++ u16 dur; /* 02 2 Duration */
++ u8 da[6]; /* 04 6 Destination Address */
++ u8 sa[6]; /* 0A 6 Source Address */
++ u8 bssid[6]; /* 10 6 BSSID */
++ u16 seq; /* 16 2 Sequence Control */
++ u8 timestamp[8];/* 18 8 Timestamp */
++ u16 beacon_interval; /* 20 2 Beacon Interval * */
++ u16 cap; /* 22 2 Capability Information * */
++ /* 24 n SSID * */
++ /* nn n Supported Rates * */
++ /* nn 1 DS Parameter Set * */
++ u8 variable[0x54 - 2-2-6-6-6-2-8-2-2];
++} ACX_PACKED acx_template_proberesp_t;
++#define acx_template_beacon_t acx_template_proberesp_t
++#define acx_template_beacon acx_template_proberesp
++
++typedef struct acx_template_nullframe {
++ u16 size;
++ struct wlan_hdr_a3 hdr;
++} ACX_PACKED acx_template_nullframe_t;
++
++
++/*
++** JOIN command structure
++**
++** as opposed to acx100, acx111 dtim interval is AFTER rates_basic111.
++** NOTE: took me about an hour to get !@#$%^& packing right --> struct packing is eeeeevil... */
++typedef struct acx_joinbss {
++ u8 bssid[ETH_ALEN];
++ u16 beacon_interval;
++ union {
++ struct {
++ u8 dtim_interval;
++ u8 rates_basic;
++ u8 rates_supported;
++ /*
++ * ARM compiler doesn't pack correctly unless unions
++ * inside structures are multiples of 4 bytes. Ugh.
++ */
++ u8 genfrm_txrate; /* generated frame (bcn, proberesp, RTS, PSpoll) tx rate */
++ } ACX_PACKED acx100;
++ struct {
++ u16 rates_basic;
++ u8 dtim_interval;
++ u8 genfrm_txrate; /* generated frame (bcn, proberesp, RTS, PSpoll) tx rate */
++ } ACX_PACKED acx111;
++ /*
++ * ARM compiler doesn't pack correctly unles unions are aligned on
++ * 4 byte boundaries and are multiples of 4 bytes.
++ */
++ struct {
++ u8 d1;
++ u8 d2;
++ u8 d3;
++ u8 genfrm_txrate;
++ } ACX_PACKED txrate;
++ } ACX_PACKED u;
++ u8 genfrm_mod_pre; /* generated frame modulation/preamble:
++ ** bit7: PBCC, bit6: OFDM (else CCK/DQPSK/DBPSK)
++ ** bit5: short pre */
++ u8 macmode; /* BSS Type, must be one of ACX_MODE_xxx */
++ u8 channel;
++ u8 essid_len;
++ char essid[IW_ESSID_MAX_SIZE];
++} ACX_PACKED acx_joinbss_t;
++
++#define JOINBSS_RATES_1 0x01
++#define JOINBSS_RATES_2 0x02
++#define JOINBSS_RATES_5 0x04
++#define JOINBSS_RATES_11 0x08
++#define JOINBSS_RATES_22 0x10
++
++/* Looks like missing bits are used to indicate 11g rates!
++** (it follows from the fact that constants below match 1:1 to RATE111_nn)
++** This was actually seen! Look at that Assoc Request sent by acx111,
++** it _does_ contain 11g rates in basic set:
++01:30:20.070772 Beacon (xxx) [1.0* 2.0* 5.5* 11.0* 6.0* 9.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit] ESS CH: 1
++01:30:20.074425 Authentication (Open System)-1: Succesful
++01:30:20.076539 Authentication (Open System)-2:
++01:30:20.076620 Acknowledgment
++01:30:20.088546 Assoc Request (xxx) [1.0* 2.0* 5.5* 6.0* 9.0* 11.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit]
++01:30:20.122413 Assoc Response AID(1) :: Succesful
++01:30:20.122679 Acknowledgment
++01:30:20.173204 Beacon (xxx) [1.0* 2.0* 5.5* 11.0* 6.0* 9.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit] ESS CH: 1
++*/
++#define JOINBSS_RATES_BASIC111_1 0x0001
++#define JOINBSS_RATES_BASIC111_2 0x0002
++#define JOINBSS_RATES_BASIC111_5 0x0004
++#define JOINBSS_RATES_BASIC111_11 0x0020
++#define JOINBSS_RATES_BASIC111_22 0x0100
++
++
++/***********************************************************************
++*/
++typedef struct mem_read_write {
++ u16 addr;
++ u16 type; /* 0x0 int. RAM / 0xffff MAC reg. / 0x81 PHY RAM / 0x82 PHY reg.; or maybe it's actually 0x30 for MAC? Better verify it by writing and reading back and checking whether the value holds! */
++ u32 len;
++ u32 data;
++} ACX_PACKED mem_read_write_t;
++
++typedef struct firmware_image {
++ u32 chksum;
++ u32 size;
++ u8 data[1]; /* the byte array of the actual firmware... */
++} ACX_PACKED firmware_image_t;
++
++typedef struct acx_cmd_radioinit {
++ u32 offset;
++ u32 len;
++} ACX_PACKED acx_cmd_radioinit_t;
++
++typedef struct acx100_ie_wep_options {
++ u16 type;
++ u16 len;
++ u16 NumKeys; /* max # of keys */
++ u8 WEPOption; /* 0 == decrypt default key only, 1 == override decrypt */
++ u8 Pad; /* used only for acx111 */
++} ACX_PACKED acx100_ie_wep_options_t;
++
++typedef struct ie_dot11WEPDefaultKey {
++ u16 type;
++ u16 len;
++ u8 action;
++ u8 keySize;
++ u8 defaultKeyNum;
++ u8 key[29]; /* check this! was Key[19] */
++} ACX_PACKED ie_dot11WEPDefaultKey_t;
++
++typedef struct acx111WEPDefaultKey {
++ u8 MacAddr[ETH_ALEN];
++ u16 action; /* NOTE: this is a u16, NOT a u8!! */
++ u16 reserved;
++ u8 keySize;
++ u8 type;
++ u8 index;
++ u8 defaultKeyNum;
++ u8 counter[6];
++ u8 key[32]; /* up to 32 bytes (for TKIP!) */
++} ACX_PACKED acx111WEPDefaultKey_t;
++
++typedef struct ie_dot11WEPDefaultKeyID {
++ u16 type;
++ u16 len;
++ u8 KeyID;
++} ACX_PACKED ie_dot11WEPDefaultKeyID_t;
++
++typedef struct acx100_cmd_wep_mgmt {
++ u8 MacAddr[ETH_ALEN];
++ u16 Action;
++ u16 KeySize;
++ u8 Key[29]; /* 29*8 == 232bits == WEP256 */
++} ACX_PACKED acx100_cmd_wep_mgmt_t;
++
++typedef struct acx_ie_generic {
++ u16 type;
++ u16 len;
++ union {
++ /* Association ID IE: just a 16bit value: */
++ u16 aid;
++ /* generic member for quick implementation of commands */
++ u8 bytes[32];
++ } ACX_PACKED m;
++} ACX_PACKED acx_ie_generic_t;
++
++/***********************************************************************
++*/
++#define CHECK_SIZEOF(type,size) { \
++ extern void BUG_bad_size_for_##type(void); \
++ if (sizeof(type)!=(size)) BUG_bad_size_for_##type(); \
++}
++
++static inline void
++acx_struct_size_check(void)
++{
++ CHECK_SIZEOF(txdesc_t, 0x30);
++ CHECK_SIZEOF(acx100_ie_memconfigoption_t, 24);
++ CHECK_SIZEOF(acx100_ie_queueconfig_t, 0x20);
++ CHECK_SIZEOF(acx_joinbss_t, 0x30);
++ /* IEs need 4 bytes for (type,len) tuple */
++ CHECK_SIZEOF(acx111_ie_configoption_t, ACX111_IE_CONFIG_OPTIONS_LEN + 4);
++}
++
++
++/***********************************************************************
++** Global data
++*/
++extern const u8 acx_bitpos2ratebyte[];
++extern const u8 acx_bitpos2rate100[];
++
++extern const u8 acx_reg_domain_ids[];
++extern const char * const acx_reg_domain_strings[];
++enum {
++ acx_reg_domain_ids_len = 8
++};
++
++extern const struct iw_handler_def acx_ioctl_handler_def;
+Index: linux-2.6.23/drivers/net/wireless/acx/common.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/common.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,7388 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/slab.h>
++#include <linux/delay.h>
++#include <linux/proc_fs.h>
++#include <linux/if_arp.h>
++#include <linux/rtnetlink.h>
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <net/iw_handler.h>
++
++#include "acx_hw.h"
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++static client_t *acx_l_sta_list_alloc(acx_device_t *adev);
++static client_t *acx_l_sta_list_get_from_hash(acx_device_t *adev, const u8 *address);
++
++static int acx_l_process_data_frame_master(acx_device_t *adev, rxbuffer_t *rxbuf);
++static int acx_l_process_data_frame_client(acx_device_t *adev, rxbuffer_t *rxbuf);
++/* static int acx_l_process_NULL_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala); */
++static int acx_l_process_mgmt_frame(acx_device_t *adev, rxbuffer_t *rxbuf);
++static void acx_l_process_disassoc_from_sta(acx_device_t *adev, const wlan_fr_disassoc_t *req);
++static void acx_l_process_disassoc_from_ap(acx_device_t *adev, const wlan_fr_disassoc_t *req);
++static void acx_l_process_deauth_from_sta(acx_device_t *adev, const wlan_fr_deauthen_t *req);
++static void acx_l_process_deauth_from_ap(acx_device_t *adev, const wlan_fr_deauthen_t *req);
++static int acx_l_process_probe_response(acx_device_t *adev, wlan_fr_proberesp_t *req, const rxbuffer_t *rxbuf);
++static int acx_l_process_assocresp(acx_device_t *adev, const wlan_fr_assocresp_t *req);
++static int acx_l_process_reassocresp(acx_device_t *adev, const wlan_fr_reassocresp_t *req);
++static int acx_l_process_authen(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_assocresp(acx_device_t *adev, const wlan_fr_assocreq_t *req);
++static int acx_l_transmit_reassocresp(acx_device_t *adev, const wlan_fr_reassocreq_t *req);
++static int acx_l_transmit_deauthen(acx_device_t *adev, const u8 *addr, u16 reason);
++static int acx_l_transmit_authen1(acx_device_t *adev);
++static int acx_l_transmit_authen2(acx_device_t *adev, const wlan_fr_authen_t *req, client_t *clt);
++static int acx_l_transmit_authen3(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_authen4(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_assoc_req(acx_device_t *adev);
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG
++unsigned int acx_debug /* will add __read_mostly later */ = ACX_DEFAULT_MSG;
++/* parameter is 'debug', corresponding var is acx_debug */
++module_param_named(debug, acx_debug, uint, 0);
++MODULE_PARM_DESC(debug, "Debug level mask (see L_xxx constants)");
++#endif
++
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("Dual MPL/GPL");
++#endif
++/* USB had this: MODULE_AUTHOR("Martin Wawro <martin.wawro AT uni-dortmund.de>"); */
++MODULE_AUTHOR("ACX100 Open Source Driver development team");
++MODULE_DESCRIPTION("Driver for TI ACX1xx based wireless cards (CardBus/PCI/USB)");
++
++
++/***********************************************************************
++*/
++/* Probably a number of acx's intermediate buffers for USB transfers,
++** not to be confused with number of descriptors in tx/rx rings
++** (which are not directly accessible to host in USB devices) */
++#define USB_RX_CNT 10
++#define USB_TX_CNT 10
++
++
++/***********************************************************************
++*/
++
++/* minutes to wait until next radio recalibration: */
++#define RECALIB_PAUSE 5
++
++/* Please keep acx_reg_domain_ids_len in sync... */
++const u8 acx_reg_domain_ids[acx_reg_domain_ids_len] =
++ { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40, 0x41, 0x51 };
++static const u16 reg_domain_channel_masks[acx_reg_domain_ids_len] =
++#ifdef ACX_ALLOW_ALLCHANNELS
++ { 0x3fff, 0x07ff, 0x1fff, 0x0600, 0x1e00, 0x2000, 0x3fff, 0x01fc };
++#else
++ { 0x07ff, 0x07ff, 0x1fff, 0x0600, 0x1e00, 0x2000, 0x3fff, 0x01fc };
++#endif
++const char * const
++acx_reg_domain_strings[] = {
++ /* 0 */ " 1-11 FCC (USA)",
++ /* 1 */ " 1-11 DOC/IC (Canada)",
++/* BTW: WLAN use in ETSI is regulated by ETSI standard EN 300 328-2 V1.1.2 */
++ /* 2 */ " 1-13 ETSI (Europe)",
++ /* 3 */ "10-11 Spain",
++ /* 4 */ "10-13 France",
++ /* 5 */ " 14 MKK (Japan)",
++ /* 6 */ " 1-14 MKK1",
++ /* 7 */ " 3-9 Israel (not all firmware versions)",
++ NULL /* needs to remain as last entry */
++};
++
++
++
++/***********************************************************************
++** Debugging support
++*/
++#ifdef PARANOID_LOCKING
++static unsigned max_lock_time;
++static unsigned max_sem_time;
++
++void
++acx_lock_unhold() { max_lock_time = 0; }
++void
++acx_sem_unhold() { max_sem_time = 0; }
++
++static inline const char*
++sanitize_str(const char *s)
++{
++ const char* t = strrchr(s, '/');
++ if (t) return t + 1;
++ return s;
++}
++
++void
++acx_lock_debug(acx_device_t *adev, const char* where)
++{
++ unsigned int count = 100*1000*1000;
++ where = sanitize_str(where);
++ while (--count) {
++ if (!spin_is_locked(&adev->lock)) break;
++ cpu_relax();
++ }
++ if (!count) {
++ printk(KERN_EMERG "LOCKUP: already taken at %s!\n", adev->last_lock);
++ BUG();
++ }
++ adev->last_lock = where;
++ rdtscl(adev->lock_time);
++}
++void
++acx_unlock_debug(acx_device_t *adev, const char* where)
++{
++#ifdef SMP
++ if (!spin_is_locked(&adev->lock)) {
++ where = sanitize_str(where);
++ printk(KERN_EMERG "STRAY UNLOCK at %s!\n", where);
++ BUG();
++ }
++#endif
++ if (acx_debug & L_LOCK) {
++ unsigned long diff;
++ rdtscl(diff);
++ diff -= adev->lock_time;
++ if (diff > max_lock_time) {
++ where = sanitize_str(where);
++ printk("max lock hold time %ld CPU ticks from %s "
++ "to %s\n", diff, adev->last_lock, where);
++ max_lock_time = diff;
++ }
++ }
++}
++void
++acx_down_debug(acx_device_t *adev, const char* where)
++{
++ int sem_count;
++ unsigned long timeout = jiffies + 5*HZ;
++
++ where = sanitize_str(where);
++
++ for (;;) {
++ sem_count = atomic_read(&adev->sem.count);
++ if (sem_count) break;
++ if (time_after(jiffies, timeout))
++ break;
++ msleep(5);
++ }
++ if (!sem_count) {
++ printk(KERN_EMERG "D STATE at %s! last sem at %s\n",
++ where, adev->last_sem);
++ dump_stack();
++ }
++ adev->last_sem = where;
++ adev->sem_time = jiffies;
++ down(&adev->sem);
++ if (acx_debug & L_LOCK) {
++ printk("%s: sem_down %d -> %d\n",
++ where, sem_count, atomic_read(&adev->sem.count));
++ }
++}
++void
++acx_up_debug(acx_device_t *adev, const char* where)
++{
++ int sem_count = atomic_read(&adev->sem.count);
++ if (sem_count) {
++ where = sanitize_str(where);
++ printk(KERN_EMERG "STRAY UP at %s! sem.count=%d\n", where, sem_count);
++ dump_stack();
++ }
++ if (acx_debug & L_LOCK) {
++ unsigned long diff = jiffies - adev->sem_time;
++ if (diff > max_sem_time) {
++ where = sanitize_str(where);
++ printk("max sem hold time %ld jiffies from %s "
++ "to %s\n", diff, adev->last_sem, where);
++ max_sem_time = diff;
++ }
++ }
++ up(&adev->sem);
++ if (acx_debug & L_LOCK) {
++ where = sanitize_str(where);
++ printk("%s: sem_up %d -> %d\n",
++ where, sem_count, atomic_read(&adev->sem.count));
++ }
++}
++#endif /* PARANOID_LOCKING */
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG > 1
++
++static int acx_debug_func_indent;
++#define DEBUG_TSC 0
++#define FUNC_INDENT_INCREMENT 2
++
++#if DEBUG_TSC
++#define TIMESTAMP(d) unsigned long d; rdtscl(d)
++#else
++#define TIMESTAMP(d) unsigned long d = jiffies
++#endif
++
++static const char
++spaces[] = " " " "; /* Nx10 spaces */
++
++void
++log_fn_enter(const char *funcname)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s==> %s\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname
++ );
++
++ acx_debug_func_indent += FUNC_INDENT_INCREMENT;
++}
++void
++log_fn_exit(const char *funcname)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ acx_debug_func_indent -= FUNC_INDENT_INCREMENT;
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s<== %s\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname
++ );
++}
++void
++log_fn_exit_v(const char *funcname, int v)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ acx_debug_func_indent -= FUNC_INDENT_INCREMENT;
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s<== %s: %08X\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname,
++ v
++ );
++}
++#endif /* ACX_DEBUG > 1 */
++
++
++/***********************************************************************
++** Basically a msleep with logging
++*/
++void
++acx_s_msleep(int ms)
++{
++ FN_ENTER;
++ msleep(ms);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** Not inlined: it's larger than it seems
++*/
++void
++acx_print_mac(const char *head, const u8 *mac, const char *tail)
++{
++ printk("%s"MACSTR"%s", head, MAC(mac), tail);
++}
++
++
++/***********************************************************************
++** acx_get_status_name
++*/
++static const char*
++acx_get_status_name(u16 status)
++{
++ static const char * const str[] = {
++ "STOPPED", "SCANNING", "WAIT_AUTH",
++ "AUTHENTICATED", "ASSOCIATED", "INVALID??"
++ };
++ if (status > VEC_SIZE(str)-1)
++ status = VEC_SIZE(str)-1;
++
++ return str[status];
++}
++
++
++/***********************************************************************
++** acx_get_packet_type_string
++*/
++#if ACX_DEBUG
++const char*
++acx_get_packet_type_string(u16 fc)
++{
++ static const char * const mgmt_arr[] = {
++ "MGMT/AssocReq", "MGMT/AssocResp", "MGMT/ReassocReq",
++ "MGMT/ReassocResp", "MGMT/ProbeReq", "MGMT/ProbeResp",
++ "MGMT/UNKNOWN", "MGMT/UNKNOWN", "MGMT/Beacon", "MGMT/ATIM",
++ "MGMT/Disassoc", "MGMT/Authen", "MGMT/Deauthen"
++ };
++ static const char * const ctl_arr[] = {
++ "CTL/PSPoll", "CTL/RTS", "CTL/CTS", "CTL/Ack", "CTL/CFEnd",
++ "CTL/CFEndCFAck"
++ };
++ static const char * const data_arr[] = {
++ "DATA/DataOnly", "DATA/Data CFAck", "DATA/Data CFPoll",
++ "DATA/Data CFAck/CFPoll", "DATA/Null", "DATA/CFAck",
++ "DATA/CFPoll", "DATA/CFAck/CFPoll"
++ };
++ const char *str;
++ u8 fstype = (WF_FC_FSTYPE & fc) >> 4;
++ u8 ctl;
++
++ switch (WF_FC_FTYPE & fc) {
++ case WF_FTYPE_MGMT:
++ if (fstype < VEC_SIZE(mgmt_arr))
++ str = mgmt_arr[fstype];
++ else
++ str = "MGMT/UNKNOWN";
++ break;
++ case WF_FTYPE_CTL:
++ ctl = fstype - 0x0a;
++ if (ctl < VEC_SIZE(ctl_arr))
++ str = ctl_arr[ctl];
++ else
++ str = "CTL/UNKNOWN";
++ break;
++ case WF_FTYPE_DATA:
++ if (fstype < VEC_SIZE(data_arr))
++ str = data_arr[fstype];
++ else
++ str = "DATA/UNKNOWN";
++ break;
++ default:
++ str = "UNKNOWN";
++ break;
++ }
++ return str;
++}
++#endif
++
++
++/***********************************************************************
++** acx_wlan_reason_str
++*/
++static inline const char*
++acx_wlan_reason_str(u16 reason)
++{
++ static const char* const reason_str[] = {
++ /* 0 */ "?",
++ /* 1 */ "unspecified",
++ /* 2 */ "prev auth is not valid",
++ /* 3 */ "leaving BBS",
++ /* 4 */ "due to inactivity",
++ /* 5 */ "AP is busy",
++ /* 6 */ "got class 2 frame from non-auth'ed STA",
++ /* 7 */ "got class 3 frame from non-assoc'ed STA",
++ /* 8 */ "STA has left BSS",
++ /* 9 */ "assoc without auth is not allowed",
++ /* 10 */ "bad power setting (802.11h)",
++ /* 11 */ "bad channel (802.11i)",
++ /* 12 */ "?",
++ /* 13 */ "invalid IE",
++ /* 14 */ "MIC failure",
++ /* 15 */ "four-way handshake timeout",
++ /* 16 */ "group key handshake timeout",
++ /* 17 */ "IE is different",
++ /* 18 */ "invalid group cipher",
++ /* 19 */ "invalid pairwise cipher",
++ /* 20 */ "invalid AKMP",
++ /* 21 */ "unsupported RSN version",
++ /* 22 */ "invalid RSN IE cap",
++ /* 23 */ "802.1x failed",
++ /* 24 */ "cipher suite rejected"
++ };
++ return reason < VEC_SIZE(reason_str) ? reason_str[reason] : "?";
++}
++
++
++/***********************************************************************
++** acx_cmd_status_str
++*/
++const char*
++acx_cmd_status_str(unsigned int state)
++{
++ static const char * const cmd_error_strings[] = {
++ "Idle",
++ "Success",
++ "Unknown Command",
++ "Invalid Information Element",
++ "Channel rejected",
++ "Channel invalid in current regulatory domain",
++ "MAC invalid",
++ "Command rejected (read-only information element)",
++ "Command rejected",
++ "Already asleep",
++ "TX in progress",
++ "Already awake",
++ "Write only",
++ "RX in progress",
++ "Invalid parameter",
++ "Scan in progress",
++ "Failed"
++ };
++ return state < VEC_SIZE(cmd_error_strings) ?
++ cmd_error_strings[state] : "?";
++}
++
++
++/***********************************************************************
++** get_status_string
++*/
++static inline const char*
++get_status_string(unsigned int status)
++{
++ /* A bit shortened, but hopefully still understandable */
++ static const char * const status_str[] = {
++ /* 0 */ "Successful",
++ /* 1 */ "Unspecified failure",
++ /* 2 */ "reserved",
++ /* 3 */ "reserved",
++ /* 4 */ "reserved",
++ /* 5 */ "reserved",
++ /* 6 */ "reserved",
++ /* 7 */ "reserved",
++ /* 8 */ "reserved",
++ /* 9 */ "reserved",
++ /*10 */ "Cannot support all requested capabilities in Capability Information field",
++ /*11 */ "Reassoc denied (reason outside of 802.11b scope)",
++ /*12 */ "Assoc denied (reason outside of 802.11b scope) -- maybe MAC filtering by peer?",
++ /*13 */ "Responding station doesnt support specified auth algorithm -- maybe WEP auth Open vs. Restricted?",
++ /*14 */ "Auth rejected: wrong transaction sequence number",
++ /*15 */ "Auth rejected: challenge failure",
++ /*16 */ "Auth rejected: timeout for next frame in sequence",
++ /*17 */ "Assoc denied: too many STAs on this AP",
++ /*18 */ "Assoc denied: requesting STA doesnt support all data rates in basic set",
++ /*19 */ "Assoc denied: requesting STA doesnt support Short Preamble",
++ /*20 */ "Assoc denied: requesting STA doesnt support PBCC Modulation",
++ /*21 */ "Assoc denied: requesting STA doesnt support Channel Agility"
++ /*22 */ "reserved",
++ /*23 */ "reserved",
++ /*24 */ "reserved",
++ /*25 */ "Assoc denied: requesting STA doesnt support Short Slot Time",
++ /*26 */ "Assoc denied: requesting STA doesnt support DSSS-OFDM"
++ };
++
++ return status_str[status < VEC_SIZE(status_str) ? status : 2];
++}
++
++
++/***********************************************************************
++*/
++void
++acx_log_bad_eid(wlan_hdr_t* hdr, int len, wlan_ie_t* ie_ptr)
++{
++ if (acx_debug & L_ASSOC) {
++ int offset = (u8*)ie_ptr - (u8*)hdr;
++ printk("acx: unknown EID %d in mgmt frame at offset %d. IE: ",
++ ie_ptr->eid, offset);
++ /* IE len can be bogus, IE can extend past packet end. Oh well... */
++ acx_dump_bytes(ie_ptr, ie_ptr->len + 2);
++ if (acx_debug & L_DATA) {
++ printk("frame (%s): ",
++ acx_get_packet_type_string(le16_to_cpu(hdr->fc)));
++ acx_dump_bytes(hdr, len);
++ }
++ }
++}
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG
++void
++acx_dump_bytes(const void *data, int num)
++{
++ const u8* ptr = (const u8*)data;
++
++ if (num <= 0) {
++ printk("\n");
++ return;
++ }
++
++ while (num >= 16) {
++ printk( "%02X %02X %02X %02X %02X %02X %02X %02X "
++ "%02X %02X %02X %02X %02X %02X %02X %02X\n",
++ ptr[0], ptr[1], ptr[2], ptr[3],
++ ptr[4], ptr[5], ptr[6], ptr[7],
++ ptr[8], ptr[9], ptr[10], ptr[11],
++ ptr[12], ptr[13], ptr[14], ptr[15]);
++ num -= 16;
++ ptr += 16;
++ }
++ if (num > 0) {
++ while (--num > 0)
++ printk("%02X ", *ptr++);
++ printk("%02X\n", *ptr);
++ }
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_get_firmware_version
++*/
++void
++acx_s_get_firmware_version(acx_device_t *adev)
++{
++ fw_ver_t fw;
++ u8 hexarr[4] = { 0, 0, 0, 0 };
++ int hexidx = 0, val = 0;
++ const char *num;
++ char c;
++
++ FN_ENTER;
++
++ memset(fw.fw_id, 'E', FW_ID_SIZE);
++ acx_s_interrogate(adev, &fw, ACX1xx_IE_FWREV);
++ memcpy(adev->firmware_version, fw.fw_id, FW_ID_SIZE);
++ adev->firmware_version[FW_ID_SIZE] = '\0';
++
++ log(L_DEBUG, "fw_ver: fw_id='%s' hw_id=%08X\n",
++ adev->firmware_version, fw.hw_id);
++
++ if (strncmp(fw.fw_id, "Rev ", 4) != 0) {
++ printk("acx: strange firmware version string "
++ "'%s', please report\n", adev->firmware_version);
++ adev->firmware_numver = 0x01090407; /* assume 1.9.4.7 */
++ } else {
++ num = &fw.fw_id[4];
++ while (1) {
++ c = *num++;
++ if ((c == '.') || (c == '\0')) {
++ hexarr[hexidx++] = val;
++ if ((hexidx > 3) || (c == '\0')) /* end? */
++ break;
++ val = 0;
++ continue;
++ }
++ if ((c >= '0') && (c <= '9'))
++ c -= '0';
++ else
++ c = c - 'a' + (char)10;
++ val = val*16 + c;
++ }
++
++ adev->firmware_numver = (u32)(
++ (hexarr[0] << 24) | (hexarr[1] << 16)
++ | (hexarr[2] << 8) | hexarr[3]);
++ log(L_DEBUG, "firmware_numver 0x%08X\n", adev->firmware_numver);
++ }
++ if (IS_ACX111(adev)) {
++ if (adev->firmware_numver == 0x00010011) {
++ /* This one does not survive floodpinging */
++ printk("acx: firmware '%s' is known to be buggy, "
++ "please upgrade\n", adev->firmware_version);
++ }
++ }
++
++ adev->firmware_id = le32_to_cpu(fw.hw_id);
++
++ /* we're able to find out more detailed chip names now */
++ switch (adev->firmware_id & 0xffff0000) {
++ case 0x01010000:
++ case 0x01020000:
++ adev->chip_name = "TNETW1100A";
++ break;
++ case 0x01030000:
++ adev->chip_name = "TNETW1100B";
++ break;
++ case 0x03000000:
++ case 0x03010000:
++ adev->chip_name = "TNETW1130";
++ break;
++ case 0x04030000: /* 0x04030101 is TNETW1450 */
++ adev->chip_name = "TNETW1450";
++ break;
++ default:
++ printk("acx: unknown chip ID 0x%08X, "
++ "please report\n", adev->firmware_id);
++ break;
++ }
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_display_hardware_details
++**
++** Displays hw/fw version, radio type etc...
++*/
++void
++acx_display_hardware_details(acx_device_t *adev)
++{
++ const char *radio_str, *form_str;
++
++ FN_ENTER;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ radio_str = "Maxim";
++ break;
++ case RADIO_RFMD_11:
++ radio_str = "RFMD";
++ break;
++ case RADIO_RALINK_15:
++ radio_str = "Ralink";
++ break;
++ case RADIO_RADIA_16:
++ radio_str = "Radia";
++ break;
++ case RADIO_UNKNOWN_17:
++ /* TI seems to have a radio which is
++ * additionally 802.11a capable, too */
++ radio_str = "802.11a/b/g radio?! Please report";
++ break;
++ case RADIO_UNKNOWN_19:
++ radio_str = "A radio used by Safecom cards?! Please report";
++ break;
++ case RADIO_UNKNOWN_1B:
++ radio_str = "An unknown radio used by TNETW1450 USB adapters";
++ break;
++ default:
++ radio_str = "UNKNOWN, please report radio type name!";
++ break;
++ }
++
++ switch (adev->form_factor) {
++ case 0x00:
++ form_str = "unspecified";
++ break;
++ case 0x01:
++ form_str = "(mini-)PCI / CardBus";
++ break;
++ case 0x02:
++ form_str = "USB";
++ break;
++ case 0x03:
++ form_str = "Compact Flash";
++ break;
++ default:
++ form_str = "UNKNOWN, please report";
++ break;
++ }
++
++ printk("acx: === chipset %s, radio type 0x%02X (%s), "
++ "form factor 0x%02X (%s), EEPROM version 0x%02X: "
++ "uploaded firmware '%s' ===\n",
++ adev->chip_name, adev->radio_type, radio_str,
++ adev->form_factor, form_str, adev->eeprom_version,
++ adev->firmware_version);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++*/
++int
++acx_e_change_mtu(struct net_device *ndev, int mtu)
++{
++ enum {
++ MIN_MTU = 256,
++ MAX_MTU = WLAN_DATA_MAXLEN - (ETH_HLEN)
++ };
++
++ if (mtu < MIN_MTU || mtu > MAX_MTU)
++ return -EINVAL;
++
++ ndev->mtu = mtu;
++ return 0;
++}
++
++
++/***********************************************************************
++** acx_e_get_stats, acx_e_get_wireless_stats
++*/
++struct net_device_stats*
++acx_e_get_stats(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ return &adev->stats;
++}
++
++struct iw_statistics*
++acx_e_get_wireless_stats(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ return &adev->wstats;
++}
++
++
++/***********************************************************************
++** maps acx111 tx descr rate field to acx100 one
++*/
++const u8
++acx_bitpos2rate100[] = {
++ RATE100_1 ,/* 0 */
++ RATE100_2 ,/* 1 */
++ RATE100_5 ,/* 2 */
++ RATE100_2 ,/* 3, should not happen */
++ RATE100_2 ,/* 4, should not happen */
++ RATE100_11 ,/* 5 */
++ RATE100_2 ,/* 6, should not happen */
++ RATE100_2 ,/* 7, should not happen */
++ RATE100_22 ,/* 8 */
++ RATE100_2 ,/* 9, should not happen */
++ RATE100_2 ,/* 10, should not happen */
++ RATE100_2 ,/* 11, should not happen */
++ RATE100_2 ,/* 12, should not happen */
++ RATE100_2 ,/* 13, should not happen */
++ RATE100_2 ,/* 14, should not happen */
++ RATE100_2 ,/* 15, should not happen */
++};
++
++u8
++acx_rate111to100(u16 r) {
++ return acx_bitpos2rate100[highest_bit(r)];
++}
++
++
++/***********************************************************************
++** Calculate level like the feb 2003 windows driver seems to do
++*/
++static u8
++acx_signal_to_winlevel(u8 rawlevel)
++{
++ /* u8 winlevel = (u8) (0.5 + 0.625 * rawlevel); */
++ u8 winlevel = ((4 + (rawlevel * 5)) / 8);
++
++ if (winlevel > 100)
++ winlevel = 100;
++ return winlevel;
++}
++
++u8
++acx_signal_determine_quality(u8 signal, u8 noise)
++{
++ int qual;
++
++ qual = (((signal - 30) * 100 / 70) + (100 - noise * 4)) / 2;
++
++ if (qual > 100)
++ return 100;
++ if (qual < 0)
++ return 0;
++ return qual;
++}
++
++
++/***********************************************************************
++** Interrogate/configure commands
++*/
++
++/* FIXME: the lengths given here probably aren't always correct.
++ * They should be gradually replaced by proper "sizeof(acx1XX_ie_XXXX)-4",
++ * unless the firmware actually expects a different length than the struct length */
++static const u16
++acx100_ie_len[] = {
++ 0,
++ ACX100_IE_ACX_TIMER_LEN,
++ sizeof(acx100_ie_powersave_t)-4, /* is that 6 or 8??? */
++ ACX1xx_IE_QUEUE_CONFIG_LEN,
++ ACX100_IE_BLOCK_SIZE_LEN,
++ ACX1xx_IE_MEMORY_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_RATE_FALLBACK_LEN,
++ ACX100_IE_WEP_OPTIONS_LEN,
++ ACX1xx_IE_MEMORY_MAP_LEN, /* ACX1xx_IE_SSID_LEN, */
++ 0,
++ ACX1xx_IE_ASSOC_ID_LEN,
++ 0,
++ ACX111_IE_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_FWREV_LEN,
++ ACX1xx_IE_FCS_ERROR_COUNT_LEN,
++ ACX1xx_IE_MEDIUM_USAGE_LEN,
++ ACX1xx_IE_RXCONFIG_LEN,
++ 0,
++ 0,
++ sizeof(fw_stats_t)-4,
++ 0,
++ ACX1xx_IE_FEATURE_CONFIG_LEN,
++ ACX111_IE_KEY_CHOOSE_LEN,
++ ACX1FF_IE_MISC_CONFIG_TABLE_LEN,
++ ACX1FF_IE_WONE_CONFIG_LEN,
++ 0,
++ ACX1FF_IE_TID_CONFIG_LEN,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_CALIB_ASSESSMENT_LEN,
++ ACX1FF_IE_BEACON_FILTER_OPTIONS_LEN,
++ ACX1FF_IE_LOW_RSSI_THRESH_OPT_LEN,
++ ACX1FF_IE_NOISE_HISTOGRAM_RESULTS_LEN,
++ 0,
++ ACX1FF_IE_PACKET_DETECT_THRESH_LEN,
++ ACX1FF_IE_TX_CONFIG_OPTIONS_LEN,
++ ACX1FF_IE_CCA_THRESHOLD_LEN,
++ ACX1FF_IE_EVENT_MASK_LEN,
++ ACX1FF_IE_DTIM_PERIOD_LEN,
++ 0,
++ ACX1FF_IE_ACI_CONFIG_SET_LEN,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_EEPROM_VER_LEN,
++};
++
++static const u16
++acx100_ie_len_dot11[] = {
++ 0,
++ ACX1xx_IE_DOT11_STATION_ID_LEN,
++ 0,
++ ACX100_IE_DOT11_BEACON_PERIOD_LEN,
++ ACX1xx_IE_DOT11_DTIM_PERIOD_LEN,
++ ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN,
++ ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN,
++ ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE_LEN,
++ ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN,
++ 0,
++ ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN_LEN,
++ ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN,
++ 0,
++ ACX1xx_IE_DOT11_TX_POWER_LEVEL_LEN,
++ ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN,
++ ACX100_IE_DOT11_ED_THRESHOLD_LEN,
++ ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET_LEN,
++ 0,
++ 0,
++ 0,
++};
++
++static const u16
++acx111_ie_len[] = {
++ 0,
++ ACX100_IE_ACX_TIMER_LEN,
++ sizeof(acx111_ie_powersave_t)-4,
++ ACX1xx_IE_QUEUE_CONFIG_LEN,
++ ACX100_IE_BLOCK_SIZE_LEN,
++ ACX1xx_IE_MEMORY_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_RATE_FALLBACK_LEN,
++ ACX100_IE_WEP_OPTIONS_LEN,
++ ACX1xx_IE_MEMORY_MAP_LEN, /* ACX1xx_IE_SSID_LEN, */
++ 0,
++ ACX1xx_IE_ASSOC_ID_LEN,
++ 0,
++ ACX111_IE_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_FWREV_LEN,
++ ACX1xx_IE_FCS_ERROR_COUNT_LEN,
++ ACX1xx_IE_MEDIUM_USAGE_LEN,
++ ACX1xx_IE_RXCONFIG_LEN,
++ 0,
++ 0,
++ sizeof(fw_stats_t)-4,
++ 0,
++ ACX1xx_IE_FEATURE_CONFIG_LEN,
++ ACX111_IE_KEY_CHOOSE_LEN,
++ ACX1FF_IE_MISC_CONFIG_TABLE_LEN,
++ ACX1FF_IE_WONE_CONFIG_LEN,
++ 0,
++ ACX1FF_IE_TID_CONFIG_LEN,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_CALIB_ASSESSMENT_LEN,
++ ACX1FF_IE_BEACON_FILTER_OPTIONS_LEN,
++ ACX1FF_IE_LOW_RSSI_THRESH_OPT_LEN,
++ ACX1FF_IE_NOISE_HISTOGRAM_RESULTS_LEN,
++ 0,
++ ACX1FF_IE_PACKET_DETECT_THRESH_LEN,
++ ACX1FF_IE_TX_CONFIG_OPTIONS_LEN,
++ ACX1FF_IE_CCA_THRESHOLD_LEN,
++ ACX1FF_IE_EVENT_MASK_LEN,
++ ACX1FF_IE_DTIM_PERIOD_LEN,
++ 0,
++ ACX1FF_IE_ACI_CONFIG_SET_LEN,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_EEPROM_VER_LEN,
++};
++
++static const u16
++acx111_ie_len_dot11[] = {
++ 0,
++ ACX1xx_IE_DOT11_STATION_ID_LEN,
++ 0,
++ ACX100_IE_DOT11_BEACON_PERIOD_LEN,
++ ACX1xx_IE_DOT11_DTIM_PERIOD_LEN,
++ ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN,
++ ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN,
++ ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE_LEN,
++ ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN,
++ 0,
++ ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN_LEN,
++ ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN,
++ 0,
++ ACX1xx_IE_DOT11_TX_POWER_LEVEL_LEN,
++ ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN,
++ ACX100_IE_DOT11_ED_THRESHOLD_LEN,
++ ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET_LEN,
++ 0,
++ 0,
++ 0,
++};
++
++
++#undef FUNC
++#define FUNC "configure"
++#if !ACX_DEBUG
++int
++acx_s_configure(acx_device_t *adev, void *pdr, int type)
++{
++#else
++int
++acx_s_configure_debug(acx_device_t *adev, void *pdr, int type, const char* typestr)
++{
++#endif
++ u16 len;
++ int res;
++
++ if (type < 0x1000)
++ len = adev->ie_len[type];
++ else
++ len = adev->ie_len_dot11[type - 0x1000];
++
++ log(L_CTL, FUNC"(type:%s,len:%u)\n", typestr, len);
++ if (unlikely(!len)) {
++ log(L_DEBUG, "zero-length type %s?!\n", typestr);
++ }
++
++ ((acx_ie_generic_t *)pdr)->type = cpu_to_le16(type);
++ ((acx_ie_generic_t *)pdr)->len = cpu_to_le16(len);
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIGURE, pdr, len + 4);
++ if (unlikely(OK != res)) {
++#if ACX_DEBUG
++ printk("%s: "FUNC"(type:%s) FAILED\n", adev->ndev->name, typestr);
++#else
++ printk("%s: "FUNC"(type:0x%X) FAILED\n", adev->ndev->name, type);
++#endif
++ /* dump_stack() is already done in issue_cmd() */
++ }
++ return res;
++}
++
++#undef FUNC
++#define FUNC "interrogate"
++#if !ACX_DEBUG
++int
++acx_s_interrogate(acx_device_t *adev, void *pdr, int type)
++{
++#else
++int
++acx_s_interrogate_debug(acx_device_t *adev, void *pdr, int type,
++ const char* typestr)
++{
++#endif
++ u16 len;
++ int res;
++
++ /* FIXME: no check whether this exceeds the array yet.
++ * We should probably remember the number of entries... */
++ if (type < 0x1000)
++ len = adev->ie_len[type];
++ else
++ len = adev->ie_len_dot11[type-0x1000];
++
++ log(L_CTL, FUNC"(type:%s,len:%u)\n", typestr, len);
++
++ ((acx_ie_generic_t *)pdr)->type = cpu_to_le16(type);
++ ((acx_ie_generic_t *)pdr)->len = cpu_to_le16(len);
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_INTERROGATE, pdr, len + 4);
++ if (unlikely(OK != res)) {
++#if ACX_DEBUG
++ printk("%s: "FUNC"(type:%s) FAILED\n", adev->ndev->name, typestr);
++#else
++ printk("%s: "FUNC"(type:0x%X) FAILED\n", adev->ndev->name, type);
++#endif
++ /* dump_stack() is already done in issue_cmd() */
++ }
++ return res;
++}
++
++#if CMD_DISCOVERY
++void
++great_inquisitor(acx_device_t *adev)
++{
++ static struct {
++ u16 type;
++ u16 len;
++ /* 0x200 was too large here: */
++ u8 data[0x100 - 4];
++ } ACX_PACKED ie;
++ u16 type;
++
++ FN_ENTER;
++
++ /* 0..0x20, 0x1000..0x1020 */
++ for (type = 0; type <= 0x1020; type++) {
++ if (type == 0x21)
++ type = 0x1000;
++ ie.type = cpu_to_le16(type);
++ ie.len = cpu_to_le16(sizeof(ie) - 4);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_INTERROGATE, &ie, sizeof(ie));
++ }
++ FN_EXIT0;
++}
++#endif
++
++
++#ifdef CONFIG_PROC_FS
++/***********************************************************************
++** /proc files
++*/
++/***********************************************************************
++** acx_l_proc_output
++** Generate content for our /proc entry
++**
++** Arguments:
++** buf is a pointer to write output to
++** adev is the usual pointer to our private struct acx_device
++** Returns:
++** number of bytes actually written to buf
++** Side effects:
++** none
++*/
++static int
++acx_l_proc_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ p += sprintf(p,
++ "acx driver version:\t\t" ACX_RELEASE "\n"
++ "Wireless extension version:\t" STRING(WIRELESS_EXT) "\n"
++ "chip name:\t\t\t%s (0x%08X)\n"
++ "radio type:\t\t\t0x%02X\n"
++ "form factor:\t\t\t0x%02X\n"
++ "EEPROM version:\t\t\t0x%02X\n"
++ "firmware version:\t\t%s (0x%08X)\n",
++ adev->chip_name, adev->firmware_id,
++ adev->radio_type,
++ adev->form_factor,
++ adev->eeprom_version,
++ adev->firmware_version, adev->firmware_numver);
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ p += sprintf(p, "BSS %u BSSID "MACSTR" ESSID %s channel %u "
++ "Cap 0x%X SIR %u SNR %u\n",
++ i, MAC(bss->bssid), (char*)bss->essid, bss->channel,
++ bss->cap_info, bss->sir, bss->snr);
++ }
++ p += sprintf(p, "status:\t\t\t%u (%s)\n",
++ adev->status, acx_get_status_name(adev->status));
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_proc_diag_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ unsigned long flags;
++ unsigned int len = 0, partlen;
++ u32 temp1, temp2;
++ u8 *st, *st_end;
++#ifdef __BIG_ENDIAN
++ u8 *st2;
++#endif
++ fw_stats_t *fw_stats;
++ char *part_str = NULL;
++ fw_stats_tx_t *tx = NULL;
++ fw_stats_rx_t *rx = NULL;
++ fw_stats_dma_t *dma = NULL;
++ fw_stats_irq_t *irq = NULL;
++ fw_stats_wep_t *wep = NULL;
++ fw_stats_pwr_t *pwr = NULL;
++ fw_stats_mic_t *mic = NULL;
++ fw_stats_aes_t *aes = NULL;
++ fw_stats_event_t *evt = NULL;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++#if defined (ACX_MEM)
++ p = acxmem_s_proc_diag_output(p, adev);
++#else
++ if (IS_PCI(adev))
++ p = acxpci_s_proc_diag_output(p, adev);
++#endif
++
++ p += sprintf(p,
++ "\n"
++ "** network status **\n"
++ "dev_state_mask 0x%04X\n"
++ "status %u (%s), "
++ "mode %u, channel %u, "
++ "reg_dom_id 0x%02X, reg_dom_chanmask 0x%04X, ",
++ adev->dev_state_mask,
++ adev->status, acx_get_status_name(adev->status),
++ adev->mode, adev->channel,
++ adev->reg_dom_id, adev->reg_dom_chanmask
++ );
++ p += sprintf(p,
++ "ESSID \"%s\", essid_active %d, essid_len %d, "
++ "essid_for_assoc \"%s\", nick \"%s\"\n"
++ "WEP ena %d, restricted %d, idx %d\n",
++ adev->essid, adev->essid_active, (int)adev->essid_len,
++ adev->essid_for_assoc, adev->nick,
++ adev->wep_enabled, adev->wep_restricted,
++ adev->wep_current_index);
++ p += sprintf(p, "dev_addr "MACSTR"\n", MAC(adev->dev_addr));
++ p += sprintf(p, "bssid "MACSTR"\n", MAC(adev->bssid));
++ p += sprintf(p, "ap_filter "MACSTR"\n", MAC(adev->ap));
++
++ p += sprintf(p,
++ "\n"
++ "** PHY status **\n"
++ "tx_disabled %d, tx_level_dbm %d\n" /* "tx_level_val %d, tx_level_auto %d\n" */
++ "sensitivity %d, antenna 0x%02X, ed_threshold %d, cca %d, preamble_mode %d\n"
++ "rate_basic 0x%04X, rate_oper 0x%04X\n"
++ "rts_threshold %d, frag_threshold %d, short_retry %d, long_retry %d\n"
++ "msdu_lifetime %d, listen_interval %d, beacon_interval %d\n",
++ adev->tx_disabled, adev->tx_level_dbm, /* adev->tx_level_val, adev->tx_level_auto, */
++ adev->sensitivity, adev->antenna, adev->ed_threshold, adev->cca, adev->preamble_mode,
++ adev->rate_basic, adev->rate_oper,
++ adev->rts_threshold, adev->frag_threshold, adev->short_retry, adev->long_retry,
++ adev->msdu_lifetime, adev->listen_interval, adev->beacon_interval);
++
++ acx_unlock(adev, flags);
++
++ p += sprintf(p,
++ "\n"
++ "** Firmware **\n"
++ "NOTE: version dependent statistics layout, "
++ "please report if you suspect wrong parsing!\n"
++ "\n"
++ "version \"%s\"\n", adev->firmware_version);
++
++ /* TODO: may replace kmalloc/memset with kzalloc once
++ * Linux 2.6.14 is widespread */
++ fw_stats = kmalloc(sizeof(*fw_stats), GFP_KERNEL);
++ if (!fw_stats) {
++ FN_EXIT1(0);
++ return 0;
++ }
++ memset(fw_stats, 0, sizeof(*fw_stats));
++
++ st = (u8 *)fw_stats;
++
++ part_str = "statistics query command";
++
++ if (OK != acx_s_interrogate(adev, st, ACX1xx_IE_FIRMWARE_STATISTICS))
++ goto fw_stats_end;
++
++ st += sizeof(u16);
++ len = *(u16 *)st;
++
++ if (len > sizeof(*fw_stats)) {
++ p += sprintf(p,
++ "firmware version with bigger fw_stats struct detected\n"
++ "(%u vs. %u), please report\n", len, sizeof(fw_stats_t));
++ if (len > sizeof(*fw_stats)) {
++ p += sprintf(p, "struct size exceeded allocation!\n");
++ len = sizeof(*fw_stats);
++ }
++ }
++ st += sizeof(u16);
++ st_end = st - 2*sizeof(u16) + len;
++
++#ifdef __BIG_ENDIAN
++ /* let's make one bold assumption here:
++ * (hopefully!) *all* statistics fields are u32 only,
++ * thus if we need to make endianness corrections
++ * we can simply do them in one go, in advance */
++ st2 = (u8 *)fw_stats;
++ for (temp1 = 0; temp1 < len; temp1 += 4, st2 += 4)
++ *(u32 *)st2 = le32_to_cpu(*(u32 *)st2);
++#endif
++
++ part_str = "Rx/Tx";
++
++ /* directly at end of a struct part? --> no error! */
++ if (st == st_end)
++ goto fw_stats_end;
++
++ tx = (fw_stats_tx_t *)st;
++ st += sizeof(fw_stats_tx_t);
++ rx = (fw_stats_rx_t *)st;
++ st += sizeof(fw_stats_rx_t);
++ partlen = sizeof(fw_stats_tx_t) + sizeof(fw_stats_rx_t);
++
++ if (IS_ACX100(adev)) {
++ /* at least ACX100 PCI F/W 1.9.8.b
++ * and ACX100 USB F/W 1.0.7-USB
++ * don't have those two fields... */
++ st -= 2*sizeof(u32);
++
++ /* our parsing doesn't quite match this firmware yet,
++ * log failure */
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = temp2 = 999999999;
++ } else {
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = rx->rx_aci_events;
++ temp2 = rx->rx_aci_resets;
++ }
++
++ p += sprintf(p,
++ "%s:\n"
++ " tx_desc_overfl %u\n"
++ " rx_OutOfMem %u, rx_hdr_overfl %u, rx_hw_stuck %u\n"
++ " rx_dropped_frame %u, rx_frame_ptr_err %u, rx_xfr_hint_trig %u\n"
++ " rx_aci_events %u, rx_aci_resets %u\n",
++ part_str,
++ tx->tx_desc_of,
++ rx->rx_oom,
++ rx->rx_hdr_of,
++ rx->rx_hw_stuck,
++ rx->rx_dropped_frame,
++ rx->rx_frame_ptr_err,
++ rx->rx_xfr_hint_trig,
++ temp1,
++ temp2);
++
++ part_str = "DMA";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ dma = (fw_stats_dma_t *)st;
++ partlen = sizeof(fw_stats_dma_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " rx_dma_req %u, rx_dma_err %u, tx_dma_req %u, tx_dma_err %u\n",
++ part_str,
++ dma->rx_dma_req,
++ dma->rx_dma_err,
++ dma->tx_dma_req,
++ dma->tx_dma_err);
++
++ part_str = "IRQ";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ irq = (fw_stats_irq_t *)st;
++ partlen = sizeof(fw_stats_irq_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " cmd_cplt %u, fiq %u\n"
++ " rx_hdrs %u, rx_cmplt %u, rx_mem_overfl %u, rx_rdys %u\n"
++ " irqs %u, tx_procs %u, decrypt_done %u\n"
++ " dma_0_done %u, dma_1_done %u, tx_exch_complet %u\n"
++ " commands %u, rx_procs %u, hw_pm_mode_changes %u\n"
++ " host_acks %u, pci_pm %u, acm_wakeups %u\n",
++ part_str,
++ irq->cmd_cplt,
++ irq->fiq,
++ irq->rx_hdrs,
++ irq->rx_cmplt,
++ irq->rx_mem_of,
++ irq->rx_rdys,
++ irq->irqs,
++ irq->tx_procs,
++ irq->decrypt_done,
++ irq->dma_0_done,
++ irq->dma_1_done,
++ irq->tx_exch_complet,
++ irq->commands,
++ irq->rx_procs,
++ irq->hw_pm_mode_changes,
++ irq->host_acks,
++ irq->pci_pm,
++ irq->acm_wakeups);
++
++ part_str = "WEP";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ wep = (fw_stats_wep_t *)st;
++ partlen = sizeof(fw_stats_wep_t);
++ st += partlen;
++
++ if (
++ (IS_PCI(adev) && IS_ACX100(adev))
++ || (IS_USB(adev) && IS_ACX100(adev))
++ || (IS_MEM(adev) && IS_ACX100(adev))
++ ) {
++ /* at least ACX100 PCI F/W 1.9.8.b,
++ * ACX100 USB F/W 1.0.7-USB
++ * and ACX100 Generic Slave F/W 1.10.7.K
++ * don't have those two fields...
++ */
++ st -= 2*sizeof(u32);
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = temp2 = 999999999;
++ } else {
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = wep->wep_pkt_decrypt;
++ temp2 = wep->wep_decrypt_irqs;
++ }
++
++ p += sprintf(p,
++ "%s:\n"
++ " wep_key_count %u, wep_default_key_count %u, dot11_def_key_mib %u\n"
++ " wep_key_not_found %u, wep_decrypt_fail %u\n"
++ " wep_pkt_decrypt %u, wep_decrypt_irqs %u\n",
++ part_str,
++ wep->wep_key_count,
++ wep->wep_default_key_count,
++ wep->dot11_def_key_mib,
++ wep->wep_key_not_found,
++ wep->wep_decrypt_fail,
++ temp1,
++ temp2);
++
++ part_str = "power";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ pwr = (fw_stats_pwr_t *)st;
++ partlen = sizeof(fw_stats_pwr_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " tx_start_ctr %u, no_ps_tx_too_short %u\n"
++ " rx_start_ctr %u, no_ps_rx_too_short %u\n"
++ " lppd_started %u\n"
++ " no_lppd_too_noisy %u, no_lppd_too_short %u, no_lppd_matching_frame %u\n",
++ part_str,
++ pwr->tx_start_ctr,
++ pwr->no_ps_tx_too_short,
++ pwr->rx_start_ctr,
++ pwr->no_ps_rx_too_short,
++ pwr->lppd_started,
++ pwr->no_lppd_too_noisy,
++ pwr->no_lppd_too_short,
++ pwr->no_lppd_matching_frame);
++
++ part_str = "MIC";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ mic = (fw_stats_mic_t *)st;
++ partlen = sizeof(fw_stats_mic_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " mic_rx_pkts %u, mic_calc_fail %u\n",
++ part_str,
++ mic->mic_rx_pkts,
++ mic->mic_calc_fail);
++
++ part_str = "AES";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ aes = (fw_stats_aes_t *)st;
++ partlen = sizeof(fw_stats_aes_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " aes_enc_fail %u, aes_dec_fail %u\n"
++ " aes_enc_pkts %u, aes_dec_pkts %u\n"
++ " aes_enc_irq %u, aes_dec_irq %u\n",
++ part_str,
++ aes->aes_enc_fail,
++ aes->aes_dec_fail,
++ aes->aes_enc_pkts,
++ aes->aes_dec_pkts,
++ aes->aes_enc_irq,
++ aes->aes_dec_irq);
++
++ part_str = "event";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ evt = (fw_stats_event_t *)st;
++ partlen = sizeof(fw_stats_event_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " heartbeat %u, calibration %u\n"
++ " rx_mismatch %u, rx_mem_empty %u, rx_pool %u\n"
++ " oom_late %u\n"
++ " phy_tx_err %u, tx_stuck %u\n",
++ part_str,
++ evt->heartbeat,
++ evt->calibration,
++ evt->rx_mismatch,
++ evt->rx_mem_empty,
++ evt->rx_pool,
++ evt->oom_late,
++ evt->phy_tx_err,
++ evt->tx_stuck);
++
++ if (st < st_end)
++ goto fw_stats_bigger;
++
++ goto fw_stats_end;
++
++fw_stats_fail:
++ st -= partlen;
++ p += sprintf(p,
++ "failed at %s part (size %u), offset %u (struct size %u), "
++ "please report\n", part_str, partlen,
++ (int)st - (int)fw_stats, len);
++
++fw_stats_bigger:
++ for (; st < st_end; st += 4)
++ p += sprintf(p,
++ "UNKN%3d: %u\n", (int)st - (int)fw_stats, *(u32 *)st);
++
++fw_stats_end:
++ kfree(fw_stats);
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_proc_phy_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ /*
++ if (RADIO_RFMD_11 != adev->radio_type) {
++ printk("sorry, not yet adapted for radio types "
++ "other than RFMD, please verify "
++ "PHY size etc. first!\n");
++ goto end;
++ }
++ */
++
++ /* The PHY area is only 0x80 bytes long; further pages after that
++ * only have some page number registers with altered value,
++ * all other registers remain the same. */
++ for (i = 0; i < 0x80; i++) {
++ acx_s_read_phy_reg(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++** acx_e_read_proc_XXXX
++** Handle our /proc entry
++**
++** Arguments:
++** standard kernel read_proc interface
++** Returns:
++** number of bytes written to buf
++** Side effects:
++** none
++*/
++static int
++acx_e_read_proc(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ unsigned long flags;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++ /* fill buf */
++ length = acx_l_proc_output(buf, adev);
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static char _buf[32768];
++static int
++acx_e_read_proc_diag(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ /* fill buf */
++ length = acx_s_proc_diag_output(_buf, adev);
++ acx_sem_unlock(adev);
++
++ memcpy(buf, _buf + offset, count);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = count;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static int
++acx_e_read_proc_eeprom(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ /* fill buf */
++ length = 0;
++#if defined (ACX_MEM)
++ acx_sem_lock(adev);
++ length = acxmem_proc_eeprom_output(buf, adev);
++ acx_sem_unlock(adev);
++#else
++ if (IS_PCI(adev)) {
++ acx_sem_lock(adev);
++ length = acxpci_proc_eeprom_output(buf, adev);
++ acx_sem_unlock(adev);
++ }
++#endif
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static int
++acx_e_read_proc_phy(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ /* fill buf */
++ length = acx_s_proc_phy_output(buf, adev);
++ acx_sem_unlock(adev);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++
++/***********************************************************************
++** /proc files registration
++*/
++static const char * const
++proc_files[] = { "", "_diag", "_eeprom", "_phy" };
++
++static read_proc_t * const
++proc_funcs[] = {
++ acx_e_read_proc,
++ acx_e_read_proc_diag,
++ acx_e_read_proc_eeprom,
++ acx_e_read_proc_phy
++};
++
++static int
++manage_proc_entries(const struct net_device *ndev, int remove)
++{
++ acx_device_t *adev = ndev2adev((struct net_device *)ndev);
++ char procbuf[80];
++ int i;
++
++ for (i = 0; i < VEC_SIZE(proc_files); i++) {
++ snprintf(procbuf, sizeof(procbuf),
++ "driver/acx_%s%s", ndev->name, proc_files[i]);
++ log(L_INIT, "%sing /proc entry %s\n",
++ remove ? "remov" : "creat", procbuf);
++ if (!remove) {
++ if (!create_proc_read_entry(procbuf, 0, 0, proc_funcs[i], adev)) {
++ printk("acx: cannot register /proc entry %s\n", procbuf);
++ return NOT_OK;
++ }
++ } else {
++ remove_proc_entry(procbuf, NULL);
++ }
++ }
++ return OK;
++}
++
++int
++acx_proc_register_entries(const struct net_device *ndev)
++{
++ return manage_proc_entries(ndev, 0);
++}
++
++int
++acx_proc_unregister_entries(const struct net_device *ndev)
++{
++ return manage_proc_entries(ndev, 1);
++}
++#endif /* CONFIG_PROC_FS */
++
++
++/***********************************************************************
++** acx_cmd_join_bssid
++**
++** Common code for both acx100 and acx111.
++*/
++/* NB: does NOT match RATE100_nn but matches ACX[111]_SCAN_RATE_n */
++static const u8
++bitpos2genframe_txrate[] = {
++ 10, /* 0. 1 Mbit/s */
++ 20, /* 1. 2 Mbit/s */
++ 55, /* 2. 5.5 Mbit/s */
++ 0x0B, /* 3. 6 Mbit/s */
++ 0x0F, /* 4. 9 Mbit/s */
++ 110, /* 5. 11 Mbit/s */
++ 0x0A, /* 6. 12 Mbit/s */
++ 0x0E, /* 7. 18 Mbit/s */
++ 220, /* 8. 22 Mbit/s */
++ 0x09, /* 9. 24 Mbit/s */
++ 0x0D, /* 10. 36 Mbit/s */
++ 0x08, /* 11. 48 Mbit/s */
++ 0x0C, /* 12. 54 Mbit/s */
++ 10, /* 13. 1 Mbit/s, should never happen */
++ 10, /* 14. 1 Mbit/s, should never happen */
++ 10, /* 15. 1 Mbit/s, should never happen */
++};
++
++/* Looks scary, eh?
++** Actually, each one compiled into one AND and one SHIFT,
++** 31 bytes in x86 asm (more if uints are replaced by u16/u8) */
++static inline unsigned int
++rate111to5bits(unsigned int rate)
++{
++ return (rate & 0x7)
++ | ( (rate & RATE111_11) / (RATE111_11/JOINBSS_RATES_11) )
++ | ( (rate & RATE111_22) / (RATE111_22/JOINBSS_RATES_22) )
++ ;
++}
++
++static void
++acx_s_cmd_join_bssid(acx_device_t *adev, const u8 *bssid)
++{
++ acx_joinbss_t tmp;
++ int dtim_interval;
++ int i;
++
++ if (mac_is_zero(bssid))
++ return;
++
++ FN_ENTER;
++
++ dtim_interval = (ACX_MODE_0_ADHOC == adev->mode) ?
++ 1 : adev->dtim_interval;
++
++ memset(&tmp, 0, sizeof(tmp));
++
++ for (i = 0; i < ETH_ALEN; i++) {
++ tmp.bssid[i] = bssid[ETH_ALEN-1 - i];
++ }
++
++ tmp.beacon_interval = cpu_to_le16(adev->beacon_interval);
++
++ /* Basic rate set. Control frame responses (such as ACK or CTS frames)
++ ** are sent with one of these rates */
++ if (IS_ACX111(adev)) {
++ /* It was experimentally determined that rates_basic
++ ** can take 11g rates as well, not only rates
++ ** defined with JOINBSS_RATES_BASIC111_nnn.
++ ** Just use RATE111_nnn constants... */
++ tmp.u.acx111.dtim_interval = dtim_interval;
++ tmp.u.acx111.rates_basic = cpu_to_le16(adev->rate_basic);
++ log(L_ASSOC, "rates_basic:%04X, rates_supported:%04X\n",
++ adev->rate_basic, adev->rate_oper);
++ } else {
++ tmp.u.acx100.dtim_interval = dtim_interval;
++ tmp.u.acx100.rates_basic = rate111to5bits(adev->rate_basic);
++ tmp.u.acx100.rates_supported = rate111to5bits(adev->rate_oper);
++ log(L_ASSOC, "rates_basic:%04X->%02X, "
++ "rates_supported:%04X->%02X\n",
++ adev->rate_basic, tmp.u.acx100.rates_basic,
++ adev->rate_oper, tmp.u.acx100.rates_supported);
++ }
++
++ /* Setting up how Beacon, Probe Response, RTS, and PS-Poll frames
++ ** will be sent (rate/modulation/preamble) */
++ tmp.u.txrate.genfrm_txrate = bitpos2genframe_txrate[lowest_bit(adev->rate_basic)];
++ tmp.genfrm_mod_pre = 0; /* FIXME: was = adev->capab_short (which was always 0); */
++ /* we can use short pre *if* all peers can understand it */
++ /* FIXME #2: we need to correctly set PBCC/OFDM bits here too */
++
++ /* we switch fw to STA mode in MONITOR mode, it seems to be
++ ** the only mode where fw does not emit beacons by itself
++ ** but allows us to send anything (we really want to retain
++ ** ability to tx arbitrary frames in MONITOR mode)
++ */
++ tmp.macmode = (adev->mode != ACX_MODE_MONITOR ? adev->mode : ACX_MODE_2_STA);
++ tmp.channel = adev->channel;
++ tmp.essid_len = adev->essid_len;
++ /* NOTE: the code memcpy'd essid_len + 1 before, which is WRONG! */
++ memcpy(tmp.essid, adev->essid, tmp.essid_len);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_JOIN, &tmp, tmp.essid_len + 0x11);
++
++ log(L_ASSOC|L_DEBUG, "BSS_Type = %u\n", tmp.macmode);
++ acxlog_mac(L_ASSOC|L_DEBUG, "JoinBSSID MAC:", adev->bssid, "\n");
++
++ acx_update_capabilities(adev);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_s_cmd_start_scan
++**
++** Issue scan command to the hardware
++**
++** unified function for both ACX111 and ACX100
++*/
++static void
++acx_s_scan_chan(acx_device_t *adev)
++{
++ union {
++ acx111_scan_t acx111;
++ acx100_scan_t acx100;
++ } s;
++
++ FN_ENTER;
++
++ memset(&s, 0, sizeof(s));
++
++ /* first common positions... */
++
++ s.acx111.count = cpu_to_le16(adev->scan_count);
++ s.acx111.rate = adev->scan_rate;
++ s.acx111.options = adev->scan_mode;
++ s.acx111.chan_duration = cpu_to_le16(adev->scan_duration);
++ s.acx111.max_probe_delay = cpu_to_le16(adev->scan_probe_delay);
++
++ /* ...then differences */
++
++ if (IS_ACX111(adev)) {
++ s.acx111.channel_list_select = 0; /* scan every allowed channel */
++ /*s.acx111.channel_list_select = 1;*/ /* scan given channels */
++ /*s.acx111.modulation = 0x40;*/ /* long preamble? OFDM? -> only for active scan */
++ s.acx111.modulation = 0;
++ /*s.acx111.channel_list[0] = 6;
++ s.acx111.channel_list[1] = 4;*/
++ } else {
++ s.acx100.start_chan = cpu_to_le16(1);
++ s.acx100.flags = cpu_to_le16(0x8000);
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SCAN, &s, sizeof(s));
++ FN_EXIT0;
++}
++
++
++void
++acx_s_cmd_start_scan(acx_device_t *adev)
++{
++ /* time_before check is 'just in case' thing */
++ if (!(adev->irq_status & HOST_INT_SCAN_COMPLETE)
++ && time_before(jiffies, adev->scan_start + 10*HZ)
++ ) {
++ log(L_INIT, "start_scan: seems like previous scan "
++ "is still running. Not starting anew. Please report\n");
++ return;
++ }
++
++ log(L_INIT, "starting radio scan\n");
++ /* remember that fw is commanded to do scan */
++ adev->scan_start = jiffies;
++ CLEAR_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ /* issue it */
++ acx_s_scan_chan(adev);
++}
++
++
++/***********************************************************************
++** acx111 feature config
++*/
++static int
++acx111_s_get_feature_config(acx_device_t *adev,
++ u32 *feature_options, u32 *data_flow_options)
++{
++ struct acx111_ie_feature_config feat;
++
++ if (!IS_ACX111(adev)) {
++ return NOT_OK;
++ }
++
++ memset(&feat, 0, sizeof(feat));
++
++ if (OK != acx_s_interrogate(adev, &feat, ACX1xx_IE_FEATURE_CONFIG)) {
++ return NOT_OK;
++ }
++ log(L_DEBUG,
++ "got Feature option:0x%X, DataFlow option: 0x%X\n",
++ feat.feature_options,
++ feat.data_flow_options);
++
++ if (feature_options)
++ *feature_options = le32_to_cpu(feat.feature_options);
++ if (data_flow_options)
++ *data_flow_options = le32_to_cpu(feat.data_flow_options);
++
++ return OK;
++}
++
++static int
++acx111_s_set_feature_config(acx_device_t *adev,
++ u32 feature_options, u32 data_flow_options,
++ unsigned int mode /* 0 == remove, 1 == add, 2 == set */)
++{
++ struct acx111_ie_feature_config feat;
++
++ if (!IS_ACX111(adev)) {
++ return NOT_OK;
++ }
++
++ if ((mode < 0) || (mode > 2))
++ return NOT_OK;
++
++ if (mode != 2)
++ /* need to modify old data */
++ acx111_s_get_feature_config(adev, &feat.feature_options, &feat.data_flow_options);
++ else {
++ /* need to set a completely new value */
++ feat.feature_options = 0;
++ feat.data_flow_options = 0;
++ }
++
++ if (mode == 0) { /* remove */
++ CLEAR_BIT(feat.feature_options, cpu_to_le32(feature_options));
++ CLEAR_BIT(feat.data_flow_options, cpu_to_le32(data_flow_options));
++ } else { /* add or set */
++ SET_BIT(feat.feature_options, cpu_to_le32(feature_options));
++ SET_BIT(feat.data_flow_options, cpu_to_le32(data_flow_options));
++ }
++
++ log(L_DEBUG,
++ "old: feature 0x%08X dataflow 0x%08X. mode: %u\n"
++ "new: feature 0x%08X dataflow 0x%08X\n",
++ feature_options, data_flow_options, mode,
++ le32_to_cpu(feat.feature_options),
++ le32_to_cpu(feat.data_flow_options));
++
++ if (OK != acx_s_configure(adev, &feat, ACX1xx_IE_FEATURE_CONFIG)) {
++ return NOT_OK;
++ }
++
++ return OK;
++}
++
++static inline int
++acx111_s_feature_off(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 0);
++}
++static inline int
++acx111_s_feature_on(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 1);
++}
++static inline int
++acx111_s_feature_set(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 2);
++}
++
++
++/***********************************************************************
++** acx100_s_init_memory_pools
++*/
++static int
++acx100_s_init_memory_pools(acx_device_t *adev, const acx_ie_memmap_t *mmt)
++{
++ acx100_ie_memblocksize_t MemoryBlockSize;
++ acx100_ie_memconfigoption_t MemoryConfigOption;
++ int TotalMemoryBlocks;
++ int RxBlockNum;
++ int TotalRxBlockSize;
++ int TxBlockNum;
++ int TotalTxBlockSize;
++
++ FN_ENTER;
++
++ /* Let's see if we can follow this:
++ first we select our memory block size (which I think is
++ completely arbitrary) */
++ MemoryBlockSize.size = cpu_to_le16(adev->memblocksize);
++
++ /* Then we alert the card to our decision of block size */
++ if (OK != acx_s_configure(adev, &MemoryBlockSize, ACX100_IE_BLOCK_SIZE)) {
++ goto bad;
++ }
++
++ /* We figure out how many total blocks we can create, using
++ the block size we chose, and the beginning and ending
++ memory pointers, i.e.: end-start/size */
++ TotalMemoryBlocks = (le32_to_cpu(mmt->PoolEnd) - le32_to_cpu(mmt->PoolStart)) / adev->memblocksize;
++
++ log(L_DEBUG, "TotalMemoryBlocks=%u (%u bytes)\n",
++ TotalMemoryBlocks, TotalMemoryBlocks*adev->memblocksize);
++
++ /* MemoryConfigOption.DMA_config bitmask:
++ access to ACX memory is to be done:
++ 0x00080000 using PCI conf space?!
++ 0x00040000 using IO instructions?
++ 0x00000000 using memory access instructions
++ 0x00020000 using local memory block linked list (else what?)
++ 0x00010000 using host indirect descriptors (else host must access ACX memory?)
++ */
++#if defined (ACX_MEM)
++ /*
++ * ACX ignores DMA_config for generic slave mode.
++ */
++ MemoryConfigOption.DMA_config = 0;
++ /* Declare start of the Rx host pool */
++ MemoryConfigOption.pRxHostDesc = cpu2acx(0);
++ log(L_DEBUG, "pRxHostDesc 0x%08X, rxhostdesc_startphy 0x%lX\n",
++ acx2cpu(MemoryConfigOption.pRxHostDesc),
++ (long)adev->rxhostdesc_startphy);
++#else
++ if (IS_PCI(adev)) {
++ MemoryConfigOption.DMA_config = cpu_to_le32(0x30000);
++ /* Declare start of the Rx host pool */
++ MemoryConfigOption.pRxHostDesc = cpu2acx(adev->rxhostdesc_startphy);
++ log(L_DEBUG, "pRxHostDesc 0x%08X, rxhostdesc_startphy 0x%lX\n",
++ acx2cpu(MemoryConfigOption.pRxHostDesc),
++ (long)adev->rxhostdesc_startphy);
++ } else {
++ MemoryConfigOption.DMA_config = cpu_to_le32(0x20000);
++ }
++#endif
++
++ /* 50% of the allotment of memory blocks go to tx descriptors */
++ TxBlockNum = TotalMemoryBlocks / 2;
++ MemoryConfigOption.TxBlockNum = cpu_to_le16(TxBlockNum);
++
++ /* and 50% go to the rx descriptors */
++ RxBlockNum = TotalMemoryBlocks - TxBlockNum;
++ MemoryConfigOption.RxBlockNum = cpu_to_le16(RxBlockNum);
++
++ /* size of the tx and rx descriptor queues */
++ TotalTxBlockSize = TxBlockNum * adev->memblocksize;
++ TotalRxBlockSize = RxBlockNum * adev->memblocksize;
++ log(L_DEBUG, "TxBlockNum %u RxBlockNum %u TotalTxBlockSize %u "
++ "TotalTxBlockSize %u\n", TxBlockNum, RxBlockNum,
++ TotalTxBlockSize, TotalRxBlockSize);
++
++
++ /* align the tx descriptor queue to an alignment of 0x20 (32 bytes) */
++ MemoryConfigOption.rx_mem =
++ cpu_to_le32((le32_to_cpu(mmt->PoolStart) + 0x1f) & ~0x1f);
++
++ /* align the rx descriptor queue to units of 0x20
++ * and offset it by the tx descriptor queue */
++ MemoryConfigOption.tx_mem =
++ cpu_to_le32((le32_to_cpu(mmt->PoolStart) + TotalRxBlockSize + 0x1f) & ~0x1f);
++ log(L_DEBUG, "rx_mem %08X rx_mem %08X\n",
++ MemoryConfigOption.tx_mem, MemoryConfigOption.rx_mem);
++
++ /* alert the device to our decision */
++ if (OK != acx_s_configure(adev, &MemoryConfigOption, ACX1xx_IE_MEMORY_CONFIG_OPTIONS)) {
++ goto bad;
++ }
++
++ /* and tell the device to kick it into gear */
++ if (OK != acx_s_issue_cmd(adev, ACX100_CMD_INIT_MEMORY, NULL, 0)) {
++ goto bad;
++ }
++#ifdef ACX_MEM
++ /*
++ * slave memory interface has to manage the transmit pools for the ACX,
++ * so it needs to know what we chose here.
++ */
++ adev->acx_txbuf_start = MemoryConfigOption.tx_mem;
++ adev->acx_txbuf_numblocks = MemoryConfigOption.TxBlockNum;
++#endif
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx100_s_create_dma_regions
++**
++** Note that this fn messes up heavily with hardware, but we cannot
++** lock it (we need to sleep). Not a problem since IRQs can't happen
++*/
++static int
++acx100_s_create_dma_regions(acx_device_t *adev)
++{
++ acx100_ie_queueconfig_t queueconf;
++ acx_ie_memmap_t memmap;
++ int res = NOT_OK;
++ u32 tx_queue_start, rx_queue_start;
++
++ FN_ENTER;
++
++ /* read out the acx100 physical start address for the queues */
++ if (OK != acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ tx_queue_start = le32_to_cpu(memmap.QueueStart);
++ rx_queue_start = tx_queue_start + TX_CNT * sizeof(txdesc_t);
++
++ log(L_DEBUG, "initializing Queue Indicator\n");
++
++ memset(&queueconf, 0, sizeof(queueconf));
++
++ /* Not needed for PCI or slave memory, so we can avoid setting them altogether */
++ if (IS_USB(adev)) {
++ queueconf.NumTxDesc = USB_TX_CNT;
++ queueconf.NumRxDesc = USB_RX_CNT;
++ }
++
++ /* calculate size of queues */
++ queueconf.AreaSize = cpu_to_le32(
++ TX_CNT * sizeof(txdesc_t) +
++ RX_CNT * sizeof(rxdesc_t) + 8
++ );
++ queueconf.NumTxQueues = 1; /* number of tx queues */
++ /* sets the beginning of the tx descriptor queue */
++ queueconf.TxQueueStart = memmap.QueueStart;
++ /* done by memset: queueconf.TxQueuePri = 0; */
++ queueconf.RxQueueStart = cpu_to_le32(rx_queue_start);
++ queueconf.QueueOptions = 1; /* auto reset descriptor */
++ /* sets the end of the rx descriptor queue */
++ queueconf.QueueEnd = cpu_to_le32(
++ rx_queue_start + RX_CNT * sizeof(rxdesc_t)
++ );
++ /* sets the beginning of the next queue */
++ queueconf.HostQueueEnd = cpu_to_le32(le32_to_cpu(queueconf.QueueEnd) + 8);
++ if (OK != acx_s_configure(adev, &queueconf, ACX1xx_IE_QUEUE_CONFIG)) {
++ goto fail;
++ }
++
++#if defined (ACX_MEM)
++ /* sets the beginning of the rx descriptor queue, after the tx descrs */
++ adev->acx_queue_indicator =
++ (queueindicator_t *) le32_to_cpu (queueconf.QueueEnd);
++ if (OK != acxmem_s_create_hostdesc_queues(adev))
++ goto fail;
++
++ acxmem_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#else
++ if (IS_PCI(adev)) {
++ /* sets the beginning of the rx descriptor queue, after the tx descrs */
++ if (OK != acxpci_s_create_hostdesc_queues(adev))
++ goto fail;
++ acxpci_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++ }
++#endif
++
++ if (OK != acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ /*
++ * Have to make sure we skip past the Queue Indicator (QueueEnd) and Host Queue Indicator
++ * maps, each of which are 8 bytes and follow immediately after the transmit and
++ * receive queues.
++ */
++ memmap.PoolStart = cpu_to_le32(
++ (le32_to_cpu(memmap.QueueEnd) + 4 + 0x1f) & ~0x1f
++ );
++
++ if (OK != acx_s_configure(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ if (OK != acx100_s_init_memory_pools(adev, &memmap)) {
++ goto fail;
++ }
++
++ res = OK;
++ goto end;
++
++fail:
++ acx_s_msleep(1000); /* ? */
++#if defined (ACX_MEM)
++ acxmem_free_desc_queues(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_free_desc_queues(adev);
++#endif
++end:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acx111_s_create_dma_regions
++**
++** Note that this fn messes heavily with hardware, but we cannot
++** lock it (we need to sleep). Not a problem since IRQs can't happen
++*/
++#define ACX111_PERCENT(percent) ((percent)/5)
++
++static int
++acx111_s_create_dma_regions(acx_device_t *adev)
++{
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ u32 tx_queue_start, rx_queue_start;
++
++ FN_ENTER;
++
++ /* Calculate memory positions and queue sizes */
++
++ /* Set up our host descriptor pool + data pool */
++#if defined (ACX_MEM)
++ if (OK != acxmem_s_create_hostdesc_queues(adev))
++ goto fail;
++#else
++ if (IS_PCI(adev)) {
++ if (OK != acxpci_s_create_hostdesc_queues(adev))
++ goto fail;
++ }
++#endif
++
++ memset(&memconf, 0, sizeof(memconf));
++ /* the number of STAs (STA contexts) to support
++ ** NB: was set to 1 and everything seemed to work nevertheless... */
++ memconf.no_of_stations = cpu_to_le16(VEC_SIZE(adev->sta_list));
++ /* specify the memory block size. Default is 256 */
++ memconf.memory_block_size = cpu_to_le16(adev->memblocksize);
++ /* let's use 50%/50% for tx/rx (specify percentage, units of 5%) */
++ memconf.tx_rx_memory_block_allocation = ACX111_PERCENT(50);
++ /* set the count of our queues
++ ** NB: struct acx111_ie_memoryconfig shall be modified
++ ** if we ever will switch to more than one rx and/or tx queue */
++ memconf.count_rx_queues = 1;
++ memconf.count_tx_queues = 1;
++ /* 0 == Busmaster Indirect Memory Organization, which is what we want
++ * (using linked host descs with their allocated mem).
++ * 2 == Generic Bus Slave */
++ /* done by memset: memconf.options = 0; */
++ /* let's use 25% for fragmentations and 75% for frame transfers
++ * (specified in units of 5%) */
++ memconf.fragmentation = ACX111_PERCENT(75);
++ /* Rx descriptor queue config */
++ memconf.rx_queue1_count_descs = RX_CNT;
++ memconf.rx_queue1_type = 7; /* must be set to 7 */
++ /* done by memset: memconf.rx_queue1_prio = 0; low prio */
++#if defined (ACX_MEM)
++ memconf.rx_queue1_host_rx_start = cpu2acx(adev->rxhostdesc_startphy);
++#else
++ if (IS_PCI(adev)) {
++ memconf.rx_queue1_host_rx_start = cpu2acx(adev->rxhostdesc_startphy);
++ }
++#endif
++ /* Tx descriptor queue config */
++ memconf.tx_queue1_count_descs = TX_CNT;
++ /* done by memset: memconf.tx_queue1_attributes = 0; lowest priority */
++
++ /* NB1: this looks wrong: (memconf,ACX1xx_IE_QUEUE_CONFIG),
++ ** (queueconf,ACX1xx_IE_MEMORY_CONFIG_OPTIONS) look swapped, eh?
++ ** But it is actually correct wrt IE numbers.
++ ** NB2: sizeof(memconf) == 28 == 0x1c but configure(ACX1xx_IE_QUEUE_CONFIG)
++ ** writes 0x20 bytes (because same IE for acx100 uses struct acx100_ie_queueconfig
++ ** which is 4 bytes larger. what a mess. TODO: clean it up) */
++ if (OK != acx_s_configure(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG)) {
++ goto fail;
++ }
++
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++
++ tx_queue_start = le32_to_cpu(queueconf.tx1_queue_address);
++ rx_queue_start = le32_to_cpu(queueconf.rx1_queue_address);
++
++ log(L_INIT, "dump queue head (from card):\n"
++ "len: %u\n"
++ "tx_memory_block_address: %X\n"
++ "rx_memory_block_address: %X\n"
++ "tx1_queue address: %X\n"
++ "rx1_queue address: %X\n",
++ le16_to_cpu(queueconf.len),
++ le32_to_cpu(queueconf.tx_memory_block_address),
++ le32_to_cpu(queueconf.rx_memory_block_address),
++ tx_queue_start,
++ rx_queue_start);
++
++#if defined (ACX_MEM)
++ acxmem_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#else
++ if (IS_PCI(adev))
++ acxpci_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#endif
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++#if defined (ACX_MEM)
++ acxmem_free_desc_queues(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_free_desc_queues(adev);
++#endif
++
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++static void
++acx_s_initialize_rx_config(acx_device_t *adev)
++{
++ struct {
++ u16 id;
++ u16 len;
++ u16 rx_cfg1;
++ u16 rx_cfg2;
++ } ACX_PACKED cfg;
++
++ switch (adev->mode) {
++ case ACX_MODE_OFF:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ /* | RX_CFG1_FILTER_MAC */
++ /* | RX_CFG1_RCV_PROMISCUOUS */
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ /*| RX_CFG2_RCV_ASSOC_REQ */
++ /*| RX_CFG2_RCV_AUTH_FRAMES */
++ /*| RX_CFG2_RCV_BEACON_FRAMES */
++ /*| RX_CFG2_RCV_CONTENTION_FREE */
++ /*| RX_CFG2_RCV_CTRL_FRAMES */
++ /*| RX_CFG2_RCV_DATA_FRAMES */
++ /*| RX_CFG2_RCV_BROKEN_FRAMES */
++ /*| RX_CFG2_RCV_MGMT_FRAMES */
++ /*| RX_CFG2_RCV_PROBE_REQ */
++ /*| RX_CFG2_RCV_PROBE_RESP */
++ /*| RX_CFG2_RCV_ACK_FRAMES */
++ /*| RX_CFG2_RCV_OTHER */
++ );
++ break;
++ case ACX_MODE_MONITOR:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ /* | RX_CFG1_FILTER_MAC */
++ | RX_CFG1_RCV_PROMISCUOUS
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ | RX_CFG2_RCV_ASSOC_REQ
++ | RX_CFG2_RCV_AUTH_FRAMES
++ | RX_CFG2_RCV_BEACON_FRAMES
++ | RX_CFG2_RCV_CONTENTION_FREE
++ | RX_CFG2_RCV_CTRL_FRAMES
++ | RX_CFG2_RCV_DATA_FRAMES
++ | RX_CFG2_RCV_BROKEN_FRAMES
++ | RX_CFG2_RCV_MGMT_FRAMES
++ | RX_CFG2_RCV_PROBE_REQ
++ | RX_CFG2_RCV_PROBE_RESP
++ | RX_CFG2_RCV_ACK_FRAMES
++ | RX_CFG2_RCV_OTHER
++ );
++ break;
++ default:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ | RX_CFG1_FILTER_MAC
++ /* | RX_CFG1_RCV_PROMISCUOUS */
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ | RX_CFG2_RCV_ASSOC_REQ
++ | RX_CFG2_RCV_AUTH_FRAMES
++ | RX_CFG2_RCV_BEACON_FRAMES
++ | RX_CFG2_RCV_CONTENTION_FREE
++ | RX_CFG2_RCV_CTRL_FRAMES
++ | RX_CFG2_RCV_DATA_FRAMES
++ /*| RX_CFG2_RCV_BROKEN_FRAMES */
++ | RX_CFG2_RCV_MGMT_FRAMES
++ | RX_CFG2_RCV_PROBE_REQ
++ | RX_CFG2_RCV_PROBE_RESP
++ /*| RX_CFG2_RCV_ACK_FRAMES */
++ | RX_CFG2_RCV_OTHER
++ );
++ break;
++ }
++ adev->rx_config_1 |= RX_CFG1_INCLUDE_RXBUF_HDR;
++
++ if ((adev->rx_config_1 & RX_CFG1_INCLUDE_PHY_HDR)
++ || (adev->firmware_numver >= 0x02000000))
++ adev->phy_header_len = IS_ACX111(adev) ? 8 : 4;
++ else
++ adev->phy_header_len = 0;
++
++ log(L_INIT, "setting RXconfig to %04X:%04X\n",
++ adev->rx_config_1, adev->rx_config_2);
++ cfg.rx_cfg1 = cpu_to_le16(adev->rx_config_1);
++ cfg.rx_cfg2 = cpu_to_le16(adev->rx_config_2);
++ acx_s_configure(adev, &cfg, ACX1xx_IE_RXCONFIG);
++}
++
++
++/***********************************************************************
++** acx_s_set_defaults
++*/
++void
++acx_s_set_defaults(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* do it before getting settings, prevent bogus channel 0 warning */
++ adev->channel = 1;
++
++ /* query some settings from the card.
++ * NOTE: for some settings, e.g. CCA and ED (ACX100!), an initial
++ * query is REQUIRED, otherwise the card won't work correctly! */
++ adev->get_mask = GETSET_ANTENNA|GETSET_SENSITIVITY|GETSET_STATION_ID|GETSET_REG_DOMAIN;
++ /* Only ACX100 supports ED and CCA */
++ if (IS_ACX100(adev))
++ adev->get_mask |= GETSET_CCA|GETSET_ED_THRESH;
++
++ acx_s_update_card_settings(adev);
++
++ acx_lock(adev, flags);
++
++ /* set our global interrupt mask */
++#if defined (ACX_MEM)
++ acxmem_set_interrupt_mask(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_set_interrupt_mask(adev);
++#endif
++
++ adev->led_power = 1; /* LED is active on startup */
++ adev->brange_max_quality = 60; /* LED blink max quality is 60 */
++ adev->brange_time_last_state_change = jiffies;
++
++ /* copy the MAC address we just got from the card
++ * into our MAC address used during current 802.11 session */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ MAC_BCAST(adev->ap);
++
++ adev->essid_len =
++ snprintf(adev->essid, sizeof(adev->essid), "STA%02X%02X%02X",
++ adev->dev_addr[3], adev->dev_addr[4], adev->dev_addr[5]);
++ adev->essid_active = 1;
++
++ /* we have a nick field to waste, so why not abuse it
++ * to announce the driver version? ;-) */
++ strncpy(adev->nick, "acx " ACX_RELEASE, IW_ESSID_MAX_SIZE);
++
++#if defined (ACX_MEM)
++ adev->reg_dom_id = adev->cfgopt_domains.list[0];
++#else
++ if (IS_PCI(adev)) { /* FIXME: this should be made to apply to USB, too! */
++ /* first regulatory domain entry in EEPROM == default reg. domain */
++ adev->reg_dom_id = adev->cfgopt_domains.list[0];
++ }
++#endif
++
++ /* 0xffff would be better, but then we won't get a "scan complete"
++ * interrupt, so our current infrastructure will fail: */
++ adev->scan_count = 1;
++ adev->scan_mode = ACX_SCAN_OPT_ACTIVE;
++ adev->scan_duration = 100;
++ adev->scan_probe_delay = 200;
++ /* reported to break scanning: adev->scan_probe_delay = adev->cfgopt_probe_delay; */
++ adev->scan_rate = ACX_SCAN_RATE_1;
++
++ adev->mode = ACX_MODE_2_STA;
++ adev->auth_alg = WLAN_AUTH_ALG_OPENSYSTEM;
++ adev->listen_interval = 100;
++ adev->beacon_interval = DEFAULT_BEACON_INTERVAL;
++ adev->dtim_interval = DEFAULT_DTIM_INTERVAL;
++
++ adev->msdu_lifetime = DEFAULT_MSDU_LIFETIME;
++
++ adev->rts_threshold = DEFAULT_RTS_THRESHOLD;
++ adev->frag_threshold = 2346;
++
++ /* use standard default values for retry limits */
++ adev->short_retry = 7; /* max. retries for (short) non-RTS packets */
++ adev->long_retry = 4; /* max. retries for long (RTS) packets */
++
++ adev->preamble_mode = 2; /* auto */
++ adev->fallback_threshold = 3;
++ adev->stepup_threshold = 10;
++ adev->rate_bcast = RATE111_1;
++ adev->rate_bcast100 = RATE100_1;
++ adev->rate_basic = RATE111_1 | RATE111_2;
++ adev->rate_auto = 1;
++ if (IS_ACX111(adev)) {
++ adev->rate_oper = RATE111_ALL;
++ } else {
++ adev->rate_oper = RATE111_ACX100_COMPAT;
++ }
++
++ /* Supported Rates element - the rates here are given in units of
++ * 500 kbit/s, plus 0x80 added. See 802.11-1999.pdf item 7.3.2.2 */
++ acx_l_update_ratevector(adev);
++
++ /* set some more defaults */
++ if (IS_ACX111(adev)) {
++ /* 30mW (15dBm) is default, at least in my acx111 card: */
++ adev->tx_level_dbm = 15;
++ } else {
++ /* don't use max. level, since it might be dangerous
++ * (e.g. WRT54G people experience
++ * excessive Tx power damage!) */
++ adev->tx_level_dbm = 18;
++ /*
++ * Lower power for the iPaq hx4700
++ */
++ if (IS_MEM(adev)) {
++ adev->tx_level_dbm = 14;
++ }
++ }
++ /* adev->tx_level_auto = 1; */
++ if (IS_ACX111(adev)) {
++ /* start with sensitivity level 1 out of 3: */
++ adev->sensitivity = 1;
++ }
++
++/* #define ENABLE_POWER_SAVE */
++#ifdef ENABLE_POWER_SAVE
++ adev->ps_wakeup_cfg = PS_CFG_ENABLE | PS_CFG_WAKEUP_ALL_BEAC;
++ adev->ps_listen_interval = 1;
++ adev->ps_options = PS_OPT_ENA_ENHANCED_PS | PS_OPT_TX_PSPOLL | PS_OPT_STILL_RCV_BCASTS;
++ adev->ps_hangover_period = 30;
++ adev->ps_enhanced_transition_time = 0;
++#else
++ adev->ps_wakeup_cfg = 0;
++ adev->ps_listen_interval = 0;
++ adev->ps_options = 0;
++ adev->ps_hangover_period = 0;
++ adev->ps_enhanced_transition_time = 0;
++#endif
++
++ /* These settings will be set in fw on ifup */
++ adev->set_mask = 0
++ | GETSET_RETRY
++ | SET_MSDU_LIFETIME
++ /* configure card to do rate fallback when in auto rate mode */
++ | SET_RATE_FALLBACK
++ | SET_RXCONFIG
++ | GETSET_TXPOWER
++ /* better re-init the antenna value we got above */
++ | GETSET_ANTENNA
++#if POWER_SAVE_80211
++ | GETSET_POWER_80211
++#endif
++ ;
++
++ acx_unlock(adev, flags);
++ acx_lock_unhold(); /* hold time 844814 CPU ticks @2GHz */
++
++ acx_s_initialize_rx_config(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** FIXME: this should be solved in a general way for all radio types
++** by decoding the radio firmware module,
++** since it probably has some standard structure describing how to
++** set the power level of the radio module which it controls.
++** Or maybe not, since the radio module probably has a function interface
++** instead which then manages Tx level programming :-\
++*/
++static int
++acx111_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* my acx111 card has two power levels in its configoptions (== EEPROM):
++ * 1 (30mW) [15dBm]
++ * 2 (10mW) [10dBm]
++ * For now, just assume all other acx111 cards have the same.
++ * FIXME: Ideally we would query it here, but we first need a
++ * standard way to query individual configoptions easily.
++ * Well, now we have proper cfgopt txpower variables, but this still
++ * hasn't been done yet, since it also requires dBm <-> mW conversion here... */
++ if (level_dbm <= 12) {
++ tx_level.level = 2; /* 10 dBm */
++ adev->tx_level_dbm = 10;
++ } else {
++ tx_level.level = 1; /* 15 dBm */
++ adev->tx_level_dbm = 15;
++ }
++ if (level_dbm != adev->tx_level_dbm)
++ log(L_INIT, "acx111 firmware has specific "
++ "power levels only: adjusted %d dBm to %d dBm!\n",
++ level_dbm, adev->tx_level_dbm);
++
++ return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++}
++
++static int
++acx_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ if (IS_ACX111(adev)) {
++ return acx111_s_set_tx_level(adev, level_dbm);
++ }
++#if defined (ACX_MEM)
++ return acx100mem_s_set_tx_level(adev, level_dbm);
++#else
++ if (IS_PCI(adev)) {
++ return acx100pci_s_set_tx_level(adev, level_dbm);
++ }
++#endif
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++#ifdef UNUSED
++/* Returns the current tx level (ACX111) */
++static u8
++acx111_s_get_tx_level(acx_device_t *adev)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ tx_level.level = 0;
++ acx_s_interrogate(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++ return tx_level.level;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_rxmonitor
++** Called from IRQ context only
++*/
++static void
++acx_l_rxmonitor(acx_device_t *adev, const rxbuffer_t *rxbuf)
++{
++ wlansniffrm_t *msg;
++ struct sk_buff *skb;
++ void *datap;
++ unsigned int skb_len;
++ int payload_offset;
++
++ FN_ENTER;
++
++ /* we are in big luck: the acx100 doesn't modify any of the fields */
++ /* in the 802.11 frame. just pass this packet into the PF_PACKET */
++ /* subsystem. yeah. */
++ payload_offset = ((u8*)acx_get_wlan_hdr(adev, rxbuf) - (u8*)rxbuf);
++ skb_len = RXBUF_BYTES_USED(rxbuf) - payload_offset;
++
++ /* sanity check */
++ if (unlikely(skb_len > WLAN_A4FR_MAXLEN_WEP)) {
++ printk("%s: monitor mode panic: oversized frame!\n",
++ adev->ndev->name);
++ goto end;
++ }
++
++ if (adev->ndev->type == ARPHRD_IEEE80211_PRISM)
++ skb_len += sizeof(*msg);
++
++ /* allocate skb */
++ skb = dev_alloc_skb(skb_len);
++ if (unlikely(!skb)) {
++ printk("%s: no memory for skb (%u bytes)\n",
++ adev->ndev->name, skb_len);
++ goto end;
++ }
++
++ skb_put(skb, skb_len);
++
++ if (adev->ndev->type == ARPHRD_IEEE80211) {
++ /* when in raw 802.11 mode, just copy frame as-is */
++ datap = skb->data;
++ } else if (adev->ndev->type == ARPHRD_IEEE80211_PRISM) {
++ /* emulate prism header */
++ msg = (wlansniffrm_t*)skb->data;
++ datap = msg + 1;
++
++ msg->msgcode = WLANSNIFFFRM;
++ msg->msglen = sizeof(*msg);
++ strncpy(msg->devname, adev->ndev->name, sizeof(msg->devname)-1);
++ msg->devname[sizeof(msg->devname)-1] = '\0';
++
++ msg->hosttime.did = WLANSNIFFFRM_hosttime;
++ msg->hosttime.status = WLANITEM_STATUS_data_ok;
++ msg->hosttime.len = 4;
++ msg->hosttime.data = jiffies;
++
++ msg->mactime.did = WLANSNIFFFRM_mactime;
++ msg->mactime.status = WLANITEM_STATUS_data_ok;
++ msg->mactime.len = 4;
++ msg->mactime.data = rxbuf->time;
++
++ msg->channel.did = WLANSNIFFFRM_channel;
++ msg->channel.status = WLANITEM_STATUS_data_ok;
++ msg->channel.len = 4;
++ msg->channel.data = adev->channel;
++
++ msg->rssi.did = WLANSNIFFFRM_rssi;
++ msg->rssi.status = WLANITEM_STATUS_no_value;
++ msg->rssi.len = 4;
++ msg->rssi.data = 0;
++
++ msg->sq.did = WLANSNIFFFRM_sq;
++ msg->sq.status = WLANITEM_STATUS_no_value;
++ msg->sq.len = 4;
++ msg->sq.data = 0;
++
++ msg->signal.did = WLANSNIFFFRM_signal;
++ msg->signal.status = WLANITEM_STATUS_data_ok;
++ msg->signal.len = 4;
++ msg->signal.data = rxbuf->phy_snr;
++
++ msg->noise.did = WLANSNIFFFRM_noise;
++ msg->noise.status = WLANITEM_STATUS_data_ok;
++ msg->noise.len = 4;
++ msg->noise.data = rxbuf->phy_level;
++
++ msg->rate.did = WLANSNIFFFRM_rate;
++ msg->rate.status = WLANITEM_STATUS_data_ok;
++ msg->rate.len = 4;
++ msg->rate.data = rxbuf->phy_plcp_signal / 5;
++
++ msg->istx.did = WLANSNIFFFRM_istx;
++ msg->istx.status = WLANITEM_STATUS_data_ok;
++ msg->istx.len = 4;
++ msg->istx.data = 0; /* tx=0: it's not a tx packet */
++
++ skb_len -= sizeof(*msg);
++
++ msg->frmlen.did = WLANSNIFFFRM_signal;
++ msg->frmlen.status = WLANITEM_STATUS_data_ok;
++ msg->frmlen.len = 4;
++ msg->frmlen.data = skb_len;
++ } else {
++ printk("acx: unsupported netdev type %d!\n", adev->ndev->type);
++ dev_kfree_skb(skb);
++ return;
++ }
++
++ /* sanity check (keep it here) */
++ if (unlikely((int)skb_len < 0)) {
++ printk("acx: skb_len=%d. Driver bug, please report\n", (int)skb_len);
++ dev_kfree_skb(skb);
++ return;
++ }
++ memcpy(datap, ((unsigned char*)rxbuf)+payload_offset, skb_len);
++
++ skb->dev = adev->ndev;
++ skb->dev->last_rx = jiffies;
++
++ skb_reset_mac_header(skb);
++ skb->ip_summed = CHECKSUM_NONE;
++ skb->pkt_type = PACKET_OTHERHOST;
++ skb->protocol = htons(ETH_P_80211_RAW);
++ netif_rx(skb);
++
++ adev->stats.rx_packets++;
++ adev->stats.rx_bytes += skb->len;
++
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_rx_ieee802_11_frame
++**
++** Called from IRQ context only
++*/
++
++/* All these contortions are for saner dup logging
++**
++** We want: (a) to know about excessive dups
++** (b) to not spam kernel log about occasional dups
++**
++** 1/64 threshold was chosen by running "ping -A"
++** It gave "rx: 59 DUPs in 2878 packets" only with 4 parallel
++** "ping -A" streams running. */
++/* 2005-10-11: bumped up to 1/8
++** subtract a $smallint from dup_count in order to
++** avoid "2 DUPs in 19 packets" messages */
++static inline int
++acx_l_handle_dup(acx_device_t *adev, u16 seq)
++{
++ if (adev->dup_count) {
++ adev->nondup_count++;
++ if (time_after(jiffies, adev->dup_msg_expiry)) {
++ /* Log only if more than 1 dup in 64 packets */
++ if (adev->nondup_count/8 < adev->dup_count-5) {
++ printk(KERN_INFO "%s: rx: %d DUPs in "
++ "%d packets received in 10 secs\n",
++ adev->ndev->name,
++ adev->dup_count,
++ adev->nondup_count);
++ }
++ adev->dup_count = 0;
++ adev->nondup_count = 0;
++ }
++ }
++ if (unlikely(seq == adev->last_seq_ctrl)) {
++ if (!adev->dup_count++)
++ adev->dup_msg_expiry = jiffies + 10*HZ;
++ adev->stats.rx_errors++;
++ return 1; /* a dup */
++ }
++ adev->last_seq_ctrl = seq;
++ return 0;
++}
++
++static int
++acx_l_rx_ieee802_11_frame(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ unsigned int ftype, fstype;
++ const wlan_hdr_t *hdr;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ /* see IEEE 802.11-1999.pdf chapter 7 "MAC frame formats" */
++ if (unlikely((hdr->fc & WF_FC_PVERi) != 0)) {
++ printk_ratelimited(KERN_INFO "rx: unsupported 802.11 protocol\n");
++ goto end;
++ }
++
++ ftype = hdr->fc & WF_FC_FTYPEi;
++ fstype = hdr->fc & WF_FC_FSTYPEi;
++
++ switch (ftype) {
++ /* check data frames first, for speed */
++ case WF_FTYPE_DATAi:
++ switch (fstype) {
++ case WF_FSTYPE_DATAONLYi:
++ if (acx_l_handle_dup(adev, hdr->seq))
++ break; /* a dup, simply discard it */
++
++ /* TODO:
++ if (WF_FC_FROMTODSi == (hdr->fc & WF_FC_FROMTODSi)) {
++ result = acx_l_process_data_frame_wds(adev, rxbuf);
++ break;
++ }
++ */
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++ result = acx_l_process_data_frame_master(adev, rxbuf);
++ break;
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ result = acx_l_process_data_frame_client(adev, rxbuf);
++ break;
++ }
++ case WF_FSTYPE_DATA_CFACKi:
++ case WF_FSTYPE_DATA_CFPOLLi:
++ case WF_FSTYPE_DATA_CFACK_CFPOLLi:
++ case WF_FSTYPE_CFPOLLi:
++ case WF_FSTYPE_CFACK_CFPOLLi:
++ /* see above.
++ acx_process_class_frame(adev, rxbuf, 3); */
++ break;
++ case WF_FSTYPE_NULLi:
++ /* acx_l_process_NULL_frame(adev, rxbuf, 3); */
++ break;
++ /* FIXME: same here, see above */
++ case WF_FSTYPE_CFACKi:
++ default:
++ break;
++ }
++ break;
++ case WF_FTYPE_MGMTi:
++ result = acx_l_process_mgmt_frame(adev, rxbuf);
++ break;
++ case WF_FTYPE_CTLi:
++ if (fstype == WF_FSTYPE_PSPOLLi)
++ result = OK;
++ /* this call is irrelevant, since
++ * acx_process_class_frame is a stub, so return
++ * immediately instead.
++ * return acx_process_class_frame(adev, rxbuf, 3); */
++ break;
++ default:
++ break;
++ }
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_rxbuf
++**
++** NB: used by USB code also
++*/
++void
++acx_l_process_rxbuf(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *hdr;
++ unsigned int qual;
++ int buf_len;
++ u16 fc;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++ fc = le16_to_cpu(hdr->fc);
++ /* length of frame from control field to first byte of FCS */
++ buf_len = RXBUF_BYTES_RCVD(adev, rxbuf);
++
++ if ( ((WF_FC_FSTYPE & fc) != WF_FSTYPE_BEACON)
++ || (acx_debug & L_XFER_BEACON)
++ ) {
++ log(L_XFER|L_DATA, "rx: %s "
++ "time:%u len:%u signal:%u SNR:%u macstat:%02X "
++ "phystat:%02X phyrate:%u status:%u\n",
++ acx_get_packet_type_string(fc),
++ le32_to_cpu(rxbuf->time),
++ buf_len,
++ acx_signal_to_winlevel(rxbuf->phy_level),
++ acx_signal_to_winlevel(rxbuf->phy_snr),
++ rxbuf->mac_status,
++ rxbuf->phy_stat_baseband,
++ rxbuf->phy_plcp_signal,
++ adev->status);
++ }
++
++ if (unlikely(acx_debug & L_DATA)) {
++ printk("rx: 802.11 buf[%u]: ", buf_len);
++ acx_dump_bytes(hdr, buf_len);
++ }
++
++ /* FIXME: should check for Rx errors (rxbuf->mac_status?
++ * discard broken packets - but NOT for monitor!)
++ * and update Rx packet statistics here */
++
++ if (unlikely(adev->mode == ACX_MODE_MONITOR)) {
++ acx_l_rxmonitor(adev, rxbuf);
++ } else if (likely(buf_len >= WLAN_HDR_A3_LEN)) {
++ acx_l_rx_ieee802_11_frame(adev, rxbuf);
++ } else {
++ log(L_DEBUG|L_XFER|L_DATA,
++ "rx: NOT receiving packet (%s): "
++ "size too small (%u)\n",
++ acx_get_packet_type_string(fc),
++ buf_len);
++ }
++
++ /* Now check Rx quality level, AFTER processing packet.
++ * I tried to figure out how to map these levels to dBm
++ * values, but for the life of me I really didn't
++ * manage to get it. Either these values are not meant to
++ * be expressed in dBm, or it's some pretty complicated
++ * calculation. */
++
++#ifdef FROM_SCAN_SOURCE_ONLY
++ /* only consider packets originating from the MAC
++ * address of the device that's managing our BSSID.
++ * Disable it for now, since it removes information (levels
++ * from different peers) and slows the Rx path. */
++ if (adev->ap_client
++ && mac_is_equal(hdr->a2, adev->ap_client->address)) {
++#endif
++ adev->wstats.qual.level = acx_signal_to_winlevel(rxbuf->phy_level);
++ adev->wstats.qual.noise = acx_signal_to_winlevel(rxbuf->phy_snr);
++#ifndef OLD_QUALITY
++ qual = acx_signal_determine_quality(adev->wstats.qual.level,
++ adev->wstats.qual.noise);
++#else
++ qual = (adev->wstats.qual.noise <= 100) ?
++ 100 - adev->wstats.qual.noise : 0;
++#endif
++ adev->wstats.qual.qual = qual;
++ adev->wstats.qual.updated = 7; /* all 3 indicators updated */
++#ifdef FROM_SCAN_SOURCE_ONLY
++ }
++#endif
++}
++
++
++/***********************************************************************
++** acx_l_handle_txrate_auto
++**
++** Theory of operation:
++** client->rate_cap is a bitmask of rates client is capable of.
++** client->rate_cfg is a bitmask of allowed (configured) rates.
++** It is set as a result of iwconfig rate N [auto]
++** or iwpriv set_rates "N,N,N N,N,N" commands.
++** It can be fixed (e.g. 0x0080 == 18Mbit only),
++** auto (0x00ff == 18Mbit or any lower value),
++** and code handles any bitmask (0x1081 == try 54Mbit,18Mbit,1Mbit _only_).
++**
++** client->rate_cur is a value for rate111 field in tx descriptor.
++** It is always set to txrate_cfg sans zero or more most significant
++** bits. This routine handles selection of new rate_cur value depending on
++** outcome of last tx event.
++**
++** client->rate_100 is a precalculated rate value for acx100
++** (we can do without it, but will need to calculate it on each tx).
++**
++** You cannot configure mixed usage of 5.5 and/or 11Mbit rate
++** with PBCC and CCK modulation. Either both at CCK or both at PBCC.
++** In theory you can implement it, but so far it is considered not worth doing.
++**
++** 22Mbit, of course, is PBCC always. */
++
++/* maps acx100 tx descr rate field to acx111 one */
++static u16
++rate100to111(u8 r)
++{
++ switch (r) {
++ case RATE100_1: return RATE111_1;
++ case RATE100_2: return RATE111_2;
++ case RATE100_5:
++ case (RATE100_5 | RATE100_PBCC511): return RATE111_5;
++ case RATE100_11:
++ case (RATE100_11 | RATE100_PBCC511): return RATE111_11;
++ case RATE100_22: return RATE111_22;
++ default:
++ printk("acx: unexpected acx100 txrate: %u! "
++ "Please report\n", r);
++ return RATE111_1;
++ }
++}
++
++
++void
++acx_l_handle_txrate_auto(acx_device_t *adev, struct client *txc,
++ u16 cur, u8 rate100, u16 rate111,
++ u8 error, int pkts_to_ignore)
++{
++ u16 sent_rate;
++ int slower_rate_was_used;
++
++ /* vda: hmm. current code will do this:
++ ** 1. send packets at 11 Mbit, stepup++
++ ** 2. will try to send at 22Mbit. hardware will see no ACK,
++ ** retries at 11Mbit, success. code notes that used rate
++ ** is lower. stepup = 0, fallback++
++ ** 3. repeat step 2 fallback_count times. Fall back to
++ ** 11Mbit. go to step 1.
++ ** If stepup_count is large (say, 16) and fallback_count
++ ** is small (3), this wouldn't be too bad wrt throughput */
++
++ if (unlikely(!cur)) {
++ printk("acx: BUG! ratemask is empty\n");
++ return; /* or else we may lock up the box */
++ }
++
++ /* do some preparations, i.e. calculate the one rate that was
++ * used to send this packet */
++ if (IS_ACX111(adev)) {
++ sent_rate = 1 << highest_bit(rate111 & RATE111_ALL);
++ } else {
++ sent_rate = rate100to111(rate100);
++ }
++ /* sent_rate has only one bit set now, corresponding to tx rate
++ * which was used by hardware to tx this particular packet */
++
++ /* now do the actual auto rate management */
++ log(L_XFER, "tx: %sclient=%p/"MACSTR" used=%04X cur=%04X cfg=%04X "
++ "__=%u/%u ^^=%u/%u\n",
++ (txc->ignore_count > 0) ? "[IGN] " : "",
++ txc, MAC(txc->address), sent_rate, cur, txc->rate_cfg,
++ txc->fallback_count, adev->fallback_threshold,
++ txc->stepup_count, adev->stepup_threshold
++ );
++
++ /* we need to ignore old packets already in the tx queue since
++ * they use older rate bytes configured before our last rate change,
++ * otherwise our mechanism will get confused by interpreting old data.
++ * Do it after logging above */
++ if (txc->ignore_count) {
++ txc->ignore_count--;
++ return;
++ }
++
++ /* true only if the only nonzero bit in sent_rate is
++ ** less significant than highest nonzero bit in cur */
++ slower_rate_was_used = ( cur > ((sent_rate<<1)-1) );
++
++ if (slower_rate_was_used || error) {
++ txc->stepup_count = 0;
++ if (++txc->fallback_count <= adev->fallback_threshold)
++ return;
++ txc->fallback_count = 0;
++
++ /* clear highest 1 bit in cur */
++ sent_rate = RATE111_54;
++ while (!(cur & sent_rate)) sent_rate >>= 1;
++ CLEAR_BIT(cur, sent_rate);
++ if (!cur) /* we can't disable all rates! */
++ cur = sent_rate;
++ log(L_XFER, "tx: falling back to ratemask %04X\n", cur);
++
++ } else { /* there was neither lower rate nor error */
++ txc->fallback_count = 0;
++ if (++txc->stepup_count <= adev->stepup_threshold)
++ return;
++ txc->stepup_count = 0;
++
++ /* Sanitize. Sort of not needed, but I dont trust hw that much...
++ ** what if it can report bogus tx rates sometimes? */
++ while (!(cur & sent_rate)) sent_rate >>= 1;
++
++ /* try to find a higher sent_rate that isn't yet in our
++ * current set, but is an allowed cfg */
++ while (1) {
++ sent_rate <<= 1;
++ if (sent_rate > txc->rate_cfg)
++ /* no higher rates allowed by config */
++ return;
++ if (!(cur & sent_rate) && (txc->rate_cfg & sent_rate))
++ /* found */
++ break;
++ /* not found, try higher one */
++ }
++ SET_BIT(cur, sent_rate);
++ log(L_XFER, "tx: stepping up to ratemask %04X\n", cur);
++ }
++
++ txc->rate_cur = cur;
++ txc->ignore_count = pkts_to_ignore;
++ /* calculate acx100 style rate byte if needed */
++ if (IS_ACX100(adev)) {
++ txc->rate_100 = acx_bitpos2rate100[highest_bit(cur)];
++ }
++}
++
++
++/***********************************************************************
++** acx_i_start_xmit
++**
++** Called by network core. Can be called outside of process context.
++*/
++int
++acx_i_start_xmit(struct sk_buff *skb, struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ tx_t *tx;
++ void *txbuf;
++ unsigned long flags;
++ int txresult = NOT_OK;
++ int len;
++
++ FN_ENTER;
++
++ if (unlikely(!skb)) {
++ /* indicate success */
++ txresult = OK;
++ goto end_no_unlock;
++ }
++ if (unlikely(!adev)) {
++ goto end_no_unlock;
++ }
++
++ acx_lock(adev, flags);
++
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ goto end;
++ }
++ if (unlikely(adev->mode == ACX_MODE_OFF)) {
++ goto end;
++ }
++ if (unlikely(acx_queue_stopped(ndev))) {
++ log(L_DEBUG, "%s: called when queue stopped\n", __func__);
++ goto end;
++ }
++ if (unlikely(ACX_STATUS_4_ASSOCIATED != adev->status)) {
++ log(L_XFER, "trying to xmit, but not associated yet: "
++ "aborting...\n");
++ /* silently drop the packet, since we're not connected yet */
++ txresult = OK;
++ /* ...but indicate an error nevertheless */
++ adev->stats.tx_errors++;
++ goto end;
++ }
++
++ tx = acx_l_alloc_tx(adev);
++ if (unlikely(!tx)) {
++#ifndef ACX_MEM
++ /*
++ * generic slave interface has to make do with the tiny amount, around
++ * 7k, of transmit buffer space on the ACX itself. It is likely this will
++ * frequently be full.
++ */
++ printk_ratelimited("%s: start_xmit: txdesc ring is full, "
++ "dropping tx\n", ndev->name);
++#endif
++ txresult = NOT_OK;
++ goto end;
++ }
++
++ txbuf = acx_l_get_txbuf(adev, tx);
++ if (unlikely(!txbuf)) {
++ /* Card was removed */
++ txresult = NOT_OK;
++ acx_l_dealloc_tx(adev, tx);
++ goto end;
++ }
++ len = acx_ether_to_txbuf(adev, txbuf, skb);
++ if (unlikely(len < 0)) {
++ /* Error in packet conversion */
++ txresult = NOT_OK;
++ acx_l_dealloc_tx(adev, tx);
++ goto end;
++ }
++ acx_l_tx_data(adev, tx, len);
++ ndev->trans_start = jiffies;
++
++ txresult = OK;
++ adev->stats.tx_packets++;
++ adev->stats.tx_bytes += skb->len;
++
++end:
++ acx_unlock(adev, flags);
++
++end_no_unlock:
++ if ((txresult == OK) && skb)
++ dev_kfree_skb_any(skb);
++
++ FN_EXIT1(txresult);
++ return txresult;
++}
++
++
++/***********************************************************************
++** acx_l_update_ratevector
++**
++** Updates adev->rate_supported[_len] according to rate_{basic,oper}
++*/
++const u8
++acx_bitpos2ratebyte[] = {
++ DOT11RATEBYTE_1,
++ DOT11RATEBYTE_2,
++ DOT11RATEBYTE_5_5,
++ DOT11RATEBYTE_6_G,
++ DOT11RATEBYTE_9_G,
++ DOT11RATEBYTE_11,
++ DOT11RATEBYTE_12_G,
++ DOT11RATEBYTE_18_G,
++ DOT11RATEBYTE_22,
++ DOT11RATEBYTE_24_G,
++ DOT11RATEBYTE_36_G,
++ DOT11RATEBYTE_48_G,
++ DOT11RATEBYTE_54_G,
++};
++
++void
++acx_l_update_ratevector(acx_device_t *adev)
++{
++ u16 bcfg = adev->rate_basic;
++ u16 ocfg = adev->rate_oper;
++ u8 *supp = adev->rate_supported;
++ const u8 *dot11 = acx_bitpos2ratebyte;
++
++ FN_ENTER;
++
++ while (ocfg) {
++ if (ocfg & 1) {
++ *supp = *dot11;
++ if (bcfg & 1) {
++ *supp |= 0x80;
++ }
++ supp++;
++ }
++ dot11++;
++ ocfg >>= 1;
++ bcfg >>= 1;
++ }
++ adev->rate_supported_len = supp - adev->rate_supported;
++ if (acx_debug & L_ASSOC) {
++ printk("new ratevector: ");
++ acx_dump_bytes(adev->rate_supported, adev->rate_supported_len);
++ }
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_init
++*/
++static void
++acx_l_sta_list_init(acx_device_t *adev)
++{
++ FN_ENTER;
++ memset(adev->sta_hash_tab, 0, sizeof(adev->sta_hash_tab));
++ memset(adev->sta_list, 0, sizeof(adev->sta_list));
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get_from_hash
++*/
++static inline client_t*
++acx_l_sta_list_get_from_hash(acx_device_t *adev, const u8 *address)
++{
++ return adev->sta_hash_tab[address[5] % VEC_SIZE(adev->sta_hash_tab)];
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get
++*/
++client_t*
++acx_l_sta_list_get(acx_device_t *adev, const u8 *address)
++{
++ client_t *client;
++ FN_ENTER;
++ client = acx_l_sta_list_get_from_hash(adev, address);
++ while (client) {
++ if (mac_is_equal(address, client->address)) {
++ client->mtime = jiffies;
++ break;
++ }
++ client = client->next;
++ }
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_del
++*/
++void
++acx_l_sta_list_del(acx_device_t *adev, client_t *victim)
++{
++ client_t *client, *next;
++
++ client = acx_l_sta_list_get_from_hash(adev, victim->address);
++ next = client;
++ /* tricky. next = client on first iteration only,
++ ** on all other iters next = client->next */
++ while (next) {
++ if (next == victim) {
++ client->next = victim->next;
++ /* Overkill */
++ memset(victim, 0, sizeof(*victim));
++ break;
++ }
++ client = next;
++ next = client->next;
++ }
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_alloc
++**
++** Never fails - will evict oldest client if needed
++*/
++static client_t*
++acx_l_sta_list_alloc(acx_device_t *adev)
++{
++ int i;
++ unsigned long age, oldest_age;
++ client_t *client, *oldest;
++
++ FN_ENTER;
++
++ oldest = &adev->sta_list[0];
++ oldest_age = 0;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client = &adev->sta_list[i];
++
++ if (!client->used) {
++ goto found;
++ } else {
++ age = jiffies - client->mtime;
++ if (oldest_age < age) {
++ oldest_age = age;
++ oldest = client;
++ }
++ }
++ }
++ acx_l_sta_list_del(adev, oldest);
++ client = oldest;
++found:
++ memset(client, 0, sizeof(*client));
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_add
++**
++** Never fails - will evict oldest client if needed
++*/
++/* In case we will reimplement it differently... */
++#define STA_LIST_ADD_CAN_FAIL 0
++
++static client_t*
++acx_l_sta_list_add(acx_device_t *adev, const u8 *address)
++{
++ client_t *client;
++ int index;
++
++ FN_ENTER;
++
++ client = acx_l_sta_list_alloc(adev);
++
++ client->mtime = jiffies;
++ MAC_COPY(client->address, address);
++ client->used = CLIENT_EXIST_1;
++ client->auth_alg = WLAN_AUTH_ALG_SHAREDKEY;
++ client->auth_step = 1;
++ /* give some tentative peer rate values
++ ** (needed because peer may do auth without probing us first,
++ ** thus we'll have no idea of peer's ratevector yet).
++ ** Will be overwritten by scanning or assoc code */
++ client->rate_cap = adev->rate_basic;
++ client->rate_cfg = adev->rate_basic;
++ client->rate_cur = 1 << lowest_bit(adev->rate_basic);
++
++ index = address[5] % VEC_SIZE(adev->sta_hash_tab);
++ client->next = adev->sta_hash_tab[index];
++ adev->sta_hash_tab[index] = client;
++
++ acxlog_mac(L_ASSOC, "sta_list_add: sta=", address, "\n");
++
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get_or_add
++**
++** Never fails - will evict oldest client if needed
++*/
++static client_t*
++acx_l_sta_list_get_or_add(acx_device_t *adev, const u8 *address)
++{
++ client_t *client = acx_l_sta_list_get(adev, address);
++ if (!client)
++ client = acx_l_sta_list_add(adev, address);
++ return client;
++}
++
++
++/***********************************************************************
++** acx_set_status
++**
++** This function is called in many atomic regions, must not sleep
++**
++** This function does not need locking UNLESS you call it
++** as acx_set_status(ACX_STATUS_4_ASSOCIATED), bacause this can
++** wake queue. This can race with stop_queue elsewhere.
++** See acx_stop_queue comment. */
++void
++acx_set_status(acx_device_t *adev, u16 new_status)
++{
++#define QUEUE_OPEN_AFTER_ASSOC 1 /* this really seems to be needed now */
++ u16 old_status = adev->status;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "%s(%d):%s\n",
++ __func__, new_status, acx_get_status_name(new_status));
++
++ /* wireless_send_event never sleeps */
++ if (ACX_STATUS_4_ASSOCIATED == new_status) {
++ union iwreq_data wrqu;
++
++ wrqu.data.length = 0;
++ wrqu.data.flags = 0;
++ wireless_send_event(adev->ndev, SIOCGIWSCAN, &wrqu, NULL);
++
++ wrqu.data.length = 0;
++ wrqu.data.flags = 0;
++ MAC_COPY(wrqu.ap_addr.sa_data, adev->bssid);
++ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
++ wireless_send_event(adev->ndev, SIOCGIWAP, &wrqu, NULL);
++ } else {
++ union iwreq_data wrqu;
++
++ /* send event with empty BSSID to indicate we're not associated */
++ MAC_ZERO(wrqu.ap_addr.sa_data);
++ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
++ wireless_send_event(adev->ndev, SIOCGIWAP, &wrqu, NULL);
++ }
++
++ adev->status = new_status;
++
++ switch (new_status) {
++ case ACX_STATUS_1_SCANNING:
++ adev->scan_retries = 0;
++ /* 1.0 s initial scan time */
++ acx_set_timer(adev, 1000000);
++ break;
++ case ACX_STATUS_2_WAIT_AUTH:
++ case ACX_STATUS_3_AUTHENTICATED:
++ adev->auth_or_assoc_retries = 0;
++ acx_set_timer(adev, 1500000); /* 1.5 s */
++ break;
++ }
++
++#if QUEUE_OPEN_AFTER_ASSOC
++ if (new_status == ACX_STATUS_4_ASSOCIATED) {
++ if (old_status < ACX_STATUS_4_ASSOCIATED) {
++ /* ah, we're newly associated now,
++ * so let's indicate carrier */
++ acx_carrier_on(adev->ndev, "after association");
++ acx_wake_queue(adev->ndev, "after association");
++ }
++ } else {
++ /* not associated any more, so let's kill carrier */
++ if (old_status >= ACX_STATUS_4_ASSOCIATED) {
++ acx_carrier_off(adev->ndev, "after losing association");
++ acx_stop_queue(adev->ndev, "after losing association");
++ }
++ }
++#endif
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_i_timer
++**
++** Fires up periodically. Used to kick scan/auth/assoc if something goes wrong
++*/
++void
++acx_i_timer(unsigned long address)
++{
++ unsigned long flags;
++ acx_device_t *adev = (acx_device_t*)address;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ log(L_DEBUG|L_ASSOC, "%s: adev->status=%d (%s)\n",
++ __func__, adev->status, acx_get_status_name(adev->status));
++
++ switch (adev->status) {
++ case ACX_STATUS_1_SCANNING:
++ /* was set to 0 by set_status() */
++ if (++adev->scan_retries < 7) {
++ acx_set_timer(adev, 1000000);
++ /* used to interrogate for scan status.
++ ** We rely on SCAN_COMPLETE IRQ instead */
++ log(L_ASSOC, "continuing scan (%d sec)\n",
++ adev->scan_retries);
++ } else {
++ log(L_ASSOC, "stopping scan\n");
++ /* send stop_scan cmd when we leave the interrupt context,
++ * and make a decision what to do next (COMPLETE_SCAN) */
++ acx_schedule_task(adev,
++ ACX_AFTER_IRQ_CMD_STOP_SCAN + ACX_AFTER_IRQ_COMPLETE_SCAN);
++ }
++ break;
++ case ACX_STATUS_2_WAIT_AUTH:
++ /* was set to 0 by set_status() */
++ if (++adev->auth_or_assoc_retries < 10) {
++ log(L_ASSOC, "resend authen1 request (attempt %d)\n",
++ adev->auth_or_assoc_retries + 1);
++ acx_l_transmit_authen1(adev);
++ } else {
++ /* time exceeded: fall back to scanning mode */
++ log(L_ASSOC,
++ "authen1 request reply timeout, giving up\n");
++ /* we are a STA, need to find AP anyhow */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ /* used to be 1500000, but some other driver uses 2.5s */
++ acx_set_timer(adev, 2500000);
++ break;
++ case ACX_STATUS_3_AUTHENTICATED:
++ /* was set to 0 by set_status() */
++ if (++adev->auth_or_assoc_retries < 10) {
++ log(L_ASSOC, "resend assoc request (attempt %d)\n",
++ adev->auth_or_assoc_retries + 1);
++ acx_l_transmit_assoc_req(adev);
++ } else {
++ /* time exceeded: give up */
++ log(L_ASSOC,
++ "association request reply timeout, giving up\n");
++ /* we are a STA, need to find AP anyhow */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ acx_set_timer(adev, 2500000); /* see above */
++ break;
++ case ACX_STATUS_4_ASSOCIATED:
++ default:
++ break;
++ }
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_set_timer
++**
++** Sets the 802.11 state management timer's timeout.
++*/
++void
++acx_set_timer(acx_device_t *adev, int timeout_us)
++{
++ FN_ENTER;
++
++ log(L_DEBUG|L_IRQ, "%s(%u ms)\n", __func__, timeout_us/1000);
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ printk("attempt to set the timer "
++ "when the card interface is not up!\n");
++ goto end;
++ }
++
++ /* first check if the timer was already initialized, THEN modify it */
++ if (adev->mgmt_timer.function) {
++ mod_timer(&adev->mgmt_timer,
++ jiffies + (timeout_us * HZ / 1000000));
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_assocresp
++**
++** We are an AP here
++*/
++static const u8
++dot11ratebyte[] = {
++ DOT11RATEBYTE_1,
++ DOT11RATEBYTE_2,
++ DOT11RATEBYTE_5_5,
++ DOT11RATEBYTE_6_G,
++ DOT11RATEBYTE_9_G,
++ DOT11RATEBYTE_11,
++ DOT11RATEBYTE_12_G,
++ DOT11RATEBYTE_18_G,
++ DOT11RATEBYTE_22,
++ DOT11RATEBYTE_24_G,
++ DOT11RATEBYTE_36_G,
++ DOT11RATEBYTE_48_G,
++ DOT11RATEBYTE_54_G,
++};
++
++static inline int
++find_pos(const u8 *p, int size, u8 v)
++{
++ int i;
++ for (i = 0; i < size; i++)
++ if (p[i] == v)
++ return i;
++ /* printk a message about strange byte? */
++ return 0;
++}
++
++static void
++add_bits_to_ratemasks(u8* ratevec, int len, u16* brate, u16* orate)
++{
++ while (len--) {
++ int n = 1 << find_pos(dot11ratebyte,
++ sizeof(dot11ratebyte), *ratevec & 0x7f);
++ if (*ratevec & 0x80)
++ *brate |= n;
++ *orate |= n;
++ ratevec++;
++ }
++}
++
++static int
++acx_l_transmit_assocresp(acx_device_t *adev, const wlan_fr_assocreq_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct assocresp_frame_body *body;
++ u8 *p;
++ const u8 *da;
++ /* const u8 *sa; */
++ const u8 *bssid;
++ client_t *clt;
++
++ FN_ENTER;
++
++ /* sa = req->hdr->a1; */
++ da = req->hdr->a2;
++ bssid = req->hdr->a3;
++
++ clt = acx_l_sta_list_get(adev, da);
++ if (!clt)
++ goto ok;
++
++ /* Assoc without auth is a big no-no */
++ /* Let's be liberal: if already assoc'ed STA sends assoc req again,
++ ** we won't be rude */
++ if (clt->used != CLIENT_AUTHENTICATED_2
++ && clt->used != CLIENT_ASSOCIATED_3) {
++ acx_l_transmit_deauthen(adev, da, WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ goto bad;
++ }
++
++ clt->used = CLIENT_ASSOCIATED_3;
++
++ if (clt->aid == 0)
++ clt->aid = ++adev->aid;
++ clt->cap_info = ieee2host16(*(req->cap_info));
++
++ /* We cheat here a bit. We don't really care which rates are flagged
++ ** as basic by the client, so we stuff them in single ratemask */
++ clt->rate_cap = 0;
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &clt->rate_cap, &clt->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &clt->rate_cap, &clt->rate_cap);
++ /* We can check that client supports all basic rates,
++ ** and deny assoc if not. But let's be liberal, right? ;) */
++ clt->rate_cfg = clt->rate_cap & adev->rate_oper;
++ if (!clt->rate_cfg) clt->rate_cfg = 1 << lowest_bit(adev->rate_oper);
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[lowest_bit(clt->rate_cfg)];
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_ASSOCRESPi;
++ head->dur = req->hdr->dur;
++ MAC_COPY(head->da, da);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, bssid);
++ head->seq = req->hdr->seq;
++
++ body->cap_info = host2ieee16(adev->capabilities);
++ body->status = host2ieee16(0);
++ body->aid = host2ieee16(clt->aid);
++ p = wlan_fill_ie_rates((u8*)&body->rates, adev->rate_supported_len,
++ adev->rate_supported);
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len,
++ adev->rate_supported);
++
++ acx_l_tx_data(adev, tx, p - (u8*)head);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++* acx_l_transmit_reassocresp
++
++You may be wondering, just like me, what the hell ReAuth is.
++In practice it was seen sent by STA when STA feels like losing connection.
++
++[802.11]
++
++5.4.2.3 Reassociation
++
++Association is sufficient for no-transition message delivery between
++IEEE 802.11 stations. Additional functionality is needed to support
++BSS-transition mobility. The additional required functionality
++is provided by the reassociation service. Reassociation is a DSS.
++The reassociation service is invoked to 'move' a current association
++from one AP to another. This keeps the DS informed of the current
++mapping between AP and STA as the station moves from BSS to BSS within
++an ESS. Reassociation also enables changing association attributes
++of an established association while the STA remains associated with
++the same AP. Reassociation is always initiated by the mobile STA.
++
++5.4.3.1 Authentication
++...
++A STA may be authenticated with many other STAs at any given instant.
++
++5.4.3.1.1 Preauthentication
++
++Because the authentication process could be time-consuming (depending
++on the authentication protocol in use), the authentication service can
++be invoked independently of the association service. Preauthentication
++is typically done by a STA while it is already associated with an AP
++(with which it previously authenticated). IEEE 802.11 does not require
++that STAs preauthenticate with APs. However, authentication is required
++before an association can be established. If the authentication is left
++until reassociation time, this may impact the speed with which a STA can
++reassociate between APs, limiting BSS-transition mobility performance.
++The use of preauthentication takes the authentication service overhead
++out of the time-critical reassociation process.
++
++5.7.3 Reassociation
++
++For a STA to reassociate, the reassociation service causes the following
++message to occur:
++
++ Reassociation request
++
++* Message type: Management
++* Message subtype: Reassociation request
++* Information items:
++ - IEEE address of the STA
++ - IEEE address of the AP with which the STA will reassociate
++ - IEEE address of the AP with which the STA is currently associated
++ - ESSID
++* Direction of message: From STA to 'new' AP
++
++The address of the current AP is included for efficiency. The inclusion
++of the current AP address facilitates MAC reassociation to be independent
++of the DS implementation.
++
++ Reassociation response
++* Message type: Management
++* Message subtype: Reassociation response
++* Information items:
++ - Result of the requested reassociation. (success/failure)
++ - If the reassociation is successful, the response shall include the AID.
++* Direction of message: From AP to STA
++
++7.2.3.6 Reassociation Request frame format
++
++The frame body of a management frame of subtype Reassociation Request
++contains the information shown in Table 9.
++
++Table 9 Reassociation Request frame body
++Order Information
++1 Capability information
++2 Listen interval
++3 Current AP address
++4 SSID
++5 Supported rates
++
++7.2.3.7 Reassociation Response frame format
++
++The frame body of a management frame of subtype Reassociation Response
++contains the information shown in Table 10.
++
++Table 10 Reassociation Response frame body
++Order Information
++1 Capability information
++2 Status code
++3 Association ID (AID)
++4 Supported rates
++
++*/
++static int
++acx_l_transmit_reassocresp(acx_device_t *adev, const wlan_fr_reassocreq_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct reassocresp_frame_body *body;
++ u8 *p;
++ const u8 *da;
++ /* const u8 *sa; */
++ const u8 *bssid;
++ client_t *clt;
++
++ FN_ENTER;
++
++ /* sa = req->hdr->a1; */
++ da = req->hdr->a2;
++ bssid = req->hdr->a3;
++
++ /* Must be already authenticated, so it must be in the list */
++ clt = acx_l_sta_list_get(adev, da);
++ if (!clt)
++ goto ok;
++
++ /* Assoc without auth is a big no-no */
++ /* Already assoc'ed STAs sending ReAssoc req are ok per 802.11 */
++ if (clt->used != CLIENT_AUTHENTICATED_2
++ && clt->used != CLIENT_ASSOCIATED_3) {
++ acx_l_transmit_deauthen(adev, da, WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ goto bad;
++ }
++
++ clt->used = CLIENT_ASSOCIATED_3;
++ if (clt->aid == 0) {
++ clt->aid = ++adev->aid;
++ }
++ if (req->cap_info)
++ clt->cap_info = ieee2host16(*(req->cap_info));
++
++ /* We cheat here a bit. We don't really care which rates are flagged
++ ** as basic by the client, so we stuff them in single ratemask */
++ clt->rate_cap = 0;
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &clt->rate_cap, &clt->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &clt->rate_cap, &clt->rate_cap);
++ /* We can check that client supports all basic rates,
++ ** and deny assoc if not. But let's be liberal, right? ;) */
++ clt->rate_cfg = clt->rate_cap & adev->rate_oper;
++ if (!clt->rate_cfg) clt->rate_cfg = 1 << lowest_bit(adev->rate_oper);
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[lowest_bit(clt->rate_cfg)];
++
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_REASSOCRESPi;
++ head->dur = req->hdr->dur;
++ MAC_COPY(head->da, da);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, bssid);
++ head->seq = req->hdr->seq;
++
++ /* IEs: 1. caps */
++ body->cap_info = host2ieee16(adev->capabilities);
++ /* 2. status code */
++ body->status = host2ieee16(0);
++ /* 3. AID */
++ body->aid = host2ieee16(clt->aid);
++ /* 4. supp rates */
++ p = wlan_fill_ie_rates((u8*)&body->rates, adev->rate_supported_len,
++ adev->rate_supported);
++ /* 5. ext supp rates */
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len,
++ adev->rate_supported);
++
++ acx_l_tx_data(adev, tx, p - (u8*)head);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_process_disassoc_from_sta
++*/
++static void
++acx_l_process_disassoc_from_sta(acx_device_t *adev, const wlan_fr_disassoc_t *req)
++{
++ const u8 *ta;
++ client_t *clt;
++
++ FN_ENTER;
++
++ ta = req->hdr->a2;
++ clt = acx_l_sta_list_get(adev, ta);
++ if (!clt)
++ goto end;
++
++ if (clt->used != CLIENT_ASSOCIATED_3
++ && clt->used != CLIENT_AUTHENTICATED_2) {
++ /* it's disassociating, but it's
++ ** not even authenticated! Let it know that */
++ acxlog_mac(L_ASSOC|L_XFER, "peer ", ta, "has sent disassoc "
++ "req but it is not even auth'ed! sending deauth\n");
++ acx_l_transmit_deauthen(adev, ta,
++ WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ clt->used = CLIENT_EXIST_1;
++ } else {
++ /* mark it as auth'ed only */
++ clt->used = CLIENT_AUTHENTICATED_2;
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_deauthen_from_sta
++*/
++static void
++acx_l_process_deauth_from_sta(acx_device_t *adev, const wlan_fr_deauthen_t *req)
++{
++ const wlan_hdr_t *hdr;
++ client_t *client;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (acx_debug & L_ASSOC) {
++ acx_print_mac("got deauth from sta:", hdr->a2, " ");
++ acx_print_mac("a1:", hdr->a1, " ");
++ acx_print_mac("a3:", hdr->a3, " ");
++ acx_print_mac("adev->addr:", adev->dev_addr, " ");
++ acx_print_mac("adev->bssid:", adev->bssid, "\n");
++ }
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)) {
++ goto end;
++ }
++
++ client = acx_l_sta_list_get(adev, hdr->a2);
++ if (!client) {
++ goto end;
++ }
++ client->used = CLIENT_EXIST_1;
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_disassoc_from_ap
++*/
++static void
++acx_l_process_disassoc_from_ap(acx_device_t *adev, const wlan_fr_disassoc_t *req)
++{
++ FN_ENTER;
++
++ if (!adev->ap_client) {
++ /* Hrm, we aren't assoc'ed yet anyhow... */
++ goto end;
++ }
++
++ printk("%s: got disassoc frame with reason %d (%s)\n",
++ adev->ndev->name, *req->reason,
++ acx_wlan_reason_str(*req->reason));
++
++ if (mac_is_equal(adev->dev_addr, req->hdr->a1)) {
++ acx_l_transmit_deauthen(adev, adev->bssid,
++ WLAN_MGMT_REASON_DEAUTH_LEAVING);
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_deauth_from_ap
++*/
++static void
++acx_l_process_deauth_from_ap(acx_device_t *adev, const wlan_fr_deauthen_t *req)
++{
++ FN_ENTER;
++
++ if (!adev->ap_client) {
++ /* Hrm, we aren't assoc'ed yet anyhow... */
++ goto end;
++ }
++
++ printk("%s: got deauth frame with reason %d (%s)\n",
++ adev->ndev->name, *req->reason,
++ acx_wlan_reason_str(*req->reason));
++
++ /* Chk: is ta verified to be from our AP? */
++ if (mac_is_equal(adev->dev_addr, req->hdr->a1)) {
++ log(L_DEBUG, "AP sent us deauth packet\n");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_rx
++**
++** The end of the Rx path. Pulls data from a rxhostdesc into a socket
++** buffer and feeds it to the network stack via netif_rx().
++*/
++static void
++acx_l_rx(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ FN_ENTER;
++ if (likely(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ struct sk_buff *skb;
++ skb = acx_rxbuf_to_ether(adev, rxbuf);
++ if (likely(skb)) {
++ netif_rx(skb);
++ adev->ndev->last_rx = jiffies;
++ adev->stats.rx_packets++;
++ adev->stats.rx_bytes += skb->len;
++ }
++ }
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_data_frame_master
++*/
++static int
++acx_l_process_data_frame_master(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *hdr;
++ struct tx *tx;
++ void *txbuf;
++ int len;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ case WF_FC_FROMDSi:
++ log(L_DEBUG, "ap->sta or adhoc->adhoc data frame ignored\n");
++ goto done;
++ case WF_FC_TODSi:
++ break;
++ default: /* WF_FC_FROMTODSi */
++ log(L_DEBUG, "wds data frame ignored (TODO)\n");
++ goto done;
++ }
++
++ /* check if it is our BSSID, if not, leave */
++ if (!mac_is_equal(adev->bssid, hdr->a1)) {
++ goto done;
++ }
++
++ if (mac_is_equal(adev->dev_addr, hdr->a3)) {
++ /* this one is for us */
++ acx_l_rx(adev, rxbuf);
++ } else {
++ if (mac_is_bcast(hdr->a3)) {
++ /* this one is bcast, rx it too */
++ acx_l_rx(adev, rxbuf);
++ }
++ tx = acx_l_alloc_tx(adev);
++ if (!tx) {
++ goto fail;
++ }
++ /* repackage, tx, and hope it someday reaches its destination */
++ /* order is important, we do it in-place */
++ MAC_COPY(hdr->a1, hdr->a3);
++ MAC_COPY(hdr->a3, hdr->a2);
++ MAC_COPY(hdr->a2, adev->bssid);
++ /* To_DS = 0, From_DS = 1 */
++ hdr->fc = WF_FC_FROMDSi + WF_FTYPE_DATAi;
++
++ txbuf = acx_l_get_txbuf(adev, tx);
++ if (txbuf) {
++ len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ memcpy(txbuf, hdr, len);
++ acx_l_tx_data(adev, tx, len);
++ } else {
++ acx_l_dealloc_tx(adev, tx);
++ }
++ }
++done:
++ result = OK;
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_data_frame_client
++*/
++static int
++acx_l_process_data_frame_client(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ const u8 *da, *bssid;
++ const wlan_hdr_t *hdr;
++ struct net_device *ndev = adev->ndev;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ if (ACX_STATUS_4_ASSOCIATED != adev->status)
++ goto drop;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ if (adev->mode != ACX_MODE_0_ADHOC) {
++ log(L_DEBUG, "adhoc->adhoc data frame ignored\n");
++ goto drop;
++ }
++ bssid = hdr->a3;
++ break;
++ case WF_FC_FROMDSi:
++ if (adev->mode != ACX_MODE_2_STA) {
++ log(L_DEBUG, "ap->sta data frame ignored\n");
++ goto drop;
++ }
++ bssid = hdr->a2;
++ break;
++ case WF_FC_TODSi:
++ log(L_DEBUG, "sta->ap data frame ignored\n");
++ goto drop;
++ default: /* WF_FC_FROMTODSi: wds->wds */
++ log(L_DEBUG, "wds data frame ignored (todo)\n");
++ goto drop;
++ }
++
++ da = hdr->a1;
++
++ if (unlikely(acx_debug & L_DEBUG)) {
++ acx_print_mac("rx: da=", da, "");
++ acx_print_mac(" bssid=", bssid, "");
++ acx_print_mac(" adev->bssid=", adev->bssid, "");
++ acx_print_mac(" adev->addr=", adev->dev_addr, "\n");
++ }
++
++ /* promiscuous mode --> receive all packets */
++ if (unlikely(ndev->flags & IFF_PROMISC))
++ goto process;
++
++ /* FIRST, check if it is our BSSID */
++ if (!mac_is_equal(adev->bssid, bssid)) {
++ /* is not our BSSID, so bail out */
++ goto drop;
++ }
++
++ /* then, check if it is our address */
++ if (mac_is_equal(adev->dev_addr, da)) {
++ goto process;
++ }
++
++ /* then, check if it is broadcast */
++ if (mac_is_bcast(da)) {
++ goto process;
++ }
++
++ if (mac_is_mcast(da)) {
++ /* unconditionally receive all multicasts */
++ if (ndev->flags & IFF_ALLMULTI)
++ goto process;
++
++ /* FIXME: need to check against the list of
++ * multicast addresses that are configured
++ * for the interface (ifconfig) */
++ log(L_XFER, "FIXME: multicast packet, need to check "
++ "against a list of multicast addresses "
++ "(to be created!); accepting packet for now\n");
++ /* for now, just accept it here */
++ goto process;
++ }
++
++ log(L_DEBUG, "rx: foreign packet, dropping\n");
++ goto drop;
++process:
++ /* receive packet */
++ acx_l_rx(adev, rxbuf);
++
++ result = OK;
++drop:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_mgmt_frame
++**
++** Theory of operation: mgmt packet gets parsed (to make it easy
++** to access variable-sized IEs), results stored in 'parsed'.
++** Then we react to the packet.
++*/
++typedef union parsed_mgmt_req {
++ wlan_fr_mgmt_t mgmt;
++ wlan_fr_assocreq_t assocreq;
++ wlan_fr_reassocreq_t reassocreq;
++ wlan_fr_assocresp_t assocresp;
++ wlan_fr_reassocresp_t reassocresp;
++ wlan_fr_beacon_t beacon;
++ wlan_fr_disassoc_t disassoc;
++ wlan_fr_authen_t authen;
++ wlan_fr_deauthen_t deauthen;
++ wlan_fr_proberesp_t proberesp;
++} parsed_mgmt_req_t;
++
++void BUG_excessive_stack_usage(void);
++
++static int
++acx_l_process_mgmt_frame(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ parsed_mgmt_req_t parsed; /* takes ~100 bytes of stack */
++ wlan_hdr_t *hdr;
++ int adhoc, sta_scan, sta, ap;
++ int len;
++
++ if (sizeof(parsed) > 256)
++ BUG_excessive_stack_usage();
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ /* Management frames never have these set */
++ if (WF_FC_FROMTODSi & hdr->fc) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ if (WF_FC_ISWEPi & hdr->fc)
++ len -= 0x10;
++
++ adhoc = (adev->mode == ACX_MODE_0_ADHOC);
++ sta_scan = ((adev->mode == ACX_MODE_2_STA)
++ && (adev->status != ACX_STATUS_4_ASSOCIATED));
++ sta = ((adev->mode == ACX_MODE_2_STA)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED));
++ ap = (adev->mode == ACX_MODE_3_AP);
++
++ switch (WF_FC_FSTYPEi & hdr->fc) {
++ /* beacons first, for speed */
++ case WF_FSTYPE_BEACONi:
++ memset(&parsed.beacon, 0, sizeof(parsed.beacon));
++ parsed.beacon.hdr = hdr;
++ parsed.beacon.len = len;
++ if (acx_debug & L_DATA) {
++ printk("beacon len:%d fc:%04X dur:%04X seq:%04X",
++ len, hdr->fc, hdr->dur, hdr->seq);
++ acx_print_mac(" a1:", hdr->a1, "");
++ acx_print_mac(" a2:", hdr->a2, "");
++ acx_print_mac(" a3:", hdr->a3, "\n");
++ }
++ wlan_mgmt_decode_beacon(&parsed.beacon);
++ /* beacon and probe response are very similar, so... */
++ acx_l_process_probe_response(adev, &parsed.beacon, rxbuf);
++ break;
++ case WF_FSTYPE_ASSOCREQi:
++ if (!ap)
++ break;
++ memset(&parsed.assocreq, 0, sizeof(parsed.assocreq));
++ parsed.assocreq.hdr = hdr;
++ parsed.assocreq.len = len;
++ wlan_mgmt_decode_assocreq(&parsed.assocreq);
++ if (mac_is_equal(hdr->a1, adev->bssid)
++ && mac_is_equal(hdr->a3, adev->bssid)) {
++ acx_l_transmit_assocresp(adev, &parsed.assocreq);
++ }
++ break;
++ case WF_FSTYPE_REASSOCREQi:
++ if (!ap)
++ break;
++ memset(&parsed.assocreq, 0, sizeof(parsed.assocreq));
++ parsed.assocreq.hdr = hdr;
++ parsed.assocreq.len = len;
++ wlan_mgmt_decode_assocreq(&parsed.assocreq);
++ /* reassocreq and assocreq are equivalent */
++ acx_l_transmit_reassocresp(adev, &parsed.reassocreq);
++ break;
++ case WF_FSTYPE_ASSOCRESPi:
++ if (!sta_scan)
++ break;
++ memset(&parsed.assocresp, 0, sizeof(parsed.assocresp));
++ parsed.assocresp.hdr = hdr;
++ parsed.assocresp.len = len;
++ wlan_mgmt_decode_assocresp(&parsed.assocresp);
++ acx_l_process_assocresp(adev, &parsed.assocresp);
++ break;
++ case WF_FSTYPE_REASSOCRESPi:
++ if (!sta_scan)
++ break;
++ memset(&parsed.assocresp, 0, sizeof(parsed.assocresp));
++ parsed.assocresp.hdr = hdr;
++ parsed.assocresp.len = len;
++ wlan_mgmt_decode_assocresp(&parsed.assocresp);
++ acx_l_process_reassocresp(adev, &parsed.reassocresp);
++ break;
++ case WF_FSTYPE_PROBEREQi:
++ if (ap || adhoc) {
++ /* FIXME: since we're supposed to be an AP,
++ ** we need to return a Probe Response packet.
++ ** Currently firmware is doing it for us,
++ ** but firmware is buggy! See comment elsewhere --vda */
++ }
++ break;
++ case WF_FSTYPE_PROBERESPi:
++ memset(&parsed.proberesp, 0, sizeof(parsed.proberesp));
++ parsed.proberesp.hdr = hdr;
++ parsed.proberesp.len = len;
++ wlan_mgmt_decode_proberesp(&parsed.proberesp);
++ acx_l_process_probe_response(adev, &parsed.proberesp, rxbuf);
++ break;
++ case 6:
++ case 7:
++ /* exit */
++ break;
++ case WF_FSTYPE_ATIMi:
++ /* exit */
++ break;
++ case WF_FSTYPE_DISASSOCi:
++ if (!sta && !ap)
++ break;
++ memset(&parsed.disassoc, 0, sizeof(parsed.disassoc));
++ parsed.disassoc.hdr = hdr;
++ parsed.disassoc.len = len;
++ wlan_mgmt_decode_disassoc(&parsed.disassoc);
++ if (sta)
++ acx_l_process_disassoc_from_ap(adev, &parsed.disassoc);
++ else
++ acx_l_process_disassoc_from_sta(adev, &parsed.disassoc);
++ break;
++ case WF_FSTYPE_AUTHENi:
++ if (!sta_scan && !ap)
++ break;
++ memset(&parsed.authen, 0, sizeof(parsed.authen));
++ parsed.authen.hdr = hdr;
++ parsed.authen.len = len;
++ wlan_mgmt_decode_authen(&parsed.authen);
++ acx_l_process_authen(adev, &parsed.authen);
++ break;
++ case WF_FSTYPE_DEAUTHENi:
++ if (!sta && !ap)
++ break;
++ memset(&parsed.deauthen, 0, sizeof(parsed.deauthen));
++ parsed.deauthen.hdr = hdr;
++ parsed.deauthen.len = len;
++ wlan_mgmt_decode_deauthen(&parsed.deauthen);
++ if (sta)
++ acx_l_process_deauth_from_ap(adev, &parsed.deauthen);
++ else
++ acx_l_process_deauth_from_sta(adev, &parsed.deauthen);
++ break;
++ }
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#ifdef UNUSED
++/***********************************************************************
++** acx_process_class_frame
++**
++** Called from IRQ context only
++*/
++static int
++acx_process_class_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala)
++{
++ return OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_process_NULL_frame
++*/
++#ifdef BOGUS_ITS_NOT_A_NULL_FRAME_HANDLER_AT_ALL
++static int
++acx_l_process_NULL_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala)
++{
++ const signed char *esi;
++ const u8 *ebx;
++ const wlan_hdr_t *hdr;
++ const client_t *client;
++ int result = NOT_OK;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ esi = hdr->a1;
++ ebx = hdr->a2;
++ break;
++ case WF_FC_FROMDSi:
++ esi = hdr->a1;
++ ebx = hdr->a3;
++ break;
++ case WF_FC_TODSi:
++ esi = hdr->a1;
++ ebx = hdr->a2;
++ break;
++ default: /* WF_FC_FROMTODSi */
++ esi = hdr->a1; /* added by me! --vda */
++ ebx = hdr->a2;
++ }
++
++ if (esi[0x0] < 0) {
++ result = OK;
++ goto done;
++ }
++
++ client = acx_l_sta_list_get(adev, ebx);
++ if (client)
++ result = NOT_OK;
++ else {
++#ifdef IS_IT_BROKEN
++ log(L_DEBUG|L_XFER, "<transmit_deauth 7>\n");
++ acx_l_transmit_deauthen(adev, ebx,
++ WLAN_MGMT_REASON_CLASS2_NONAUTH);
++#else
++ log(L_DEBUG, "received NULL frame from unknown client! "
++ "We really shouldn't send deauthen here, right?\n");
++#endif
++ result = OK;
++ }
++done:
++ return result;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_process_probe_response
++*/
++static int
++acx_l_process_probe_response(acx_device_t *adev, wlan_fr_proberesp_t *req,
++ const rxbuffer_t *rxbuf)
++{
++ struct client *bss;
++ wlan_hdr_t *hdr;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (mac_is_equal(hdr->a3, adev->dev_addr)) {
++ log(L_ASSOC, "huh, scan found our own MAC!?\n");
++ goto ok; /* just skip this one silently */
++ }
++
++ bss = acx_l_sta_list_get_or_add(adev, hdr->a2);
++
++ /* NB: be careful modifying bss data! It may be one
++ ** of the already known clients (like our AP if we are a STA)
++ ** Thus do not blindly modify e.g. current ratemask! */
++
++ if (STA_LIST_ADD_CAN_FAIL && !bss) {
++ /* uh oh, we found more sites/stations than we can handle with
++ * our current setup: pull the emergency brake and stop scanning! */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_STOP_SCAN);
++ /* TODO: a nice comment what below call achieves --vda */
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ goto ok;
++ }
++ /* NB: get_or_add already filled bss->address = hdr->a2 */
++ MAC_COPY(bss->bssid, hdr->a3);
++
++ /* copy the ESSID element */
++ if (req->ssid && req->ssid->len <= IW_ESSID_MAX_SIZE) {
++ bss->essid_len = req->ssid->len;
++ memcpy(bss->essid, req->ssid->ssid, req->ssid->len);
++ bss->essid[req->ssid->len] = '\0';
++ } else {
++ /* Either no ESSID IE or oversized one */
++ printk("%s: received packet has bogus ESSID\n",
++ adev->ndev->name);
++ }
++
++ if (req->ds_parms)
++ bss->channel = req->ds_parms->curr_ch;
++ if (req->cap_info)
++ bss->cap_info = ieee2host16(*req->cap_info);
++
++ bss->sir = acx_signal_to_winlevel(rxbuf->phy_level);
++ bss->snr = acx_signal_to_winlevel(rxbuf->phy_snr);
++
++ bss->rate_cap = 0; /* operational mask */
++ bss->rate_bas = 0; /* basic mask */
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &bss->rate_bas, &bss->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &bss->rate_bas, &bss->rate_cap);
++ /* Fix up any possible bogosity - code elsewhere
++ * is not expecting empty masks */
++ if (!bss->rate_cap)
++ bss->rate_cap = adev->rate_basic;
++ if (!bss->rate_bas)
++ bss->rate_bas = 1 << lowest_bit(bss->rate_cap);
++ if (!bss->rate_cur)
++ bss->rate_cur = 1 << lowest_bit(bss->rate_bas);
++
++ /* People moan about this being too noisy at L_ASSOC */
++ log(L_DEBUG,
++ "found %s: ESSID=\"%s\" ch=%d "
++ "BSSID="MACSTR" caps=0x%04X SIR=%d SNR=%d\n",
++ (bss->cap_info & WF_MGMT_CAP_IBSS) ? "Ad-Hoc peer" : "AP",
++ bss->essid, bss->channel, MAC(bss->bssid), bss->cap_info,
++ bss->sir, bss->snr);
++ok:
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_process_assocresp
++*/
++static int
++acx_l_process_assocresp(acx_device_t *adev, const wlan_fr_assocresp_t *req)
++{
++ const wlan_hdr_t *hdr;
++ int res = OK;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if ((ACX_MODE_2_STA == adev->mode)
++ && mac_is_equal(adev->dev_addr, hdr->a1)) {
++ u16 st = ieee2host16(*(req->status));
++ if (WLAN_MGMT_STATUS_SUCCESS == st) {
++ adev->aid = ieee2host16(*(req->aid));
++ /* tell the card we are associated when
++ ** we are out of interrupt context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_ASSOCIATE);
++ } else {
++
++ /* TODO: we shall delete peer from sta_list, and try
++ ** other candidates... */
++
++ printk("%s: association FAILED: peer sent "
++ "Status Code %d (%s)\n",
++ adev->ndev->name, st, get_status_string(st));
++ res = NOT_OK;
++ }
++ }
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acx_l_process_reassocresp
++*/
++static int
++acx_l_process_reassocresp(acx_device_t *adev, const wlan_fr_reassocresp_t *req)
++{
++ const wlan_hdr_t *hdr;
++ int result = NOT_OK;
++ u16 st;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)) {
++ goto end;
++ }
++ st = ieee2host16(*(req->status));
++ if (st == WLAN_MGMT_STATUS_SUCCESS) {
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ result = OK;
++ } else {
++ printk("%s: reassociation FAILED: peer sent "
++ "response code %d (%s)\n",
++ adev->ndev->name, st, get_status_string(st));
++ }
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_authen
++**
++** Called only in STA_SCAN or AP mode
++*/
++static int
++acx_l_process_authen(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ const wlan_hdr_t *hdr;
++ client_t *clt;
++ wlan_ie_challenge_t *chal;
++ u16 alg, seq, status;
++ int ap, result;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (acx_debug & L_ASSOC) {
++ acx_print_mac("AUTHEN adev->addr=", adev->dev_addr, " ");
++ acx_print_mac("a1=", hdr->a1, " ");
++ acx_print_mac("a2=", hdr->a2, " ");
++ acx_print_mac("a3=", hdr->a3, " ");
++ acx_print_mac("adev->bssid=", adev->bssid, "\n");
++ }
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)
++ || !mac_is_equal(adev->bssid, hdr->a3)) {
++ result = OK;
++ goto end;
++ }
++
++ alg = ieee2host16(*(req->auth_alg));
++ seq = ieee2host16(*(req->auth_seq));
++ status = ieee2host16(*(req->status));
++
++ log(L_ASSOC, "auth algorithm %d, auth sequence %d, status %d\n", alg, seq, status);
++
++ ap = (adev->mode == ACX_MODE_3_AP);
++
++ if (adev->auth_alg <= 1) {
++ if (adev->auth_alg != alg) {
++ log(L_ASSOC, "auth algorithm mismatch: "
++ "our:%d peer:%d\n", adev->auth_alg, alg);
++ result = NOT_OK;
++ goto end;
++ }
++ }
++ if (ap) {
++ clt = acx_l_sta_list_get_or_add(adev, hdr->a2);
++ if (STA_LIST_ADD_CAN_FAIL && !clt) {
++ log(L_ASSOC, "could not allocate room for client\n");
++ result = NOT_OK;
++ goto end;
++ }
++ } else {
++ clt = adev->ap_client;
++ if (!mac_is_equal(clt->address, hdr->a2)) {
++ printk("%s: malformed auth frame from AP?!\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto end;
++ }
++ }
++
++ /* now check which step in the authentication sequence we are
++ * currently in, and act accordingly */
++ switch (seq) {
++ case 1:
++ if (!ap)
++ break;
++ acx_l_transmit_authen2(adev, req, clt);
++ break;
++ case 2:
++ if (ap)
++ break;
++ if (status == WLAN_MGMT_STATUS_SUCCESS) {
++ if (alg == WLAN_AUTH_ALG_OPENSYSTEM) {
++ acx_set_status(adev, ACX_STATUS_3_AUTHENTICATED);
++ acx_l_transmit_assoc_req(adev);
++ } else
++ if (alg == WLAN_AUTH_ALG_SHAREDKEY) {
++ acx_l_transmit_authen3(adev, req);
++ }
++ } else {
++ printk("%s: auth FAILED: peer sent "
++ "response code %d (%s), "
++ "still waiting for authentication\n",
++ adev->ndev->name,
++ status, get_status_string(status));
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ }
++ break;
++ case 3:
++ if (!ap)
++ break;
++ if ((clt->auth_alg != WLAN_AUTH_ALG_SHAREDKEY)
++ || (alg != WLAN_AUTH_ALG_SHAREDKEY)
++ || (clt->auth_step != 2))
++ break;
++ chal = req->challenge;
++ if (!chal
++ || memcmp(chal->challenge, clt->challenge_text, WLAN_CHALLENGE_LEN)
++ || (chal->eid != WLAN_EID_CHALLENGE)
++ || (chal->len != WLAN_CHALLENGE_LEN)
++ )
++ break;
++ acx_l_transmit_authen4(adev, req);
++ MAC_COPY(clt->address, hdr->a2);
++ clt->used = CLIENT_AUTHENTICATED_2;
++ clt->auth_step = 4;
++ clt->seq = ieee2host16(hdr->seq);
++ break;
++ case 4:
++ if (ap)
++ break;
++ /* ok, we're through: we're authenticated. Woohoo!! */
++ acx_set_status(adev, ACX_STATUS_3_AUTHENTICATED);
++ log(L_ASSOC, "Authenticated!\n");
++ /* now that we're authenticated, request association */
++ acx_l_transmit_assoc_req(adev);
++ break;
++ }
++ result = OK;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_gen_challenge
++*/
++static inline void
++acx_gen_challenge(wlan_ie_challenge_t* d)
++{
++ FN_ENTER;
++ d->eid = WLAN_EID_CHALLENGE;
++ d->len = WLAN_CHALLENGE_LEN;
++ get_random_bytes(d->challenge, WLAN_CHALLENGE_LEN);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_deauthen
++*/
++static int
++acx_l_transmit_deauthen(acx_device_t *adev, const u8 *addr, u16 reason)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct deauthen_frame_body *body;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = (WF_FTYPE_MGMTi | WF_FSTYPE_DEAUTHENi);
++ head->dur = 0;
++ MAC_COPY(head->da, addr);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ log(L_DEBUG|L_ASSOC|L_XFER,
++ "sending deauthen to "MACSTR" for %d\n",
++ MAC(addr), reason);
++
++ body->reason = host2ieee16(reason);
++
++ /* body is fixed size here, but beware of cutting-and-pasting this -
++ ** do not use sizeof(*body) for variable sized mgmt packets! */
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + sizeof(*body));
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen1
++*/
++static int
++acx_l_transmit_authen1(acx_device_t *adev)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "sending authentication1 request (auth algo %d), "
++ "awaiting response\n", adev->auth_alg);
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi;
++ /* duration should be 0 instead of 0x8000 to have
++ * the firmware calculate the value, right? */
++ head->dur = 0;
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ body->auth_alg = host2ieee16(adev->auth_alg);
++ body->auth_seq = host2ieee16(1);
++ body->status = host2ieee16(0);
++
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + 2 + 2 + 2);
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen2
++*/
++static int
++acx_l_transmit_authen2(acx_device_t *adev, const wlan_fr_authen_t *req,
++ client_t *clt)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++ unsigned int packet_len;
++
++ FN_ENTER;
++
++ if (!clt)
++ goto ok;
++
++ MAC_COPY(clt->address, req->hdr->a2);
++#ifdef UNUSED
++ clt->ps = ((WF_FC_PWRMGTi & req->hdr->fc) != 0);
++#endif
++ clt->auth_alg = ieee2host16(*(req->auth_alg));
++ clt->auth_step = 2;
++ clt->seq = ieee2host16(req->hdr->seq);
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi;
++ head->dur = 0 /* req->hdr->dur */;
++ MAC_COPY(head->da, req->hdr->a2);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, req->hdr->a3);
++ head->seq = 0 /* req->hdr->seq */;
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(2);
++ body->status = host2ieee16(0);
++
++ packet_len = WLAN_HDR_A3_LEN + 2 + 2 + 2;
++ if (ieee2host16(*(req->auth_alg)) == WLAN_AUTH_ALG_OPENSYSTEM) {
++ clt->used = CLIENT_AUTHENTICATED_2;
++ } else { /* shared key */
++ acx_gen_challenge(&body->challenge);
++ memcpy(&clt->challenge_text, body->challenge.challenge, WLAN_CHALLENGE_LEN);
++ packet_len += 2 + 2 + 2 + 1+1+WLAN_CHALLENGE_LEN;
++ }
++
++ acxlog_mac(L_ASSOC|L_XFER,
++ "transmit_auth2: BSSID=", head->bssid, "\n");
++
++ acx_l_tx_data(adev, tx, packet_len);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen3
++*/
++static int
++acx_l_transmit_authen3(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++ unsigned int packet_len;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ /* add WF_FC_ISWEPi: auth step 3 needs to be encrypted */
++ head->fc = WF_FC_ISWEPi + WF_FSTYPE_AUTHENi;
++ /* FIXME: is this needed?? authen4 does it...
++ * I think it's even wrong since we shouldn't re-use old
++ * values but instead let the firmware calculate proper ones
++ head->dur = req->hdr->dur;
++ head->seq = req->hdr->seq;
++ */
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(3);
++ body->status = host2ieee16(0);
++ memcpy(&body->challenge, req->challenge, req->challenge->len + 2);
++ packet_len = WLAN_HDR_A3_LEN + 8 + req->challenge->len;
++
++ log(L_ASSOC|L_XFER, "transmit_authen3!\n");
++
++ acx_l_tx_data(adev, tx, packet_len);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen4
++*/
++static int
++acx_l_transmit_authen4(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi; /* 0xb0 */
++ head->dur = 0 /* req->hdr->dur */;
++ MAC_COPY(head->da, req->hdr->a2);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, req->hdr->a3);
++ head->seq = 0 /* req->hdr->seq */;
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(4);
++ body->status = host2ieee16(0);
++
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + 2 + 2 + 2);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_assoc_req
++**
++** adev->ap_client is a current candidate AP here
++*/
++static int
++acx_l_transmit_assoc_req(acx_device_t *adev)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ u8 *body, *p, *prate;
++ unsigned int packet_len;
++ u16 cap;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "sending association request, "
++ "awaiting response. NOT ASSOCIATED YET\n");
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_ASSOCREQi;
++ head->dur = host2ieee16(0x8000);
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ p = body;
++ /* now start filling the AssocReq frame body */
++
++ /* since this assoc request will most likely only get
++ * sent in the STA to AP case (and not when Ad-Hoc IBSS),
++ * the cap combination indicated here will thus be
++ * WF_MGMT_CAP_ESSi *always* (no IBSS ever)
++ * The specs are more than non-obvious on all that:
++ *
++ * 802.11 7.3.1.4 Capability Information field
++ ** APs set the ESS subfield to 1 and the IBSS subfield to 0 within
++ ** Beacon or Probe Response management frames. STAs within an IBSS
++ ** set the ESS subfield to 0 and the IBSS subfield to 1 in transmitted
++ ** Beacon or Probe Response management frames
++ **
++ ** APs set the Privacy subfield to 1 within transmitted Beacon,
++ ** Probe Response, Association Response, and Reassociation Response
++ ** if WEP is required for all data type frames within the BSS.
++ ** STAs within an IBSS set the Privacy subfield to 1 in Beacon
++ ** or Probe Response management frames if WEP is required
++ ** for all data type frames within the IBSS */
++
++ /* note that returning 0 will be refused by several APs...
++ * (so this indicates that you're probably supposed to
++ * "confirm" the ESS mode) */
++ cap = WF_MGMT_CAP_ESSi;
++
++ /* this one used to be a check on wep_restricted,
++ * but more likely it's wep_enabled instead */
++ if (adev->wep_enabled)
++ SET_BIT(cap, WF_MGMT_CAP_PRIVACYi);
++
++ /* Probably we can just set these always, because our hw is
++ ** capable of shortpre and PBCC --vda */
++ /* only ask for short preamble if the peer station supports it */
++ if (adev->ap_client->cap_info & WF_MGMT_CAP_SHORT)
++ SET_BIT(cap, WF_MGMT_CAP_SHORTi);
++ /* only ask for PBCC support if the peer station supports it */
++ if (adev->ap_client->cap_info & WF_MGMT_CAP_PBCC)
++ SET_BIT(cap, WF_MGMT_CAP_PBCCi);
++
++ /* IEs: 1. caps */
++ *(u16*)p = cap; p += 2;
++ /* 2. listen interval */
++ *(u16*)p = host2ieee16(adev->listen_interval); p += 2;
++ /* 3. ESSID */
++ p = wlan_fill_ie_ssid(p,
++ strlen(adev->essid_for_assoc), adev->essid_for_assoc);
++ /* 4. supp rates */
++ prate = p;
++ p = wlan_fill_ie_rates(p,
++ adev->rate_supported_len, adev->rate_supported);
++ /* 5. ext supp rates */
++ p = wlan_fill_ie_rates_ext(p,
++ adev->rate_supported_len, adev->rate_supported);
++
++ if (acx_debug & L_DEBUG) {
++ printk("association: rates element\n");
++ acx_dump_bytes(prate, p - prate);
++ }
++
++ /* calculate lengths */
++ packet_len = WLAN_HDR_A3_LEN + (p - body);
++
++ log(L_ASSOC, "association: requesting caps 0x%04X, ESSID \"%s\"\n",
++ cap, adev->essid_for_assoc);
++
++ acx_l_tx_data(adev, tx, packet_len);
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_disassoc
++**
++** FIXME: looks like incomplete implementation of a helper:
++** acx_l_transmit_disassoc(adev, clt) - kick this client (we're an AP)
++** acx_l_transmit_disassoc(adev, NULL) - leave BSSID (we're a STA)
++*/
++#ifdef BROKEN
++int
++acx_l_transmit_disassoc(acx_device_t *adev, client_t *clt)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct disassoc_frame_body *body;
++
++ FN_ENTER;
++/* if (clt != NULL) { */
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++/* clt->used = CLIENT_AUTHENTICATED_2; - not (yet?) associated */
++
++ head->fc = WF_FSTYPE_DISASSOCi;
++ head->dur = 0;
++ /* huh? It muchly depends on whether we're STA or AP...
++ ** sta->ap: da=bssid, sa=own, bssid=bssid
++ ** ap->sta: da=sta, sa=bssid, bssid=bssid. FIXME! */
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->dev_addr);
++ head->seq = 0;
++
++ /* "Class 3 frame received from nonassociated station." */
++ body->reason = host2ieee16(7);
++
++ /* fixed size struct, ok to sizeof */
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + sizeof(*body));
++/* } */
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_complete_scan
++**
++** Called either from after_interrupt_task() if:
++** 1) there was Scan_Complete IRQ, or
++** 2) scanning expired in timer()
++** We need to decide which ESS or IBSS to join.
++** Iterates thru adev->sta_list:
++** if adev->ap is not bcast, will join only specified
++** ESS or IBSS with this bssid
++** checks peers' caps for ESS/IBSS bit
++** checks peers' SSID, allows exact match or hidden SSID
++** If station to join is chosen:
++** points adev->ap_client to the chosen struct client
++** sets adev->essid_for_assoc for future assoc attempt
++** Auth/assoc is not yet performed
++** Returns OK if there is no need to restart scan
++*/
++int
++acx_s_complete_scan(acx_device_t *adev)
++{
++ struct client *bss;
++ unsigned long flags;
++ u16 needed_cap;
++ int i;
++ int idx_found = -1;
++ int result = OK;
++
++ FN_ENTER;
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ needed_cap = WF_MGMT_CAP_IBSS; /* 2, we require Ad-Hoc */
++ break;
++ case ACX_MODE_2_STA:
++ needed_cap = WF_MGMT_CAP_ESS; /* 1, we require Managed */
++ break;
++ default:
++ printk("acx: driver bug: mode=%d in complete_scan()\n", adev->mode);
++ dump_stack();
++ goto end;
++ }
++
++ acx_lock(adev, flags);
++
++ /* TODO: sta_iterator hiding implementation would be nice here... */
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++
++
++ log(L_ASSOC, "scan table: SSID=\"%s\" CH=%d SIR=%d SNR=%d\n",
++ bss->essid, bss->channel, bss->sir, bss->snr);
++
++ if (!mac_is_bcast(adev->ap))
++ if (!mac_is_equal(bss->bssid, adev->ap))
++ continue; /* keep looking */
++
++ /* broken peer with no mode flags set? */
++ if (unlikely(!(bss->cap_info & (WF_MGMT_CAP_ESS | WF_MGMT_CAP_IBSS)))) {
++ printk("%s: strange peer "MACSTR" found with "
++ "neither ESS (AP) nor IBSS (Ad-Hoc) "
++ "capability - skipped\n",
++ adev->ndev->name, MAC(bss->address));
++ continue;
++ }
++ log(L_ASSOC, "peer_cap 0x%04X, needed_cap 0x%04X\n",
++ bss->cap_info, needed_cap);
++
++ /* does peer station support what we need? */
++ if ((bss->cap_info & needed_cap) != needed_cap)
++ continue; /* keep looking */
++
++ /* strange peer with NO basic rates?! */
++ if (unlikely(!bss->rate_bas)) {
++ printk("%s: strange peer "MACSTR" with empty rate set "
++ "- skipped\n",
++ adev->ndev->name, MAC(bss->address));
++ continue;
++ }
++
++ /* do we support all basic rates of this peer? */
++ if ((bss->rate_bas & adev->rate_oper) != bss->rate_bas) {
++/* we probably need to have all rates as operational rates,
++ even in case of an 11M-only configuration */
++#ifdef THIS_IS_TROUBLESOME
++ printk("%s: peer "MACSTR": incompatible basic rates "
++ "(AP requests 0x%04X, we have 0x%04X) "
++ "- skipped\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->rate_bas, adev->rate_oper);
++ continue;
++#else
++ printk("%s: peer "MACSTR": incompatible basic rates "
++ "(AP requests 0x%04X, we have 0x%04X). "
++ "Considering anyway...\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->rate_bas, adev->rate_oper);
++#endif
++ }
++
++ if ( !(adev->reg_dom_chanmask & (1<<(bss->channel-1))) ) {
++ printk("%s: warning: peer "MACSTR" is on channel %d "
++ "outside of channel range of current "
++ "regulatory domain - couldn't join "
++ "even if other settings match. "
++ "You might want to adapt your config\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->channel);
++ continue; /* keep looking */
++ }
++
++ if (!adev->essid_active || !strcmp(bss->essid, adev->essid)) {
++ log(L_ASSOC,
++ "found station with matching ESSID! ('%s' "
++ "station, '%s' config)\n",
++ bss->essid,
++ (adev->essid_active) ? adev->essid : "[any]");
++ /* TODO: continue looking for peer with better SNR */
++ bss->used = CLIENT_JOIN_CANDIDATE;
++ idx_found = i;
++
++ /* stop searching if this station is
++ * on the current channel, otherwise
++ * keep looking for an even better match */
++ if (bss->channel == adev->channel)
++ break;
++ } else
++ if (is_hidden_essid(bss->essid)) {
++ /* hmm, station with empty or single-space SSID:
++ * using hidden SSID broadcast?
++ */
++ /* This behaviour is broken: which AP from zillion
++ ** of APs with hidden SSID you'd try?
++ ** We should use Probe requests to get Probe responses
++ ** and check for real SSID (are those never hidden?) */
++ bss->used = CLIENT_JOIN_CANDIDATE;
++ if (idx_found == -1)
++ idx_found = i;
++ log(L_ASSOC, "found station with empty or "
++ "single-space (hidden) SSID, considering "
++ "for assoc attempt\n");
++ /* ...and keep looking for better matches */
++ } else {
++ log(L_ASSOC, "ESSID doesn't match! ('%s' "
++ "station, '%s' config)\n",
++ bss->essid,
++ (adev->essid_active) ? adev->essid : "[any]");
++ }
++ }
++
++ /* TODO: iterate thru join candidates instead */
++ /* TODO: rescan if not associated within some timeout */
++ if (idx_found != -1) {
++ char *essid_src;
++ size_t essid_len;
++
++ bss = &adev->sta_list[idx_found];
++ adev->ap_client = bss;
++
++ if (is_hidden_essid(bss->essid)) {
++ /* if the ESSID of the station we found is empty
++ * (no broadcast), then use user-configured ESSID
++ * instead */
++ essid_src = adev->essid;
++ essid_len = adev->essid_len;
++ } else {
++ essid_src = bss->essid;
++ essid_len = strlen(bss->essid);
++ }
++
++ acx_update_capabilities(adev);
++
++ memcpy(adev->essid_for_assoc, essid_src, essid_len);
++ adev->essid_for_assoc[essid_len] = '\0';
++ adev->channel = bss->channel;
++ MAC_COPY(adev->bssid, bss->bssid);
++
++ bss->rate_cfg = (bss->rate_cap & adev->rate_oper);
++ bss->rate_cur = 1 << lowest_bit(bss->rate_cfg);
++ bss->rate_100 = acx_rate111to100(bss->rate_cur);
++
++ acxlog_mac(L_ASSOC,
++ "matching station found: ", adev->bssid, ", joining\n");
++
++ /* TODO: do we need to switch to the peer's channel first? */
++
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ } else {
++ acx_l_transmit_authen1(adev);
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ }
++ } else { /* idx_found == -1 */
++ /* uh oh, no station found in range */
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ printk("%s: no matching station found in range, "
++ "generating our own IBSS instead\n",
++ adev->ndev->name);
++ /* we do it the HostAP way: */
++ MAC_COPY(adev->bssid, adev->dev_addr);
++ adev->bssid[0] |= 0x02; /* 'local assigned addr' bit */
++ /* add IBSS bit to our caps... */
++ acx_update_capabilities(adev);
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ /* In order to cmd_join be called below */
++ idx_found = 0;
++ } else {
++ /* we shall scan again, AP can be
++ ** just temporarily powered off */
++ log(L_ASSOC,
++ "no matching station found in range yet\n");
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ result = NOT_OK;
++ }
++ }
++
++ acx_unlock(adev, flags);
++
++ if (idx_found != -1) {
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ /* need to update channel in beacon template */
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ }
++ /* Inform firmware on our decision to start or join BSS */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ }
++
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_read_fw
++**
++** Loads a firmware image
++**
++** Returns:
++** 0 unable to load file
++** pointer to firmware success
++*/
++firmware_image_t*
++acx_s_read_fw(struct device *dev, const char *file, u32 *size)
++{
++ firmware_image_t *res;
++ const struct firmware *fw_entry;
++
++ res = NULL;
++ log(L_INIT, "requesting firmware image '%s'\n", file);
++ if (!request_firmware(&fw_entry, file, dev)) {
++ *size = 8;
++ if (fw_entry->size >= 8)
++ *size = 8 + le32_to_cpu(*(u32 *)(fw_entry->data + 4));
++ if (fw_entry->size != *size) {
++ printk("acx: firmware size does not match "
++ "firmware header: %d != %d, "
++ "aborting fw upload\n",
++ (int) fw_entry->size, (int) *size);
++ goto release_ret;
++ }
++ res = vmalloc(*size);
++ if (!res) {
++ printk("acx: no memory for firmware "
++ "(%u bytes)\n", *size);
++ goto release_ret;
++ }
++ memcpy(res, fw_entry->data, fw_entry->size);
++release_ret:
++ release_firmware(fw_entry);
++ return res;
++ }
++ printk("acx: firmware image '%s' was not provided. "
++ "Check your hotplug scripts\n", file);
++
++ /* checksum will be verified in write_fw, so don't bother here */
++ return res;
++}
++
++
++/***********************************************************************
++** acx_s_set_wepkey
++*/
++static void
++acx100_s_set_wepkey(acx_device_t *adev)
++{
++ ie_dot11WEPDefaultKey_t dk;
++ int i;
++
++ for (i = 0; i < DOT11_MAX_DEFAULT_WEP_KEYS; i++) {
++ if (adev->wep_keys[i].size != 0) {
++ log(L_INIT, "setting WEP key: %d with "
++ "total size: %d\n", i, (int) adev->wep_keys[i].size);
++ dk.action = 1;
++ dk.keySize = adev->wep_keys[i].size;
++ dk.defaultKeyNum = i;
++ memcpy(dk.key, adev->wep_keys[i].key, dk.keySize);
++ acx_s_configure(adev, &dk, ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE);
++ }
++ }
++}
++
++static void
++acx111_s_set_wepkey(acx_device_t *adev)
++{
++ acx111WEPDefaultKey_t dk;
++ int i;
++
++ for (i = 0; i < DOT11_MAX_DEFAULT_WEP_KEYS; i++) {
++ if (adev->wep_keys[i].size != 0) {
++ log(L_INIT, "setting WEP key: %d with "
++ "total size: %d\n", i, (int) adev->wep_keys[i].size);
++ memset(&dk, 0, sizeof(dk));
++ dk.action = cpu_to_le16(1); /* "add key"; yes, that's a 16bit value */
++ dk.keySize = adev->wep_keys[i].size;
++
++ /* are these two lines necessary? */
++ dk.type = 0; /* default WEP key */
++ dk.index = 0; /* ignored when setting default key */
++
++ dk.defaultKeyNum = i;
++ memcpy(dk.key, adev->wep_keys[i].key, dk.keySize);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WEP_MGMT, &dk, sizeof(dk));
++ }
++ }
++}
++
++static void
++acx_s_set_wepkey(acx_device_t *adev)
++{
++ if (IS_ACX111(adev))
++ acx111_s_set_wepkey(adev);
++ else
++ acx100_s_set_wepkey(adev);
++}
++
++
++/***********************************************************************
++** acx100_s_init_wep
++**
++** FIXME: this should probably be moved into the new card settings
++** management, but since we're also modifying the memory map layout here
++** due to the WEP key space we want, we should take care...
++*/
++static int
++acx100_s_init_wep(acx_device_t *adev)
++{
++ acx100_ie_wep_options_t options;
++ ie_dot11WEPDefaultKeyID_t dk;
++ acx_ie_memmap_t pt;
++ int res = NOT_OK;
++
++ FN_ENTER;
++
++ if (OK != acx_s_interrogate(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ log(L_DEBUG, "CodeEnd:%X\n", pt.CodeEnd);
++
++ pt.WEPCacheStart = cpu_to_le32(le32_to_cpu(pt.CodeEnd) + 0x4);
++ pt.WEPCacheEnd = cpu_to_le32(le32_to_cpu(pt.CodeEnd) + 0x4);
++
++ if (OK != acx_s_configure(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ /* let's choose maximum setting: 4 default keys, plus 10 other keys: */
++ options.NumKeys = cpu_to_le16(DOT11_MAX_DEFAULT_WEP_KEYS + 10);
++ options.WEPOption = 0x00;
++
++ log(L_ASSOC, "%s: writing WEP options\n", __func__);
++ acx_s_configure(adev, &options, ACX100_IE_WEP_OPTIONS);
++
++ acx100_s_set_wepkey(adev);
++
++ if (adev->wep_keys[adev->wep_current_index].size != 0) {
++ log(L_ASSOC, "setting active default WEP key number: %d\n",
++ adev->wep_current_index);
++ dk.KeyID = adev->wep_current_index;
++ acx_s_configure(adev, &dk, ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET); /* 0x1010 */
++ }
++ /* FIXME!!! wep_key_struct is filled nowhere! But adev
++ * is initialized to 0, and we don't REALLY need those keys either */
++/* for (i = 0; i < 10; i++) {
++ if (adev->wep_key_struct[i].len != 0) {
++ MAC_COPY(wep_mgmt.MacAddr, adev->wep_key_struct[i].addr);
++ wep_mgmt.KeySize = cpu_to_le16(adev->wep_key_struct[i].len);
++ memcpy(&wep_mgmt.Key, adev->wep_key_struct[i].key, le16_to_cpu(wep_mgmt.KeySize));
++ wep_mgmt.Action = cpu_to_le16(1);
++ log(L_ASSOC, "writing WEP key %d (len %d)\n", i, le16_to_cpu(wep_mgmt.KeySize));
++ if (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_WEP_MGMT, &wep_mgmt, sizeof(wep_mgmt))) {
++ adev->wep_key_struct[i].index = i;
++ }
++ }
++ }
++*/
++
++ /* now retrieve the updated WEPCacheEnd pointer... */
++ if (OK != acx_s_interrogate(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ printk("%s: ACX1xx_IE_MEMORY_MAP read #2 FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ /* ...and tell it to start allocating templates at that location */
++ /* (no endianness conversion needed) */
++ pt.PacketTemplateStart = pt.WEPCacheEnd;
++
++ if (OK != acx_s_configure(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ printk("%s: ACX1xx_IE_MEMORY_MAP write #2 FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ res = OK;
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++static int
++acx_s_init_max_template_generic(acx_device_t *adev, unsigned int len, unsigned int cmd)
++{
++ int res;
++ union {
++ acx_template_nullframe_t null;
++ acx_template_beacon_t b;
++ acx_template_tim_t tim;
++ acx_template_probereq_t preq;
++ acx_template_proberesp_t presp;
++ } templ;
++
++ memset(&templ, 0, len);
++ templ.null.size = cpu_to_le16(len - 2);
++ res = acx_s_issue_cmd(adev, cmd, &templ, len);
++ return res;
++}
++
++static inline int
++acx_s_init_max_null_data_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_nullframe_t), ACX1xx_CMD_CONFIG_NULL_DATA
++ );
++}
++
++static inline int
++acx_s_init_max_beacon_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_beacon_t), ACX1xx_CMD_CONFIG_BEACON
++ );
++}
++
++static inline int
++acx_s_init_max_tim_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_tim_t), ACX1xx_CMD_CONFIG_TIM
++ );
++}
++
++static inline int
++acx_s_init_max_probe_response_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_proberesp_t), ACX1xx_CMD_CONFIG_PROBE_RESPONSE
++ );
++}
++
++static inline int
++acx_s_init_max_probe_request_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_probereq_t), ACX1xx_CMD_CONFIG_PROBE_REQUEST
++ );
++}
++
++/***********************************************************************
++** acx_s_set_tim_template
++**
++** FIXME: In full blown driver we will regularly update partial virtual bitmap
++** by calling this function
++** (it can be done by irq handler on each DTIM irq or by timer...)
++
++[802.11 7.3.2.6] TIM information element:
++- 1 EID
++- 1 Length
++1 1 DTIM Count
++ indicates how many beacons (including this) appear before next DTIM
++ (0=this one is a DTIM)
++2 1 DTIM Period
++ number of beacons between successive DTIMs
++ (0=reserved, 1=all TIMs are DTIMs, 2=every other, etc)
++3 1 Bitmap Control
++ bit0: Traffic Indicator bit associated with Assoc ID 0 (Bcast AID?)
++ set to 1 in TIM elements with a value of 0 in the DTIM Count field
++ when one or more broadcast or multicast frames are buffered at the AP.
++ bit1-7: Bitmap Offset (logically Bitmap_Offset = Bitmap_Control & 0xFE).
++4 n Partial Virtual Bitmap
++ Visible part of traffic-indication bitmap.
++ Full bitmap consists of 2008 bits (251 octets) such that bit number N
++ (0<=N<=2007) in the bitmap corresponds to bit number (N mod 8)
++ in octet number N/8 where the low-order bit of each octet is bit0,
++ and the high order bit is bit7.
++ Each set bit in virtual bitmap corresponds to traffic buffered by AP
++ for a specific station (with corresponding AID?).
++ Partial Virtual Bitmap shows a part of bitmap which has non-zero.
++ Bitmap Offset is a number of skipped zero octets (see above).
++ 'Missing' octets at the tail are also assumed to be zero.
++ Example: Length=6, Bitmap_Offset=2, Partial_Virtual_Bitmap=55 55 55
++ This means that traffic-indication bitmap is:
++ 00000000 00000000 01010101 01010101 01010101 00000000 00000000...
++ (is bit0 in the map is always 0 and real value is in Bitmap Control bit0?)
++*/
++static int
++acx_s_set_tim_template(acx_device_t *adev)
++{
++/* For now, configure smallish test bitmap, all zero ("no pending data") */
++ enum { bitmap_size = 5 };
++
++ acx_template_tim_t t;
++ int result;
++
++ FN_ENTER;
++
++ memset(&t, 0, sizeof(t));
++ t.size = 5 + bitmap_size; /* eid+len+count+period+bmap_ctrl + bmap */
++ t.tim_eid = WLAN_EID_TIM;
++ t.len = 3 + bitmap_size; /* count+period+bmap_ctrl + bmap */
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_TIM, &t, sizeof(t));
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_fill_beacon_or_proberesp_template
++**
++** For frame format info, please see 802.11-1999.pdf item 7.2.3.9 and below!!
++**
++** NB: we use the fact that
++** struct acx_template_proberesp and struct acx_template_beacon are the same
++** (well, almost...)
++**
++** [802.11] Beacon's body consist of these IEs:
++** 1 Timestamp
++** 2 Beacon interval
++** 3 Capability information
++** 4 SSID
++** 5 Supported rates (up to 8 rates)
++** 6 FH Parameter Set (frequency-hopping PHYs only)
++** 7 DS Parameter Set (direct sequence PHYs only)
++** 8 CF Parameter Set (only if PCF is supported)
++** 9 IBSS Parameter Set (ad-hoc only)
++**
++** Beacon only:
++** 10 TIM (AP only) (see 802.11 7.3.2.6)
++** 11 Country Information (802.11d)
++** 12 FH Parameters (802.11d)
++** 13 FH Pattern Table (802.11d)
++** ... (?!! did not yet find relevant PDF file... --vda)
++** 19 ERP Information (extended rate PHYs)
++** 20 Extended Supported Rates (if more than 8 rates)
++**
++** Proberesp only:
++** 10 Country information (802.11d)
++** 11 FH Parameters (802.11d)
++** 12 FH Pattern Table (802.11d)
++** 13-n Requested information elements (802.11d)
++** ????
++** 18 ERP Information (extended rate PHYs)
++** 19 Extended Supported Rates (if more than 8 rates)
++*/
++static int
++acx_fill_beacon_or_proberesp_template(acx_device_t *adev,
++ struct acx_template_beacon *templ,
++ u16 fc /* in host order! */)
++{
++ int len;
++ u8 *p;
++
++ FN_ENTER;
++
++ memset(templ, 0, sizeof(*templ));
++ MAC_BCAST(templ->da);
++ MAC_COPY(templ->sa, adev->dev_addr);
++ MAC_COPY(templ->bssid, adev->bssid);
++
++ templ->beacon_interval = cpu_to_le16(adev->beacon_interval);
++ acx_update_capabilities(adev);
++ templ->cap = cpu_to_le16(adev->capabilities);
++
++ p = templ->variable;
++ p = wlan_fill_ie_ssid(p, adev->essid_len, adev->essid);
++ p = wlan_fill_ie_rates(p, adev->rate_supported_len, adev->rate_supported);
++ p = wlan_fill_ie_ds_parms(p, adev->channel);
++ /* NB: should go AFTER tim, but acx seem to keep tim last always */
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len, adev->rate_supported);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ /* ATIM window */
++ p = wlan_fill_ie_ibss_parms(p, 0); break;
++ case ACX_MODE_3_AP:
++ /* TIM IE is set up as separate template */
++ break;
++ }
++
++ len = p - (u8*)templ;
++ templ->fc = cpu_to_le16(WF_FTYPE_MGMT | fc);
++ /* - 2: do not count 'u16 size' field */
++ templ->size = cpu_to_le16(len - 2);
++
++ FN_EXIT1(len);
++ return len;
++}
++
++
++#if POWER_SAVE_80211
++/***********************************************************************
++** acx_s_set_null_data_template
++*/
++static int
++acx_s_set_null_data_template(acx_device_t *adev)
++{
++ struct acx_template_nullframe b;
++ int result;
++
++ FN_ENTER;
++
++ /* memset(&b, 0, sizeof(b)); not needed, setting all members */
++
++ b.size = cpu_to_le16(sizeof(b) - 2);
++ b.hdr.fc = WF_FTYPE_MGMTi | WF_FSTYPE_NULLi;
++ b.hdr.dur = 0;
++ MAC_BCAST(b.hdr.a1);
++ MAC_COPY(b.hdr.a2, adev->dev_addr);
++ MAC_COPY(b.hdr.a3, adev->bssid);
++ b.hdr.seq = 0;
++
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_NULL_DATA, &b, sizeof(b));
++
++ FN_EXIT1(result);
++ return result;
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_set_beacon_template
++*/
++static int
++acx_s_set_beacon_template(acx_device_t *adev)
++{
++ struct acx_template_beacon bcn;
++ int len, result;
++
++ FN_ENTER;
++
++ len = acx_fill_beacon_or_proberesp_template(adev, &bcn, WF_FSTYPE_BEACON);
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_BEACON, &bcn, len);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_set_probe_response_template
++*/
++static int
++acx_s_set_probe_response_template(acx_device_t *adev)
++{
++ struct acx_template_proberesp pr;
++ int len, result;
++
++ FN_ENTER;
++
++ len = acx_fill_beacon_or_proberesp_template(adev, &pr, WF_FSTYPE_PROBERESP);
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_PROBE_RESPONSE, &pr, len);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_init_packet_templates()
++**
++** NOTE: order is very important here, to have a correct memory layout!
++** init templates: max Probe Request (station mode), max NULL data,
++** max Beacon, max TIM, max Probe Response.
++*/
++static int
++acx_s_init_packet_templates(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm; /* ACX100 only */
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ log(L_DEBUG|L_INIT, "initializing max packet templates\n");
++
++ if (OK != acx_s_init_max_probe_request_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_null_data_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_beacon_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_tim_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_probe_response_template(adev))
++ goto failed;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 doesn't need the memory map magic below,
++ * and the other templates will be set later (acx_start) */
++ result = OK;
++ goto success;
++ }
++
++ /* ACX100 will have its TIM template set,
++ * and we also need to update the memory map */
++
++ if (OK != acx_s_set_tim_template(adev))
++ goto failed_acx100;
++
++ log(L_DEBUG, "sizeof(memmap)=%d bytes\n", (int)sizeof(mm));
++
++ if (OK != acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP))
++ goto failed_acx100;
++
++ mm.QueueStart = cpu_to_le32(le32_to_cpu(mm.PacketTemplateEnd) + 4);
++ if (OK != acx_s_configure(adev, &mm, ACX1xx_IE_MEMORY_MAP))
++ goto failed_acx100;
++
++ result = OK;
++ goto success;
++
++failed_acx100:
++ log(L_DEBUG|L_INIT,
++ /* "cb=0x%X\n" */
++ "ACXMemoryMap:\n"
++ ".CodeStart=0x%X\n"
++ ".CodeEnd=0x%X\n"
++ ".WEPCacheStart=0x%X\n"
++ ".WEPCacheEnd=0x%X\n"
++ ".PacketTemplateStart=0x%X\n"
++ ".PacketTemplateEnd=0x%X\n",
++ /* len, */
++ le32_to_cpu(mm.CodeStart),
++ le32_to_cpu(mm.CodeEnd),
++ le32_to_cpu(mm.WEPCacheStart),
++ le32_to_cpu(mm.WEPCacheEnd),
++ le32_to_cpu(mm.PacketTemplateStart),
++ le32_to_cpu(mm.PacketTemplateEnd));
++
++failed:
++ printk("%s: %s() FAILED\n", adev->ndev->name, __func__);
++
++success:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_set_probe_request_template(acx_device_t *adev)
++{
++ struct acx_template_probereq probereq;
++ char *p;
++ int res;
++ int frame_len;
++
++ FN_ENTER;
++
++ memset(&probereq, 0, sizeof(probereq));
++
++ probereq.fc = WF_FTYPE_MGMTi | WF_FSTYPE_PROBEREQi;
++ MAC_BCAST(probereq.da);
++ MAC_COPY(probereq.sa, adev->dev_addr);
++ MAC_BCAST(probereq.bssid);
++
++ p = probereq.variable;
++ p = wlan_fill_ie_ssid(p, adev->essid_len, adev->essid);
++ p = wlan_fill_ie_rates(p, adev->rate_supported_len, adev->rate_supported);
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len, adev->rate_supported);
++ frame_len = p - (char*)&probereq;
++ probereq.size = cpu_to_le16(frame_len - 2);
++
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_PROBE_REQUEST, &probereq, frame_len);
++ FN_EXIT0;
++ return res;
++}
++
++
++/***********************************************************************
++** acx_s_init_mac
++*/
++int
++acx_s_init_mac(acx_device_t *adev)
++{
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ if (IS_ACX111(adev)) {
++ adev->ie_len = acx111_ie_len;
++ adev->ie_len_dot11 = acx111_ie_len_dot11;
++ } else {
++ adev->ie_len = acx100_ie_len;
++ adev->ie_len_dot11 = acx100_ie_len_dot11;
++ }
++
++#if defined (ACX_MEM)
++ adev->memblocksize = 256; /* 256 is default */
++ /* try to load radio for both ACX100 and ACX111, since both
++ * chips have at least some firmware versions making use of an
++ * external radio module */
++ acxmem_s_upload_radio(adev);
++#else
++ if (IS_PCI(adev)) {
++ adev->memblocksize = 256; /* 256 is default */
++ /* try to load radio for both ACX100 and ACX111, since both
++ * chips have at least some firmware versions making use of an
++ * external radio module */
++ acxpci_s_upload_radio(adev);
++ } else {
++ adev->memblocksize = 128;
++ }
++#endif
++
++ if (IS_ACX111(adev)) {
++ /* for ACX111, the order is different from ACX100
++ 1. init packet templates
++ 2. create station context and create dma regions
++ 3. init wep default keys
++ */
++ if (OK != acx_s_init_packet_templates(adev))
++ goto fail;
++ if (OK != acx111_s_create_dma_regions(adev)) {
++ printk("%s: acx111_create_dma_regions FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ } else {
++ if (OK != acx100_s_init_wep(adev))
++ goto fail;
++ if (OK != acx_s_init_packet_templates(adev))
++ goto fail;
++ if (OK != acx100_s_create_dma_regions(adev)) {
++ printk("%s: acx100_create_dma_regions FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ }
++
++ MAC_COPY(adev->ndev->dev_addr, adev->dev_addr);
++ result = OK;
++
++fail:
++ if (result)
++ printk("acx: init_mac() FAILED\n");
++ FN_EXIT1(result);
++ return result;
++}
++
++
++void
++acx_s_set_sane_reg_domain(acx_device_t *adev, int do_set)
++{
++ unsigned mask;
++
++ unsigned int i;
++
++ for (i = 0; i < sizeof(acx_reg_domain_ids); i++)
++ if (acx_reg_domain_ids[i] == adev->reg_dom_id)
++ break;
++
++ if (sizeof(acx_reg_domain_ids) == i) {
++ log(L_INIT, "Invalid or unsupported regulatory domain"
++ " 0x%02X specified, falling back to FCC (USA)!"
++ " Please report if this sounds fishy!\n",
++ adev->reg_dom_id);
++ i = 0;
++ adev->reg_dom_id = acx_reg_domain_ids[i];
++
++ /* since there was a mismatch, we need to force updating */
++ do_set = 1;
++ }
++
++ if (do_set) {
++ acx_ie_generic_t dom;
++ dom.m.bytes[0] = adev->reg_dom_id;
++ acx_s_configure(adev, &dom, ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN);
++ }
++
++ adev->reg_dom_chanmask = reg_domain_channel_masks[i];
++
++ mask = (1 << (adev->channel - 1));
++ if (!(adev->reg_dom_chanmask & mask)) {
++ /* hmm, need to adjust our channel to reside within domain */
++ mask = 1;
++ for (i = 1; i <= 14; i++) {
++ if (adev->reg_dom_chanmask & mask) {
++ printk("%s: adjusting selected channel from %d "
++ "to %d due to new regulatory domain\n",
++ adev->ndev->name, adev->channel, i);
++ adev->channel = i;
++ break;
++ }
++ mask <<= 1;
++ }
++ }
++}
++
++
++#if POWER_SAVE_80211
++static void
++acx_s_update_80211_powersave_mode(acx_device_t *adev)
++{
++ /* merge both structs in a union to be able to have common code */
++ union {
++ acx111_ie_powersave_t acx111;
++ acx100_ie_powersave_t acx100;
++ } pm;
++
++ /* change 802.11 power save mode settings */
++ log(L_INIT, "updating 802.11 power save mode settings: "
++ "wakeup_cfg 0x%02X, listen interval %u, "
++ "options 0x%02X, hangover period %u, "
++ "enhanced_ps_transition_time %u\n",
++ adev->ps_wakeup_cfg, adev->ps_listen_interval,
++ adev->ps_options, adev->ps_hangover_period,
++ adev->ps_enhanced_transition_time);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "Previous PS mode settings: wakeup_cfg 0x%02X, "
++ "listen interval %u, options 0x%02X, "
++ "hangover period %u, "
++ "enhanced_ps_transition_time %u, beacon_rx_time %u\n",
++ pm.acx111.wakeup_cfg,
++ pm.acx111.listen_interval,
++ pm.acx111.options,
++ pm.acx111.hangover_period,
++ IS_ACX111(adev) ?
++ pm.acx111.enhanced_ps_transition_time
++ : pm.acx100.enhanced_ps_transition_time,
++ IS_ACX111(adev) ?
++ pm.acx111.beacon_rx_time
++ : (u32)-1
++ );
++ pm.acx111.wakeup_cfg = adev->ps_wakeup_cfg;
++ pm.acx111.listen_interval = adev->ps_listen_interval;
++ pm.acx111.options = adev->ps_options;
++ pm.acx111.hangover_period = adev->ps_hangover_period;
++ if (IS_ACX111(adev)) {
++ pm.acx111.beacon_rx_time = cpu_to_le32(adev->ps_beacon_rx_time);
++ pm.acx111.enhanced_ps_transition_time = cpu_to_le32(adev->ps_enhanced_transition_time);
++ } else {
++ pm.acx100.enhanced_ps_transition_time = cpu_to_le16(adev->ps_enhanced_transition_time);
++ }
++ acx_s_configure(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "wakeup_cfg: 0x%02X\n", pm.acx111.wakeup_cfg);
++ acx_s_msleep(40);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "wakeup_cfg: 0x%02X\n", pm.acx111.wakeup_cfg);
++ log(L_INIT, "power save mode change %s\n",
++ (pm.acx111.wakeup_cfg & PS_CFG_PENDING) ? "FAILED" : "was successful");
++ /* FIXME: maybe verify via PS_CFG_PENDING bit here
++ * that power save mode change was successful. */
++ /* FIXME: we shouldn't trigger a scan immediately after
++ * fiddling with power save mode (since the firmware is sending
++ * a NULL frame then). */
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_update_card_settings
++**
++** Applies accumulated changes in various adev->xxxx members
++** Called by ioctl commit handler, acx_start, acx_set_defaults,
++** acx_s_after_interrupt_task (if IRQ_CMD_UPDATE_CARD_CFG),
++*/
++static void
++acx111_s_sens_radio_16_17(acx_device_t *adev)
++{
++ u32 feature1, feature2;
++
++ if ((adev->sensitivity < 1) || (adev->sensitivity > 3)) {
++ printk("%s: invalid sensitivity setting (1..3), "
++ "setting to 1\n", adev->ndev->name);
++ adev->sensitivity = 1;
++ }
++ acx111_s_get_feature_config(adev, &feature1, &feature2);
++ CLEAR_BIT(feature1, FEATURE1_LOW_RX|FEATURE1_EXTRA_LOW_RX);
++ if (adev->sensitivity > 1)
++ SET_BIT(feature1, FEATURE1_LOW_RX);
++ if (adev->sensitivity > 2)
++ SET_BIT(feature1, FEATURE1_EXTRA_LOW_RX);
++ acx111_s_feature_set(adev, feature1, feature2);
++}
++
++
++void
++acx_s_update_card_settings(acx_device_t *adev)
++{
++ unsigned long flags;
++ unsigned int start_scan = 0;
++ int i;
++
++ FN_ENTER;
++
++ log(L_INIT, "get_mask 0x%08X, set_mask 0x%08X\n",
++ adev->get_mask, adev->set_mask);
++
++ /* Track dependencies betweed various settings */
++
++ if (adev->set_mask & (GETSET_MODE|GETSET_RESCAN|GETSET_WEP)) {
++ log(L_INIT, "important setting has been changed. "
++ "Need to update packet templates, too\n");
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ if (adev->set_mask & GETSET_CHANNEL) {
++ /* This will actually tune RX/TX to the channel */
++ SET_BIT(adev->set_mask, GETSET_RX|GETSET_TX);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ /* Beacons contain channel# - update them */
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ start_scan = 1;
++ }
++ }
++
++ /* Apply settings */
++
++#ifdef WHY_SHOULD_WE_BOTHER /* imagine we were just powered off */
++ /* send a disassoc request in case it's required */
++ if (adev->set_mask & (GETSET_MODE|GETSET_RESCAN|GETSET_CHANNEL|GETSET_WEP)) {
++ if (ACX_MODE_2_STA == adev->mode) {
++ if (ACX_STATUS_4_ASSOCIATED == adev->status) {
++ log(L_ASSOC, "we were ASSOCIATED - "
++ "sending disassoc request\n");
++ acx_lock(adev, flags);
++ acx_l_transmit_disassoc(adev, NULL);
++ /* FIXME: deauth? */
++ acx_unlock(adev, flags);
++ }
++ /* need to reset some other stuff as well */
++ log(L_DEBUG, "resetting bssid\n");
++ MAC_ZERO(adev->bssid);
++ SET_BIT(adev->set_mask, SET_TEMPLATES|SET_STA_LIST);
++ start_scan = 1;
++ }
++ }
++#endif
++
++ if (adev->get_mask & GETSET_STATION_ID) {
++ u8 stationID[4 + ACX1xx_IE_DOT11_STATION_ID_LEN];
++ const u8 *paddr;
++
++ acx_s_interrogate(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID);
++ paddr = &stationID[4];
++ for (i = 0; i < ETH_ALEN; i++) {
++ /* we copy the MAC address (reversed in
++ * the card) to the netdevice's MAC
++ * address, and on ifup it will be
++ * copied into iwadev->dev_addr */
++ adev->ndev->dev_addr[ETH_ALEN - 1 - i] = paddr[i];
++ }
++ CLEAR_BIT(adev->get_mask, GETSET_STATION_ID);
++ }
++
++ if (adev->get_mask & GETSET_SENSITIVITY) {
++ if ((RADIO_RFMD_11 == adev->radio_type)
++ || (RADIO_MAXIM_0D == adev->radio_type)
++ || (RADIO_RALINK_15 == adev->radio_type)) {
++ acx_s_read_phy_reg(adev, 0x30, &adev->sensitivity);
++ } else {
++ log(L_INIT, "don't know how to get sensitivity "
++ "for radio type 0x%02X\n", adev->radio_type);
++ adev->sensitivity = 0;
++ }
++ log(L_INIT, "got sensitivity value %u\n", adev->sensitivity);
++
++ CLEAR_BIT(adev->get_mask, GETSET_SENSITIVITY);
++ }
++
++ if (adev->get_mask & GETSET_ANTENNA) {
++ u8 antenna[4 + ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN];
++
++ memset(antenna, 0, sizeof(antenna));
++ acx_s_interrogate(adev, antenna, ACX1xx_IE_DOT11_CURRENT_ANTENNA);
++ adev->antenna = antenna[4];
++ log(L_INIT, "got antenna value 0x%02X\n", adev->antenna);
++ CLEAR_BIT(adev->get_mask, GETSET_ANTENNA);
++ }
++
++ if (adev->get_mask & GETSET_ED_THRESH) {
++ if (IS_ACX100(adev)) {
++ u8 ed_threshold[4 + ACX100_IE_DOT11_ED_THRESHOLD_LEN];
++
++ memset(ed_threshold, 0, sizeof(ed_threshold));
++ acx_s_interrogate(adev, ed_threshold, ACX100_IE_DOT11_ED_THRESHOLD);
++ adev->ed_threshold = ed_threshold[4];
++ } else {
++ log(L_INIT, "acx111 doesn't support ED\n");
++ adev->ed_threshold = 0;
++ }
++ log(L_INIT, "got Energy Detect (ED) threshold %u\n", adev->ed_threshold);
++ CLEAR_BIT(adev->get_mask, GETSET_ED_THRESH);
++ }
++
++ if (adev->get_mask & GETSET_CCA) {
++ if (IS_ACX100(adev)) {
++ u8 cca[4 + ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN];
++
++ memset(cca, 0, sizeof(adev->cca));
++ acx_s_interrogate(adev, cca, ACX1xx_IE_DOT11_CURRENT_CCA_MODE);
++ adev->cca = cca[4];
++ } else {
++ log(L_INIT, "acx111 doesn't support CCA\n");
++ adev->cca = 0;
++ }
++ log(L_INIT, "got Channel Clear Assessment (CCA) value %u\n", adev->cca);
++ CLEAR_BIT(adev->get_mask, GETSET_CCA);
++ }
++
++ if (adev->get_mask & GETSET_REG_DOMAIN) {
++ acx_ie_generic_t dom;
++
++ acx_s_interrogate(adev, &dom, ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN);
++ adev->reg_dom_id = dom.m.bytes[0];
++ acx_s_set_sane_reg_domain(adev, 0);
++ log(L_INIT, "got regulatory domain 0x%02X\n", adev->reg_dom_id);
++ CLEAR_BIT(adev->get_mask, GETSET_REG_DOMAIN);
++ }
++
++ if (adev->set_mask & GETSET_STATION_ID) {
++ u8 stationID[4 + ACX1xx_IE_DOT11_STATION_ID_LEN];
++ u8 *paddr;
++
++ paddr = &stationID[4];
++ memcpy(adev->dev_addr, adev->ndev->dev_addr, ETH_ALEN);
++ for (i = 0; i < ETH_ALEN; i++) {
++ /* copy the MAC address we obtained when we noticed
++ * that the ethernet iface's MAC changed
++ * to the card (reversed in
++ * the card!) */
++ paddr[i] = adev->dev_addr[ETH_ALEN - 1 - i];
++ }
++ acx_s_configure(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID);
++ CLEAR_BIT(adev->set_mask, GETSET_STATION_ID);
++ }
++
++ if (adev->set_mask & SET_TEMPLATES) {
++ log(L_INIT, "updating packet templates\n");
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ acx_s_set_probe_request_template(adev);
++#if POWER_SAVE_80211
++ acx_s_set_null_data_template(adev);
++#endif
++ break;
++ case ACX_MODE_0_ADHOC:
++ acx_s_set_probe_request_template(adev);
++#if POWER_SAVE_80211
++ /* maybe power save functionality is somehow possible
++ * for Ad-Hoc mode, too... FIXME: verify it somehow? firmware debug fields? */
++ acx_s_set_null_data_template(adev);
++#endif
++ /* fall through */
++ case ACX_MODE_3_AP:
++ acx_s_set_beacon_template(adev);
++ acx_s_set_tim_template(adev);
++ /* BTW acx111 firmware would not send probe responses
++ ** if probe request does not have all basic rates flagged
++ ** by 0x80! Thus firmware does not conform to 802.11,
++ ** it should ignore 0x80 bit in ratevector from STA.
++ ** We can 'fix' it by not using this template and
++ ** sending probe responses by hand. TODO --vda */
++ acx_s_set_probe_response_template(adev);
++ }
++ /* Needed if generated frames are to be emitted at different tx rate now */
++ log(L_IRQ, "redoing cmd_join_bssid() after template cfg\n");
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ CLEAR_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ if (adev->set_mask & SET_STA_LIST) {
++ acx_lock(adev, flags);
++ acx_l_sta_list_init(adev);
++ CLEAR_BIT(adev->set_mask, SET_STA_LIST);
++ acx_unlock(adev, flags);
++ }
++ if (adev->set_mask & SET_RATE_FALLBACK) {
++ u8 rate[4 + ACX1xx_IE_RATE_FALLBACK_LEN];
++
++ /* configure to not do fallbacks when not in auto rate mode */
++ rate[4] = (adev->rate_auto) ? /* adev->txrate_fallback_retries */ 1 : 0;
++ log(L_INIT, "updating Tx fallback to %u retries\n", rate[4]);
++ acx_s_configure(adev, &rate, ACX1xx_IE_RATE_FALLBACK);
++ CLEAR_BIT(adev->set_mask, SET_RATE_FALLBACK);
++ }
++ if (adev->set_mask & GETSET_TXPOWER) {
++ log(L_INIT, "updating transmit power: %u dBm\n",
++ adev->tx_level_dbm);
++ acx_s_set_tx_level(adev, adev->tx_level_dbm);
++ CLEAR_BIT(adev->set_mask, GETSET_TXPOWER);
++ }
++
++ if (adev->set_mask & GETSET_SENSITIVITY) {
++ log(L_INIT, "updating sensitivity value: %u\n",
++ adev->sensitivity);
++ switch (adev->radio_type) {
++ case RADIO_RFMD_11:
++ case RADIO_MAXIM_0D:
++ case RADIO_RALINK_15:
++ acx_s_write_phy_reg(adev, 0x30, adev->sensitivity);
++ break;
++ case RADIO_RADIA_16:
++ case RADIO_UNKNOWN_17:
++ acx111_s_sens_radio_16_17(adev);
++ break;
++ default:
++ log(L_INIT, "don't know how to modify sensitivity "
++ "for radio type 0x%02X\n", adev->radio_type);
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_SENSITIVITY);
++ }
++
++ if (adev->set_mask & GETSET_ANTENNA) {
++ /* antenna */
++ u8 antenna[4 + ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN];
++
++ memset(antenna, 0, sizeof(antenna));
++ antenna[4] = adev->antenna;
++ log(L_INIT, "updating antenna value: 0x%02X\n",
++ adev->antenna);
++ acx_s_configure(adev, &antenna, ACX1xx_IE_DOT11_CURRENT_ANTENNA);
++ CLEAR_BIT(adev->set_mask, GETSET_ANTENNA);
++ }
++
++ if (adev->set_mask & GETSET_ED_THRESH) {
++ /* ed_threshold */
++ log(L_INIT, "updating Energy Detect (ED) threshold: %u\n",
++ adev->ed_threshold);
++ if (IS_ACX100(adev)) {
++ u8 ed_threshold[4 + ACX100_IE_DOT11_ED_THRESHOLD_LEN];
++
++ memset(ed_threshold, 0, sizeof(ed_threshold));
++ ed_threshold[4] = adev->ed_threshold;
++ acx_s_configure(adev, &ed_threshold, ACX100_IE_DOT11_ED_THRESHOLD);
++ }
++ else
++ log(L_INIT, "acx111 doesn't support ED!\n");
++ CLEAR_BIT(adev->set_mask, GETSET_ED_THRESH);
++ }
++
++ if (adev->set_mask & GETSET_CCA) {
++ /* CCA value */
++ log(L_INIT, "updating Channel Clear Assessment "
++ "(CCA) value: 0x%02X\n", adev->cca);
++ if (IS_ACX100(adev)) {
++ u8 cca[4 + ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN];
++
++ memset(cca, 0, sizeof(cca));
++ cca[4] = adev->cca;
++ acx_s_configure(adev, &cca, ACX1xx_IE_DOT11_CURRENT_CCA_MODE);
++ }
++ else
++ log(L_INIT, "acx111 doesn't support CCA!\n");
++ CLEAR_BIT(adev->set_mask, GETSET_CCA);
++ }
++
++ if (adev->set_mask & GETSET_LED_POWER) {
++ /* Enable Tx */
++ log(L_INIT, "updating power LED status: %u\n", adev->led_power);
++
++ acx_lock(adev, flags);
++#if defined (ACX_MEM)
++ acxmem_l_power_led(adev, adev->led_power);
++#else
++ if (IS_PCI(adev))
++ acxpci_l_power_led(adev, adev->led_power);
++#endif
++ CLEAR_BIT(adev->set_mask, GETSET_LED_POWER);
++ acx_unlock(adev, flags);
++ }
++
++ if (adev->set_mask & GETSET_POWER_80211) {
++#if POWER_SAVE_80211
++ acx_s_update_80211_powersave_mode(adev);
++#endif
++ CLEAR_BIT(adev->set_mask, GETSET_POWER_80211);
++ }
++
++ if (adev->set_mask & GETSET_CHANNEL) {
++ /* channel */
++ log(L_INIT, "updating channel to: %u\n", adev->channel);
++ CLEAR_BIT(adev->set_mask, GETSET_CHANNEL);
++ }
++
++ if (adev->set_mask & GETSET_TX) {
++ /* set Tx */
++ log(L_INIT, "updating: %s Tx\n",
++ adev->tx_disabled ? "disable" : "enable");
++ if (adev->tx_disabled)
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ else
++ acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_TX, &adev->channel, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_TX);
++ }
++
++ if (adev->set_mask & GETSET_RX) {
++ /* Enable Rx */
++ log(L_INIT, "updating: enable Rx on channel: %u\n",
++ adev->channel);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_RX, &adev->channel, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_RX);
++ }
++
++ if (adev->set_mask & GETSET_RETRY) {
++ u8 short_retry[4 + ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN];
++ u8 long_retry[4 + ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN];
++
++ log(L_INIT, "updating short retry limit: %u, long retry limit: %u\n",
++ adev->short_retry, adev->long_retry);
++ short_retry[0x4] = adev->short_retry;
++ long_retry[0x4] = adev->long_retry;
++ acx_s_configure(adev, &short_retry, ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT);
++ acx_s_configure(adev, &long_retry, ACX1xx_IE_DOT11_LONG_RETRY_LIMIT);
++ CLEAR_BIT(adev->set_mask, GETSET_RETRY);
++ }
++
++ if (adev->set_mask & SET_MSDU_LIFETIME) {
++ u8 xmt_msdu_lifetime[4 + ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN];
++
++ log(L_INIT, "updating tx MSDU lifetime: %u\n",
++ adev->msdu_lifetime);
++ *(u32 *)&xmt_msdu_lifetime[4] = cpu_to_le32((u32)adev->msdu_lifetime);
++ acx_s_configure(adev, &xmt_msdu_lifetime, ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME);
++ CLEAR_BIT(adev->set_mask, SET_MSDU_LIFETIME);
++ }
++
++ if (adev->set_mask & GETSET_REG_DOMAIN) {
++ log(L_INIT, "updating regulatory domain: 0x%02X\n",
++ adev->reg_dom_id);
++ acx_s_set_sane_reg_domain(adev, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_REG_DOMAIN);
++ }
++
++ if (adev->set_mask & GETSET_MODE) {
++ adev->ndev->type = (adev->mode == ACX_MODE_MONITOR) ?
++ adev->monitor_type : ARPHRD_ETHER;
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++
++ acx_lock(adev, flags);
++ acx_l_sta_list_init(adev);
++ adev->aid = 0;
++ adev->ap_client = NULL;
++ MAC_COPY(adev->bssid, adev->dev_addr);
++ /* this basically says "we're connected" */
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ acx_unlock(adev, flags);
++
++ acx111_s_feature_off(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++ /* start sending beacons */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ break;
++ case ACX_MODE_MONITOR:
++ acx111_s_feature_on(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++ /* this stops beacons */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ /* this basically says "we're connected" */
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ SET_BIT(adev->set_mask, SET_RXCONFIG|SET_WEP_OPTIONS);
++ break;
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ acx111_s_feature_off(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++
++ acx_lock(adev, flags);
++ adev->aid = 0;
++ adev->ap_client = NULL;
++ acx_unlock(adev, flags);
++
++ /* we want to start looking for peer or AP */
++ start_scan = 1;
++ break;
++ case ACX_MODE_OFF:
++ /* TODO: disable RX/TX, stop any scanning activity etc: */
++ /* adev->tx_disabled = 1; */
++ /* SET_BIT(adev->set_mask, GETSET_RX|GETSET_TX); */
++
++ /* This stops beacons (invalid macmode...) */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ break;
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_MODE);
++ }
++
++ if (adev->set_mask & SET_RXCONFIG) {
++ acx_s_initialize_rx_config(adev);
++ CLEAR_BIT(adev->set_mask, SET_RXCONFIG);
++ }
++
++ if (adev->set_mask & GETSET_RESCAN) {
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ start_scan = 1;
++ break;
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++
++ if (adev->set_mask & GETSET_WEP) {
++ /* encode */
++
++ ie_dot11WEPDefaultKeyID_t dkey;
++#ifdef DEBUG_WEP
++ struct {
++ u16 type;
++ u16 len;
++ u8 val;
++ } ACX_PACKED keyindic;
++#endif
++ log(L_INIT, "updating WEP key settings\n");
++
++ acx_s_set_wepkey(adev);
++
++ dkey.KeyID = adev->wep_current_index;
++ log(L_INIT, "setting WEP key %u as default\n", dkey.KeyID);
++ acx_s_configure(adev, &dkey, ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET);
++#ifdef DEBUG_WEP
++ keyindic.val = 3;
++ acx_s_configure(adev, &keyindic, ACX111_IE_KEY_CHOOSE);
++#endif
++ start_scan = 1;
++ CLEAR_BIT(adev->set_mask, GETSET_WEP);
++ }
++
++ if (adev->set_mask & SET_WEP_OPTIONS) {
++ acx100_ie_wep_options_t options;
++ if (IS_ACX111(adev)) {
++ log(L_DEBUG, "setting WEP Options for acx111 is not supported\n");
++ } else {
++ log(L_INIT, "setting WEP Options\n");
++ acx100_s_init_wep(adev);
++#if 0
++ /* let's choose maximum setting: 4 default keys,
++ * plus 10 other keys: */
++ options.NumKeys = cpu_to_le16(DOT11_MAX_DEFAULT_WEP_KEYS + 10);
++ /* don't decrypt default key only,
++ * don't override decryption: */
++ options.WEPOption = 0;
++ if (adev->mode == ACX_MODE_MONITOR) {
++ /* don't decrypt default key only,
++ * override decryption mechanism: */
++ options.WEPOption = 2;
++ }
++
++ acx_s_configure(adev, &options, ACX100_IE_WEP_OPTIONS);
++#endif
++ }
++ CLEAR_BIT(adev->set_mask, SET_WEP_OPTIONS);
++ }
++
++ /* Rescan was requested */
++ if (start_scan) {
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* We can avoid clearing list if join code
++ ** will be a bit more clever about not picking
++ ** 'bad' AP over and over again */
++ acx_lock(adev, flags);
++ adev->ap_client = NULL;
++ acx_l_sta_list_init(adev);
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_unlock(adev, flags);
++
++ acx_s_cmd_start_scan(adev);
++ }
++ }
++
++ /* debug, rate, and nick don't need any handling */
++ /* what about sniffing mode?? */
++
++ log(L_INIT, "get_mask 0x%08X, set_mask 0x%08X - after update\n",
++ adev->get_mask, adev->set_mask);
++
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_e_after_interrupt_task
++*/
++static int
++acx_s_recalib_radio(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ acx111_cmd_radiocalib_t cal;
++
++ printk("%s: recalibrating radio\n", adev->ndev->name);
++ /* automatic recalibration, choose all methods: */
++ cal.methods = cpu_to_le32(0x8000000f);
++ /* automatic recalibration every 60 seconds (value in TUs)
++ * I wonder what the firmware default here is? */
++ cal.interval = cpu_to_le32(58594);
++ return acx_s_issue_cmd_timeo(adev, ACX111_CMD_RADIOCALIB,
++ &cal, sizeof(cal), CMD_TIMEOUT_MS(100));
++ } else {
++ /* On ACX100, we need to recalibrate the radio
++ * by issuing a GETSET_TX|GETSET_RX */
++ if (/* (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0)) &&
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0)) && */
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_TX, &adev->channel, 1)) &&
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_RX, &adev->channel, 1)) )
++ return OK;
++ return NOT_OK;
++ }
++}
++
++static void
++acx_s_after_interrupt_recalib(acx_device_t *adev)
++{
++ int res;
++
++ /* this helps with ACX100 at least;
++ * hopefully ACX111 also does a
++ * recalibration here */
++
++ /* clear flag beforehand, since we want to make sure
++ * it's cleared; then only set it again on specific circumstances */
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* better wait a bit between recalibrations to
++ * prevent overheating due to torturing the card
++ * into working too long despite high temperature
++ * (just a safety measure) */
++ if (adev->recalib_time_last_success
++ && time_before(jiffies, adev->recalib_time_last_success
++ + RECALIB_PAUSE * 60 * HZ)) {
++ if (adev->recalib_msg_ratelimit <= 4) {
++ printk("%s: less than " STRING(RECALIB_PAUSE)
++ " minutes since last radio recalibration, "
++ "not recalibrating (maybe card is too hot?)\n",
++ adev->ndev->name);
++ adev->recalib_msg_ratelimit++;
++ if (adev->recalib_msg_ratelimit == 5)
++ printk("disabling above message until next recalib\n");
++ }
++ return;
++ }
++
++ adev->recalib_msg_ratelimit = 0;
++
++ /* note that commands sometimes fail (card busy),
++ * so only clear flag if we were fully successful */
++ res = acx_s_recalib_radio(adev);
++ if (res == OK) {
++ printk("%s: successfully recalibrated radio\n",
++ adev->ndev->name);
++ adev->recalib_time_last_success = jiffies;
++ adev->recalib_failure_count = 0;
++ } else {
++ /* failed: resubmit, but only limited
++ * amount of times within some time range
++ * to prevent endless loop */
++
++ adev->recalib_time_last_success = 0; /* we failed */
++
++ /* if some time passed between last
++ * attempts, then reset failure retry counter
++ * to be able to do next recalib attempt */
++ if (time_after(jiffies, adev->recalib_time_last_attempt + 5*HZ))
++ adev->recalib_failure_count = 0;
++
++ if (adev->recalib_failure_count < 5) {
++ /* increment inside only, for speedup of outside path */
++ adev->recalib_failure_count++;
++ adev->recalib_time_last_attempt = jiffies;
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ }
++}
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
++static void
++acx_e_after_interrupt_task(struct work_struct *work)
++{
++ acx_device_t *adev = container_of(work, acx_device_t, after_interrupt_task);
++#else
++ static void
++ acx_e_after_interrupt_task(void *data)
++ {
++ struct net_device *ndev = (struct net_device*)data;
++ acx_device_t *adev = ndev2adev(ndev);
++#endif
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ if (!adev->after_interrupt_jobs)
++ goto end; /* no jobs to do */
++
++#if TX_CLEANUP_IN_SOFTIRQ
++ /* can happen only on PCI */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_TX_CLEANUP) {
++ acx_lock(adev, flags);
++ acxpci_l_clean_txdesc(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_TX_CLEANUP);
++ acx_unlock(adev, flags);
++ }
++#endif
++ /* we see lotsa tx errors */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_RADIO_RECALIB) {
++ acx_s_after_interrupt_recalib(adev);
++ }
++
++ /* a poor interrupt code wanted to do update_card_settings() */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_UPDATE_CARD_CFG) {
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++
++ /* 1) we detected that no Scan_Complete IRQ came from fw, or
++ ** 2) we found too many STAs */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_STOP_SCAN) {
++ log(L_IRQ, "sending a stop scan cmd...\n");
++ acx_s_issue_cmd(adev, ACX1xx_CMD_STOP_SCAN, NULL, 0);
++ /* HACK: set the IRQ bit, since we won't get a
++ * scan complete IRQ any more on ACX111 (works on ACX100!),
++ * since _we_, not a fw, have stopped the scan */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_STOP_SCAN);
++ }
++
++ /* either fw sent Scan_Complete or we detected that
++ ** no Scan_Complete IRQ came from fw. Finish scanning,
++ ** pick join partner if any */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_COMPLETE_SCAN) {
++ if (adev->status == ACX_STATUS_1_SCANNING) {
++ if (OK != acx_s_complete_scan(adev)) {
++ SET_BIT(adev->after_interrupt_jobs,
++ ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ } else {
++ /* + scan kills current join status - restore it
++ ** (do we need it for STA?) */
++ /* + does it happen only with active scans?
++ ** active and passive scans? ALL scans including
++ ** background one? */
++ /* + was not verified that everything is restored
++ ** (but at least we start to emit beacons again) */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ log(L_IRQ, "redoing cmd_join_bssid() after scan\n");
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ }
++ }
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ }
++
++ /* STA auth or assoc timed out, start over again */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_RESTART_SCAN) {
++ log(L_IRQ, "sending a start_scan cmd...\n");
++ acx_s_cmd_start_scan(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++
++ /* whee, we got positive assoc response! 8) */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_ASSOCIATE) {
++ acx_ie_generic_t pdr;
++ /* tiny race window exists, checking that we still a STA */
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ pdr.m.aid = cpu_to_le16(adev->aid);
++ acx_s_configure(adev, &pdr, ACX1xx_IE_ASSOC_ID);
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ log(L_ASSOC|L_DEBUG, "ASSOCIATED!\n");
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_ASSOCIATE);
++ }
++ }
++end:
++ acx_sem_unlock(adev);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_schedule_task
++**
++** Schedule the call of the after_interrupt method after leaving
++** the interrupt context.
++*/
++void
++acx_schedule_task(acx_device_t *adev, unsigned int set_flag)
++{
++ SET_BIT(adev->after_interrupt_jobs, set_flag);
++ SCHEDULE_WORK(&adev->after_interrupt_task);
++}
++
++
++/***********************************************************************
++*/
++void
++acx_init_task_scheduler(acx_device_t *adev)
++{
++ /* configure task scheduler */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
++ INIT_WORK(&adev->after_interrupt_task, acx_e_after_interrupt_task);
++#else
++ INIT_WORK(&adev->after_interrupt_task, acx_e_after_interrupt_task,
++ adev->ndev);
++#endif
++}
++
++
++/***********************************************************************
++** acx_s_start
++*/
++void
++acx_s_start(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /*
++ * Ok, now we do everything that can possibly be done with ioctl
++ * calls to make sure that when it was called before the card
++ * was up we get the changes asked for
++ */
++
++ SET_BIT(adev->set_mask, SET_TEMPLATES|SET_STA_LIST|GETSET_WEP
++ |GETSET_TXPOWER|GETSET_ANTENNA|GETSET_ED_THRESH|GETSET_CCA
++ |GETSET_REG_DOMAIN|GETSET_MODE|GETSET_CHANNEL
++ |GETSET_TX|GETSET_RX|GETSET_STATION_ID);
++
++ log(L_INIT, "updating initial settings on iface activation\n");
++ acx_s_update_card_settings(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_update_capabilities
++*/
++void
++acx_update_capabilities(acx_device_t *adev)
++{
++ u16 cap = 0;
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++ SET_BIT(cap, WF_MGMT_CAP_ESS); break;
++ case ACX_MODE_0_ADHOC:
++ SET_BIT(cap, WF_MGMT_CAP_IBSS); break;
++ /* other types of stations do not emit beacons */
++ }
++
++ if (adev->wep_restricted) {
++ SET_BIT(cap, WF_MGMT_CAP_PRIVACY);
++ }
++ if (adev->cfgopt_dot11ShortPreambleOption) {
++ SET_BIT(cap, WF_MGMT_CAP_SHORT);
++ }
++ if (adev->cfgopt_dot11PBCCOption) {
++ SET_BIT(cap, WF_MGMT_CAP_PBCC);
++ }
++ if (adev->cfgopt_dot11ChannelAgility) {
++ SET_BIT(cap, WF_MGMT_CAP_AGILITY);
++ }
++ log(L_DEBUG, "caps updated from 0x%04X to 0x%04X\n",
++ adev->capabilities, cap);
++ adev->capabilities = cap;
++}
++
++/***********************************************************************
++** Common function to parse ALL configoption struct formats
++** (ACX100 and ACX111; FIXME: how to make it work with ACX100 USB!?!?).
++** FIXME: logging should be removed here and added to a /proc file instead
++*/
++void
++acx_s_parse_configoption(acx_device_t *adev, const acx111_ie_configoption_t *pcfg)
++{
++ const u8 *pEle;
++ int i;
++ int is_acx111 = IS_ACX111(adev);
++
++ if (acx_debug & L_DEBUG) {
++ printk("configoption struct content:\n");
++ acx_dump_bytes(pcfg, sizeof(*pcfg));
++ }
++
++ if (( is_acx111 && (adev->eeprom_version == 5))
++ || (!is_acx111 && (adev->eeprom_version == 4))
++ || (!is_acx111 && (adev->eeprom_version == 5))) {
++ /* these versions are known to be supported */
++ } else {
++ printk("unknown chip and EEPROM version combination (%s, v%d), "
++ "don't know how to parse config options yet. "
++ "Please report\n", is_acx111 ? "ACX111" : "ACX100",
++ adev->eeprom_version);
++ return;
++ }
++
++ /* first custom-parse the first part which has chip-specific layout */
++
++ pEle = (const u8 *) pcfg;
++
++ pEle += 4; /* skip (type,len) header */
++
++ memcpy(adev->cfgopt_NVSv, pEle, sizeof(adev->cfgopt_NVSv));
++ pEle += sizeof(adev->cfgopt_NVSv);
++
++ if (is_acx111) {
++ adev->cfgopt_NVS_vendor_offs = le16_to_cpu(*(u16 *)pEle);
++ pEle += sizeof(adev->cfgopt_NVS_vendor_offs);
++
++ adev->cfgopt_probe_delay = 200; /* good default value? */
++ pEle += 2; /* FIXME: unknown, value 0x0001 */
++ } else {
++ memcpy(adev->cfgopt_MAC, pEle, sizeof(adev->cfgopt_MAC));
++ pEle += sizeof(adev->cfgopt_MAC);
++
++ adev->cfgopt_probe_delay = le16_to_cpu(*(u16 *)pEle);
++ pEle += sizeof(adev->cfgopt_probe_delay);
++ if ((adev->cfgopt_probe_delay < 100) || (adev->cfgopt_probe_delay > 500)) {
++ printk("strange probe_delay value %d, "
++ "tweaking to 200\n", adev->cfgopt_probe_delay);
++ adev->cfgopt_probe_delay = 200;
++ }
++ }
++
++ adev->cfgopt_eof_memory = le32_to_cpu(*(u32 *)pEle);
++ pEle += sizeof(adev->cfgopt_eof_memory);
++
++ printk("NVS_vendor_offs:%04X probe_delay:%d eof_memory:%d\n",
++ adev->cfgopt_NVS_vendor_offs,
++ adev->cfgopt_probe_delay,
++ adev->cfgopt_eof_memory);
++
++ adev->cfgopt_dot11CCAModes = *pEle++;
++ adev->cfgopt_dot11Diversity = *pEle++;
++ adev->cfgopt_dot11ShortPreambleOption = *pEle++;
++ adev->cfgopt_dot11PBCCOption = *pEle++;
++ adev->cfgopt_dot11ChannelAgility = *pEle++;
++ adev->cfgopt_dot11PhyType = *pEle++;
++ adev->cfgopt_dot11TempType = *pEle++;
++ printk("CCAModes:%02X Diversity:%02X ShortPreOpt:%02X "
++ "PBCC:%02X ChanAgil:%02X PHY:%02X Temp:%02X\n",
++ adev->cfgopt_dot11CCAModes,
++ adev->cfgopt_dot11Diversity,
++ adev->cfgopt_dot11ShortPreambleOption,
++ adev->cfgopt_dot11PBCCOption,
++ adev->cfgopt_dot11ChannelAgility,
++ adev->cfgopt_dot11PhyType,
++ adev->cfgopt_dot11TempType);
++
++ /* then use common parsing for next part which has common layout */
++
++ pEle++; /* skip table_count (6) */
++
++ if (IS_MEM(adev) && IS_ACX100(adev))
++ {
++ /*
++ * For iPaq hx4700 Generic Slave F/W 1.10.7.K. I'm not sure if these
++ * 4 extra bytes are before the dot11 things above or after, so I'm just
++ * going to guess after. If someone sees these aren't reasonable numbers,
++ * please fix this.
++ * The area from which the dot11 values above are read contains:
++ * 04 01 01 01 00 05 01 06 00 02 01 02
++ * the 8 dot11 reads above take care of 8 of them, but which 8...
++ */
++ pEle += 4;
++ }
++
++ adev->cfgopt_antennas.type = pEle[0];
++ adev->cfgopt_antennas.len = pEle[1];
++ printk("AntennaID:%02X Len:%02X Data:",
++ adev->cfgopt_antennas.type, adev->cfgopt_antennas.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_antennas.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_power_levels.type = pEle[0];
++ adev->cfgopt_power_levels.len = pEle[1];
++ printk("PowerLevelID:%02X Len:%02X Data:",
++ adev->cfgopt_power_levels.type, adev->cfgopt_power_levels.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_power_levels.list[i] = le16_to_cpu(*(u16 *)&pEle[i*2+2]);
++ printk("%04X ", adev->cfgopt_power_levels.list[i]);
++ }
++ printk("\n");
++
++ pEle += pEle[1]*2 + 2;
++ adev->cfgopt_data_rates.type = pEle[0];
++ adev->cfgopt_data_rates.len = pEle[1];
++ printk("DataRatesID:%02X Len:%02X Data:",
++ adev->cfgopt_data_rates.type, adev->cfgopt_data_rates.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_data_rates.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_domains.type = pEle[0];
++ adev->cfgopt_domains.len = pEle[1];
++ if (IS_MEM(adev) && IS_ACX100(adev))
++ {
++ /*
++ * For iPaq hx4700 Generic Slave F/W 1.10.7.K.
++ * There's an extra byte between this structure and the next
++ * that is not accounted for with this structure's length. It's
++ * most likely a bug in the firmware, but we can fix it here
++ * by bumping the length of this field by 1.
++ */
++ adev->cfgopt_domains.len++;
++ }
++ printk("DomainID:%02X Len:%02X Data:",
++ adev->cfgopt_domains.type, adev->cfgopt_domains.len);
++ for (i = 0; i < adev->cfgopt_domains.len; i++) {
++ adev->cfgopt_domains.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += adev->cfgopt_domains.len + 2;
++
++ adev->cfgopt_product_id.type = pEle[0];
++ adev->cfgopt_product_id.len = pEle[1];
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_product_id.list[i] = pEle[i+2];
++ }
++ printk("ProductID:%02X Len:%02X Data:%.*s\n",
++ adev->cfgopt_product_id.type, adev->cfgopt_product_id.len,
++ adev->cfgopt_product_id.len, (char *)adev->cfgopt_product_id.list);
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_manufacturer.type = pEle[0];
++ adev->cfgopt_manufacturer.len = pEle[1];
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_manufacturer.list[i] = pEle[i+2];
++ }
++ printk("ManufacturerID:%02X Len:%02X Data:%.*s\n",
++ adev->cfgopt_manufacturer.type, adev->cfgopt_manufacturer.len,
++ adev->cfgopt_manufacturer.len, (char *)adev->cfgopt_manufacturer.list);
++/*
++ printk("EEPROM part:\n");
++ for (i=0; i<58; i++) {
++ printk("%02X =======> 0x%02X\n",
++ i, (u8 *)adev->cfgopt_NVSv[i-2]);
++ }
++*/
++}
++
++
++/***********************************************************************
++*/
++static int __init
++acx_e_init_module(void)
++{
++ int r1,r2,r3,r4;
++
++ acx_struct_size_check();
++
++ printk("acx: this driver is still EXPERIMENTAL\n"
++ "acx: reading README file and/or Craig's HOWTO is "
++ "recommended, visit http://acx100.sf.net in case "
++ "of further questions/discussion\n");
++
++#if defined(CONFIG_ACX_PCI)
++ r1 = acxpci_e_init_module();
++#else
++ r1 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_MEM)
++ r2 = acxmem_e_init_module();
++#else
++ r2 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_USB)
++ r3 = acxusb_e_init_module();
++#else
++ r3 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_CS)
++ r4 = acx_cs_init();
++#else
++ r4 = -EINVAL;
++#endif
++ if (r2 && r1 && r3 && r4) { /* all failed! */
++ if (r3 || r1)
++ return r3 ? r3 : r1;
++ else
++ return r2;
++ }
++ /* return success if at least one succeeded */
++ return 0;
++
++}
++
++static void __exit
++acx_e_cleanup_module(void)
++{
++#if defined(CONFIG_ACX_PCI)
++ acxpci_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_MEM)
++ acxmem_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_USB)
++ acxusb_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_CS)
++ acx_cs_cleanup();
++#endif
++}
++
++module_init(acx_e_init_module)
++module_exit(acx_e_cleanup_module)
+Index: linux-2.6.23/drivers/net/wireless/acx/conv.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/conv.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,504 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/skbuff.h>
++#include <linux/if_arp.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++** proto_is_stt
++**
++** Searches the 802.1h Selective Translation Table for a given
++** protocol.
++**
++** prottype - protocol number (in host order) to search for.
++**
++** Returns:
++** 1 - if the table is empty or a match is found.
++** 0 - if the table is non-empty and a match is not found.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++static inline int
++proto_is_stt(unsigned int proto)
++{
++ /* Always return found for now. This is the behavior used by the */
++ /* Zoom Win95 driver when 802.1h mode is selected */
++ /* TODO: If necessary, add an actual search we'll probably
++ need this to match the CMAC's way of doing things.
++ Need to do some testing to confirm.
++ */
++
++ if (proto == 0x80f3) /* APPLETALK */
++ return 1;
++
++ return 0;
++/* return ((prottype == ETH_P_AARP) || (prottype == ETH_P_IPX)); */
++}
++
++/* Helpers */
++
++static inline void
++store_llc_snap(struct wlan_llc *llc)
++{
++ llc->dsap = 0xaa; /* SNAP, see IEEE 802 */
++ llc->ssap = 0xaa;
++ llc->ctl = 0x03;
++}
++static inline int
++llc_is_snap(const struct wlan_llc *llc)
++{
++ return (llc->dsap == 0xaa)
++ && (llc->ssap == 0xaa)
++ && (llc->ctl == 0x03);
++}
++static inline void
++store_oui_rfc1042(struct wlan_snap *snap)
++{
++ snap->oui[0] = 0;
++ snap->oui[1] = 0;
++ snap->oui[2] = 0;
++}
++static inline int
++oui_is_rfc1042(const struct wlan_snap *snap)
++{
++ return (snap->oui[0] == 0)
++ && (snap->oui[1] == 0)
++ && (snap->oui[2] == 0);
++}
++static inline void
++store_oui_8021h(struct wlan_snap *snap)
++{
++ snap->oui[0] = 0;
++ snap->oui[1] = 0;
++ snap->oui[2] = 0xf8;
++}
++static inline int
++oui_is_8021h(const struct wlan_snap *snap)
++{
++ return (snap->oui[0] == 0)
++ && (snap->oui[1] == 0)
++ && (snap->oui[2] == 0xf8);
++}
++
++
++/***********************************************************************
++** acx_ether_to_txbuf
++**
++** Uses the contents of the ether frame to build the elements of
++** the 802.11 frame.
++**
++** We don't actually set up the frame header here. That's the
++** MAC's job. We're only handling conversion of DIXII or 802.3+LLC
++** frames to something that works with 802.11.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++int
++acx_ether_to_txbuf(acx_device_t *adev, void *txbuf, const struct sk_buff *skb)
++{
++ struct wlan_hdr_a3 *w_hdr;
++ struct wlan_ethhdr *e_hdr;
++ struct wlan_llc *e_llc;
++ struct wlan_snap *e_snap;
++ const u8 *a1, *a3;
++ int header_len, payload_len = -1;
++ /* protocol type or data length, depending on whether
++ * DIX or 802.3 ethernet format */
++ u16 proto;
++ u16 fc;
++
++ FN_ENTER;
++
++ if (unlikely(!skb->len)) {
++ log(L_DEBUG, "zero-length skb!\n");
++ goto end;
++ }
++
++ w_hdr = (struct wlan_hdr_a3*)txbuf;
++
++ switch (adev->mode) {
++ case ACX_MODE_MONITOR:
++ /* NB: one day we might want to play with DESC_CTL2_FCS
++ ** Will need to stop doing "- WLAN_FCS_LEN" here then */
++ if (unlikely(skb->len >= WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_FCS_LEN)) {
++ printk("%s: can't tx oversized frame (%d bytes)\n",
++ adev->ndev->name, skb->len);
++ goto end;
++ }
++ memcpy(w_hdr, skb->data, skb->len);
++ payload_len = skb->len;
++ goto end;
++ }
++
++ /* step 1: classify ether frame, DIX or 802.3? */
++ e_hdr = (wlan_ethhdr_t *)skb->data;
++ proto = ntohs(e_hdr->type);
++ if (proto <= 1500) {
++ log(L_DEBUG, "tx: 802.3 len: %d\n", skb->len);
++ /* codes <= 1500 reserved for 802.3 lengths */
++ /* it's 802.3, pass ether payload unchanged, */
++ /* trim off ethernet header and copy payload to txdesc */
++ header_len = WLAN_HDR_A3_LEN;
++ } else {
++ /* it's DIXII, time for some conversion */
++ /* Create 802.11 packet. Header also contains llc and snap. */
++
++ log(L_DEBUG, "tx: DIXII len: %d\n", skb->len);
++
++ /* size of header is 802.11 header + llc + snap */
++ header_len = WLAN_HDR_A3_LEN + sizeof(wlan_llc_t) + sizeof(wlan_snap_t);
++ /* llc is located behind the 802.11 header */
++ e_llc = (wlan_llc_t*)(w_hdr + 1);
++ /* snap is located behind the llc */
++ e_snap = (wlan_snap_t*)(e_llc + 1);
++
++ /* setup the LLC header */
++ store_llc_snap(e_llc);
++
++ /* setup the SNAP header */
++ e_snap->type = htons(proto);
++ if (proto_is_stt(proto)) {
++ store_oui_8021h(e_snap);
++ } else {
++ store_oui_rfc1042(e_snap);
++ }
++ }
++ /* trim off ethernet header and copy payload to txbuf */
++ payload_len = skb->len - sizeof(wlan_ethhdr_t);
++ /* TODO: can we just let acx DMA payload from skb instead? */
++ memcpy((u8*)txbuf + header_len, skb->data + sizeof(wlan_ethhdr_t), payload_len);
++ payload_len += header_len;
++
++ /* Set up the 802.11 header */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi);
++ a1 = e_hdr->daddr;
++ a3 = adev->bssid;
++ break;
++ case ACX_MODE_2_STA:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi | WF_FC_TODSi);
++ a1 = adev->bssid;
++ a3 = e_hdr->daddr;
++ break;
++ case ACX_MODE_3_AP:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi | WF_FC_FROMDSi);
++ a1 = e_hdr->daddr;
++ a3 = e_hdr->saddr;
++ break;
++ default:
++ printk("%s: error - converting eth to wlan in unknown mode\n",
++ adev->ndev->name);
++ payload_len = -1;
++ goto end;
++ }
++ if (adev->wep_enabled)
++ SET_BIT(fc, WF_FC_ISWEPi);
++
++ w_hdr->fc = fc;
++ w_hdr->dur = 0;
++ MAC_COPY(w_hdr->a1, a1);
++ MAC_COPY(w_hdr->a2, adev->dev_addr);
++ MAC_COPY(w_hdr->a3, a3);
++ w_hdr->seq = 0;
++
++#ifdef DEBUG_CONVERT
++ if (acx_debug & L_DATA) {
++ printk("original eth frame [%d]: ", skb->len);
++ acx_dump_bytes(skb->data, skb->len);
++ printk("802.11 frame [%d]: ", payload_len);
++ acx_dump_bytes(w_hdr, payload_len);
++ }
++#endif
++
++end:
++ FN_EXIT1(payload_len);
++ return payload_len;
++}
++
++
++/***********************************************************************
++** acx_rxbuf_to_ether
++**
++** Uses the contents of a received 802.11 frame to build an ether
++** frame.
++**
++** This function extracts the src and dest address from the 802.11
++** frame to use in the construction of the eth frame.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++struct sk_buff*
++acx_rxbuf_to_ether(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *w_hdr;
++ struct wlan_ethhdr *e_hdr;
++ struct wlan_llc *e_llc;
++ struct wlan_snap *e_snap;
++ struct sk_buff *skb;
++ const u8 *daddr;
++ const u8 *saddr;
++ const u8 *e_payload;
++ int buflen, payload_length;
++ unsigned int payload_offset, mtu;
++ u16 fc;
++
++ FN_ENTER;
++
++ /* This looks complex because it must handle possible
++ ** phy header in rxbuff */
++ w_hdr = acx_get_wlan_hdr(adev, rxbuf);
++ payload_offset = WLAN_HDR_A3_LEN; /* it is relative to w_hdr */
++ payload_length = RXBUF_BYTES_USED(rxbuf) /* entire rxbuff... */
++ - ((u8*)w_hdr - (u8*)rxbuf) /* minus space before 802.11 frame */
++ - WLAN_HDR_A3_LEN; /* minus 802.11 header */
++
++ /* setup some vars for convenience */
++ fc = w_hdr->fc;
++ switch (WF_FC_FROMTODSi & fc) {
++ case 0:
++ daddr = w_hdr->a1;
++ saddr = w_hdr->a2;
++ break;
++ case WF_FC_FROMDSi:
++ daddr = w_hdr->a1;
++ saddr = w_hdr->a3;
++ break;
++ case WF_FC_TODSi:
++ daddr = w_hdr->a3;
++ saddr = w_hdr->a2;
++ break;
++ default: /* WF_FC_FROMTODSi */
++ payload_offset += (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN);
++ payload_length -= (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN);
++ daddr = w_hdr->a3;
++ saddr = w_hdr->a4;
++ }
++
++ if ((WF_FC_ISWEPi & fc) && IS_ACX100(adev)) {
++ /* chop off the IV+ICV WEP header and footer */
++ log(L_DATA|L_DEBUG, "rx: WEP packet, "
++ "chopping off IV and ICV\n");
++ payload_offset += WLAN_WEP_IV_LEN;
++ payload_length -= WLAN_WEP_IV_LEN + WLAN_WEP_ICV_LEN;
++ }
++
++ if (unlikely(payload_length < 0)) {
++ printk("%s: rx frame too short, ignored\n", adev->ndev->name);
++ goto ret_null;
++ }
++
++ e_hdr = (wlan_ethhdr_t*) ((u8*) w_hdr + payload_offset);
++ e_llc = (wlan_llc_t*) e_hdr;
++ e_snap = (wlan_snap_t*) (e_llc + 1);
++ mtu = adev->ndev->mtu;
++ e_payload = (u8*) (e_snap + 1);
++
++ log(L_DATA, "rx: payload_offset %d, payload_length %d\n",
++ payload_offset, payload_length);
++ log(L_XFER|L_DATA,
++ "rx: frame info: llc=%02X%02X%02X "
++ "snap.oui=%02X%02X%02X snap.type=%04X\n",
++ e_llc->dsap, e_llc->ssap, e_llc->ctl,
++ e_snap->oui[0], e_snap->oui[1], e_snap->oui[2],
++ ntohs(e_snap->type));
++
++ /* Test for the various encodings */
++ if ((payload_length >= sizeof(wlan_ethhdr_t))
++ && ((e_llc->dsap != 0xaa) || (e_llc->ssap != 0xaa))
++ && ( (mac_is_equal(daddr, e_hdr->daddr))
++ || (mac_is_equal(saddr, e_hdr->saddr))
++ )
++ ) {
++ /* 802.3 Encapsulated: */
++ /* wlan frame body contains complete eth frame (header+body) */
++ log(L_DEBUG|L_DATA, "rx: 802.3 ENCAP len=%d\n", payload_length);
++
++ if (unlikely(payload_length > (mtu + ETH_HLEN))) {
++ printk("%s: rx: ENCAP frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu + ETH_HLEN);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length;
++ /* Attempt to align IP header (14 bytes eth header + 2 = 16) */
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* now copy the data from the 80211 frame */
++ memcpy(skb->data, e_hdr, payload_length);
++
++ } else if ( (payload_length >= sizeof(wlan_llc_t)+sizeof(wlan_snap_t))
++ && llc_is_snap(e_llc) ) {
++ /* wlan frame body contains: AA AA 03 ... (it's a SNAP) */
++
++ if ( !oui_is_rfc1042(e_snap)
++ || (proto_is_stt(ieee2host16(e_snap->type)) /* && (ethconv == WLAN_ETHCONV_8021h) */)) {
++ log(L_DEBUG|L_DATA, "rx: SNAP+RFC1042 len=%d\n", payload_length);
++ /* wlan frame body contains: AA AA 03 !(00 00 00) ... -or- */
++ /* wlan frame body contains: AA AA 03 00 00 00 0x80f3 ... */
++ /* build eth hdr, type = len, copy AA AA 03... as eth body */
++ /* it's a SNAP + RFC1042 frame && protocol is in STT */
++
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: SNAP frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* create 802.3 header */
++ e_hdr = (wlan_ethhdr_t*) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = htons(payload_length);
++
++ /* Now copy the data from the 80211 frame.
++ Make room in front for the eth header, and keep the
++ llc and snap from the 802.11 payload */
++ memcpy(skb->data + ETH_HLEN,
++ e_llc, payload_length);
++
++ } else {
++ /* wlan frame body contains: AA AA 03 00 00 00 [type] [tail] */
++ /* build eth hdr, type=[type], copy [tail] as eth body */
++ log(L_DEBUG|L_DATA, "rx: 802.1h/RFC1042 len=%d\n",
++ payload_length);
++ /* it's an 802.1h frame (an RFC1042 && protocol is not in STT) */
++ /* build a DIXII + RFC894 */
++
++ payload_length -= sizeof(wlan_llc_t) + sizeof(wlan_snap_t);
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: DIXII frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* create 802.3 header */
++ e_hdr = (wlan_ethhdr_t *) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = e_snap->type;
++
++ /* Now copy the data from the 80211 frame.
++ Make room in front for the eth header, and cut off the
++ llc and snap from the 802.11 payload */
++ memcpy(skb->data + ETH_HLEN,
++ e_payload, payload_length);
++ }
++
++ } else {
++ log(L_DEBUG|L_DATA, "rx: NON-ENCAP len=%d\n", payload_length);
++ /* build eth hdr, type=len, copy wlan body as eth body */
++ /* any NON-ENCAP */
++ /* it's a generic 80211+LLC or IPX 'Raw 802.3' */
++ /* build an 802.3 frame */
++
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: OTHER frame too large (%d > %d)\n",
++ adev->ndev->name, payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* set up the 802.3 header */
++ e_hdr = (wlan_ethhdr_t *) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = htons(payload_length);
++
++ /* now copy the data from the 80211 frame */
++ memcpy(skb->data + ETH_HLEN, e_llc, payload_length);
++ }
++
++ skb->dev = adev->ndev;
++ skb->protocol = eth_type_trans(skb, adev->ndev);
++
++#ifdef DEBUG_CONVERT
++ if (acx_debug & L_DATA) {
++ int len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ printk("p802.11 frame [%d]: ", len);
++ acx_dump_bytes(w_hdr, len);
++ printk("eth frame [%d]: ", skb->len);
++ acx_dump_bytes(skb->data, skb->len);
++ }
++#endif
++
++ FN_EXIT0;
++ return skb;
++
++no_skb:
++ printk("%s: rx: no memory for skb (%d bytes)\n",
++ adev->ndev->name, buflen + 2);
++ret_null:
++ FN_EXIT1((int)NULL);
++ return NULL;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/cs.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/cs.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,5703 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++**
++** Slave memory interface support:
++**
++** Todd Blumer - SDG Systems
++** Bill Reese - HP
++** Eric McCorkle - Shadowsun
++**
++** CF support, (c) Fabrice Crohas, Paul Sokolovsky
++*/
++#define ACX_MEM 1
++
++/*
++ * non-zero makes it dump the ACX memory to the console then
++ * panic when you cat /proc/driver/acx_wlan0_diag
++ */
++#define DUMP_MEM_DEFINED 1
++
++#define DUMP_MEM_DURING_DIAG 0
++#define DUMP_IF_SLOW 0
++
++#define PATCH_AROUND_BAD_SPOTS 1
++#define HX4700_FIRMWARE_CHECKSUM 0x0036862e
++#define HX4700_ALTERNATE_FIRMWARE_CHECKSUM 0x00368a75
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/irq.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/platform_device.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/delay.h>
++#include <linux/workqueue.h>
++#include <linux/inetdevice.h>
++
++#define PCMCIA_DEBUG 1
++
++/*
++ All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
++ you do not define PCMCIA_DEBUG at all, all the debug code will be
++ left out. If you compile with PCMCIA_DEBUG=0, the debug code will
++ be present but disabled -- but it can then be enabled for specific
++ modules at load time with a 'pc_debug=#' option to insmod.
++
++*/
++#include <pcmcia/cs_types.h>
++#include <pcmcia/cs.h>
++#include <pcmcia/cistpl.h>
++#include <pcmcia/cisreg.h>
++#include <pcmcia/ds.h>
++#include "acx.h"
++#include "acx_hw.h"
++
++#ifdef PCMCIA_DEBUG
++static int pc_debug = PCMCIA_DEBUG;
++module_param(pc_debug, int, 0);
++static char *version = "$Revision: 1.10 $";
++#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
++#else
++#define DEBUG(n, args...)
++#endif
++
++
++static win_req_t memwin;
++
++typedef struct local_info_t {
++ dev_node_t node;
++ struct net_device *ndev;
++} local_info_t;
++
++static struct net_device *resume_ndev;
++
++
++/***********************************************************************
++*/
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#include <asm/io.h>
++
++#define REG_ACX_VENDOR_ID 0x900
++/*
++ * This is the vendor id on the HX4700, anyway
++ */
++#define ACX_VENDOR_ID 0x8400104c
++
++typedef enum {
++ ACX_SOFT_RESET = 0,
++
++ ACX_SLV_REG_ADDR,
++ ACX_SLV_REG_DATA,
++ ACX_SLV_REG_ADATA,
++
++ ACX_SLV_MEM_CP,
++ ACX_SLV_MEM_ADDR,
++ ACX_SLV_MEM_DATA,
++ ACX_SLV_MEM_CTL,
++} acxreg_t;
++
++/***********************************************************************
++*/
++static void acxmem_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxmem_i_set_multicast_list(struct net_device *ndev);
++
++static int acxmem_e_open(struct net_device *ndev);
++static int acxmem_e_close(struct net_device *ndev);
++static void acxmem_s_up(struct net_device *ndev);
++static void acxmem_s_down(struct net_device *ndev);
++
++static void dump_acxmem (acx_device_t *adev, u32 start, int length);
++static int acxmem_complete_hw_reset (acx_device_t *adev);
++static void acxmem_s_delete_dma_regions(acx_device_t *adev);
++
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend( struct net_device *ndev, pm_message_t state);
++#else
++acxmem_e_suspend( struct net_device *ndev, u32 state);
++#endif
++static void
++fw_resumer(struct work_struct *notused);
++//fw_resumer( void *data );
++
++static int acx_netdev_event(struct notifier_block *this, unsigned long event, void *ptr)
++{
++ struct net_device *ndev = ptr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /*
++ * Upper level ioctl() handlers send a NETDEV_CHANGEADDR if the MAC address changes.
++ */
++
++ if (NETDEV_CHANGEADDR == event) {
++ /*
++ * the upper layers put the new MAC address in ndev->dev_addr; we just copy
++ * it over and update the ACX with it.
++ */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ adev->set_mask |= GETSET_STATION_ID;
++ acx_s_update_card_settings (adev);
++ }
++
++ return 0;
++}
++
++static struct notifier_block acx_netdev_notifier = {
++ .notifier_call = acx_netdev_event,
++};
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_id_register (acx_device_t *adev)
++{
++ writel (0x24, &adev->iobase[ACX_SLV_REG_ADDR]);
++ return readl (&adev->iobase[ACX_SLV_REG_DATA]);
++}
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++ u32 val;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readl(((u8*)adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ val = readl( &adev->iobase[ACX_SLV_REG_DATA] );
++
++ return val;
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ u16 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readw(((u8 *) adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u16 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return lo;
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ u8 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20)
++ return readb(((u8 *)adev->iobase) + addr);
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return (u8)lo;
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writel(val, ((u8*)adev->iobase) + addr);
++ return;
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writel( val, &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writew(val, ((u8 *)adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writew( val, (u16 *) &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writeb(val, ((u8 *) adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writeb( val, (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ (void) readl(adev->iobase);
++}
++
++INLINE_IO void
++set_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp | bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++INLINE_IO void
++clear_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp & ~bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++/*
++ * Copy from PXA memory to the ACX memory. This assumes both the PXA and ACX
++ * addresses are 32 bit aligned. Count is in bytes.
++ */
++INLINE_IO void
++write_slavemem32 (acx_device_t *adev, u32 slave_address, u32 val)
++{
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, val);
++}
++
++INLINE_IO u32
++read_slavemem32 (acx_device_t *adev, u32 slave_address)
++{
++ u32 val;
++
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ val = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++
++ return val;
++}
++
++INLINE_IO void
++write_slavemem8 (acx_device_t *adev, u32 slave_address, u8 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++INLINE_IO u8
++read_slavemem8 (acx_device_t *adev, u32 slave_address)
++{
++ u8 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xff;
++
++ return val;
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO void
++write_slavemem16 (acx_device_t *adev, u32 slave_address, u16 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xffff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO u16
++read_slavemem16 (acx_device_t *adev, u32 slave_address)
++{
++ u16 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xffff;
++
++ return val;
++}
++
++/*
++ * Copy from slave memory
++ *
++ * TODO - rewrite using address autoincrement, handle partial words
++ */
++void
++copy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count) {
++ u32 tmp = 0;
++ u8 *ptmp = (u8 *) &tmp;
++
++ /*
++ * Right now I'm making the assumption that the destination is aligned, but
++ * I'd better check.
++ */
++ if ((u32) destination & 3) {
++ printk ("acx copy_from_slavemem: warning! destination not word-aligned!\n");
++ }
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ *((u32 *) destination) = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If the word reads above didn't satisfy the count, read one more word
++ * and transfer a byte at a time until the request is satisfied.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *destination++ = *ptmp++;
++ }
++ }
++}
++
++/*
++ * Copy to slave memory
++ *
++ * TODO - rewrite using autoincrement, handle partial words
++ */
++void
++copy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 tmp = 0;
++ u8* ptmp = (u8 *) &tmp;
++ static u8 src[512]; /* make static to avoid huge stack objects */
++
++ /*
++ * For now, make sure the source is word-aligned by copying it to a word-aligned
++ * buffer. Someday rewrite to avoid the extra copy.
++ */
++ if (count > sizeof (src)) {
++ printk ("acx copy_to_slavemem: Warning! buffer overflow!\n");
++ count = sizeof (src);
++ }
++ memcpy (src, source, count);
++ source = src;
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, *((u32 *) source));
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If there are leftovers read the next word from the acx and merge in
++ * what they want to write.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *ptmp++ = *source++;
++ }
++ /*
++ * reset address in case we're currently in auto-increment mode
++ */
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, tmp);
++ udelay (10);
++ }
++
++}
++
++/*
++ * Block copy to slave buffers using memory block chain mode. Copies to the ACX
++ * transmit buffer structure with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) source;
++ static u8 aligned_source[WLAN_A4FR_MAXLEN_WEP_FCS];
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * This should never happen since we're in control of both, but I want to know about
++ * it if it does.
++ */
++ if ((destination & 0x00ffffe0) != destination) {
++ printk ("acx chaincopy: destination block 0x%04x not aligned!\n", destination);
++ }
++ if (count > sizeof aligned_source) {
++ printk( KERN_ERR "chaincopy_to_slavemem overflow!\n" );
++ count = sizeof aligned_source;
++ }
++ if ((u32) source & 3) {
++ memcpy (aligned_source, source, count);
++ data = (u32 *) aligned_source;
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = 2 << 16 | 1 << 2;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = destination & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (destination & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Write the data to the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ writel (*data++, &adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++}
++
++
++/*
++ * Block copy from slave buffers using memory block chain mode. Copies from the ACX
++ * receive buffer structures with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) destination;
++ static u8 aligned_destination[WLAN_A4FR_MAXLEN_WEP_FCS];
++ int saved_count = count;
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * Turns out the network stack sends unaligned things, so fix them before
++ * copying to the ACX.
++ */
++ if ((source & 0x00ffffe0) != source) {
++ printk ("acx chaincopy: source block 0x%04x not aligned!\n", source);
++ dump_acxmem (adev, 0, 0x10000);
++ }
++ if ((u32) destination & 3) {
++ //printk ("acx chaincopy: data destination not word aligned!\n");
++ data = (u32 *) aligned_destination;
++ if (count > sizeof aligned_destination) {
++ printk( KERN_ERR "chaincopy_from_slavemem overflow!\n" );
++ count = sizeof aligned_destination;
++ }
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = (2 << 16) | (1 << 2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = source & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (source & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Read the data from the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ *data++ = readl (&adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++
++ /*
++ * If the destination wasn't aligned, we would have saved it in
++ * the aligned buffer, so copy it where it should go.
++ */
++ if ((u32) destination & 3) {
++ memcpy (destination, aligned_destination, saved_count);
++ }
++}
++
++char
++printable (char c)
++{
++ return ((c >= 20) && (c < 127)) ? c : '.';
++}
++
++#if DUMP_MEM_DEFINED > 0
++static void
++dump_acxmem (acx_device_t *adev, u32 start, int length)
++{
++ int i;
++ u8 buf[16];
++
++ while (length > 0) {
++ printk ("%04x ", start);
++ copy_from_slavemem (adev, buf, start, 16);
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%02x ", buf[i]);
++ }
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%c", printable (buf[i]));
++ }
++ printk ("\n");
++ start += 16;
++ length -= 16;
++ }
++}
++#endif
++
++static void
++enable_acx_irq(acx_device_t *adev);
++static void
++disable_acx_irq(acx_device_t *adev);
++
++/*
++ * Return an acx pointer to the next transmit data block.
++ */
++u32
++allocate_acx_txbuf_space (acx_device_t *adev, int count) {
++ u32 block, next, last_block;
++ int blocks_needed;
++ unsigned long flags;
++
++ spin_lock_irqsave(&adev->txbuf_lock, flags);
++ /*
++ * Take 4 off the memory block size to account for the reserved word at the start of
++ * the block.
++ */
++ blocks_needed = count / (adev->memblocksize - 4);
++ if (count % (adev->memblocksize - 4))
++ blocks_needed++;
++
++ if (blocks_needed <= adev->acx_txbuf_blocks_free) {
++ /*
++ * Take blocks at the head of the free list.
++ */
++ last_block = block = adev->acx_txbuf_free;
++
++ /*
++ * Follow block pointers through the requested number of blocks both to
++ * find the new head of the free list and to set the flags for the blocks
++ * appropriately.
++ */
++ while (blocks_needed--) {
++ /*
++ * Keep track of the last block of the allocation
++ */
++ last_block = adev->acx_txbuf_free;
++
++ /*
++ * Make sure the end control flag is not set.
++ */
++ next = read_slavemem32 (adev, adev->acx_txbuf_free) & 0x7ffff;
++ write_slavemem32 (adev, adev->acx_txbuf_free, next);
++
++ /*
++ * Update the new head of the free list
++ */
++ adev->acx_txbuf_free = next << 5;
++ adev->acx_txbuf_blocks_free--;
++
++ }
++
++ /*
++ * Flag the last block both by clearing out the next pointer
++ * and marking the control field.
++ */
++ write_slavemem32 (adev, last_block, 0x02000000);
++
++ /*
++ * If we're out of buffers make sure the free list pointer is NULL
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ adev->acx_txbuf_free = 0;
++ }
++ }
++ else {
++ block = 0;
++ }
++ spin_unlock_irqrestore (&adev->txbuf_lock, flags);
++ return block;
++}
++
++/*
++ * Return buffer space back to the pool by following the next pointers until we find
++ * the block marked as the end. Point the last block to the head of the free list,
++ * then update the head of the free list to point to the newly freed memory.
++ * This routine gets called in interrupt context, so it shouldn't block to protect
++ * the integrity of the linked list. The ISR already holds the lock.
++ */
++void
++reclaim_acx_txbuf_space (acx_device_t *adev, u32 blockptr) {
++ u32 cur, last, next;
++ unsigned long flags;
++
++ spin_lock_irqsave (&adev->txbuf_lock, flags);
++ if ((blockptr >= adev->acx_txbuf_start) &&
++ (blockptr <= adev->acx_txbuf_start +
++ (adev->acx_txbuf_numblocks - 1) * adev->memblocksize)) {
++ cur = blockptr;
++ do {
++ last = cur;
++ next = read_slavemem32 (adev, cur);
++
++ /*
++ * Advance to the next block in this allocation
++ */
++ cur = (next & 0x7ffff) << 5;
++
++ /*
++ * This block now counts as free.
++ */
++ adev->acx_txbuf_blocks_free++;
++ } while (!(next & 0x02000000));
++
++ /*
++ * last now points to the last block of that allocation. Update the pointer
++ * in that block to point to the free list and reset the free list to the
++ * first block of the free call. If there were no free blocks, make sure
++ * the new end of the list marks itself as truly the end.
++ */
++ if (adev->acx_txbuf_free) {
++ write_slavemem32 (adev, last, adev->acx_txbuf_free >> 5);
++ }
++ else {
++ write_slavemem32 (adev, last, 0x02000000);
++ }
++ adev->acx_txbuf_free = blockptr;
++ }
++ spin_unlock_irqrestore(&adev->txbuf_lock, flags);
++}
++
++/*
++ * Initialize the pieces managing the transmit buffer pool on the ACX. The transmit
++ * buffer is a circular queue with one 32 bit word reserved at the beginning of each
++ * block. The upper 13 bits are a control field, of which only 0x02000000 has any
++ * meaning. The lower 19 bits are the address of the next block divided by 32.
++ */
++void
++init_acx_txbuf (acx_device_t *adev) {
++
++ /*
++ * acx100_s_init_memory_pools set up txbuf_start and txbuf_numblocks for us.
++ * All we need to do is reset the rest of the bookeeping.
++ */
++
++ adev->acx_txbuf_free = adev->acx_txbuf_start;
++ adev->acx_txbuf_blocks_free = adev->acx_txbuf_numblocks;
++
++ /*
++ * Initialization leaves the last transmit pool block without a pointer back to
++ * the head of the list, but marked as the end of the list. That's how we want
++ * to see it, too, so leave it alone. This is only ever called after a firmware
++ * reset, so the ACX memory is in the state we want.
++ */
++
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxmem_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxmem_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxmem_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxmem_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ int count;
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++ fail:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxmem_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxmem_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size, checkMismatch = -1;
++ u32 sum, v32, tmp, id;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++#endif
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ write_flush(adev);
++#endif
++ write_slavemem32 (adev, offset + len - 4, v32);
++
++ id = read_id_register (adev);
++
++ /*
++ * check the data written
++ */
++ tmp = read_slavemem32 (adev, offset + len - 4);
++ if (checkMismatch && (tmp != v32)) {
++ printk ("first data mismatch at 0x%08x good 0x%08x bad 0x%08x id 0x%08x\n",
++ offset + len - 4, v32, tmp, id);
++ checkMismatch = 0;
++ }
++ }
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxmem_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxmem_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ udelay(10);
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++#endif
++ w32 = read_slavemem32 (adev, offset + len - 4);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match\n(0x%08X vs. 0x%08X)!\n"
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxmem_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char *filename = "WLANGEN.BIN";
++#ifdef PATCH_AROUND_BAD_SPOTS
++ u32 offset;
++ int i;
++ /*
++ * arm-linux-objdump -d patch.bin, or
++ * od -Ax -t x4 patch.bin after finding the bounds
++ * of the .text section with arm-linux-objdump -s patch.bin
++ */
++ u32 patch[] = {
++ 0xe584c030, 0xe59fc008,
++ 0xe92d1000, 0xe59fc004, 0xe8bd8000, 0x0000080c,
++ 0x0000aa68, 0x605a2200, 0x2c0a689c, 0x2414d80a,
++ 0x2f00689f, 0x1c27d007, 0x06241e7c, 0x2f000e24,
++ 0xe000d1f6, 0x602e6018, 0x23036468, 0x480203db,
++ 0x60ca6003, 0xbdf0750a, 0xffff0808
++ };
++#endif
++
++ FN_ENTER;
++ /* No combined image; tell common we need the radio firmware, too */
++ adev->need_radio_fw = 1;
++
++ fw_image = acx_s_read_fw(adev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++#ifdef PATCH_AROUND_BAD_SPOTS
++ /*
++ * Only want to do this if the firmware is exactly what we expect for an
++ * iPaq 4700; otherwise, bad things would ensue.
++ */
++ if ((HX4700_FIRMWARE_CHECKSUM == fw_image->chksum) ||
++ (HX4700_ALTERNATE_FIRMWARE_CHECKSUM == fw_image->chksum)) {
++ /*
++ * Put the patch after the main firmware image. 0x950c contains
++ * the ACX's idea of the end of the firmware. Use that location to
++ * load ours (which depends on that location being 0xab58) then
++ * update that location to point to after ours.
++ */
++
++ offset = read_slavemem32 (adev, 0x950c);
++
++ log (L_DEBUG, "acx: patching in at 0x%04x\n", offset);
++
++ for (i = 0; i < sizeof(patch) / sizeof(patch[0]); i++) {
++ write_slavemem32 (adev, offset, patch[i]);
++ offset += sizeof(u32);
++ }
++
++ /*
++ * Patch the instruction at 0x0804 to branch to our ARM patch at 0xab58
++ */
++ write_slavemem32 (adev, 0x0804, 0xea000000 + (0xab58-0x0804-8)/4);
++
++ /*
++ * Patch the instructions at 0x1f40 to branch to our Thumb patch at 0xab74
++ *
++ * 4a00 ldr r2, [pc, #0]
++ * 4710 bx r2
++ * .data 0xab74+1
++ */
++ write_slavemem32 (adev, 0x1f40, 0x47104a00);
++ write_slavemem32 (adev, 0x1f44, 0x0000ab74+1);
++
++ /*
++ * Bump the end of the firmware up to beyond our patch.
++ */
++ write_slavemem32 (adev, 0x950c, offset);
++
++ }
++#endif
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxmem_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("RADIONN.BIN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "RADIO%02x.BIN",
++ adev->radio_type);
++ radio_image = acx_s_read_fw(adev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++/***********************************************************************
++** acxmem_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxmem_l_reset_mac(acx_device_t *adev)
++{
++ int count;
++ FN_ENTER;
++
++ /* halt eCPU */
++ set_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++
++ /* now do soft reset of eCPU, set bit */
++ set_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++
++ /* Windows driver sleeps here for a while with this sequence */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ clear_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++
++ /* now start a burst read from initial EEPROM */
++ set_regbits (adev, IO_ACX_EE_START, 0x1);
++
++ /*
++ * Windows driver sleeps here for a while with this sequence
++ */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* Windows driver writes 0x10000 to register 0x808 here */
++
++ write_reg32 (adev, 0x808, 0x10000);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_verify_init
++*/
++static int
++acxmem_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u32 irqstat = read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if ((irqstat != 0xFFFFFFFF) && (irqstat & HOST_INT_FCS_THRESHOLD)) {
++ result = OK;
++ write_reg32(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxmem_write_cmd_type_status
++*/
++
++static inline void
++acxmem_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ write_slavemem32 (adev, (u32) adev->cmd_area, type | (status << 16));
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxmem_read_cmd_type_status
++*/
++static u32
++acxmem_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = read_slavemem32 (adev, (u32) adev->cmd_area);
++
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxmem_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxmem_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8*) cmd_offs;
++ adev->info_area = (u8*) info_offs;
++ /*
++ log(L_DEBUG, "iobase2=%p\n"
++ */
++ log( L_DEBUG, "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxmem_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++static int
++acxmem_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++ u32 tmp;
++
++ FN_ENTER;
++ /*
++ write_reg32 (adev, IO_ACX_SLV_MEM_CP, 0);
++ */
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ /* Windows driver does some funny things here */
++ /*
++ * clear bit 0x200 in register 0x2A0
++ */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /*
++ * Set bit 0x200 in ACX_GPIO_OUT
++ */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++
++ /*
++ * read register 0x900 until its value is 0x8400104C, sleeping
++ * in between reads if it's not immediate
++ */
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ count = 500;
++ while (count-- && (tmp != ACX_VENDOR_ID)) {
++ mdelay (10);
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ }
++
++ /* end what Windows driver does */
++
++ acxmem_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg32(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++ printk("ACX radio type 0x%02x\n", (hardware_info >> 8) & 0xff);
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxmem_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ clear_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* Windows driver clears bit 0x200 in register 0x2A0 here */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /* Windows driver sets bit 0x200 in ACX_GPIO_OUT here */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++ /* wait for eCPU bootup */
++ if (OK != acxmem_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++ init_mboxes(adev);
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxmem_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxmem_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ int i, j;
++ u8 *p;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxmem_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++#if DUMP_IF_SLOW > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("not idle");
++#endif
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /*
++ * slave memory version
++ */
++ copy_to_slavemem (adev, (u32) (adev->cmd_area + 4), buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxmem_write_cmd_type_status(adev, cmd, 0);
++
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxmem_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ printk("%s: "FUNC"(): device irq status 0x%04x\n",
++ devname, read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES));
++ printk("%s: "FUNC"(): IO_ACX_IRQ_MASK 0x%04x IO_ACX_FEMR 0x%04x\n",
++ devname,
++ read_reg16 (adev, IO_ACX_IRQ_MASK),
++ read_reg16 (adev, IO_ACX_FEMR));
++ if (read_reg16 (adev, IO_ACX_IRQ_MASK) == 0xffff) {
++ printk ("acxmem: firmware probably hosed - reloading\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ {
++ pm_message_t state;
++ /* acxmem_e_suspend (resume_pdev, state); */
++ acxmem_e_suspend (adev->ndev , state);
++ }
++#else
++ acxmem_e_suspend (adev, 0);
++#endif
++ {
++ resume_ndev = adev->ndev;
++ fw_resumer (NULL);
++ }
++ }
++
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buflen > 388) {
++ /*
++ * 388 is maximum command length
++ */
++ printk ("invalid length 0x%08x\n", buflen);
++ buflen = 388;
++ }
++ p = (u8 *) buffer;
++ for (i = 0; i < buflen; i+= 16) {
++ printk ("%04x:", i);
++ for (j = 0; (j < 16) && (i+j < buflen); j++) {
++ printk (" %02x", *p++);
++ }
++ printk ("\n");
++ }
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ copy_from_slavemem (adev, buffer, (u32) (adev->cmd_area + 4), buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#if defined(NONESSENTIAL_FEATURES)
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxmem_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++/***********************************************************************
++** acxmem_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++void
++acxmem_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ kfree(ptr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_delete_dma_regions
++*/
++static void
++acxmem_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ /*
++ * slave memory interface really doesn't like this.
++ */
++ /*
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++ */
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxmem_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_MEM_CP */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++/*
++ * Most of the acx specific pieces of hardware reset.
++ */
++static int
++acxmem_complete_hw_reset (acx_device_t *adev)
++{
++ acx111_ie_configoption_t co;
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxmem_s_reset_dev (adev))
++ return -1;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ copy_from_slavemem (adev, (u8*) &co, (u32) adev->cmd_area, sizeof (co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ return -3;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++ /*
++ * Set up transmit buffer administration
++ */
++ init_acx_txbuf (adev);
++
++ /*
++ * Windows driver writes 0x01000000 to register 0x288, RADIO_CTL, if the form factor
++ * is 3. It also write protects the EEPROM by writing 1<<9 to GPIO_OUT
++ */
++ if (adev->form_factor == 3) {
++ set_regbits (adev, 0x288, 0x01000000);
++ set_regbits (adev, 0x298, 1<<9);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxmem_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ return -2;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ return 0;
++}
++
++static int acx_init_netdev(struct net_device *ndev, struct device *dev, int base_addr, int addr_size, int irq)
++{
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ u8 chip_type;
++ acx_device_t *adev = NULL;
++
++ FN_ENTER;
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = CHIPTYPE_ACX100;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ printk("acx: found %s-based wireless network card\n", chip_name);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++
++ dev_set_drvdata(dev, ndev);
++
++ ether_setup(ndev);
++
++ ndev->irq = irq;
++
++ ndev->base_addr = base_addr;
++printk (KERN_INFO "memwinbase=%lx memwinsize=%u\n",memwin.Base,memwin.Size);
++ if (addr_size == 0 || ndev->irq == 0)
++ goto fail_hw_params;
++ ndev->open = &acxmem_e_open;
++ ndev->stop = &acxmem_e_close;
++ //pdev->dev.release = &acxmem_e_release;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxmem_i_set_multicast_list;
++ ndev->tx_timeout = &acxmem_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ spin_lock_init(&adev->txbuf_lock);
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->dev = dev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_MEM;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = (volatile u32 *) ndev->base_addr;
++ adev->iobase = (volatile u32 *) ioremap_nocache (ndev->base_addr, addr_size);
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#if defined(NONESSENTIAL_FEATURES)
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ // need to fix that @@
++ SET_NETDEV_DEV(ndev, dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", ndev->irq);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ if (OK != acxmem_complete_hw_reset (adev))
++ goto fail_reset;
++
++ /*
++ * Set up default things for most of the card settings.
++ */
++ acx_s_set_defaults(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /*
++ * Set up a default monitor type so that poor combinations of initialization
++ * sequences in monitor mode don't end up destroying the hardware type.
++ */
++ adev->monitor_type = ARPHRD_ETHER;
++
++ /*
++ * Register to receive inetaddr notifier changes. This will allow us to
++ * catch if the user changes the MAC address of the interface.
++ */
++ register_netdevice_notifier(&acx_netdev_notifier);
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxmem_s_delete_dma_regions(adev);
++
++fail_reset:
++fail_hw_params:
++ free_netdev(ndev);
++fail_unknown_chiptype:
++
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static int __devexit
++acxmem_e_remove(struct pcmcia_device *link)
++{
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = ((local_info_t*)link->priv)->ndev;
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxmem_l_power_led(adev, 0);
++
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxmem_l_reset_mac(adev);
++ } else {
++ u16 temp;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++
++ /*
++ * Unregister the notifier chain
++ */
++ unregister_netdevice_notifier(&acx_netdev_notifier);
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxmem_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxmem_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ acxmem_s_delete_dma_regions(adev);
++
++ /* finally, clean up PCI bus state */
++ if (adev->iobase) iounmap((void *)adev->iobase);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ printk ("e_remove done\n");
++end:
++ FN_EXIT0;
++
++ return 0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend( struct net_device *ndev, pm_message_t state)
++#else
++acxmem_e_suspend( struct net_device *ndev, u32 state)
++#endif
++{
++ FN_ENTER;
++ acx_device_t *adev;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++ // @@ need to get it from link or something like that
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(adev->ndev); /* this one cannot sleep */
++ acxmem_s_down(adev->ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxmem_s_delete_dma_regions(adev);
++
++ /*
++ * Turn the ACX chip off.
++ */
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++static void
++fw_resumer(struct work_struct *notused)
++{
++ acx_device_t *adev;
++ struct net_device *ndev = resume_ndev;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ return;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ /*
++ * Turn on the ACX.
++ */
++
++ acxmem_complete_hw_reset (adev);
++
++ /*
++ * done by acx_s_set_defaults for initial startup
++ */
++ acxmem_set_interrupt_mask(adev);
++
++ printk ("rsm: bringing up interface\n");
++ SET_BIT (adev->set_mask, GETSET_ALL);
++ acxmem_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-)
++ */
++ /* - most settings updated in acxmem_s_up()
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ */
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++ acx_sem_unlock(adev);
++}
++
++DECLARE_WORK( fw_resume_work, fw_resumer );
++
++static int
++acxmem_e_resume(struct pcmcia_device *link)
++{
++ FN_ENTER;
++
++ //resume_pdev = pdev;
++ schedule_work( &fw_resume_work );
++
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxmem_s_up
++**
++** This function is called by acxmem_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_down
++**
++** This disables the netdevice
++**
++** Side effects:
++** - disables on-card interrupt request
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++#if 0
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxmem_i_interrupt, SA_INTERRUPT, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ set_irq_type (ndev->irq, IRQT_FALLING);
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++#endif
++
++ /* ifup device */
++ acxmem_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxmem_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxmem_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxmem_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxmem_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxmem_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxmem_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxmem_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ register rxdesc_t *rxdesc;
++ unsigned count, tail;
++ u32 addr;
++ u8 Ctl_8;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ /*
++ * Unlike the PCI interface, where the ACX can write directly to
++ * the host descriptors, on the slave memory interface we have to
++ * pull these. All we really need to do is check the Ctl_8 field
++ * in the rx descriptor on the ACX, which should be 0x11000000 if
++ * we should process it.
++ */
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_HOSTOWN) &&
++ (Ctl_8 & DESC_CTL_ACXDONE))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_8=%02X\n", tail, Ctl_8);
++ /*
++ * If the ACX has CTL_RECLAIM set on this descriptor there
++ * is no buffer associated; it just wants us to tell it to
++ * reclaim the memory.
++ */
++ if (!(Ctl_8 & DESC_CTL_RECLAIM)) {
++
++ /*
++ * slave interface - pull data now
++ */
++ hostdesc->length = read_slavemem16 (adev, (u32) &(rxdesc->total_length));
++
++ /*
++ * hostdesc->data is an rxbuffer_t, which includes header information,
++ * but the length in the data packet doesn't. The header information
++ * takes up an additional 12 bytes, so add that to the length we copy.
++ */
++ addr = read_slavemem32 (adev, (u32) &(rxdesc->ACXMemPtr));
++ if (addr) {
++ /*
++ * How can &(rxdesc->ACXMemPtr) above ever be zero? Looks like we
++ * get that now and then - try to trap it for debug.
++ */
++ if (addr & 0xffff0000) {
++ printk("rxdesc 0x%08x\n", (u32) rxdesc);
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("Bad access!");
++ }
++ chaincopy_from_slavemem (adev, (u8 *) hostdesc->data, addr,
++ hostdesc->length +
++ (u32) &((rxbuffer_t *)0)->hdr_a3);
++ acx_l_process_rxbuf(adev, hostdesc->data);
++ }
++ }
++ else {
++ printk ("rx reclaim only!\n");
++ }
++
++ hostdesc->Status = 0;
++
++ /*
++ * Let the ACX know we're done.
++ */
++ CLEAR_BIT (Ctl_8, DESC_CTL_HOSTOWN);
++ SET_BIT (Ctl_8, DESC_CTL_HOSTDONE);
++ SET_BIT (Ctl_8, DESC_CTL_RECLAIM);
++ write_slavemem8 (adev, (u32) &rxdesc->Ctl_8, Ctl_8);
++
++ /*
++ * Now tell the ACX we've finished with the receive buffer so
++ * it can finish the reclaim.
++ */
++ write_reg16 (adev, IO_ACX_INT_TRIG, INT_TRIG_RXPRC);
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++
++ /* if next descriptor is empty, then bail out */
++ if (!(Ctl_8 & DESC_CTL_HOSTOWN) || !(Ctl_8 & DESC_CTL_ACXDONE))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = read_slavemem32 (adev, (u32) adev->info_area);
++
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ write_slavemem32(adev, (u32) adev->info_area, info_type | 0x00010000);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ printk(" Rx_Complete");
++ }
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxmem_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxmem_i_interrupt(int irq, void *dev_id)
++#else
++acxmwm_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_DATA) {
++ log(L_IRQ, "got Rx_Data IRQ\n");
++ acxmem_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxmem_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxmem_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ /* | HOST_INT_RX_DATA */
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ | HOST_INT_RX_COMPLETE
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxmem_l_power_led
++*/
++void
++acxmem_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ printk ("Interrogating queue config\n");
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++ printk ("done with queue config\n");
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ printk ("Interrogating mem config options\n");
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++ printk ("done with mem config options\n");
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ printk ("Interrogating mem map\n");
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++ printk ("done with mem map\n");
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ printk ("Interrogating rxconfig\n");
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++ printk ("done with queue rxconfig\n");
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ printk ("Interrogating fcs err count\n");
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++ printk ("done with err count\n");
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ printk ("Interrogating rate fallback\n");
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++ printk ("done with rate fallback\n");
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++/***************************************************************
++** acxmem_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxmem_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++ static int txattempts = 0;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ /*
++ * Probably the ACX ignored a transmit attempt and now there's a packet
++ * sitting in the queue we think should be transmitting but the ACX doesn't
++ * know about.
++ * On the first pass, send the ACX a TxProc interrupt to try moving
++ * things along, and if that doesn't work (ie, we get called again) completely
++ * flush the transmit queue.
++ */
++ if (txattempts < 10) {
++ txattempts++;
++ printk ("acx: trying to wake up ACX\n");
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev); }
++ else {
++ txattempts = 0;
++ printk ("acx: flushing transmit queue.\n");
++ acxmem_l_clean_txdesc_emergency (adev);
++ }
++ txdesc = NULL;
++ goto end;
++ }
++
++ /*
++ * Make a quick check to see if there is transmit buffer space on
++ * the ACX. This can't guarantee there is enough space for the packet
++ * since we don't yet know how big it is, but it will prevent at least some
++ * annoyances.
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ /*
++ * txdesc points to ACX memory
++ */
++ txdesc = get_txdesc(adev, head);
++ ctl8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++
++ /*
++ * If we don't own the buffer (HOSTOWN) it is certainly not free; however,
++ * we may have previously thought we had enough memory to send
++ * a packet, allocated the buffer then gave up when we found not enough
++ * transmit buffer space on the ACX. In that case, HOSTOWN and
++ * ACXDONE will both be set.
++ */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_ACXDONE_HOSTOWN);
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***************************************************************
++** acxmem_l_dealloc_tx
++** Clears out a previously allocatedvoid acxmem_l_dealloc_tx(tx_t *tx_opaque);
++ transmit descriptor. The ACX
++** can get confused if we skip transmit descriptors in the queue,
++** so when we don't need a descriptor return it to its original
++** state and move the queue head pointer back.
++**
++*/
++void
++acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++ /*
++ * txdesc is the address of the descriptor on the ACX.
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txdesc_t tmptxdesc;
++ int index;
++
++ memset (&tmptxdesc, 0, sizeof(tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ /*
++ * Clear out all of the transmit descriptor except for the next pointer
++ */
++ copy_to_slavemem (adev, (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc));
++
++ /*
++ * This is only called immediately after we've allocated, so we should
++ * be able to set the head back to this descriptor.
++ */
++ index = ((u8*) txdesc - (u8*)adev->txdesc_start) / adev->txdesc_size;
++ printk ("acx_dealloc: moving head from %d to %d\n", adev->tx_head, index);
++ adev->tx_head = index;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxmem_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxmem_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxmem_update_queue_indicator (acx_device_t *adev, int txqueue)
++{
++#ifdef USING_MORE_THAN_ONE_TRANSMIT_QUEUE
++ u32 indicator;
++ unsigned long flags;
++ int count;
++
++ /*
++ * Can't handle an interrupt while we're fiddling with the ACX's lock,
++ * according to TI. The ACX is supposed to hold fw_lock for at most
++ * 500ns.
++ */
++ local_irq_save (flags);
++
++ /*
++ * Wait for ACX to release the lock (at most 500ns).
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++ if (count < 50) {
++
++ /*
++ * Take out the host lock - anything non-zero will work, so don't worry about
++ * be/le
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 1);
++
++ /*
++ * Avoid a race condition
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++
++ if (count < 50) {
++ /*
++ * Mark the queue active
++ */
++ indicator = read_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator));
++ indicator |= cpu_to_le32 (1 << txqueue);
++ write_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator), indicator);
++ }
++
++ /*
++ * Release the host lock
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 0);
++
++ }
++
++ /*
++ * Restore interrupts
++ */
++ local_irq_restore (flags);
++#endif
++}
++
++void
++acxmem_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ /*
++ * txdesc is the address on the ACX
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++ u32 addr;
++
++ FN_ENTER;
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), cpu_to_le16(len));
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ write_slavemem8 (adev, (u32) &(txdesc->u.r1.rate), rate_100);
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_FIRSTFRAG);
++
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++
++ /*
++ * Since we're not using autodma copy the packet data to the acx now.
++ * Even host descriptors point to the packet header, and the odd indexed
++ * descriptor following points to the packet data.
++ *
++ * The first step is to find free memory in the ACX transmit buffers.
++ * They don't necessarily map one to one with the transmit queue entries,
++ * so search through them starting just after the last one used.
++ */
++ addr = allocate_acx_txbuf_space (adev, len);
++ if (addr) {
++ chaincopy_to_slavemem (adev, addr, hostdesc1->data, len);
++ }
++ else {
++ /*
++ * Bummer. We thought we might have enough room in the transmit
++ * buffers to send this packet, but it turns out we don't. alloc_tx
++ * has already marked this transmit descriptor as HOSTOWN and ACXDONE,
++ * which means the ACX will hang when it gets to this descriptor unless
++ * we do something about it. Having a bubble in the transmit queue just
++ * doesn't seem to work, so we have to reset this transmit queue entry's
++ * state to its original value and back up our head pointer to point
++ * back to this entry.
++ */
++ hostdesc1->length = 0;
++ hostdesc2->length = 0;
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG);
++ adev->tx_head = ((u8*) txdesc - (u8*) adev->txdesc_start) / adev->txdesc_size;
++ goto end;
++ }
++ /*
++ * Tell the ACX where the packet is.
++ */
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), addr);
++
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ //wmb();
++
++ /* write back modified flags */
++ /*
++ * At this point Ctl_8 should just be FIRSTFRAG
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl2_8),Ctl2_8);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), Ctl_8);
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /*
++ * Update the queue indicator to say there's data on the first queue.
++ */
++ acxmem_update_queue_indicator (adev, 0);
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate)),
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u8 Ctl_8;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ printk(" %02X", Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxmem_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100, Ctl_8;
++ u32 acxmem;
++ txdesc_t tmptxdesc;
++
++ FN_ENTER;
++
++ /*
++ * Set up a template descriptor for re-initialization. The only
++ * things that get set are Ctl_8 and the rate, and the rate defaults
++ * to 1Mbps.
++ */
++ memset (&tmptxdesc, 0, sizeof (tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = read_slavemem8 (adev, (u32) &(txdesc->error));
++ ack_failures = read_slavemem8 (adev, (u32) &(txdesc->ack_failures));
++ rts_failures = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures));
++ rts_ok = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok));
++ r100 = read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate));
++ r111 = le16_to_cpu(read_slavemem16 (adev, (u32) &(txdesc->u.r2.rate111)));
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /*
++ * Free up the transmit data buffers
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ /* ...and free the desc by clearing all the fields
++ except the next pointer */
++ copy_to_slavemem (adev,
++ (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc)
++ );
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxmem_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u32 acxmem;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ write_slavemem8 (adev, (u32) &(txdesc->ack_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->error), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN);
++
++ /*
++ * Clean up the memory allocated on the ACX for this transmit descriptor.
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), 0);
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++ ptr = kmalloc (size, GFP_KERNEL);
++ /*
++ * The ACX can't use the physical address, so we'll have to fake it
++ * later and it might be handy to have the virtual address.
++ */
++ *phy = (dma_addr_t) NULL;
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++/*
++ * In the generic slave memory access mode, most of the stuff in
++ * the txhostdesc_t is unused. It's only here because the rest of
++ * the ACX driver expects it to be since the PCI version uses indirect
++ * host memory organization with DMA. Since we're not using DMA the
++ * only use we have for the host descriptors is to store the packets
++ * on the way out.
++ */
++static int
++acxmem_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ txbuf = adev->txbuf_start;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxmem_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ hostdesc = adev->rxhostdesc_start;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ rxbuf++;
++ hostdesc++;
++ }
++ hostdesc--;
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_hostdesc_queues
++*/
++int
++acxmem_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxmem_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxmem_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxmem_create_tx_desc_queue
++*/
++static void
++acxmem_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ u32 clr;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ /*
++ * This refers to an ACX address, not one of ours
++ */
++ adev->txdesc_start = (txdesc_t *) tx_queue_start;
++
++ log(L_DEBUG, "adev->txdesc_start=%p\n",
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++
++ /*
++ * adev->txdesc_start refers to device memory, so we can't write
++ * directly to it.
++ */
++ clr = (u32) adev->txdesc_start;
++ while (clr < (u32) adev->txdesc_start + (TX_CNT * sizeof(*txdesc))) {
++ write_slavemem32 (adev, clr, 0);
++ clr += 4;
++ }
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* initialise ctl */
++ /*
++ * No auto DMA here
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8),
++ (u8) (DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG));
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++
++ /* point to next txdesc */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) txdesc + adev->txdesc_size));
++
++ /* go to the next one */
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 (tx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_rx_desc_queue
++*/
++static void
++acxmem_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) rx_queue_start;
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ acx2cpu(rxdesc->pNextDesc);
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ mem_offs = (u32) adev->rxdesc_start;
++ while (mem_offs < (u32) adev->rxdesc_start + (RX_CNT * sizeof (*rxdesc))) {
++ write_slavemem32 (adev, mem_offs, 0);
++ mem_offs += 4;
++ }
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ /* point to next rxdesc */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) rxdesc + sizeof(*rxdesc)));
++ /* go to the next one */
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 (rx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_desc_queues
++*/
++void
++acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ u32 *p;
++ int i;
++
++ acxmem_create_tx_desc_queue(adev, tx_queue_start);
++ acxmem_create_rx_desc_queue(adev, rx_queue_start);
++ p = (u32 *) adev->acx_queue_indicator;
++ for (i = 0; i < 4; i++) {
++ write_slavemem32 (adev, (u32) p, 0);
++ p++;
++ }
++}
++
++
++/***************************************************************
++** acxmem_s_proc_diag_output
++*/
++char*
++acxmem_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ txdesc_t *txdesc;
++ u8 Ctl_8;
++ rxdesc_t *rxdesc;
++ int i;
++ u32 tmp;
++ txdesc_t txd;
++ u8 buf[0x200];
++ int j, k;
++
++ FN_ENTER;
++
++#if DUMP_MEM_DURING_DIAG > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("dump finished");
++#endif
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxdesc = adev->rxdesc_start;
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ Ctl_8 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u (%02x) FULL%s\n", i, Ctl_8, rtl);
++ else
++ p += sprintf(p, "%02u (%02x) empty%s\n", i, Ctl_8, rtl);
++ rxdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++
++ p += sprintf(p, "** Tx buf %d blocks total, %d available, free list head %04x\n",
++ adev->acx_txbuf_numblocks, adev->acx_txbuf_blocks_free, adev->acx_txbuf_free);
++ txdesc = adev->txdesc_start;
++ if (txdesc) {
++ for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ copy_from_slavemem (adev, (u8 *) &txd, (u32) txdesc, sizeof (txd));
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u ready to free (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u available (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u busy (%02X)%s%s", i, Ctl_8, thd, ttl);
++ tmp = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (tmp) {
++ p += sprintf (p, " %04x", tmp);
++ while ((tmp = read_slavemem32 (adev, (u32) tmp)) != 0x02000000) {
++ tmp <<= 5;
++ p += sprintf (p, " %04x", tmp);
++ }
++ }
++ p += sprintf (p, "\n");
++ p += sprintf (p, " %04x: %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %02x %02x %02x %02x\n"
++ "%02x %02x %02x %02x %04x\n",
++ (u32) txdesc,
++ txd.pNextDesc.v, txd.HostMemPtr.v, txd.AcxMemPtr.v, txd.tx_time,
++ txd.total_length, txd.Reserved,
++ txd.dummy[0], txd.dummy[1], txd.dummy[2], txd.dummy[3],
++ txd.Ctl_8, txd.Ctl2_8, txd.error, txd.ack_failures,
++ txd.u.rts.rts_failures, txd.u.rts.rts_ok, txd.u.r1.rate, txd.u.r1.queue_ctrl,
++ txd.queue_info
++ );
++ if (txd.AcxMemPtr.v) {
++ copy_from_slavemem (adev, buf, txd.AcxMemPtr.v, sizeof (buf));
++ for (j = 0; (j < txd.total_length) && (j<(sizeof(buf)-4)); j+=16) {
++ p += sprintf (p, " ");
++ for (k = 0; (k < 16) && (j+k < txd.total_length); k++) {
++ p += sprintf (p, " %02x", buf[j+k+4]);
++ }
++ p += sprintf (p, "\n");
++ }
++ }
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ }
++
++ p += sprintf(p,
++ "\n"
++ "** Generic slave data **\n"
++ "irq_mask 0x%04x irq_status 0x%04x irq on acx 0x%04x\n"
++ "txbuf_start 0x%p, txbuf_area_size %u\n"
++ "txdesc_size %u, txdesc_start 0x%p\n"
++ "txhostdesc_start 0x%p, txhostdesc_area_size %u\n"
++ "txbuf start 0x%04x, txbuf size %d\n"
++ "rxdesc_start 0x%p\n"
++ "rxhostdesc_start 0x%p, rxhostdesc_area_size %u\n"
++ "rxbuf_start 0x%p, rxbuf_area_size %u\n",
++ adev->irq_mask, adev->irq_status, read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES),
++ adev->txbuf_start, adev->txbuf_area_size,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ adev->acx_txbuf_start, adev->acx_txbuf_numblocks * adev->memblocksize,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ adev->rxbuf_start, adev->rxbuf_area_size);
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxmem_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxmem_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_OVERFLOW
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_BEACON_MISSED */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ /*
++ * The hx4700 EEPROM, at least, only supports 1 power setting. The configure
++ * routine matches the PA bias with the gain, so just use its default value.
++ * The values are: 0x2b for the gain and 0x03 for the PA bias. The firmware
++ * writes the gain level to the Tx gain control DAC and the PA bias to the Maxim
++ * radio's PA bias register. The firmware limits itself to 0 - 64 when writing to the
++ * gain control DAC.
++ *
++ * Physically between the ACX and the radio, higher Tx gain control DAC values result
++ * in less power output; 0 volts to the Maxim radio results in the highest output power
++ * level, which I'm assuming matches up with 0 in the Tx Gain DAC register.
++ *
++ * Although there is only the 1 power setting, one of the radio firmware functions adjusts
++ * the transmit power level up and down. That function is called by the ACX FIQ handler
++ * under certain conditions.
++ */
++ tx_level.level = 1;
++ //return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxmem_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++
++ return 0;
++}
++
++void acxmem_e_release(struct device *dev) {
++}
++
++/***********************************************************************
++** acx_cs part
++**
++** called by pcmcia card service
++*/
++
++/*
++ The event() function is this driver's Card Services event handler.
++ It will be called by Card Services when an appropriate card status
++ event is received. The config() and release() entry points are
++ used to configure or release a socket, in response to card
++ insertion and ejection events. They are invoked from the acx_cs
++ event handler.
++*/
++
++static int acx_cs_config(struct pcmcia_device *link);
++static void acx_cs_release(struct pcmcia_device *link);
++
++/*
++ The attach() and detach() entry points are used to create and destroy
++ "instances" of the driver, where each instance represents everything
++ needed to manage one actual PCMCIA card.
++*/
++
++static void acx_cs_detach(struct pcmcia_device *p_dev);
++
++/*
++ You'll also need to prototype all the functions that will actually
++ be used to talk to your device. See 'pcmem_cs' for a good example
++ of a fully self-sufficient driver; the other drivers rely more or
++ less on other parts of the kernel.
++*/
++
++/*
++ A linked list of "instances" of the acxnet device. Each actual
++ PCMCIA card corresponds to one device instance, and is described
++ by one struct pcmcia_device structure (defined in ds.h).
++
++ You may not want to use a linked list for this -- for example, the
++ memory card driver uses an array of struct pcmcia_device pointers, where minor
++ device numbers are used to derive the corresponding array index.
++*/
++
++/*
++ A driver needs to provide a dev_node_t structure for each device
++ on a card. In some cases, there is only one device per card (for
++ example, ethernet cards, modems). In other cases, there may be
++ many actual or logical devices (SCSI adapters, memory cards with
++ multiple partitions). The dev_node_t structures need to be kept
++ in a linked list starting at the 'dev' field of a struct pcmcia_device
++ structure. We allocate them in the card's private data structure,
++ because they generally shouldn't be allocated dynamically.
++
++ In this case, we also provide a flag to indicate if a device is
++ "stopped" due to a power management event, or card ejection. The
++ device IO routines can use a flag like this to throttle IO to a
++ card that is not ready to accept it.
++*/
++
++
++/*======================================================================
++
++ acx_attach() creates an "instance" of the driver, allocating
++ local data structures for one device. The device is registered
++ with Card Services.
++
++ The dev_link structure is initialized, but we don't actually
++ configure the card at this point -- we wait until we receive a
++ card insertion event.
++
++ ======================================================================*/
++
++static int acx_cs_probe(struct pcmcia_device *link)
++{
++ local_info_t *local;
++ struct net_device *ndev;
++
++ DEBUG(0, "acx_attach()\n");
++
++ ndev = alloc_netdev(sizeof(acx_device_t), "wlan%d", dummy_netdev_init);
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ return -ENOMEM;
++ }
++
++ /* Interrupt setup */
++ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
++ link->irq.IRQInfo1 = IRQ_LEVEL_ID;
++ link->irq.Handler = acxmem_i_interrupt;
++ link->irq.Instance = ndev;
++
++ /*
++ General socket configuration defaults can go here. In this
++ client, we assume very little, and rely on the CIS for almost
++ everything. In most clients, many details (i.e., number, sizes,
++ and attributes of IO windows) are fixed by the nature of the
++ device, and can be hard-wired here.
++ */
++ link->conf.Attributes = CONF_ENABLE_IRQ;
++ link->conf.IntType = INT_MEMORY_AND_IO;
++ link->conf.Present = PRESENT_OPTION | PRESENT_COPY;
++
++ /* Allocate space for private device-specific data */
++ local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
++ if (!local) {
++ printk(KERN_ERR "acx_cs: no memory for new device\n");
++ return -ENOMEM;
++ }
++ local->ndev = ndev;
++
++ link->priv = local;
++
++ return acx_cs_config(link);
++} /* acx_attach */
++
++/*======================================================================
++
++ This deletes a driver "instance". The device is de-registered
++ with Card Services. If it has been released, all local data
++ structures are freed. Otherwise, the structures will be freed
++ when the device is released.
++
++ ======================================================================*/
++
++static void acx_cs_detach(struct pcmcia_device *link)
++{
++ DEBUG(0, "acx_detach(0x%p)\n", link);
++
++
++ if ( ((local_info_t*)link->priv)->ndev ) {
++ acxmem_e_close( ((local_info_t*)link->priv)->ndev );
++ }
++
++ acx_cs_release(link);
++
++ ((local_info_t*)link->priv)->ndev = NULL;
++
++ kfree(link->priv);
++} /* acx_detach */
++
++/*======================================================================
++
++ acx_config() is scheduled to run after a CARD_INSERTION event
++ is received, to configure the PCMCIA socket, and to make the
++ device available to the system.
++
++ ======================================================================*/
++
++#define CS_CHECK(fn, ret) \
++do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
++
++static int acx_cs_config(struct pcmcia_device *link)
++{
++ tuple_t tuple;
++ cisparse_t parse;
++ local_info_t *local = link->priv;
++ int last_fn, last_ret;
++ u_char buf[64];
++ win_req_t req;
++ memreq_t map;
++// int i;
++// acx_device_t *adev;
++
++// adev = (acx_device_t *)link->priv;
++
++ DEBUG(0, "acx_cs_config(0x%p)\n", link);
++
++ /*
++ In this loop, we scan the CIS for configuration table entries,
++ each of which describes a valid card configuration, including
++ voltage, IO window, memory window, and interrupt settings.
++
++ We make no assumptions about the card to be configured: we use
++ just the information available in the CIS. In an ideal world,
++ this would work for any PCMCIA card, but it requires a complete
++ and accurate CIS. In practice, a driver usually "knows" most of
++ these things without consulting the CIS, and most client drivers
++ will only use the CIS to fill in implementation-defined details.
++ */
++ tuple.Attributes = 0;
++ tuple.TupleData = (cisdata_t *)buf;
++ tuple.TupleDataMax = sizeof(buf);
++ tuple.TupleOffset = 0;
++ tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
++
++ /* don't trust the CIS on this; Linksys got it wrong */
++ //link->conf.Present = 0x63;
++
++ CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
++ while (1) {
++ cistpl_cftable_entry_t dflt = { 0 };
++ cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
++ if (pcmcia_get_tuple_data(link, &tuple) != 0 ||
++ pcmcia_parse_tuple(link, &tuple, &parse) != 0)
++ goto next_entry;
++
++ if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg;
++ if (cfg->index == 0) goto next_entry;
++ link->conf.ConfigIndex = cfg->index;
++
++ /* Does this card need audio output? */
++ if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
++ link->conf.Attributes |= CONF_ENABLE_SPKR;
++ link->conf.Status = CCSR_AUDIO_ENA;
++ }
++
++ /* Use power settings for Vcc and Vpp if present */
++ /* Note that the CIS values need to be rescaled */
++ if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
++ link->conf.Vpp =
++ cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
++ else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM))
++ link->conf.Vpp =
++ dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
++
++ /* Do we need to allocate an interrupt? */
++ if (cfg->irq.IRQInfo1 || dflt.irq.IRQInfo1)
++ link->conf.Attributes |= CONF_ENABLE_IRQ;
++ if ((cfg->mem.nwin > 0) || (dflt.mem.nwin > 0)) {
++ cistpl_mem_t *mem =
++ (cfg->mem.nwin) ? &cfg->mem : &dflt.mem;
++// req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_AM|WIN_ENABLE|WIN_USE_WAIT;
++ req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM|WIN_ENABLE|WIN_USE_WAIT;
++ req.Base = mem->win[0].host_addr;
++ req.Size = mem->win[0].len;
++ req.Size=0x1000;
++ req.AccessSpeed = 0;
++ if (pcmcia_request_window(&link, &req, &link->win) != 0)
++ goto next_entry;
++ map.Page = 0; map.CardOffset = mem->win[0].card_addr;
++ if (pcmcia_map_mem_page(link->win, &map) != 0)
++ goto next_entry;
++ else
++ printk(KERN_INFO "MEMORY WINDOW FOUND!!!\n");
++ }
++ /* If we got this far, we're cool! */
++ break;
++
++ next_entry:
++ CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(link, &tuple));
++ }
++
++ if (link->conf.Attributes & CONF_ENABLE_IRQ) {
++ printk(KERN_INFO "requesting Irq...\n");
++ CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
++ }
++
++ /*
++ This actually configures the PCMCIA socket -- setting up
++ the I/O windows and the interrupt mapping, and putting the
++ card and host interface into "Memory and IO" mode.
++ */
++ CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
++ DEBUG(0,"RequestConfiguration OK\n");
++
++
++ memwin.Base=req.Base;
++ memwin.Size=req.Size;
++
++ acx_init_netdev(local->ndev, &link->dev, memwin.Base, memwin.Size, link->irq.AssignedIRQ);
++
++#if 1
++ /*
++ At this point, the dev_node_t structure(s) need to be
++ initialized and arranged in a linked list at link->dev_node.
++ */
++ strcpy(local->node.dev_name, local->ndev->name );
++ local->node.major = local->node.minor = 0;
++ link->dev_node = &local->node;
++
++ /* Finally, report what we've done */
++ printk(KERN_INFO "%s: index 0x%02x: ",
++ local->ndev->name, link->conf.ConfigIndex);
++#endif
++ if (link->conf.Attributes & CONF_ENABLE_IRQ)
++ printk("irq %d", link->irq.AssignedIRQ);
++ if (link->io.NumPorts1)
++ printk(", io 0x%04x-0x%04x", link->io.BasePort1,
++ link->io.BasePort1+link->io.NumPorts1-1);
++ if (link->io.NumPorts2)
++ printk(" & 0x%04x-0x%04x", link->io.BasePort2,
++ link->io.BasePort2+link->io.NumPorts2-1);
++ if (link->win)
++ printk(", mem 0x%06lx-0x%06lx\n", req.Base,
++ req.Base+req.Size-1);
++ return 0;
++
++ cs_failed:
++ cs_error(link, last_fn, last_ret);
++ acx_cs_release(link);
++ return -ENODEV;
++} /* acx_config */
++
++/*======================================================================
++
++ After a card is removed, acx_release() will unregister the
++ device, and release the PCMCIA configuration. If the device is
++ still open, this will be postponed until it is closed.
++
++ ======================================================================*/
++
++static void acx_cs_release(struct pcmcia_device *link)
++{
++ DEBUG(0, "acx_release(0x%p)\n", link);
++ acxmem_e_remove(link);
++ pcmcia_disable_device(link);
++}
++
++static int acx_cs_suspend(struct pcmcia_device *link)
++{
++ local_info_t *local = link->priv;
++
++ pm_message_t state;
++ acxmem_e_suspend ( local->ndev, state);
++ /* Already done in suspend
++ * netif_device_detach(local->ndev); */
++
++ return 0;
++}
++
++static int acx_cs_resume(struct pcmcia_device *link)
++{
++ local_info_t *local = link->priv;
++
++ FN_ENTER;
++ resume_ndev = local->ndev;
++
++ schedule_work( &fw_resume_work );
++
++ /* Already done in suspend
++ if (link->open) {
++ // do we need reset for ACX, if so what function nane is ?
++ //reset_acx_card(local->eth_dev);
++ netif_device_attach(local->ndev);
++ } */
++
++ FN_EXIT0;
++ return 0;
++}
++
++static struct pcmcia_device_id acx_ids[] = {
++ PCMCIA_DEVICE_MANF_CARD(0x0097, 0x8402),
++ PCMCIA_DEVICE_MANF_CARD(0x0250, 0xb001),
++ PCMCIA_DEVICE_NULL,
++};
++MODULE_DEVICE_TABLE(pcmcia, acx_ids);
++
++static struct pcmcia_driver acx_driver = {
++ .owner = THIS_MODULE,
++ .drv = {
++ .name = "acx_cs",
++ },
++ .probe = acx_cs_probe,
++ .remove = acx_cs_detach,
++ .id_table = acx_ids,
++ .suspend = acx_cs_suspend,
++ .resume = acx_cs_resume,
++};
++
++int acx_cs_init(void)
++{
++ /* return success if at least one succeeded */
++ DEBUG(0, "acxcs_init()\n");
++ return pcmcia_register_driver(&acx_driver);
++}
++
++void acx_cs_cleanup(void)
++{
++ pcmcia_unregister_driver(&acx_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.
++
++ In addition:
++
++ Redistribution and use in source and binary forms, with or without
++ modification, are permitted provided that the following conditions
++ are met:
++
++ 1. Redistributions of source code must retain the above copyright
++ notice, this list of conditions and the following disclaimer.
++ 2. Redistributions in binary form must reproduce the above copyright
++ notice, this list of conditions and the following disclaimer in the
++ documentation and/or other materials provided with the distribution.
++ 3. The name of the author may not be used to endorse or promote
++ products derived from this software without specific prior written
++ permission.
++
++ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ POSSIBILITY OF SUCH DAMAGE.
++*/
++
++MODULE_DESCRIPTION( "ACX Cardbus Driver" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/htcsable_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/htcsable_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,118 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HTC Sable
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * 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.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <linux/mfd/asic3_base.h>
++#include <asm/arch/htcsable-gpio.h>
++#include <asm/arch/htcsable-asic.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_BASE PXA_CS2_PHYS
++
++/*
++off: b15 c8 d3
++on: d3 c8 b5 b5-
++*/
++
++#define GPIO_NR_HTCSABLE_ACX111 111
++
++static int
++htcsable_wlan_stop( void );
++
++static int
++htcsable_wlan_start( void )
++{
++ printk( "htcsable_wlan_start\n" );
++
++ /*asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 0);*/
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_PWR_3, 1<<GPIOC_ACX_PWR_3); /* related to acx */
++ SET_HTCSABLE_GPIO(ACX111, 1);
++ asic3_set_gpio_out_b(&htcsable_asic3.dev, 1<<GPIOB_ACX_PWR_1, 1<<GPIOB_ACX_PWR_1);
++ asic3_set_gpio_out_d(&htcsable_asic3.dev, 1<<GPIOD_ACX_PWR_2, 1<<GPIOD_ACX_PWR_2);
++ mdelay(260);
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 1<<GPIOC_ACX_RESET);
++
++ return 0;
++}
++
++static int
++htcsable_wlan_stop( void )
++{
++ printk( "htcsable_wlan_stop\n" );
++ asic3_set_gpio_out_b(&htcsable_asic3.dev, 1<<GPIOB_ACX_PWR_1, 0);
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 0);
++ asic3_set_gpio_out_d(&htcsable_asic3.dev, 1<<GPIOD_ACX_PWR_2, 0);
++ SET_HTCSABLE_GPIO(ACX111, 0); /* not necessary to power down this one? */
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_PWR_3, 0); /* not necessary to power down this one? */
++
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++// .start = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++// .end = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = htcsable_wlan_start,
++ .stop_hw = htcsable_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++htcsable_wlan_init( void )
++{
++ printk( "htcsable_wlan_init: acx-mem platform_device_register\n" );
++ acx_device.resource[1].start = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOB_IRQ_BASE+GPIOB_ACX_IRQ_N;
++ acx_device.resource[1].end = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOB_IRQ_BASE+GPIOB_ACX_IRQ_N;
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++htcsable_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( htcsable_wlan_init );
++module_exit( htcsable_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for HTC Sable" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/htcuniversal_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/htcuniversal_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,108 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HTC Universal
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * 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.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_BASE PXA_CS2_PHYS
++
++
++static int
++htcuniversal_wlan_start( void )
++{
++ htcuniversal_egpio_enable(1<<EGPIO6_WIFI_ON);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_PWR1_ON, 1<<GPIOC_WIFI_PWR1_ON);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR3_ON, 1<<GPIOD_WIFI_PWR3_ON);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR2_ON, 1<<GPIOD_WIFI_PWR2_ON);
++ mdelay(100);
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 0);
++ mdelay(100);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 1<<GPIOC_WIFI_RESET);
++ mdelay(100);
++ return 0;
++}
++
++static int
++htcuniversal_wlan_stop( void )
++{
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 0);
++
++ htcuniversal_egpio_disable(1<<EGPIO6_WIFI_ON);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_PWR1_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR2_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR3_ON, 0);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++// .start = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++// .end = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = htcuniversal_wlan_start,
++ .stop_hw = htcuniversal_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++htcuniversal_wlan_init( void )
++{
++ printk( "htcuniversal_wlan_init: acx-mem platform_device_register\n" );
++ acx_device.resource[1].start = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N;
++ acx_device.resource[1].end = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N;
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++htcuniversal_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( htcuniversal_wlan_init );
++module_exit( htcuniversal_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for HTC Universal" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/hx4700_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/hx4700_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,108 @@
++/*
++ * WLAN (TI TNETW1100B) support in the hx470x.
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * 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.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/leds.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/hx4700-gpio.h>
++#include <asm/arch/hx4700-core.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_OFFSET 0x1000000
++#define WLAN_BASE (PXA_CS5_PHYS+WLAN_OFFSET)
++
++
++static int
++hx4700_wlan_start( void )
++{
++ SET_HX4700_GPIO( WLAN_RESET_N, 0 );
++ mdelay(5);
++ hx4700_egpio_enable( EGPIO0_VCC_3V3_EN );
++ mdelay(100);
++ hx4700_egpio_enable( EGPIO7_VCC_3V3_WL_EN );
++ mdelay(150);
++ hx4700_egpio_enable( EGPIO1_WL_VREG_EN | EGPIO2_VCC_2V1_WL_EN |
++ EGPIO6_WL1V8_EN );
++ mdelay(10);
++ SET_HX4700_GPIO( WLAN_RESET_N, 1 );
++ mdelay(50);
++ led_trigger_event_shared(hx4700_radio_trig, LED_FULL);
++ return 0;
++}
++
++static int
++hx4700_wlan_stop( void )
++{
++ hx4700_egpio_disable( EGPIO0_VCC_3V3_EN | EGPIO1_WL_VREG_EN |
++ EGPIO7_VCC_3V3_WL_EN | EGPIO2_VCC_2V1_WL_EN |
++ EGPIO6_WL1V8_EN );
++ SET_HX4700_GPIO( WLAN_RESET_N, 0 );
++ led_trigger_event_shared(hx4700_radio_trig, LED_OFF);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = HX4700_IRQ(WLAN_IRQ_N),
++ .end = HX4700_IRQ(WLAN_IRQ_N),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = hx4700_wlan_start,
++ .stop_hw = hx4700_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++hx4700_wlan_init( void )
++{
++ printk( "hx4700_wlan_init: acx-mem platform_device_register\n" );
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++hx4700_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( hx4700_wlan_init );
++module_exit( hx4700_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for iPAQ hx4700" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/ioctl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/ioctl.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,2748 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/kernel.h>
++#include <linux/types.h>
++#include <asm/io.h>
++/* #include <asm/uaccess.h> */ /* required for 2.4.x kernels; verify_write() */
++#include <linux/if_arp.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++
++/* channel frequencies
++ * TODO: Currently, every other 802.11 driver keeps its own copy of this. In
++ * the long run this should be integrated into ieee802_11.h or wireless.h or
++ * whatever IEEE802.11x framework evolves */
++static const u16 acx_channel_freq[] = {
++ 2412, 2417, 2422, 2427, 2432, 2437, 2442,
++ 2447, 2452, 2457, 2462, 2467, 2472, 2484,
++};
++
++
++/***********************************************************************
++** acx_ioctl_commit
++*/
++static int
++acx_ioctl_commit(struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_name(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ static const char * const names[] = { "IEEE 802.11b+/g+", "IEEE 802.11b+" };
++
++ strcpy(wrqu->name, names[IS_ACX111(adev) ? 0 : 1]);
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_freq
++*/
++static int
++acx_ioctl_set_freq(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int channel = -1;
++ unsigned int mult = 1;
++ int result;
++
++ FN_ENTER;
++
++ if (wrqu->freq.e == 0 && wrqu->freq.m <= 1000) {
++ /* Setting by channel number */
++ channel = wrqu->freq.m;
++ } else {
++ /* If setting by frequency, convert to a channel */
++ int i;
++
++ for (i = 0; i < (6 - wrqu->freq.e); i++)
++ mult *= 10;
++
++ for (i = 1; i <= 14; i++)
++ if (wrqu->freq.m == acx_channel_freq[i - 1] * mult)
++ channel = i;
++ }
++
++ if (channel > 14) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->channel = channel;
++ /* hmm, the following code part is strange, but this is how
++ * it was being done before... */
++ log(L_IOCTL, "Changing to channel %d\n", channel);
++ SET_BIT(adev->set_mask, GETSET_CHANNEL);
++
++ result = -EINPROGRESS; /* need to call commit handler */
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static inline int
++acx_ioctl_get_freq(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ wrqu->freq.e = 0;
++ wrqu->freq.m = adev->channel;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_mode
++*/
++static int
++acx_ioctl_set_mode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ switch (wrqu->mode) {
++ case IW_MODE_AUTO:
++ adev->mode = ACX_MODE_OFF;
++ break;
++ case IW_MODE_MONITOR:
++ adev->mode = ACX_MODE_MONITOR;
++ break;
++ case IW_MODE_ADHOC:
++ adev->mode = ACX_MODE_0_ADHOC;
++ break;
++ case IW_MODE_INFRA:
++ adev->mode = ACX_MODE_2_STA;
++ break;
++ case IW_MODE_MASTER:
++ printk("acx: master mode (HostAP) is very, very "
++ "experimental! It might work partially, but "
++ "better get prepared for nasty surprises "
++ "at any time\n");
++ adev->mode = ACX_MODE_3_AP;
++ break;
++ case IW_MODE_REPEAT:
++ case IW_MODE_SECOND:
++ default:
++ result = -EOPNOTSUPP;
++ goto end_unlock;
++ }
++
++ log(L_ASSOC, "new adev->mode=%d\n", adev->mode);
++ SET_BIT(adev->set_mask, GETSET_MODE);
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_mode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = 0;
++
++ switch (adev->mode) {
++ case ACX_MODE_OFF:
++ wrqu->mode = IW_MODE_AUTO; break;
++ case ACX_MODE_MONITOR:
++ wrqu->mode = IW_MODE_MONITOR; break;
++ case ACX_MODE_0_ADHOC:
++ wrqu->mode = IW_MODE_ADHOC; break;
++ case ACX_MODE_2_STA:
++ wrqu->mode = IW_MODE_INFRA; break;
++ case ACX_MODE_3_AP:
++ wrqu->mode = IW_MODE_MASTER; break;
++ default:
++ result = -EOPNOTSUPP;
++ }
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_sens(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->sens;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ adev->sensitivity = (1 == vwrq->disabled) ? 0 : vwrq->value;
++ SET_BIT(adev->set_mask, GETSET_SENSITIVITY);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_sens(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->sens;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ if (IS_USB(adev))
++ /* setting the PHY reg via fw cmd doesn't work yet */
++ return -EOPNOTSUPP;
++
++ /* acx_sem_lock(adev); */
++
++ vwrq->value = adev->sensitivity;
++ vwrq->disabled = (vwrq->value == 0);
++ vwrq->fixed = 1;
++
++ /* acx_sem_unlock(adev); */
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_ap
++**
++** Sets the MAC address of the AP to associate with
++*/
++static int
++acx_ioctl_set_ap(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct sockaddr *awrq = &wrqu->ap_addr;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = 0;
++ const u8 *ap;
++
++ FN_ENTER;
++ if (NULL == awrq) {
++ result = -EFAULT;
++ goto end;
++ }
++ if (ARPHRD_ETHER != awrq->sa_family) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ ap = awrq->sa_data;
++ acxlog_mac(L_IOCTL, "set AP=", ap, "\n");
++
++ MAC_COPY(adev->ap, ap);
++
++ /* We want to start rescan in managed or ad-hoc mode,
++ ** otherwise just set adev->ap.
++ ** "iwconfig <if> ap <mac> mode managed": we must be able
++ ** to set ap _first_ and _then_ set mode */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* FIXME: if there is a convention on what zero AP means,
++ ** please add a comment about that. I don't know of any --vda */
++ if (mac_is_zero(ap)) {
++ /* "off" == 00:00:00:00:00:00 */
++ MAC_BCAST(adev->ap);
++ log(L_IOCTL, "Not reassociating\n");
++ } else {
++ log(L_IOCTL, "Forcing reassociation\n");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ break;
++ }
++ result = -EINPROGRESS;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_ap(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct sockaddr *awrq = &wrqu->ap_addr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ if (ACX_STATUS_4_ASSOCIATED == adev->status) {
++ /* as seen in Aironet driver, airo.c */
++ MAC_COPY(awrq->sa_data, adev->bssid);
++ } else {
++ MAC_ZERO(awrq->sa_data);
++ }
++ awrq->sa_family = ARPHRD_ETHER;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_aplist
++**
++** Deprecated in favor of iwscan.
++** We simply return the list of currently available stations in range,
++** don't do a new scan.
++*/
++static int
++acx_ioctl_get_aplist(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ struct sockaddr *address = (struct sockaddr *) extra;
++ struct iw_quality qual[IW_MAX_AP];
++ int i, cur;
++ int result = OK;
++
++ FN_ENTER;
++
++ /* we have AP list only in STA mode */
++ if (ACX_MODE_2_STA != adev->mode) {
++ result = -EOPNOTSUPP;
++ goto end;
++ }
++
++ cur = 0;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ MAC_COPY(address[cur].sa_data, bss->bssid);
++ address[cur].sa_family = ARPHRD_ETHER;
++ qual[cur].level = bss->sir;
++ qual[cur].noise = bss->snr;
++#ifndef OLD_QUALITY
++ qual[cur].qual = acx_signal_determine_quality(qual[cur].level,
++ qual[cur].noise);
++#else
++ qual[cur].qual = (qual[cur].noise <= 100) ?
++ 100 - qual[cur].noise : 0;
++#endif
++ /* no scan: level/noise/qual not updated: */
++ qual[cur].updated = 0;
++ cur++;
++ }
++ if (cur) {
++ dwrq->flags = 1;
++ memcpy(extra + sizeof(struct sockaddr)*cur, &qual,
++ sizeof(struct iw_quality)*cur);
++ }
++ dwrq->length = cur;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_scan(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* don't start scan if device is not up yet */
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ result = -EAGAIN;
++ goto end_unlock;
++ }
++
++ /* This is NOT a rescan for new AP!
++ ** Do not use SET_BIT(GETSET_RESCAN); */
++ acx_s_cmd_start_scan(adev);
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++/* end: */
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_scan_add_station
++*/
++/* helper. not sure whether it's really a _s_leeping fn */
++static char*
++acx_s_scan_add_station(
++ acx_device_t *adev,
++ char *ptr,
++ char *end_buf,
++ struct client *bss)
++{
++ struct iw_event iwe;
++ char *ptr_rate;
++
++ FN_ENTER;
++
++ /* MAC address has to be added first */
++ iwe.cmd = SIOCGIWAP;
++ iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
++ MAC_COPY(iwe.u.ap_addr.sa_data, bss->bssid);
++ acxlog_mac(L_IOCTL, "scan, station address: ", bss->bssid, "\n");
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
++
++ /* Add ESSID */
++ iwe.cmd = SIOCGIWESSID;
++ iwe.u.data.length = bss->essid_len;
++ iwe.u.data.flags = 1;
++ log(L_IOCTL, "scan, essid: %s\n", bss->essid);
++ ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
++
++ /* Add mode */
++ iwe.cmd = SIOCGIWMODE;
++ if (bss->cap_info & (WF_MGMT_CAP_ESS | WF_MGMT_CAP_IBSS)) {
++ if (bss->cap_info & WF_MGMT_CAP_ESS)
++ iwe.u.mode = IW_MODE_MASTER;
++ else
++ iwe.u.mode = IW_MODE_ADHOC;
++ log(L_IOCTL, "scan, mode: %d\n", iwe.u.mode);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN);
++ }
++
++ /* Add frequency */
++ iwe.cmd = SIOCGIWFREQ;
++ iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
++ iwe.u.freq.e = 1;
++ log(L_IOCTL, "scan, frequency: %d\n", iwe.u.freq.m);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
++
++ /* Add link quality */
++ iwe.cmd = IWEVQUAL;
++ /* FIXME: these values should be expressed in dBm, but we don't know
++ * how to calibrate it yet */
++ iwe.u.qual.level = bss->sir;
++ iwe.u.qual.noise = bss->snr;
++#ifndef OLD_QUALITY
++ iwe.u.qual.qual = acx_signal_determine_quality(iwe.u.qual.level,
++ iwe.u.qual.noise);
++#else
++ iwe.u.qual.qual = (iwe.u.qual.noise <= 100) ?
++ 100 - iwe.u.qual.noise : 0;
++#endif
++ iwe.u.qual.updated = 7;
++ log(L_IOCTL, "scan, link quality: %d/%d/%d\n",
++ iwe.u.qual.level, iwe.u.qual.noise, iwe.u.qual.qual);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
++
++ /* Add encryption */
++ iwe.cmd = SIOCGIWENCODE;
++ if (bss->cap_info & WF_MGMT_CAP_PRIVACY)
++ iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
++ else
++ iwe.u.data.flags = IW_ENCODE_DISABLED;
++ iwe.u.data.length = 0;
++ log(L_IOCTL, "scan, encryption flags: %X\n", iwe.u.data.flags);
++ ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
++
++ /* add rates */
++ iwe.cmd = SIOCGIWRATE;
++ iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
++ ptr_rate = ptr + IW_EV_LCP_LEN;
++
++ {
++ u16 rate = bss->rate_cap;
++ const u8* p = acx_bitpos2ratebyte;
++ while (rate) {
++ if (rate & 1) {
++ iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */
++ log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value);
++ ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
++ &iwe, IW_EV_PARAM_LEN);
++ }
++ rate >>= 1;
++ p++;
++ }}
++
++ if ((ptr_rate - ptr) > (ptrdiff_t)IW_EV_LCP_LEN)
++ ptr = ptr_rate;
++
++ /* drop remaining station data items for now */
++
++ FN_EXIT0;
++ return ptr;
++}
++
++
++/***********************************************************************
++ * acx_ioctl_get_scan
++ */
++static int
++acx_ioctl_get_scan(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ char *ptr = extra;
++ int i;
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* no scan available if device is not up yet */
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ log(L_IOCTL, "iface not up yet\n");
++ result = -EAGAIN;
++ goto end_unlock;
++ }
++
++#ifdef ENODATA_TO_BE_USED_AFTER_SCAN_ERROR_ONLY
++ if (adev->bss_table_count == 0) {
++ /* no stations found */
++ result = -ENODATA;
++ goto end_unlock;
++ }
++#endif
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ ptr = acx_s_scan_add_station(adev, ptr,
++ extra + IW_SCAN_MAX_DATA, bss);
++ }
++ dwrq->length = ptr - extra;
++ dwrq->flags = 0;
++
++end_unlock:
++ acx_sem_unlock(adev);
++/* end: */
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_essid
++*/
++static int
++acx_ioctl_set_essid(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->essid;
++ acx_device_t *adev = ndev2adev(ndev);
++ int len = dwrq->length;
++ int result;
++
++ FN_ENTER;
++
++ if (len < 0) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ log(L_IOCTL, "set ESSID '%*s', length %d, flags 0x%04X\n",
++ len, extra, len, dwrq->flags);
++
++#if WIRELESS_EXT >= 21
++ /* WE 21 gives real ESSID strlen, not +1 (trailing zero):
++ * see LKML "[patch] drivers/net/wireless: correct reported ssid lengths" */
++ len += 1;
++#endif
++
++ acx_sem_lock(adev);
++
++ /* ESSID disabled? */
++ if (0 == dwrq->flags) {
++ adev->essid_active = 0;
++
++ } else {
++ if (len > IW_ESSID_MAX_SIZE) {
++ result = -E2BIG;
++ goto end_unlock;
++ }
++
++ if (len >= sizeof(adev->essid))
++ len = sizeof(adev->essid) - 1;
++ memcpy(adev->essid, extra, len);
++ adev->essid[len] = '\0';
++ /* Paranoia: just in case there is a '\0'... */
++ adev->essid_len = strlen(adev->essid);
++ adev->essid_active = 1;
++ }
++
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_essid(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->essid;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ dwrq->flags = adev->essid_active;
++ if (adev->essid_active) {
++ memcpy(extra, adev->essid, adev->essid_len);
++ extra[adev->essid_len] = '\0';
++ dwrq->length = adev->essid_len + 1;
++ dwrq->flags = 1;
++ }
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_update_client_rates
++*/
++static void
++acx_l_update_client_rates(acx_device_t *adev, u16 rate)
++{
++ int i;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ clt->rate_cfg = (clt->rate_cap & rate);
++ if (!clt->rate_cfg) {
++ /* no compatible rates left: kick client */
++ acxlog_mac(L_ASSOC, "client ",clt->address," kicked: "
++ "rates are not compatible anymore\n");
++ acx_l_sta_list_del(adev, clt);
++ continue;
++ }
++ clt->rate_cur &= clt->rate_cfg;
++ if (!clt->rate_cur) {
++ /* current rate become invalid, choose a valid one */
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ }
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[highest_bit(clt->rate_cur)];
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++ }
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ if (adev->ap_client && !adev->ap_client->used) {
++ /* Owwww... we kicked our AP!! :) */
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ }
++}
++
++
++/***********************************************************************
++*/
++/* maps bits from acx111 rate to rate in Mbits */
++static const unsigned int
++acx111_rate_tbl[] = {
++ 1000000, /* 0 */
++ 2000000, /* 1 */
++ 5500000, /* 2 */
++ 6000000, /* 3 */
++ 9000000, /* 4 */
++ 11000000, /* 5 */
++ 12000000, /* 6 */
++ 18000000, /* 7 */
++ 22000000, /* 8 */
++ 24000000, /* 9 */
++ 36000000, /* 10 */
++ 48000000, /* 11 */
++ 54000000, /* 12 */
++ 500000, /* 13, should not happen */
++ 500000, /* 14, should not happen */
++ 500000, /* 15, should not happen */
++};
++
++/***********************************************************************
++ * acx_ioctl_set_rate
++ */
++static int
++acx_ioctl_set_rate(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ u16 txrate_cfg = 1;
++ unsigned long flags;
++ int autorate;
++ int result = -EINVAL;
++
++ FN_ENTER;
++ log(L_IOCTL, "rate %d fixed 0x%X disabled 0x%X flags 0x%X\n",
++ vwrq->value, vwrq->fixed, vwrq->disabled, vwrq->flags);
++
++ if ((0 == vwrq->fixed) || (1 == vwrq->fixed)) {
++ int i = VEC_SIZE(acx111_rate_tbl)-1;
++ if (vwrq->value == -1)
++ /* "iwconfig rate auto" --> choose highest */
++ vwrq->value = IS_ACX100(adev) ? 22000000 : 54000000;
++ while (i >= 0) {
++ if (vwrq->value == acx111_rate_tbl[i]) {
++ txrate_cfg <<= i;
++ i = 0;
++ break;
++ }
++ i--;
++ }
++ if (i == -1) { /* no matching rate */
++ result = -EINVAL;
++ goto end;
++ }
++ } else { /* rate N, N<1000 (driver specific): we don't use this */
++ result = -EOPNOTSUPP;
++ goto end;
++ }
++ /* now: only one bit is set in txrate_cfg, corresponding to
++ ** indicated rate */
++
++ autorate = (vwrq->fixed == 0) && (RATE111_1 != txrate_cfg);
++ if (autorate) {
++ /* convert 00100000 -> 00111111 */
++ txrate_cfg = (txrate_cfg<<1)-1;
++ }
++
++ if (IS_ACX100(adev)) {
++ txrate_cfg &= RATE111_ACX100_COMPAT;
++ if (!txrate_cfg) {
++ result = -ENOTSUPP; /* rate is not supported by acx100 */
++ goto end;
++ }
++ }
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ adev->rate_auto = autorate;
++ adev->rate_oper = txrate_cfg;
++ adev->rate_basic = txrate_cfg;
++ /* only do that in auto mode, non-auto will be able to use
++ * one specific Tx rate only anyway */
++ if (autorate) {
++ /* only use 802.11b base rates, for standard 802.11b H/W
++ * compatibility */
++ adev->rate_basic &= RATE111_80211B_COMPAT;
++ }
++ adev->rate_bcast = 1 << lowest_bit(txrate_cfg);
++ if (IS_ACX100(adev))
++ adev->rate_bcast100 = acx_rate111to100(adev->rate_bcast);
++ acx_l_update_ratevector(adev);
++ acx_l_update_client_rates(adev, txrate_cfg);
++
++ /* Do/don't do tx rate fallback; beacon contents and rate */
++ SET_BIT(adev->set_mask, SET_RATE_FALLBACK|SET_TEMPLATES);
++ result = -EINPROGRESS;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_rate
++*/
++static int
++acx_ioctl_get_rate(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 rate;
++
++ acx_lock(adev, flags);
++ rate = adev->rate_oper;
++ if (adev->ap_client)
++ rate = adev->ap_client->rate_cur;
++ vwrq->value = acx111_rate_tbl[highest_bit(rate)];
++ vwrq->fixed = !adev->rate_auto;
++ vwrq->disabled = 0;
++ acx_unlock(adev, flags);
++
++ return OK;
++}
++
++static int
++acx_ioctl_set_rts(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->rts;
++ acx_device_t *adev = ndev2adev(ndev);
++ int val = vwrq->value;
++
++ if (vwrq->disabled)
++ val = 2312;
++ if ((val < 0) || (val > 2312))
++ return -EINVAL;
++
++ adev->rts_threshold = val;
++ return OK;
++}
++
++static inline int
++acx_ioctl_get_rts(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->rts;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ vwrq->value = adev->rts_threshold;
++ vwrq->disabled = (vwrq->value >= 2312);
++ vwrq->fixed = 1;
++ return OK;
++}
++
++
++#if ACX_FRAGMENTATION
++static int
++acx_ioctl_set_frag(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int val = vwrq->value;
++
++ if (vwrq->disabled)
++ val = 32767;
++ else
++ if ((val < 256) || (val > 2347))
++ return -EINVAL;
++
++ adev->frag_threshold = val;
++ return OK;
++}
++
++static inline int
++acx_ioctl_get_frag(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->frag;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ vwrq->value = adev->frag_threshold;
++ vwrq->disabled = (vwrq->value >= 2347);
++ vwrq->fixed = 1;
++ return OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_ioctl_set_encode
++*/
++static int
++acx_ioctl_set_encode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->encoding;
++ acx_device_t *adev = ndev2adev(ndev);
++ int index;
++ int result;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set encoding flags=0x%04X, size=%d, key: %s\n",
++ dwrq->flags, dwrq->length, extra ? "set" : "No key");
++
++ acx_sem_lock(adev);
++
++ index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
++
++ if (dwrq->length > 0) {
++ /* if index is 0 or invalid, use default key */
++ if ((index < 0) || (index > 3))
++ index = (int)adev->wep_current_index;
++
++ if (0 == (dwrq->flags & IW_ENCODE_NOKEY)) {
++ if (dwrq->length > 29)
++ dwrq->length = 29; /* restrict it */
++
++ if (dwrq->length > 13) {
++ /* 29*8 == 232, WEP256 */
++ adev->wep_keys[index].size = 29;
++ } else if (dwrq->length > 5) {
++ /* 13*8 == 104bit, WEP128 */
++ adev->wep_keys[index].size = 13;
++ } else if (dwrq->length > 0) {
++ /* 5*8 == 40bit, WEP64 */
++ adev->wep_keys[index].size = 5;
++ } else {
++ /* disable key */
++ adev->wep_keys[index].size = 0;
++ }
++
++ memset(adev->wep_keys[index].key, 0,
++ sizeof(adev->wep_keys[index].key));
++ memcpy(adev->wep_keys[index].key, extra, dwrq->length);
++ }
++ } else {
++ /* set transmit key */
++ if ((index >= 0) && (index <= 3))
++ adev->wep_current_index = index;
++ else if (0 == (dwrq->flags & IW_ENCODE_MODE)) {
++ /* complain if we were not just setting
++ * the key mode */
++ result = -EINVAL;
++ goto end_unlock;
++ }
++ }
++
++ adev->wep_enabled = !(dwrq->flags & IW_ENCODE_DISABLED);
++
++ if (dwrq->flags & IW_ENCODE_OPEN) {
++ adev->auth_alg = WLAN_AUTH_ALG_OPENSYSTEM;
++ adev->wep_restricted = 0;
++
++ } else if (dwrq->flags & IW_ENCODE_RESTRICTED) {
++ adev->auth_alg = WLAN_AUTH_ALG_SHAREDKEY;
++ adev->wep_restricted = 1;
++ }
++
++ /* set flag to make sure the card WEP settings get updated */
++ SET_BIT(adev->set_mask, GETSET_WEP);
++
++ log(L_IOCTL, "len=%d, key at 0x%p, flags=0x%X\n",
++ dwrq->length, extra, dwrq->flags);
++
++ for (index = 0; index <= 3; index++) {
++ if (adev->wep_keys[index].size) {
++ log(L_IOCTL, "index=%d, size=%d, key at 0x%p\n",
++ adev->wep_keys[index].index,
++ (int) adev->wep_keys[index].size,
++ adev->wep_keys[index].key);
++ }
++ }
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_encode
++*/
++static int
++acx_ioctl_get_encode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->encoding;
++ acx_device_t *adev = ndev2adev(ndev);
++ int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
++
++ FN_ENTER;
++
++ if (adev->wep_enabled == 0) {
++ dwrq->flags = IW_ENCODE_DISABLED;
++ } else {
++ if ((index < 0) || (index > 3))
++ index = (int)adev->wep_current_index;
++
++ dwrq->flags = (adev->wep_restricted == 1) ?
++ IW_ENCODE_RESTRICTED : IW_ENCODE_OPEN;
++ dwrq->length = adev->wep_keys[index].size;
++
++ memcpy(extra, adev->wep_keys[index].key,
++ adev->wep_keys[index].size);
++ }
++
++ /* set the current index */
++ SET_BIT(dwrq->flags, index + 1);
++
++ log(L_IOCTL, "len=%d, key=%p, flags=0x%X\n",
++ dwrq->length, dwrq->pointer,
++ dwrq->flags);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = -EINPROGRESS;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set 802.11 powersave flags=0x%04X\n", vwrq->flags);
++
++ acx_sem_lock(adev);
++
++ if (vwrq->disabled) {
++ CLEAR_BIT(adev->ps_wakeup_cfg, PS_CFG_ENABLE);
++ SET_BIT(adev->set_mask, GETSET_POWER_80211);
++ goto end;
++ }
++ if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
++ u16 ps_timeout = (vwrq->value * 1024) / 1000;
++
++ if (ps_timeout > 255)
++ ps_timeout = 255;
++ log(L_IOCTL, "setting PS timeout value to %d time units "
++ "due to %dus\n", ps_timeout, vwrq->value);
++ adev->ps_hangover_period = ps_timeout;
++ } else if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) {
++ u16 ps_periods = vwrq->value / 1000000;
++
++ if (ps_periods > 255)
++ ps_periods = 255;
++ log(L_IOCTL, "setting PS period value to %d periods "
++ "due to %dus\n", ps_periods, vwrq->value);
++ adev->ps_listen_interval = ps_periods;
++ CLEAR_BIT(adev->ps_wakeup_cfg, PS_CFG_WAKEUP_MODE_MASK);
++ SET_BIT(adev->ps_wakeup_cfg, PS_CFG_WAKEUP_EACH_ITVL);
++ }
++
++ switch (vwrq->flags & IW_POWER_MODE) {
++ /* FIXME: are we doing the right thing here? */
++ case IW_POWER_UNICAST_R:
++ CLEAR_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_MULTICAST_R:
++ SET_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_ALL_R:
++ SET_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_ON:
++ break;
++ default:
++ log(L_IOCTL, "unknown PS mode\n");
++ result = -EINVAL;
++ goto end;
++ }
++
++ SET_BIT(adev->ps_wakeup_cfg, PS_CFG_ENABLE);
++ SET_BIT(adev->set_mask, GETSET_POWER_80211);
++end:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ log(L_IOCTL, "Get 802.11 Power Save flags = 0x%04X\n", vwrq->flags);
++ vwrq->disabled = ((adev->ps_wakeup_cfg & PS_CFG_ENABLE) == 0);
++ if (vwrq->disabled)
++ goto end;
++
++ if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
++ vwrq->value = adev->ps_hangover_period * 1000 / 1024;
++ vwrq->flags = IW_POWER_TIMEOUT;
++ } else {
++ vwrq->value = adev->ps_listen_interval * 1000000;
++ vwrq->flags = IW_POWER_PERIOD|IW_POWER_RELATIVE;
++ }
++ if (adev->ps_options & PS_OPT_STILL_RCV_BCASTS)
++ SET_BIT(vwrq->flags, IW_POWER_ALL_R);
++ else
++ SET_BIT(vwrq->flags, IW_POWER_UNICAST_R);
++end:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_txpow
++*/
++static inline int
++acx_ioctl_get_txpow(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ vwrq->flags = IW_TXPOW_DBM;
++ vwrq->disabled = 0;
++ vwrq->fixed = 1;
++ vwrq->value = adev->tx_level_dbm;
++
++ log(L_IOCTL, "get txpower:%d dBm\n", adev->tx_level_dbm);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_txpow
++*/
++static int
++acx_ioctl_set_txpow(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set txpower:%d, disabled:%d, flags:0x%04X\n",
++ vwrq->value, vwrq->disabled, vwrq->flags);
++
++ acx_sem_lock(adev);
++
++ if (vwrq->disabled != adev->tx_disabled) {
++ SET_BIT(adev->set_mask, GETSET_TX);
++ }
++
++ adev->tx_disabled = vwrq->disabled;
++ if (vwrq->value == -1) {
++ if (vwrq->disabled) {
++ adev->tx_level_dbm = 0;
++ log(L_IOCTL, "disable radio tx\n");
++ } else {
++ /* adev->tx_level_auto = 1; */
++ log(L_IOCTL, "set tx power auto (NIY)\n");
++ }
++ } else {
++ adev->tx_level_dbm = vwrq->value <= 20 ? vwrq->value : 20;
++ /* adev->tx_level_auto = 0; */
++ log(L_IOCTL, "set txpower=%d dBm\n", adev->tx_level_dbm);
++ }
++ SET_BIT(adev->set_mask, GETSET_TXPOWER);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_range
++*/
++static int
++acx_ioctl_get_range(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ struct iw_range *range = (struct iw_range *)extra;
++ acx_device_t *adev = ndev2adev(ndev);
++ int i,n;
++
++ FN_ENTER;
++
++ if (!dwrq->pointer)
++ goto end;
++
++ dwrq->length = sizeof(struct iw_range);
++ memset(range, 0, sizeof(struct iw_range));
++ n = 0;
++ for (i = 1; i <= 14; i++) {
++ if (adev->reg_dom_chanmask & (1 << (i - 1))) {
++ range->freq[n].i = i;
++ range->freq[n].m = acx_channel_freq[i - 1] * 100000;
++ range->freq[n].e = 1; /* units are MHz */
++ n++;
++ }
++ }
++ range->num_channels = n;
++ range->num_frequency = n;
++
++ range->min_rts = 0;
++ range->max_rts = 2312;
++
++#if ACX_FRAGMENTATION
++ range->min_frag = 256;
++ range->max_frag = 2312;
++#endif
++
++ range->encoding_size[0] = 5;
++ range->encoding_size[1] = 13;
++ range->encoding_size[2] = 29;
++ range->num_encoding_sizes = 3;
++ range->max_encoding_tokens = 4;
++
++ range->min_pmp = 0;
++ range->max_pmp = 5000000;
++ range->min_pmt = 0;
++ range->max_pmt = 65535 * 1000;
++ range->pmp_flags = IW_POWER_PERIOD;
++ range->pmt_flags = IW_POWER_TIMEOUT;
++ range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R;
++
++ if (IS_ACX100(adev)) { /* ACX100 has direct radio programming - arbitrary levels, so offer a lot */
++ for (i = 0; i <= IW_MAX_TXPOWER - 1; i++)
++ range->txpower[i] = 20 * i / (IW_MAX_TXPOWER - 1);
++ range->num_txpower = IW_MAX_TXPOWER;
++ range->txpower_capa = IW_TXPOW_DBM;
++ }
++ else {
++ int count = min(IW_MAX_TXPOWER, (int)adev->cfgopt_power_levels.len);
++ for (i = 0; i <= count; i++)
++ range->txpower[i] = adev->cfgopt_power_levels.list[i];
++ range->num_txpower = count;
++ /* this list is given in mW */
++ range->txpower_capa = IW_TXPOW_MWATT;
++ }
++
++ range->we_version_compiled = WIRELESS_EXT;
++ range->we_version_source = 0x9;
++
++ range->retry_capa = IW_RETRY_LIMIT;
++ range->retry_flags = IW_RETRY_LIMIT;
++ range->min_retry = 1;
++ range->max_retry = 255;
++
++ range->r_time_flags = IW_RETRY_LIFETIME;
++ range->min_r_time = 0;
++ /* FIXME: lifetime ranges and orders of magnitude are strange?? */
++ range->max_r_time = 65535;
++
++ if (IS_USB(adev))
++ range->sensitivity = 0;
++ else if (IS_ACX111(adev))
++ range->sensitivity = 3;
++ else
++ range->sensitivity = 255;
++
++ for (i=0; i < adev->rate_supported_len; i++) {
++ range->bitrate[i] = (adev->rate_supported[i] & ~0x80) * 500000;
++ /* never happens, but keep it, to be safe: */
++ if (range->bitrate[i] == 0)
++ break;
++ }
++ range->num_bitrates = i;
++
++ range->max_qual.qual = 100;
++ range->max_qual.level = 100;
++ range->max_qual.noise = 100;
++ /* TODO: better values */
++ range->avg_qual.qual = 90;
++ range->avg_qual.level = 80;
++ range->avg_qual.noise = 2;
++
++end:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** Private functions
++*/
++
++/***********************************************************************
++** acx_ioctl_get_nick
++*/
++static inline int
++acx_ioctl_get_nick(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ strcpy(extra, adev->nick);
++ dwrq->length = strlen(extra) + 1;
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_nick
++*/
++static int
++acx_ioctl_set_nick(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ if (dwrq->length > IW_ESSID_MAX_SIZE + 1) {
++ result = -E2BIG;
++ goto end_unlock;
++ }
++
++ /* extra includes trailing \0, so it's ok */
++ strcpy(adev->nick, extra);
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_retry
++*/
++static int
++acx_ioctl_get_retry(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->retry;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned int type = vwrq->flags & IW_RETRY_TYPE;
++ unsigned int modifier = vwrq->flags & IW_RETRY_MODIFIER;
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* return the short retry number by default */
++ if (type == IW_RETRY_LIFETIME) {
++ vwrq->flags = IW_RETRY_LIFETIME;
++ vwrq->value = adev->msdu_lifetime;
++ } else if (modifier == IW_RETRY_MAX) {
++ vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
++ vwrq->value = adev->long_retry;
++ } else {
++ vwrq->flags = IW_RETRY_LIMIT;
++ if (adev->long_retry != adev->short_retry)
++ SET_BIT(vwrq->flags, IW_RETRY_MIN);
++ vwrq->value = adev->short_retry;
++ }
++
++ /* can't be disabled */
++ vwrq->disabled = (u8)0;
++ result = OK;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_retry
++*/
++static int
++acx_ioctl_set_retry(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->retry;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (!vwrq) {
++ result = -EFAULT;
++ goto end;
++ }
++ if (vwrq->disabled) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ result = -EINVAL;
++ if (IW_RETRY_LIMIT == (vwrq->flags & IW_RETRY_TYPE)) {
++ printk("old retry limits: short %d long %d\n",
++ adev->short_retry, adev->long_retry);
++ if (vwrq->flags & IW_RETRY_MAX) {
++ adev->long_retry = vwrq->value;
++ } else if (vwrq->flags & IW_RETRY_MIN) {
++ adev->short_retry = vwrq->value;
++ } else {
++ /* no modifier: set both */
++ adev->long_retry = vwrq->value;
++ adev->short_retry = vwrq->value;
++ }
++ printk("new retry limits: short %d long %d\n",
++ adev->short_retry, adev->long_retry);
++ SET_BIT(adev->set_mask, GETSET_RETRY);
++ result = -EINPROGRESS;
++ }
++ else if (vwrq->flags & IW_RETRY_LIFETIME) {
++ adev->msdu_lifetime = vwrq->value;
++ printk("new MSDU lifetime: %d\n", adev->msdu_lifetime);
++ SET_BIT(adev->set_mask, SET_MSDU_LIFETIME);
++ result = -EINPROGRESS;
++ }
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/************************ private ioctls ******************************/
++
++
++/***********************************************************************
++** acx_ioctl_set_debug
++*/
++#if ACX_DEBUG
++static int
++acx_ioctl_set_debug(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ unsigned int debug_new = *((unsigned int *)extra);
++ int result = -EINVAL;
++
++ log(L_ANY, "setting debug from %04X to %04X\n", acx_debug, debug_new);
++ acx_debug = debug_new;
++
++ result = OK;
++ return result;
++
++}
++#endif
++
++
++/***********************************************************************
++** acx_ioctl_list_reg_domain
++*/
++static int
++acx_ioctl_list_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ int i = 1;
++ const char * const *entry = acx_reg_domain_strings;
++
++ printk("dom# chan# domain/country\n");
++ while (*entry)
++ printk("%4d %s\n", i++, *entry++);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_reg_domain
++*/
++static int
++acx_ioctl_set_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if ((*extra < 1) || ((size_t)*extra > acx_reg_domain_ids_len)) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->reg_dom_id = acx_reg_domain_ids[*extra - 1];
++ SET_BIT(adev->set_mask, GETSET_REG_DOMAIN);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_reg_domain
++*/
++static int
++acx_ioctl_get_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int dom,i;
++
++ /* no locking */
++ dom = adev->reg_dom_id;
++
++ for (i = 1; i <= acx_reg_domain_ids_len; i++) {
++ if (acx_reg_domain_ids[i-1] == dom) {
++ log(L_IOCTL, "regulatory domain is currently set "
++ "to %d (0x%X): %s\n", i, dom,
++ acx_reg_domain_strings[i-1]);
++ *extra = i;
++ break;
++ }
++ }
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_short_preamble
++*/
++static const char * const
++preamble_modes[] = {
++ "off",
++ "on",
++ "auto (peer capability dependent)",
++ "unknown mode, error"
++};
++
++static int
++acx_ioctl_set_short_preamble(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int i;
++ int result;
++
++ FN_ENTER;
++
++ if ((unsigned char)*extra > 2) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->preamble_mode = (u8)*extra;
++ switch (adev->preamble_mode) {
++ case 0: /* long */
++ adev->preamble_cur = 0;
++ break;
++ case 1:
++ /* short, kick incapable peers */
++ adev->preamble_cur = 1;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ if (!(clt->cap_info & WF_MGMT_CAP_SHORT)) {
++ clt->used = CLIENT_EMPTY_SLOT_0;
++ }
++ }
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ if (adev->ap_client && !adev->ap_client->used) {
++ /* We kicked our AP :) */
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ }
++ break;
++ case 2: /* auto. short only if all peers are short-capable */
++ adev->preamble_cur = 1;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ if (!(clt->cap_info & WF_MGMT_CAP_SHORT)) {
++ adev->preamble_cur = 0;
++ break;
++ }
++ }
++ break;
++ }
++ printk("new short preamble setting: configured %s, active %s\n",
++ preamble_modes[adev->preamble_mode],
++ preamble_modes[adev->preamble_cur]);
++ result = OK;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_short_preamble
++*/
++static int
++acx_ioctl_get_short_preamble(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("current short preamble setting: configured %s, active %s\n",
++ preamble_modes[adev->preamble_mode],
++ preamble_modes[adev->preamble_cur]);
++
++ *extra = (char)adev->preamble_mode;
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_antenna
++**
++** TX and RX antenna can be set separately but this function good
++** for testing 0-4 bits
++*/
++static int
++acx_ioctl_set_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("old antenna value: 0x%02X (COMBINED bit mask)\n"
++ "Rx antenna selection:\n"
++ "0x00 ant. 1\n"
++ "0x40 ant. 2\n"
++ "0x80 full diversity\n"
++ "0xc0 partial diversity\n"
++ "0x0f dwell time mask (in units of us)\n"
++ "Tx antenna selection:\n"
++ "0x00 ant. 2\n" /* yep, those ARE reversed! */
++ "0x20 ant. 1\n"
++ "new antenna value: 0x%02X\n",
++ adev->antenna, (u8)*extra);
++
++ adev->antenna = (u8)*extra;
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_antenna
++*/
++static int
++acx_ioctl_get_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /* no locking. it's pointless to lock a single load */
++ printk("current antenna value: 0x%02X (COMBINED bit mask)\n"
++ "Rx antenna selection:\n"
++ "0x00 ant. 1\n"
++ "0x40 ant. 2\n"
++ "0x80 full diversity\n"
++ "0xc0 partial diversity\n"
++ "Tx antenna selection:\n"
++ "0x00 ant. 2\n" /* yep, those ARE reversed! */
++ "0x20 ant. 1\n", adev->antenna);
++
++ return 0;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_rx_antenna
++**
++** 0 = antenna1; 1 = antenna2; 2 = full diversity; 3 = partial diversity
++** Could anybody test which antenna is the external one?
++*/
++static int
++acx_ioctl_set_rx_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (*extra > 3) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ printk("old antenna value: 0x%02X\n", adev->antenna);
++
++ acx_sem_lock(adev);
++
++ adev->antenna &= 0x3f;
++ SET_BIT(adev->antenna, (*extra << 6));
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++ printk("new antenna value: 0x%02X\n", adev->antenna);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_tx_antenna
++**
++** Arguments: 0 == antenna2; 1 == antenna1;
++** Could anybody test which antenna is the external one?
++*/
++static int
++acx_ioctl_set_tx_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (*extra > 1) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ printk("old antenna value: 0x%02X\n", adev->antenna);
++
++ acx_sem_lock(adev);
++
++ adev->antenna &= ~0x30;
++ SET_BIT(adev->antenna, ((*extra & 0x01) << 5));
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++ printk("new antenna value: 0x%02X\n", adev->antenna);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_wlansniff
++**
++** can we just remove this in favor of monitor mode? --vda
++*/
++static int
++acx_ioctl_wlansniff(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned int *params = (unsigned int*)extra;
++ unsigned int enable = (unsigned int)(params[0] > 0);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* not using printk() here, since it distorts kismet display
++ * when printk messages activated */
++ log(L_IOCTL, "setting monitor to: 0x%02X\n", params[0]);
++
++ switch (params[0]) {
++ case 0:
++ /* no monitor mode. hmm, should we simply ignore it
++ * or go back to enabling adev->netdev->type ARPHRD_ETHER? */
++ break;
++ case 1:
++ adev->monitor_type = ARPHRD_IEEE80211_PRISM;
++ break;
++ case 2:
++ adev->monitor_type = ARPHRD_IEEE80211;
++ break;
++ }
++
++ if (params[0]) {
++ adev->mode = ACX_MODE_MONITOR;
++ SET_BIT(adev->set_mask, GETSET_MODE);
++ }
++
++ if (enable) {
++ adev->channel = params[1];
++ SET_BIT(adev->set_mask, GETSET_RX);
++ }
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_unknown11
++** FIXME: looks like some sort of "iwpriv kick_sta MAC" but it's broken
++*/
++static int
++acx_ioctl_unknown11(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++#ifdef BROKEN
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ client_t client;
++ int result;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ acx_l_transmit_disassoc(adev, &client);
++ result = OK;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ return result;
++#endif
++ return -EINVAL;
++}
++
++
++/***********************************************************************
++** debug helper function to be able to debug various issues relatively easily
++*/
++static int
++acx_ioctl_dbg_set_masks(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ const unsigned int *params = (unsigned int*)extra;
++ int result;
++
++ acx_sem_lock(adev);
++
++ log(L_IOCTL, "setting flags in settings mask: "
++ "get_mask %08X set_mask %08X\n"
++ "before: get_mask %08X set_mask %08X\n",
++ params[0], params[1],
++ adev->get_mask, adev->set_mask);
++ SET_BIT(adev->get_mask, params[0]);
++ SET_BIT(adev->set_mask, params[1]);
++ log(L_IOCTL, "after: get_mask %08X set_mask %08X\n",
++ adev->get_mask, adev->set_mask);
++ result = -EINPROGRESS; /* immediately call commit handler */
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++* acx_ioctl_set_rates
++*
++* This ioctl takes string parameter. Examples:
++* iwpriv wlan0 SetRates "1,2"
++* use 1 and 2 Mbit rates, both are in basic rate set
++* iwpriv wlan0 SetRates "1,2 5,11"
++* use 1,2,5.5,11 Mbit rates. 1 and 2 are basic
++* iwpriv wlan0 SetRates "1,2 5c,11c"
++* same ('c' means 'CCK modulation' and it is a default for 5 and 11)
++* iwpriv wlan0 SetRates "1,2 5p,11p"
++* use 1,2,5.5,11 Mbit, 1,2 are basic. 5 and 11 are using PBCC
++* iwpriv wlan0 SetRates "1,2,5,11 22p"
++* use 1,2,5.5,11,22 Mbit. 1,2,5.5 and 11 are basic. 22 is using PBCC
++* (this is the maximum acx100 can do (modulo x4 mode))
++* iwpriv wlan0 SetRates "1,2,5,11 22"
++* same. 802.11 defines only PBCC modulation
++* for 22 and 33 Mbit rates, so there is no ambiguity
++* iwpriv wlan0 SetRates "1,2,5,11 6o,9o,12o,18o,24o,36o,48o,54o"
++* 1,2,5.5 and 11 are basic. 11g OFDM rates are enabled but
++* they are not in basic rate set. 22 Mbit is disabled.
++* iwpriv wlan0 SetRates "1,2,5,11 6,9,12,18,24,36,48,54"
++* same. OFDM is default for 11g rates except 22 and 33 Mbit,
++* thus 'o' is optional
++* iwpriv wlan0 SetRates "1,2,5,11 6d,9d,12d,18d,24d,36d,48d,54d"
++* 1,2,5.5 and 11 are basic. 11g CCK-OFDM rates are enabled
++* (acx111 does not support CCK-OFDM, driver will reject this cmd)
++* iwpriv wlan0 SetRates "6,9,12 18,24,36,48,54"
++* 6,9,12 are basic, rest of 11g rates is enabled. Using OFDM
++*/
++#include "setrate.c"
++
++/* disallow: 33Mbit (unsupported by hw) */
++/* disallow: CCKOFDM (unsupported by hw) */
++static int
++acx111_supported(int mbit, int modulation, void *opaque)
++{
++ if (mbit==33) return -ENOTSUPP;
++ if (modulation==DOT11_MOD_CCKOFDM) return -ENOTSUPP;
++ return OK;
++}
++
++static const u16
++acx111mask[] = {
++ [DOT11_RATE_1 ] = RATE111_1 ,
++ [DOT11_RATE_2 ] = RATE111_2 ,
++ [DOT11_RATE_5 ] = RATE111_5 ,
++ [DOT11_RATE_11] = RATE111_11,
++ [DOT11_RATE_22] = RATE111_22,
++ /* [DOT11_RATE_33] = */
++ [DOT11_RATE_6 ] = RATE111_6 ,
++ [DOT11_RATE_9 ] = RATE111_9 ,
++ [DOT11_RATE_12] = RATE111_12,
++ [DOT11_RATE_18] = RATE111_18,
++ [DOT11_RATE_24] = RATE111_24,
++ [DOT11_RATE_36] = RATE111_36,
++ [DOT11_RATE_48] = RATE111_48,
++ [DOT11_RATE_54] = RATE111_54,
++};
++
++static u32
++acx111_gen_mask(int mbit, int modulation, void *opaque)
++{
++ /* lower 16 bits show selected 1, 2, CCK and OFDM rates */
++ /* upper 16 bits show selected PBCC rates */
++ u32 m = acx111mask[rate_mbit2enum(mbit)];
++ if (modulation==DOT11_MOD_PBCC)
++ return m<<16;
++ return m;
++}
++
++static int
++verify_rate(u32 rate, int chip_type)
++{
++ /* never happens. be paranoid */
++ if (!rate) return -EINVAL;
++
++ /* disallow: mixing PBCC and CCK at 5 and 11Mbit
++ ** (can be supported, but needs complicated handling in tx code) */
++ if (( rate & ((RATE111_11+RATE111_5)<<16) )
++ && ( rate & (RATE111_11+RATE111_5) )
++ ) {
++ return -ENOTSUPP;
++ }
++ if (CHIPTYPE_ACX100 == chip_type) {
++ if ( rate & ~(RATE111_ACX100_COMPAT+(RATE111_ACX100_COMPAT<<16)) )
++ return -ENOTSUPP;
++ }
++ return 0;
++}
++
++static int
++acx_ioctl_set_rates(struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int result;
++ u32 brate = 0, orate = 0; /* basic, operational rate set */
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set_rates %s\n", extra);
++ result = fill_ratemasks(extra, &brate, &orate,
++ acx111_supported, acx111_gen_mask, 0);
++ if (result) goto end;
++ SET_BIT(orate, brate);
++ log(L_IOCTL, "brate %08X orate %08X\n", brate, orate);
++
++ result = verify_rate(brate, adev->chip_type);
++ if (result) goto end;
++ result = verify_rate(orate, adev->chip_type);
++ if (result) goto end;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ adev->rate_basic = brate;
++ adev->rate_oper = orate;
++ /* TODO: ideally, we shall monitor highest basic rate
++ ** which was successfully sent to every peer
++ ** (say, last we checked, everybody could hear 5.5 Mbits)
++ ** and use that for bcasts when we want to reach all peers.
++ ** For beacons, we probably shall use lowest basic rate
++ ** because we want to reach all *potential* new peers too */
++ adev->rate_bcast = 1 << lowest_bit(brate);
++ if (IS_ACX100(adev))
++ adev->rate_bcast100 = acx_rate111to100(adev->rate_bcast);
++ adev->rate_auto = !has_only_one_bit(orate);
++ acx_l_update_client_rates(adev, orate);
++ /* TODO: get rid of ratevector, build it only when needed */
++ acx_l_update_ratevector(adev);
++
++ /* Do/don't do tx rate fallback; beacon contents and rate */
++ SET_BIT(adev->set_mask, SET_RATE_FALLBACK|SET_TEMPLATES);
++ result = -EINPROGRESS;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_phy_chan_busy_percentage
++*/
++static int
++acx_ioctl_get_phy_chan_busy_percentage(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ struct {
++ u16 type;
++ u16 len;
++ u32 busytime;
++ u32 totaltime;
++ } ACX_PACKED usage;
++ int result;
++
++ acx_sem_lock(adev);
++
++ if (OK != acx_s_interrogate(adev, &usage, ACX1xx_IE_MEDIUM_USAGE)) {
++ result = NOT_OK;
++ goto end_unlock;
++ }
++
++ usage.busytime = le32_to_cpu(usage.busytime);
++ usage.totaltime = le32_to_cpu(usage.totaltime);
++
++ /* yes, this is supposed to be "Medium" (singular of media),
++ not "average"! OK, reword the message to make it obvious... */
++ printk("%s: busy percentage of medium (since last invocation): %d%% "
++ "(%u of %u microseconds)\n",
++ ndev->name,
++ usage.busytime / ((usage.totaltime / 100) + 1),
++ usage.busytime, usage.totaltime);
++
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_ed_threshold
++*/
++static inline int
++acx_ioctl_set_ed_threshold(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("old ED threshold value: %d\n", adev->ed_threshold);
++ adev->ed_threshold = (unsigned char)*extra;
++ printk("new ED threshold value: %d\n", (unsigned char)*extra);
++ SET_BIT(adev->set_mask, GETSET_ED_THRESH);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_cca
++*/
++static inline int
++acx_ioctl_set_cca(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ acx_sem_lock(adev);
++
++ printk("old CCA value: 0x%02X\n", adev->cca);
++ adev->cca = (unsigned char)*extra;
++ printk("new CCA value: 0x%02X\n", (unsigned char)*extra);
++ SET_BIT(adev->set_mask, GETSET_CCA);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static const char * const
++scan_modes[] = { "active", "passive", "background" };
++
++static void
++acx_print_scan_params(acx_device_t *adev, const char* head)
++{
++ printk("%s: %smode %d (%s), min chan time %dTU, "
++ "max chan time %dTU, max scan rate byte: %d\n",
++ adev->ndev->name, head,
++ adev->scan_mode, scan_modes[adev->scan_mode],
++ adev->scan_probe_delay, adev->scan_duration, adev->scan_rate);
++}
++
++static int
++acx_ioctl_set_scan_params(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++ const int *params = (int *)extra;
++
++ acx_sem_lock(adev);
++
++ acx_print_scan_params(adev, "old scan parameters: ");
++ if ((params[0] != -1) && (params[0] >= 0) && (params[0] <= 2))
++ adev->scan_mode = params[0];
++ if (params[1] != -1)
++ adev->scan_probe_delay = params[1];
++ if (params[2] != -1)
++ adev->scan_duration = params[2];
++ if ((params[3] != -1) && (params[3] <= 255))
++ adev->scan_rate = params[3];
++ acx_print_scan_params(adev, "new scan parameters: ");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++static int
++acx_ioctl_get_scan_params(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++ int *params = (int *)extra;
++
++ acx_sem_lock(adev);
++
++ acx_print_scan_params(adev, "current scan parameters: ");
++ params[0] = adev->scan_mode;
++ params[1] = adev->scan_probe_delay;
++ params[2] = adev->scan_duration;
++ params[3] = adev->scan_rate;
++ result = OK;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx100_ioctl_set_led_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ static const char * const led_modes[] = { "off", "on", "LinkQuality" };
++
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ acx_sem_lock(adev);
++
++ printk("%s: power LED status: old %d (%s), ",
++ ndev->name,
++ adev->led_power,
++ led_modes[adev->led_power]);
++ adev->led_power = extra[0];
++ if (adev->led_power > 2) adev->led_power = 2;
++ printk("new %d (%s)\n",
++ adev->led_power,
++ led_modes[adev->led_power]);
++
++ if (adev->led_power == 2) {
++ printk("%s: max link quality setting: old %d, ",
++ ndev->name, adev->brange_max_quality);
++ if (extra[1])
++ adev->brange_max_quality = extra[1];
++ printk("new %d\n", adev->brange_max_quality);
++ }
++
++ SET_BIT(adev->set_mask, GETSET_LED_POWER);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static inline int
++acx100_ioctl_get_led_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ extra[0] = adev->led_power;
++ if (adev->led_power == 2)
++ extra[1] = adev->brange_max_quality;
++ else
++ extra[1] = -1;
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx111_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ if (!IS_PCI(ndev2adev(ndev)))
++ return OK;
++ return acx111pci_ioctl_info(ndev, info, vwrq, extra);
++}
++
++
++/***********************************************************************
++*/
++static int
++acx100_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ if (IS_USB(ndev2adev(ndev))) {
++ printk("acx: set_phy_amp_bias() is not supported on USB\n");
++ return OK;
++ }
++#ifdef ACX_MEM
++ return acx100mem_ioctl_set_phy_amp_bias(ndev, info, vwrq, extra);
++#else
++ return acx100pci_ioctl_set_phy_amp_bias(ndev, info, vwrq, extra);
++#endif
++}
++
++
++/***********************************************************************
++*/
++static const iw_handler acx_ioctl_handler[] =
++{
++ acx_ioctl_commit, /* SIOCSIWCOMMIT */
++ acx_ioctl_get_name, /* SIOCGIWNAME */
++ NULL, /* SIOCSIWNWID */
++ NULL, /* SIOCGIWNWID */
++ acx_ioctl_set_freq, /* SIOCSIWFREQ */
++ acx_ioctl_get_freq, /* SIOCGIWFREQ */
++ acx_ioctl_set_mode, /* SIOCSIWMODE */
++ acx_ioctl_get_mode, /* SIOCGIWMODE */
++ acx_ioctl_set_sens, /* SIOCSIWSENS */
++ acx_ioctl_get_sens, /* SIOCGIWSENS */
++ NULL, /* SIOCSIWRANGE */
++ acx_ioctl_get_range, /* SIOCGIWRANGE */
++ NULL, /* SIOCSIWPRIV */
++ NULL, /* SIOCGIWPRIV */
++ NULL, /* SIOCSIWSTATS */
++ NULL, /* SIOCGIWSTATS */
++#if IW_HANDLER_VERSION > 4
++ iw_handler_set_spy, /* SIOCSIWSPY */
++ iw_handler_get_spy, /* SIOCGIWSPY */
++ iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
++ iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
++#else /* IW_HANDLER_VERSION > 4 */
++#ifdef WIRELESS_SPY
++ NULL /* acx_ioctl_set_spy FIXME */, /* SIOCSIWSPY */
++ NULL /* acx_ioctl_get_spy */, /* SIOCGIWSPY */
++#else /* WSPY */
++ NULL, /* SIOCSIWSPY */
++ NULL, /* SIOCGIWSPY */
++#endif /* WSPY */
++ NULL, /* [nothing] */
++ NULL, /* [nothing] */
++#endif /* IW_HANDLER_VERSION > 4 */
++ acx_ioctl_set_ap, /* SIOCSIWAP */
++ acx_ioctl_get_ap, /* SIOCGIWAP */
++ NULL, /* [nothing] */
++ acx_ioctl_get_aplist, /* SIOCGIWAPLIST */
++ acx_ioctl_set_scan, /* SIOCSIWSCAN */
++ acx_ioctl_get_scan, /* SIOCGIWSCAN */
++ acx_ioctl_set_essid, /* SIOCSIWESSID */
++ acx_ioctl_get_essid, /* SIOCGIWESSID */
++ acx_ioctl_set_nick, /* SIOCSIWNICKN */
++ acx_ioctl_get_nick, /* SIOCGIWNICKN */
++ NULL, /* [nothing] */
++ NULL, /* [nothing] */
++ acx_ioctl_set_rate, /* SIOCSIWRATE */
++ acx_ioctl_get_rate, /* SIOCGIWRATE */
++ acx_ioctl_set_rts, /* SIOCSIWRTS */
++ acx_ioctl_get_rts, /* SIOCGIWRTS */
++#if ACX_FRAGMENTATION
++ acx_ioctl_set_frag, /* SIOCSIWFRAG */
++ acx_ioctl_get_frag, /* SIOCGIWFRAG */
++#else
++ NULL, /* SIOCSIWFRAG */
++ NULL, /* SIOCGIWFRAG */
++#endif
++ acx_ioctl_set_txpow, /* SIOCSIWTXPOW */
++ acx_ioctl_get_txpow, /* SIOCGIWTXPOW */
++ acx_ioctl_set_retry, /* SIOCSIWRETRY */
++ acx_ioctl_get_retry, /* SIOCGIWRETRY */
++ acx_ioctl_set_encode, /* SIOCSIWENCODE */
++ acx_ioctl_get_encode, /* SIOCGIWENCODE */
++ acx_ioctl_set_power, /* SIOCSIWPOWER */
++ acx_ioctl_get_power, /* SIOCGIWPOWER */
++};
++
++
++/***********************************************************************
++*/
++
++/* if you plan to reorder something, make sure to reorder all other places
++ * accordingly! */
++/* SET/GET convention: SETs must have even position, GETs odd */
++#define ACX100_IOCTL SIOCIWFIRSTPRIV
++enum {
++ ACX100_IOCTL_DEBUG = ACX100_IOCTL,
++ ACX100_IOCTL_GET__________UNUSED1,
++ ACX100_IOCTL_SET_PLED,
++ ACX100_IOCTL_GET_PLED,
++ ACX100_IOCTL_SET_RATES,
++ ACX100_IOCTL_LIST_DOM,
++ ACX100_IOCTL_SET_DOM,
++ ACX100_IOCTL_GET_DOM,
++ ACX100_IOCTL_SET_SCAN_PARAMS,
++ ACX100_IOCTL_GET_SCAN_PARAMS,
++ ACX100_IOCTL_SET_PREAMB,
++ ACX100_IOCTL_GET_PREAMB,
++ ACX100_IOCTL_SET_ANT,
++ ACX100_IOCTL_GET_ANT,
++ ACX100_IOCTL_RX_ANT,
++ ACX100_IOCTL_TX_ANT,
++ ACX100_IOCTL_SET_PHY_AMP_BIAS,
++ ACX100_IOCTL_GET_PHY_CHAN_BUSY,
++ ACX100_IOCTL_SET_ED,
++ ACX100_IOCTL_GET__________UNUSED3,
++ ACX100_IOCTL_SET_CCA,
++ ACX100_IOCTL_GET__________UNUSED4,
++ ACX100_IOCTL_MONITOR,
++ ACX100_IOCTL_TEST,
++ ACX100_IOCTL_DBG_SET_MASKS,
++ ACX111_IOCTL_INFO,
++ ACX100_IOCTL_DBG_SET_IO,
++ ACX100_IOCTL_DBG_GET_IO
++};
++
++
++static const iw_handler acx_ioctl_private_handler[] =
++{
++#if ACX_DEBUG
++[ACX100_IOCTL_DEBUG - ACX100_IOCTL] = acx_ioctl_set_debug,
++#endif
++[ACX100_IOCTL_SET_PLED - ACX100_IOCTL] = acx100_ioctl_set_led_power,
++[ACX100_IOCTL_GET_PLED - ACX100_IOCTL] = acx100_ioctl_get_led_power,
++[ACX100_IOCTL_SET_RATES - ACX100_IOCTL] = acx_ioctl_set_rates,
++[ACX100_IOCTL_LIST_DOM - ACX100_IOCTL] = acx_ioctl_list_reg_domain,
++[ACX100_IOCTL_SET_DOM - ACX100_IOCTL] = acx_ioctl_set_reg_domain,
++[ACX100_IOCTL_GET_DOM - ACX100_IOCTL] = acx_ioctl_get_reg_domain,
++[ACX100_IOCTL_SET_SCAN_PARAMS - ACX100_IOCTL] = acx_ioctl_set_scan_params,
++[ACX100_IOCTL_GET_SCAN_PARAMS - ACX100_IOCTL] = acx_ioctl_get_scan_params,
++[ACX100_IOCTL_SET_PREAMB - ACX100_IOCTL] = acx_ioctl_set_short_preamble,
++[ACX100_IOCTL_GET_PREAMB - ACX100_IOCTL] = acx_ioctl_get_short_preamble,
++[ACX100_IOCTL_SET_ANT - ACX100_IOCTL] = acx_ioctl_set_antenna,
++[ACX100_IOCTL_GET_ANT - ACX100_IOCTL] = acx_ioctl_get_antenna,
++[ACX100_IOCTL_RX_ANT - ACX100_IOCTL] = acx_ioctl_set_rx_antenna,
++[ACX100_IOCTL_TX_ANT - ACX100_IOCTL] = acx_ioctl_set_tx_antenna,
++[ACX100_IOCTL_SET_PHY_AMP_BIAS - ACX100_IOCTL] = acx100_ioctl_set_phy_amp_bias,
++[ACX100_IOCTL_GET_PHY_CHAN_BUSY - ACX100_IOCTL] = acx_ioctl_get_phy_chan_busy_percentage,
++[ACX100_IOCTL_SET_ED - ACX100_IOCTL] = acx_ioctl_set_ed_threshold,
++[ACX100_IOCTL_SET_CCA - ACX100_IOCTL] = acx_ioctl_set_cca,
++[ACX100_IOCTL_MONITOR - ACX100_IOCTL] = acx_ioctl_wlansniff,
++[ACX100_IOCTL_TEST - ACX100_IOCTL] = acx_ioctl_unknown11,
++[ACX100_IOCTL_DBG_SET_MASKS - ACX100_IOCTL] = acx_ioctl_dbg_set_masks,
++[ACX111_IOCTL_INFO - ACX100_IOCTL] = acx111_ioctl_info,
++};
++
++
++static const struct iw_priv_args acx_ioctl_private_args[] = {
++#if ACX_DEBUG
++{ cmd : ACX100_IOCTL_DEBUG,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetDebug" },
++#endif
++{ cmd : ACX100_IOCTL_SET_PLED,
++ set_args : IW_PRIV_TYPE_BYTE | 2,
++ get_args : 0,
++ name : "SetLEDPower" },
++{ cmd : ACX100_IOCTL_GET_PLED,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 2,
++ name : "GetLEDPower" },
++{ cmd : ACX100_IOCTL_SET_RATES,
++ set_args : IW_PRIV_TYPE_CHAR | 256,
++ get_args : 0,
++ name : "SetRates" },
++{ cmd : ACX100_IOCTL_LIST_DOM,
++ set_args : 0,
++ get_args : 0,
++ name : "ListRegDomain" },
++{ cmd : ACX100_IOCTL_SET_DOM,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetRegDomain" },
++{ cmd : ACX100_IOCTL_GET_DOM,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ name : "GetRegDomain" },
++{ cmd : ACX100_IOCTL_SET_SCAN_PARAMS,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ get_args : 0,
++ name : "SetScanParams" },
++{ cmd : ACX100_IOCTL_GET_SCAN_PARAMS,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ name : "GetScanParams" },
++{ cmd : ACX100_IOCTL_SET_PREAMB,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetSPreamble" },
++{ cmd : ACX100_IOCTL_GET_PREAMB,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ name : "GetSPreamble" },
++{ cmd : ACX100_IOCTL_SET_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetAntenna" },
++{ cmd : ACX100_IOCTL_GET_ANT,
++ set_args : 0,
++ get_args : 0,
++ name : "GetAntenna" },
++{ cmd : ACX100_IOCTL_RX_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetRxAnt" },
++{ cmd : ACX100_IOCTL_TX_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetTxAnt" },
++{ cmd : ACX100_IOCTL_SET_PHY_AMP_BIAS,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetPhyAmpBias"},
++{ cmd : ACX100_IOCTL_GET_PHY_CHAN_BUSY,
++ set_args : 0,
++ get_args : 0,
++ name : "GetPhyChanBusy" },
++{ cmd : ACX100_IOCTL_SET_ED,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetED" },
++{ cmd : ACX100_IOCTL_SET_CCA,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetCCA" },
++{ cmd : ACX100_IOCTL_MONITOR,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
++ get_args : 0,
++ name : "monitor" },
++{ cmd : ACX100_IOCTL_TEST,
++ set_args : 0,
++ get_args : 0,
++ name : "Test" },
++{ cmd : ACX100_IOCTL_DBG_SET_MASKS,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
++ get_args : 0,
++ name : "DbgSetMasks" },
++{ cmd : ACX111_IOCTL_INFO,
++ set_args : 0,
++ get_args : 0,
++ name : "GetAcx111Info" },
++{ cmd : ACX100_IOCTL_DBG_SET_IO,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ get_args : 0,
++ name : "DbgSetIO" },
++{ cmd : ACX100_IOCTL_DBG_GET_IO,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3,
++ get_args : 0,
++ name : "DbgGetIO" },
++};
++
++
++const struct iw_handler_def acx_ioctl_handler_def =
++{
++ .num_standard = VEC_SIZE(acx_ioctl_handler),
++ .num_private = VEC_SIZE(acx_ioctl_private_handler),
++ .num_private_args = VEC_SIZE(acx_ioctl_private_args),
++ .standard = (iw_handler *) acx_ioctl_handler,
++ .private = (iw_handler *) acx_ioctl_private_handler,
++ .private_args = (struct iw_priv_args *) acx_ioctl_private_args,
++#if IW_HANDLER_VERSION > 5
++ .get_wireless_stats = acx_e_get_wireless_stats
++#endif /* IW > 5 */
++};
+Index: linux-2.6.23/drivers/net/wireless/acx/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/Kconfig 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,113 @@
++config ACX
++ tristate "TI acx100/acx111 802.11b/g wireless chipsets"
++ depends on NET_RADIO && EXPERIMENTAL
++ select FW_LOADER
++ ---help---
++ A driver for 802.11b/g wireless cards based on
++ Texas Instruments acx100 and acx111 chipsets.
++
++ This driver supports Host AP mode that allows
++ your computer to act as an IEEE 802.11 access point.
++ This driver is new and experimental.
++
++ Texas Instruments did not take part in development of this driver
++ in any way, shape or form.
++
++ The driver can be compiled as a module and will be named "acx".
++
++config ACX_PCI
++ bool "TI acx100/acx111 802.11b/g PCI"
++ depends on ACX && PCI
++ ---help---
++ Include PCI and CardBus support in acx.
++
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware may be in a form of single image 40-100kb in size
++ (a 'combined' firmware) or two images - main image
++ (again 40-100kb) and radio image (~10kb or less).
++
++ Firmware images are requested from hotplug using following names:
++
++ tiacx100 - main firmware image for acx100 chipset
++ tiacx100rNN - radio acx100 firmware for radio type NN
++ tiacx100cNN - combined acx100 firmware for radio type NN
++ tiacx111 - main acx111 firmware
++ tiacx111rNN - radio acx111 firmware for radio type NN
++ tiacx111cNN - combined acx111 firmware for radio type NN
++
++ Driver will attempt to load combined image first.
++ If no such image is found, it will try to load main image
++ and radio image instead.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_USB
++ bool "TI acx100/acx111 802.11b/g USB"
++ depends on ACX && (USB=y || USB=ACX)
++ ---help---
++ Include USB support in acx.
++
++ There is only one currently known device in this category,
++ D-Link DWL-120+, but newer devices seem to be on the horizon.
++
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware for USB device is requested from hotplug
++ by the 'tiacx100usb' name.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_MEM
++ bool "TI acx100/acx111 802.11b/g memory mapped slave 16 interface"
++ depends on ACX
++ ---help---
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware for USB device is requested from hotplug
++ by the 'tiacx100usb' name.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_CS
++ bool "TI acx100/acx111 802.11b/g cardbus interface"
++ depends on ACX
++ ---help---
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ This driver is based on memory mapped driver.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_HX4700
++ tristate "ACX support for the iPAQ hx4700 using ACX_MEM"
++ depends on HX4700_CORE && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the iPAQ hx4700.
++
++config ACX_HTCUNIVERSAL
++ tristate "ACX support for the HTC Universal using ACX_MEM"
++ depends on HTCUNIVERSAL_CORE && HTC_ASIC3 && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the HTC Universal.
++
++config ACX_HTCSABLE
++ tristate "ACX support for the HTC Sable (IPAQ hw6915) using ACX_MEM"
++ depends on MACH_HW6900 && HTC_ASIC3 && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the HTC Sable (IPAQ hw6915).
++
++config ACX_RX3000
++ tristate "ACX support for the iPAQ RX3000 using ACX_MEM"
++ depends on MACH_RX3715 && ACX_MEM && LEDS_ASIC3
++ ---help---
++ Include memory interface support in acx for the IPAQ RX3000.
++
+Index: linux-2.6.23/drivers/net/wireless/acx/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/Makefile 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,21 @@
++#obj-m += acx.o
++
++#acx-obj-y += pci.o
++#acx-obj-y += usb.o
++
++#acx-objs := wlan.o conv.o ioctl.o common.o $(acx-obj-y)
++
++# Use this if you have proper Kconfig integration:
++
++obj-$(CONFIG_ACX) += acx.o
++obj-$(CONFIG_ACX_HX4700) += hx4700_acx.o
++obj-$(CONFIG_ACX_HTCUNIVERSAL) += htcuniversal_acx.o
++obj-$(CONFIG_ACX_HTCSABLE) += htcsable_acx.o
++obj-$(CONFIG_ACX_RX3000) += rx3000_acx.o
++#
++acx-obj-$(CONFIG_ACX_PCI) += pci.o
++acx-obj-$(CONFIG_ACX_USB) += usb.o
++acx-obj-$(CONFIG_ACX_MEM) += mem.o
++acx-obj-$(CONFIG_ACX_CS) += cs.o
++#
++acx-objs := wlan.o conv.o ioctl.o common.o $(acx-obj-y)
+Index: linux-2.6.23/drivers/net/wireless/acx/mem.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/mem.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,5363 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++**
++** Slave memory interface support:
++**
++** Todd Blumer - SDG Systems
++** Bill Reese - HP
++** Eric McCorkle - Shadowsun
++*/
++#define ACX_MEM 1
++
++/*
++ * non-zero makes it dump the ACX memory to the console then
++ * panic when you cat /proc/driver/acx_wlan0_diag
++ */
++#define DUMP_MEM_DEFINED 1
++
++#define DUMP_MEM_DURING_DIAG 0
++#define DUMP_IF_SLOW 0
++
++#define PATCH_AROUND_BAD_SPOTS 1
++#define HX4700_FIRMWARE_CHECKSUM 0x0036862e
++#define HX4700_ALTERNATE_FIRMWARE_CHECKSUM 0x00368a75
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/irq.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/platform_device.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/delay.h>
++#include <linux/workqueue.h>
++#include <linux/inetdevice.h>
++
++#include "acx.h"
++#include "acx_hw.h"
++
++/***********************************************************************
++*/
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#include <asm/io.h>
++
++#define REG_ACX_VENDOR_ID 0x900
++/*
++ * This is the vendor id on the HX4700, anyway
++ */
++#define ACX_VENDOR_ID 0x8400104c
++
++typedef enum {
++ ACX_SOFT_RESET = 0,
++
++ ACX_SLV_REG_ADDR,
++ ACX_SLV_REG_DATA,
++ ACX_SLV_REG_ADATA,
++
++ ACX_SLV_MEM_CP,
++ ACX_SLV_MEM_ADDR,
++ ACX_SLV_MEM_DATA,
++ ACX_SLV_MEM_CTL,
++} acxreg_t;
++
++/***********************************************************************
++*/
++static void acxmem_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxmem_i_set_multicast_list(struct net_device *ndev);
++
++static int acxmem_e_open(struct net_device *ndev);
++static int acxmem_e_close(struct net_device *ndev);
++static void acxmem_s_up(struct net_device *ndev);
++static void acxmem_s_down(struct net_device *ndev);
++
++static void dump_acxmem (acx_device_t *adev, u32 start, int length);
++static int acxmem_complete_hw_reset (acx_device_t *adev);
++static void acxmem_s_delete_dma_regions(acx_device_t *adev);
++
++static struct platform_device *resume_pdev;
++
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend(struct platform_device *pdev, pm_message_t state);
++#else
++acxmem_e_suspend(struct device *pdev, u32 state);
++#endif
++static void
++fw_resumer(struct work_struct *notused);
++//fw_resumer( void *data );
++
++static int acx_netdev_event(struct notifier_block *this, unsigned long event, void *ptr)
++{
++ struct net_device *ndev = ptr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /*
++ * Upper level ioctl() handlers send a NETDEV_CHANGEADDR if the MAC address changes.
++ */
++
++ if (NETDEV_CHANGEADDR == event) {
++ /*
++ * the upper layers put the new MAC address in ndev->dev_addr; we just copy
++ * it over and update the ACX with it.
++ */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ adev->set_mask |= GETSET_STATION_ID;
++ acx_s_update_card_settings (adev);
++ }
++
++ return 0;
++}
++
++static struct notifier_block acx_netdev_notifier = {
++ .notifier_call = acx_netdev_event,
++};
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_id_register (acx_device_t *adev)
++{
++ writel (0x24, &adev->iobase[ACX_SLV_REG_ADDR]);
++ return readl (&adev->iobase[ACX_SLV_REG_DATA]);
++}
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++ u32 val;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readl(((u8*)adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ val = readl( &adev->iobase[ACX_SLV_REG_DATA] );
++
++ return val;
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ u16 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readw(((u8 *) adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u16 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return lo;
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ u8 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20)
++ return readb(((u8 *)adev->iobase) + addr);
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return (u8)lo;
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writel(val, ((u8*)adev->iobase) + addr);
++ return;
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writel( val, &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writew(val, ((u8 *)adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writew( val, (u16 *) &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writeb(val, ((u8 *) adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writeb( val, (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ (void) readl(adev->iobase);
++}
++
++INLINE_IO void
++set_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp | bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++INLINE_IO void
++clear_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp & ~bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++/*
++ * Copy from PXA memory to the ACX memory. This assumes both the PXA and ACX
++ * addresses are 32 bit aligned. Count is in bytes.
++ */
++INLINE_IO void
++write_slavemem32 (acx_device_t *adev, u32 slave_address, u32 val)
++{
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, val);
++}
++
++INLINE_IO u32
++read_slavemem32 (acx_device_t *adev, u32 slave_address)
++{
++ u32 val;
++
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ val = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++
++ return val;
++}
++
++INLINE_IO void
++write_slavemem8 (acx_device_t *adev, u32 slave_address, u8 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++INLINE_IO u8
++read_slavemem8 (acx_device_t *adev, u32 slave_address)
++{
++ u8 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xff;
++
++ return val;
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO void
++write_slavemem16 (acx_device_t *adev, u32 slave_address, u16 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xffff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO u16
++read_slavemem16 (acx_device_t *adev, u32 slave_address)
++{
++ u16 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xffff;
++
++ return val;
++}
++
++/*
++ * Copy from slave memory
++ *
++ * TODO - rewrite using address autoincrement, handle partial words
++ */
++void
++copy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count) {
++ u32 tmp = 0;
++ u8 *ptmp = (u8 *) &tmp;
++
++ /*
++ * Right now I'm making the assumption that the destination is aligned, but
++ * I'd better check.
++ */
++ if ((u32) destination & 3) {
++ printk ("acx copy_from_slavemem: warning! destination not word-aligned!\n");
++ }
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ *((u32 *) destination) = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If the word reads above didn't satisfy the count, read one more word
++ * and transfer a byte at a time until the request is satisfied.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *destination++ = *ptmp++;
++ }
++ }
++}
++
++/*
++ * Copy to slave memory
++ *
++ * TODO - rewrite using autoincrement, handle partial words
++ */
++void
++copy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 tmp = 0;
++ u8* ptmp = (u8 *) &tmp;
++ static u8 src[512]; /* make static to avoid huge stack objects */
++
++ /*
++ * For now, make sure the source is word-aligned by copying it to a word-aligned
++ * buffer. Someday rewrite to avoid the extra copy.
++ */
++ if (count > sizeof (src)) {
++ printk ("acx copy_to_slavemem: Warning! buffer overflow!\n");
++ count = sizeof (src);
++ }
++ memcpy (src, source, count);
++ source = src;
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, *((u32 *) source));
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If there are leftovers read the next word from the acx and merge in
++ * what they want to write.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *ptmp++ = *source++;
++ }
++ /*
++ * reset address in case we're currently in auto-increment mode
++ */
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, tmp);
++ udelay (10);
++ }
++
++}
++
++/*
++ * Block copy to slave buffers using memory block chain mode. Copies to the ACX
++ * transmit buffer structure with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) source;
++ static u8 aligned_source[WLAN_A4FR_MAXLEN_WEP_FCS];
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * This should never happen since we're in control of both, but I want to know about
++ * it if it does.
++ */
++ if ((destination & 0x00ffffe0) != destination) {
++ printk ("acx chaincopy: destination block 0x%04x not aligned!\n", destination);
++ }
++ if (count > sizeof aligned_source) {
++ printk( KERN_ERR "chaincopy_to_slavemem overflow!\n" );
++ count = sizeof aligned_source;
++ }
++ if ((u32) source & 3) {
++ memcpy (aligned_source, source, count);
++ data = (u32 *) aligned_source;
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = 2 << 16 | 1 << 2;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = destination & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (destination & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Write the data to the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ writel (*data++, &adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++}
++
++
++/*
++ * Block copy from slave buffers using memory block chain mode. Copies from the ACX
++ * receive buffer structures with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) destination;
++ static u8 aligned_destination[WLAN_A4FR_MAXLEN_WEP_FCS];
++ int saved_count = count;
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * Turns out the network stack sends unaligned things, so fix them before
++ * copying to the ACX.
++ */
++ if ((source & 0x00ffffe0) != source) {
++ printk ("acx chaincopy: source block 0x%04x not aligned!\n", source);
++ dump_acxmem (adev, 0, 0x10000);
++ }
++ if ((u32) destination & 3) {
++ //printk ("acx chaincopy: data destination not word aligned!\n");
++ data = (u32 *) aligned_destination;
++ if (count > sizeof aligned_destination) {
++ printk( KERN_ERR "chaincopy_from_slavemem overflow!\n" );
++ count = sizeof aligned_destination;
++ }
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = (2 << 16) | (1 << 2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = source & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (source & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Read the data from the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ *data++ = readl (&adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++
++ /*
++ * If the destination wasn't aligned, we would have saved it in
++ * the aligned buffer, so copy it where it should go.
++ */
++ if ((u32) destination & 3) {
++ memcpy (destination, aligned_destination, saved_count);
++ }
++}
++
++char
++printable (char c)
++{
++ return ((c >= 20) && (c < 127)) ? c : '.';
++}
++
++#if DUMP_MEM_DEFINED > 0
++static void
++dump_acxmem (acx_device_t *adev, u32 start, int length)
++{
++ int i;
++ u8 buf[16];
++
++ while (length > 0) {
++ printk ("%04x ", start);
++ copy_from_slavemem (adev, buf, start, 16);
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%02x ", buf[i]);
++ }
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%c", printable (buf[i]));
++ }
++ printk ("\n");
++ start += 16;
++ length -= 16;
++ }
++}
++#endif
++
++static void
++enable_acx_irq(acx_device_t *adev);
++static void
++disable_acx_irq(acx_device_t *adev);
++
++/*
++ * Return an acx pointer to the next transmit data block.
++ */
++u32
++allocate_acx_txbuf_space (acx_device_t *adev, int count) {
++ u32 block, next, last_block;
++ int blocks_needed;
++ unsigned long flags;
++
++ spin_lock_irqsave(&adev->txbuf_lock, flags);
++ /*
++ * Take 4 off the memory block size to account for the reserved word at the start of
++ * the block.
++ */
++ blocks_needed = count / (adev->memblocksize - 4);
++ if (count % (adev->memblocksize - 4))
++ blocks_needed++;
++
++ if (blocks_needed <= adev->acx_txbuf_blocks_free) {
++ /*
++ * Take blocks at the head of the free list.
++ */
++ last_block = block = adev->acx_txbuf_free;
++
++ /*
++ * Follow block pointers through the requested number of blocks both to
++ * find the new head of the free list and to set the flags for the blocks
++ * appropriately.
++ */
++ while (blocks_needed--) {
++ /*
++ * Keep track of the last block of the allocation
++ */
++ last_block = adev->acx_txbuf_free;
++
++ /*
++ * Make sure the end control flag is not set.
++ */
++ next = read_slavemem32 (adev, adev->acx_txbuf_free) & 0x7ffff;
++ write_slavemem32 (adev, adev->acx_txbuf_free, next);
++
++ /*
++ * Update the new head of the free list
++ */
++ adev->acx_txbuf_free = next << 5;
++ adev->acx_txbuf_blocks_free--;
++
++ }
++
++ /*
++ * Flag the last block both by clearing out the next pointer
++ * and marking the control field.
++ */
++ write_slavemem32 (adev, last_block, 0x02000000);
++
++ /*
++ * If we're out of buffers make sure the free list pointer is NULL
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ adev->acx_txbuf_free = 0;
++ }
++ }
++ else {
++ block = 0;
++ }
++ spin_unlock_irqrestore (&adev->txbuf_lock, flags);
++ return block;
++}
++
++/*
++ * Return buffer space back to the pool by following the next pointers until we find
++ * the block marked as the end. Point the last block to the head of the free list,
++ * then update the head of the free list to point to the newly freed memory.
++ * This routine gets called in interrupt context, so it shouldn't block to protect
++ * the integrity of the linked list. The ISR already holds the lock.
++ */
++void
++reclaim_acx_txbuf_space (acx_device_t *adev, u32 blockptr) {
++ u32 cur, last, next;
++ unsigned long flags;
++
++ spin_lock_irqsave (&adev->txbuf_lock, flags);
++ if ((blockptr >= adev->acx_txbuf_start) &&
++ (blockptr <= adev->acx_txbuf_start +
++ (adev->acx_txbuf_numblocks - 1) * adev->memblocksize)) {
++ cur = blockptr;
++ do {
++ last = cur;
++ next = read_slavemem32 (adev, cur);
++
++ /*
++ * Advance to the next block in this allocation
++ */
++ cur = (next & 0x7ffff) << 5;
++
++ /*
++ * This block now counts as free.
++ */
++ adev->acx_txbuf_blocks_free++;
++ } while (!(next & 0x02000000));
++
++ /*
++ * last now points to the last block of that allocation. Update the pointer
++ * in that block to point to the free list and reset the free list to the
++ * first block of the free call. If there were no free blocks, make sure
++ * the new end of the list marks itself as truly the end.
++ */
++ if (adev->acx_txbuf_free) {
++ write_slavemem32 (adev, last, adev->acx_txbuf_free >> 5);
++ }
++ else {
++ write_slavemem32 (adev, last, 0x02000000);
++ }
++ adev->acx_txbuf_free = blockptr;
++ }
++ spin_unlock_irqrestore(&adev->txbuf_lock, flags);
++}
++
++/*
++ * Initialize the pieces managing the transmit buffer pool on the ACX. The transmit
++ * buffer is a circular queue with one 32 bit word reserved at the beginning of each
++ * block. The upper 13 bits are a control field, of which only 0x02000000 has any
++ * meaning. The lower 19 bits are the address of the next block divided by 32.
++ */
++void
++init_acx_txbuf (acx_device_t *adev) {
++
++ /*
++ * acx100_s_init_memory_pools set up txbuf_start and txbuf_numblocks for us.
++ * All we need to do is reset the rest of the bookeeping.
++ */
++
++ adev->acx_txbuf_free = adev->acx_txbuf_start;
++ adev->acx_txbuf_blocks_free = adev->acx_txbuf_numblocks;
++
++ /*
++ * Initialization leaves the last transmit pool block without a pointer back to
++ * the head of the list, but marked as the end of the list. That's how we want
++ * to see it, too, so leave it alone. This is only ever called after a firmware
++ * reset, so the ACX memory is in the state we want.
++ */
++
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxmem_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxmem_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxmem_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxmem_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ int count;
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++ fail:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxmem_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxmem_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size, checkMismatch = -1;
++ u32 sum, v32, tmp, id;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++#endif
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ write_flush(adev);
++#endif
++ write_slavemem32 (adev, offset + len - 4, v32);
++
++ id = read_id_register (adev);
++
++ /*
++ * check the data written
++ */
++ tmp = read_slavemem32 (adev, offset + len - 4);
++ if (checkMismatch && (tmp != v32)) {
++ printk ("first data mismatch at 0x%08x good 0x%08x bad 0x%08x id 0x%08x\n",
++ offset + len - 4, v32, tmp, id);
++ checkMismatch = 0;
++ }
++ }
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxmem_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxmem_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ udelay(10);
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++#endif
++ w32 = read_slavemem32 (adev, offset + len - 4);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match\n(0x%08X vs. 0x%08X)!\n"
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxmem_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char *filename = "WLANGEN.BIN";
++#ifdef PATCH_AROUND_BAD_SPOTS
++ u32 offset;
++ int i;
++ /*
++ * arm-linux-objdump -d patch.bin, or
++ * od -Ax -t x4 patch.bin after finding the bounds
++ * of the .text section with arm-linux-objdump -s patch.bin
++ */
++ u32 patch[] = {
++ 0xe584c030, 0xe59fc008,
++ 0xe92d1000, 0xe59fc004, 0xe8bd8000, 0x0000080c,
++ 0x0000aa68, 0x605a2200, 0x2c0a689c, 0x2414d80a,
++ 0x2f00689f, 0x1c27d007, 0x06241e7c, 0x2f000e24,
++ 0xe000d1f6, 0x602e6018, 0x23036468, 0x480203db,
++ 0x60ca6003, 0xbdf0750a, 0xffff0808
++ };
++#endif
++
++ FN_ENTER;
++ /* No combined image; tell common we need the radio firmware, too */
++ adev->need_radio_fw = 1;
++
++ fw_image = acx_s_read_fw(adev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++#ifdef PATCH_AROUND_BAD_SPOTS
++ /*
++ * Only want to do this if the firmware is exactly what we expect for an
++ * iPaq 4700; otherwise, bad things would ensue.
++ */
++ if ((HX4700_FIRMWARE_CHECKSUM == fw_image->chksum) ||
++ (HX4700_ALTERNATE_FIRMWARE_CHECKSUM == fw_image->chksum)) {
++ /*
++ * Put the patch after the main firmware image. 0x950c contains
++ * the ACX's idea of the end of the firmware. Use that location to
++ * load ours (which depends on that location being 0xab58) then
++ * update that location to point to after ours.
++ */
++
++ offset = read_slavemem32 (adev, 0x950c);
++
++ log (L_DEBUG, "acx: patching in at 0x%04x\n", offset);
++
++ for (i = 0; i < sizeof(patch) / sizeof(patch[0]); i++) {
++ write_slavemem32 (adev, offset, patch[i]);
++ offset += sizeof(u32);
++ }
++
++ /*
++ * Patch the instruction at 0x0804 to branch to our ARM patch at 0xab58
++ */
++ write_slavemem32 (adev, 0x0804, 0xea000000 + (0xab58-0x0804-8)/4);
++
++ /*
++ * Patch the instructions at 0x1f40 to branch to our Thumb patch at 0xab74
++ *
++ * 4a00 ldr r2, [pc, #0]
++ * 4710 bx r2
++ * .data 0xab74+1
++ */
++ write_slavemem32 (adev, 0x1f40, 0x47104a00);
++ write_slavemem32 (adev, 0x1f44, 0x0000ab74+1);
++
++ /*
++ * Bump the end of the firmware up to beyond our patch.
++ */
++ write_slavemem32 (adev, 0x950c, offset);
++
++ }
++#endif
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxmem_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("RADIONN.BIN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "RADIO%02x.BIN",
++ adev->radio_type);
++ radio_image = acx_s_read_fw(adev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++/***********************************************************************
++** acxmem_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxmem_l_reset_mac(acx_device_t *adev)
++{
++ int count;
++ FN_ENTER;
++
++ /* halt eCPU */
++ set_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++
++ /* now do soft reset of eCPU, set bit */
++ set_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++
++ /* Windows driver sleeps here for a while with this sequence */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ clear_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++
++ /* now start a burst read from initial EEPROM */
++ set_regbits (adev, IO_ACX_EE_START, 0x1);
++
++ /*
++ * Windows driver sleeps here for a while with this sequence
++ */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* Windows driver writes 0x10000 to register 0x808 here */
++
++ write_reg32 (adev, 0x808, 0x10000);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_verify_init
++*/
++static int
++acxmem_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u32 irqstat = read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if ((irqstat != 0xFFFFFFFF) && (irqstat & HOST_INT_FCS_THRESHOLD)) {
++ result = OK;
++ write_reg32(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxmem_write_cmd_type_status
++*/
++
++static inline void
++acxmem_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ write_slavemem32 (adev, (u32) adev->cmd_area, type | (status << 16));
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxmem_read_cmd_type_status
++*/
++static u32
++acxmem_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = read_slavemem32 (adev, (u32) adev->cmd_area);
++
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxmem_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxmem_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8*) cmd_offs;
++ adev->info_area = (u8*) info_offs;
++ /*
++ log(L_DEBUG, "iobase2=%p\n"
++ */
++ log( L_DEBUG, "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxmem_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++static int
++acxmem_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++ u32 tmp;
++
++ FN_ENTER;
++ /*
++ write_reg32 (adev, IO_ACX_SLV_MEM_CP, 0);
++ */
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ /* Windows driver does some funny things here */
++ /*
++ * clear bit 0x200 in register 0x2A0
++ */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /*
++ * Set bit 0x200 in ACX_GPIO_OUT
++ */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++
++ /*
++ * read register 0x900 until its value is 0x8400104C, sleeping
++ * in between reads if it's not immediate
++ */
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ count = 500;
++ while (count-- && (tmp != ACX_VENDOR_ID)) {
++ mdelay (10);
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ }
++
++ /* end what Windows driver does */
++
++ acxmem_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg32(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++ printk("ACX radio type 0x%02x\n", (hardware_info >> 8) & 0xff);
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxmem_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ clear_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* Windows driver clears bit 0x200 in register 0x2A0 here */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /* Windows driver sets bit 0x200 in ACX_GPIO_OUT here */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++ /* wait for eCPU bootup */
++ if (OK != acxmem_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++ init_mboxes(adev);
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxmem_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxmem_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ int i, j;
++ u8 *p;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxmem_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++#if DUMP_IF_SLOW > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("not idle");
++#endif
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /*
++ * slave memory version
++ */
++ copy_to_slavemem (adev, (u32) (adev->cmd_area + 4), buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxmem_write_cmd_type_status(adev, cmd, 0);
++
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxmem_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ printk("%s: "FUNC"(): device irq status 0x%04x\n",
++ devname, read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES));
++ printk("%s: "FUNC"(): IO_ACX_IRQ_MASK 0x%04x IO_ACX_FEMR 0x%04x\n",
++ devname,
++ read_reg16 (adev, IO_ACX_IRQ_MASK),
++ read_reg16 (adev, IO_ACX_FEMR));
++ if (read_reg16 (adev, IO_ACX_IRQ_MASK) == 0xffff) {
++ printk ("acxmem: firmware probably hosed - reloading\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ {
++ pm_message_t state;
++ acxmem_e_suspend (resume_pdev, state);
++ }
++#else
++ acxmem_e_suspend (adev->dev, 0);
++#endif
++ {
++ struct work_struct *notused;
++ fw_resumer (notused);
++ }
++ }
++
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buflen > 388) {
++ /*
++ * 388 is maximum command length
++ */
++ printk ("invalid length 0x%08x\n", buflen);
++ buflen = 388;
++ }
++ p = (u8 *) buffer;
++ for (i = 0; i < buflen; i+= 16) {
++ printk ("%04x:", i);
++ for (j = 0; (j < 16) && (i+j < buflen); j++) {
++ printk (" %02x", *p++);
++ }
++ printk ("\n");
++ }
++
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ copy_from_slavemem (adev, buffer, (u32) (adev->cmd_area + 4), buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#if defined(NONESSENTIAL_FEATURES)
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxmem_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++/***********************************************************************
++** acxmem_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++void
++acxmem_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ kfree(ptr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_delete_dma_regions
++*/
++static void
++acxmem_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ /*
++ * slave memory interface really doesn't like this.
++ */
++ /*
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++ */
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxmem_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_MEM_CP */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++/*
++ * Most of the acx specific pieces of hardware reset.
++ */
++static int
++acxmem_complete_hw_reset (acx_device_t *adev)
++{
++ acx111_ie_configoption_t co;
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxmem_s_reset_dev (adev))
++ return -1;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ copy_from_slavemem (adev, (u8*) &co, (u32) adev->cmd_area, sizeof (co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ return -3;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++ /*
++ * Set up transmit buffer administration
++ */
++ init_acx_txbuf (adev);
++
++ /*
++ * Windows driver writes 0x01000000 to register 0x288, RADIO_CTL, if the form factor
++ * is 3. It also write protects the EEPROM by writing 1<<9 to GPIO_OUT
++ */
++ if (adev->form_factor == 3) {
++ set_regbits (adev, 0x288, 0x01000000);
++ set_regbits (adev, 0x298, 1<<9);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxmem_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ return -2;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ return 0;
++}
++
++static int __devinit
++acxmem_e_probe(struct platform_device *pdev)
++{
++ struct acx_hardware_data *hwdata = pdev->dev.platform_data;
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ int i;
++ unsigned long addr_size=0;
++ u8 chip_type;
++
++ FN_ENTER;
++ (void) hwdata->start_hw();
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = CHIPTYPE_ACX100;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ printk("acx: found %s-based wireless network card\n", chip_name);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ goto fail_alloc_netdev;
++ }
++
++ platform_set_drvdata (pdev, ndev);
++
++ ether_setup(ndev);
++
++ /*
++ * use platform_data resources that were provided
++ */
++ ndev->irq = 0;
++ for (i=0; i<pdev->num_resources; i++) {
++ if (pdev->resource[i].flags == IORESOURCE_IRQ) {
++ ndev->irq = pdev->resource[i].start;
++ }
++ else if (pdev->resource[i].flags == IORESOURCE_MEM) {
++ ndev->base_addr = pdev->resource[i].start;
++ addr_size = pdev->resource[i].end - pdev->resource[i].start;
++ }
++ }
++ if (addr_size == 0 || ndev->irq == 0)
++ goto fail_hw_params;
++ ndev->open = &acxmem_e_open;
++ ndev->stop = &acxmem_e_close;
++ pdev->dev.release = &acxmem_e_release;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxmem_i_set_multicast_list;
++ ndev->tx_timeout = &acxmem_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ spin_lock_init(&adev->txbuf_lock);
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->dev = &pdev->dev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_MEM;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = (volatile u32 *) ndev->base_addr;
++ adev->iobase = (volatile u32 *) ioremap_nocache (ndev->base_addr, addr_size);
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#if defined(NONESSENTIAL_FEATURES)
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ SET_NETDEV_DEV(ndev, &pdev->dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", ndev->irq);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ if (OK != acxmem_complete_hw_reset (adev))
++ goto fail_reset;
++
++ /*
++ * Set up default things for most of the card settings.
++ */
++ acx_s_set_defaults(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /*
++ * Set up a default monitor type so that poor combinations of initialization
++ * sequences in monitor mode don't end up destroying the hardware type.
++ */
++ adev->monitor_type = ARPHRD_ETHER;
++
++ /*
++ * Register to receive inetaddr notifier changes. This will allow us to
++ * catch if the user changes the MAC address of the interface.
++ */
++ register_netdevice_notifier(&acx_netdev_notifier);
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxmem_s_delete_dma_regions(adev);
++
++fail_reset:
++fail_hw_params:
++ free_netdev(ndev);
++fail_alloc_netdev:
++fail_unknown_chiptype:
++
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static int __devexit
++acxmem_e_remove(struct platform_device *pdev)
++{
++ struct acx_hardware_data *hwdata = pdev->dev.platform_data;
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = (struct net_device*) platform_get_drvdata(pdev);
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxmem_l_power_led(adev, 0);
++
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxmem_l_reset_mac(adev);
++ } else {
++ u16 temp;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++
++ /*
++ * Unregister the notifier chain
++ */
++ unregister_netdevice_notifier(&acx_netdev_notifier);
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxmem_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxmem_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ acxmem_s_delete_dma_regions(adev);
++
++ /* finally, clean up PCI bus state */
++ if (adev->iobase) iounmap((void *)adev->iobase);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ (void) hwdata->stop_hw();
++
++ printk ("e_remove done\n");
++end:
++ FN_EXIT0;
++
++ return 0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend(struct platform_device *pdev, pm_message_t state)
++#else
++acxmem_e_suspend(struct device *pdev, u32 state)
++#endif
++{
++ struct net_device *ndev = platform_get_drvdata(pdev);
++ acx_device_t *adev;
++ struct acx_hardware_data *hwdata;
++
++ FN_ENTER;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ hwdata = adev->dev->platform_data;
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(ndev); /* this one cannot sleep */
++ acxmem_s_down(ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxmem_s_delete_dma_regions(adev);
++
++ /*
++ * Turn the ACX chip off.
++ */
++ hwdata->stop_hw();
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++
++static void
++fw_resumer(struct work_struct *notused)
++{
++ struct platform_device *pdev = resume_pdev;
++ struct net_device *ndev = platform_get_drvdata(pdev);
++ acx_device_t *adev;
++ struct acx_hardware_data *hwdata;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ return;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ hwdata = adev->dev->platform_data;
++
++ /*
++ * Turn on the ACX.
++ */
++ hwdata->start_hw();
++
++ acxmem_complete_hw_reset (adev);
++
++ /*
++ * done by acx_s_set_defaults for initial startup
++ */
++ acxmem_set_interrupt_mask(adev);
++
++ printk ("rsm: bringing up interface\n");
++ SET_BIT (adev->set_mask, GETSET_ALL);
++ acxmem_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-)
++ */
++ /* - most settings updated in acxmem_s_up()
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ */
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++ acx_sem_unlock(adev);
++}
++
++DECLARE_WORK( fw_resume_work, fw_resumer );
++
++static int
++acxmem_e_resume(struct platform_device *pdev)
++{
++ FN_ENTER;
++
++ resume_pdev = pdev;
++ schedule_work( &fw_resume_work );
++
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxmem_s_up
++**
++** This function is called by acxmem_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_down
++**
++** This disables the netdevice
++**
++** Side effects:
++** - disables on-card interrupt request
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxmem_i_interrupt, SA_INTERRUPT, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ set_irq_type (ndev->irq, IRQT_FALLING);
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++
++ /* ifup device */
++ acxmem_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxmem_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxmem_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxmem_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxmem_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxmem_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxmem_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxmem_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ register rxdesc_t *rxdesc;
++ unsigned count, tail;
++ u32 addr;
++ u8 Ctl_8;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ /*
++ * Unlike the PCI interface, where the ACX can write directly to
++ * the host descriptors, on the slave memory interface we have to
++ * pull these. All we really need to do is check the Ctl_8 field
++ * in the rx descriptor on the ACX, which should be 0x11000000 if
++ * we should process it.
++ */
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_HOSTOWN) &&
++ (Ctl_8 & DESC_CTL_ACXDONE))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_8=%02X\n", tail, Ctl_8);
++ /*
++ * If the ACX has CTL_RECLAIM set on this descriptor there
++ * is no buffer associated; it just wants us to tell it to
++ * reclaim the memory.
++ */
++ if (!(Ctl_8 & DESC_CTL_RECLAIM)) {
++
++ /*
++ * slave interface - pull data now
++ */
++ hostdesc->length = read_slavemem16 (adev, (u32) &(rxdesc->total_length));
++
++ /*
++ * hostdesc->data is an rxbuffer_t, which includes header information,
++ * but the length in the data packet doesn't. The header information
++ * takes up an additional 12 bytes, so add that to the length we copy.
++ */
++ addr = read_slavemem32 (adev, (u32) &(rxdesc->ACXMemPtr));
++ if (addr) {
++ /*
++ * How can &(rxdesc->ACXMemPtr) above ever be zero? Looks like we
++ * get that now and then - try to trap it for debug.
++ */
++ if (addr & 0xffff0000) {
++ printk("rxdesc 0x%08x\n", (u32) rxdesc);
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("Bad access!");
++ }
++ chaincopy_from_slavemem (adev, (u8 *) hostdesc->data, addr,
++ hostdesc->length +
++ (u32) &((rxbuffer_t *)0)->hdr_a3);
++ acx_l_process_rxbuf(adev, hostdesc->data);
++ }
++ }
++ else {
++ printk ("rx reclaim only!\n");
++ }
++
++ hostdesc->Status = 0;
++
++ /*
++ * Let the ACX know we're done.
++ */
++ CLEAR_BIT (Ctl_8, DESC_CTL_HOSTOWN);
++ SET_BIT (Ctl_8, DESC_CTL_HOSTDONE);
++ SET_BIT (Ctl_8, DESC_CTL_RECLAIM);
++ write_slavemem8 (adev, (u32) &rxdesc->Ctl_8, Ctl_8);
++
++ /*
++ * Now tell the ACX we've finished with the receive buffer so
++ * it can finish the reclaim.
++ */
++ write_reg16 (adev, IO_ACX_INT_TRIG, INT_TRIG_RXPRC);
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++
++ /* if next descriptor is empty, then bail out */
++ if (!(Ctl_8 & DESC_CTL_HOSTOWN) || !(Ctl_8 & DESC_CTL_ACXDONE))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = read_slavemem32 (adev, (u32) adev->info_area);
++
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ write_slavemem32(adev, (u32) adev->info_area, info_type | 0x00010000);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ printk(" Rx_Complete");
++ }
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxmem_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxmem_i_interrupt(int irq, void *dev_id)
++#else
++acxmwm_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_DATA) {
++ log(L_IRQ, "got Rx_Data IRQ\n");
++ acxmem_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxmem_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxmem_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ /* | HOST_INT_RX_DATA */
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ | HOST_INT_RX_COMPLETE
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxmem_l_power_led
++*/
++void
++acxmem_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ printk ("Interrogating queue config\n");
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++ printk ("done with queue config\n");
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ printk ("Interrogating mem config options\n");
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++ printk ("done with mem config options\n");
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ printk ("Interrogating mem map\n");
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++ printk ("done with mem map\n");
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ printk ("Interrogating rxconfig\n");
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++ printk ("done with queue rxconfig\n");
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ printk ("Interrogating fcs err count\n");
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++ printk ("done with err count\n");
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ printk ("Interrogating rate fallback\n");
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++ printk ("done with rate fallback\n");
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++/***************************************************************
++** acxmem_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxmem_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++ static int txattempts = 0;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ /*
++ * Probably the ACX ignored a transmit attempt and now there's a packet
++ * sitting in the queue we think should be transmitting but the ACX doesn't
++ * know about.
++ * On the first pass, send the ACX a TxProc interrupt to try moving
++ * things along, and if that doesn't work (ie, we get called again) completely
++ * flush the transmit queue.
++ */
++ if (txattempts < 10) {
++ txattempts++;
++ printk ("acx: trying to wake up ACX\n");
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev); }
++ else {
++ txattempts = 0;
++ printk ("acx: flushing transmit queue.\n");
++ acxmem_l_clean_txdesc_emergency (adev);
++ }
++ txdesc = NULL;
++ goto end;
++ }
++
++ /*
++ * Make a quick check to see if there is transmit buffer space on
++ * the ACX. This can't guarantee there is enough space for the packet
++ * since we don't yet know how big it is, but it will prevent at least some
++ * annoyances.
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ /*
++ * txdesc points to ACX memory
++ */
++ txdesc = get_txdesc(adev, head);
++ ctl8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++
++ /*
++ * If we don't own the buffer (HOSTOWN) it is certainly not free; however,
++ * we may have previously thought we had enough memory to send
++ * a packet, allocated the buffer then gave up when we found not enough
++ * transmit buffer space on the ACX. In that case, HOSTOWN and
++ * ACXDONE will both be set.
++ */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_ACXDONE_HOSTOWN);
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***************************************************************
++** acxmem_l_dealloc_tx
++** Clears out a previously allocatedvoid acxmem_l_dealloc_tx(tx_t *tx_opaque);
++ transmit descriptor. The ACX
++** can get confused if we skip transmit descriptors in the queue,
++** so when we don't need a descriptor return it to its original
++** state and move the queue head pointer back.
++**
++*/
++void
++acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++ /*
++ * txdesc is the address of the descriptor on the ACX.
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txdesc_t tmptxdesc;
++ int index;
++
++ memset (&tmptxdesc, 0, sizeof(tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ /*
++ * Clear out all of the transmit descriptor except for the next pointer
++ */
++ copy_to_slavemem (adev, (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc));
++
++ /*
++ * This is only called immediately after we've allocated, so we should
++ * be able to set the head back to this descriptor.
++ */
++ index = ((u8*) txdesc - (u8*)adev->txdesc_start) / adev->txdesc_size;
++ printk ("acx_dealloc: moving head from %d to %d\n", adev->tx_head, index);
++ adev->tx_head = index;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxmem_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxmem_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxmem_update_queue_indicator (acx_device_t *adev, int txqueue)
++{
++#ifdef USING_MORE_THAN_ONE_TRANSMIT_QUEUE
++ u32 indicator;
++ unsigned long flags;
++ int count;
++
++ /*
++ * Can't handle an interrupt while we're fiddling with the ACX's lock,
++ * according to TI. The ACX is supposed to hold fw_lock for at most
++ * 500ns.
++ */
++ local_irq_save (flags);
++
++ /*
++ * Wait for ACX to release the lock (at most 500ns).
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++ if (count < 50) {
++
++ /*
++ * Take out the host lock - anything non-zero will work, so don't worry about
++ * be/le
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 1);
++
++ /*
++ * Avoid a race condition
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++
++ if (count < 50) {
++ /*
++ * Mark the queue active
++ */
++ indicator = read_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator));
++ indicator |= cpu_to_le32 (1 << txqueue);
++ write_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator), indicator);
++ }
++
++ /*
++ * Release the host lock
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 0);
++
++ }
++
++ /*
++ * Restore interrupts
++ */
++ local_irq_restore (flags);
++#endif
++}
++
++void
++acxmem_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ /*
++ * txdesc is the address on the ACX
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++ u32 addr;
++
++ FN_ENTER;
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), cpu_to_le16(len));
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ write_slavemem8 (adev, (u32) &(txdesc->u.r1.rate), rate_100);
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_FIRSTFRAG);
++
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++
++ /*
++ * Since we're not using autodma copy the packet data to the acx now.
++ * Even host descriptors point to the packet header, and the odd indexed
++ * descriptor following points to the packet data.
++ *
++ * The first step is to find free memory in the ACX transmit buffers.
++ * They don't necessarily map one to one with the transmit queue entries,
++ * so search through them starting just after the last one used.
++ */
++ addr = allocate_acx_txbuf_space (adev, len);
++ if (addr) {
++ chaincopy_to_slavemem (adev, addr, hostdesc1->data, len);
++ }
++ else {
++ /*
++ * Bummer. We thought we might have enough room in the transmit
++ * buffers to send this packet, but it turns out we don't. alloc_tx
++ * has already marked this transmit descriptor as HOSTOWN and ACXDONE,
++ * which means the ACX will hang when it gets to this descriptor unless
++ * we do something about it. Having a bubble in the transmit queue just
++ * doesn't seem to work, so we have to reset this transmit queue entry's
++ * state to its original value and back up our head pointer to point
++ * back to this entry.
++ */
++ hostdesc1->length = 0;
++ hostdesc2->length = 0;
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG);
++ adev->tx_head = ((u8*) txdesc - (u8*) adev->txdesc_start) / adev->txdesc_size;
++ goto end;
++ }
++ /*
++ * Tell the ACX where the packet is.
++ */
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), addr);
++
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ //wmb();
++
++ /* write back modified flags */
++ /*
++ * At this point Ctl_8 should just be FIRSTFRAG
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl2_8),Ctl2_8);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), Ctl_8);
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /*
++ * Update the queue indicator to say there's data on the first queue.
++ */
++ acxmem_update_queue_indicator (adev, 0);
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate)),
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u8 Ctl_8;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ printk(" %02X", Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxmem_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100, Ctl_8;
++ u32 acxmem;
++ txdesc_t tmptxdesc;
++
++ FN_ENTER;
++
++ /*
++ * Set up a template descriptor for re-initialization. The only
++ * things that get set are Ctl_8 and the rate, and the rate defaults
++ * to 1Mbps.
++ */
++ memset (&tmptxdesc, 0, sizeof (tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = read_slavemem8 (adev, (u32) &(txdesc->error));
++ ack_failures = read_slavemem8 (adev, (u32) &(txdesc->ack_failures));
++ rts_failures = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures));
++ rts_ok = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok));
++ r100 = read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate));
++ r111 = le16_to_cpu(read_slavemem16 (adev, (u32) &(txdesc->u.r2.rate111)));
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /*
++ * Free up the transmit data buffers
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ /* ...and free the desc by clearing all the fields
++ except the next pointer */
++ copy_to_slavemem (adev,
++ (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc)
++ );
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxmem_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u32 acxmem;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ write_slavemem8 (adev, (u32) &(txdesc->ack_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->error), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN);
++
++ /*
++ * Clean up the memory allocated on the ACX for this transmit descriptor.
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), 0);
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++ ptr = kmalloc (size, GFP_KERNEL);
++ /*
++ * The ACX can't use the physical address, so we'll have to fake it
++ * later and it might be handy to have the virtual address.
++ */
++ *phy = (dma_addr_t) NULL;
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++/*
++ * In the generic slave memory access mode, most of the stuff in
++ * the txhostdesc_t is unused. It's only here because the rest of
++ * the ACX driver expects it to be since the PCI version uses indirect
++ * host memory organization with DMA. Since we're not using DMA the
++ * only use we have for the host descriptors is to store the packets
++ * on the way out.
++ */
++static int
++acxmem_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ txbuf = adev->txbuf_start;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxmem_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ hostdesc = adev->rxhostdesc_start;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ rxbuf++;
++ hostdesc++;
++ }
++ hostdesc--;
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_hostdesc_queues
++*/
++int
++acxmem_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxmem_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxmem_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxmem_create_tx_desc_queue
++*/
++static void
++acxmem_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ u32 clr;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ /*
++ * This refers to an ACX address, not one of ours
++ */
++ adev->txdesc_start = (txdesc_t *) tx_queue_start;
++
++ log(L_DEBUG, "adev->txdesc_start=%p\n",
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++
++ /*
++ * adev->txdesc_start refers to device memory, so we can't write
++ * directly to it.
++ */
++ clr = (u32) adev->txdesc_start;
++ while (clr < (u32) adev->txdesc_start + (TX_CNT * sizeof(*txdesc))) {
++ write_slavemem32 (adev, clr, 0);
++ clr += 4;
++ }
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* initialise ctl */
++ /*
++ * No auto DMA here
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8),
++ (u8) (DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG));
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++
++ /* point to next txdesc */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) txdesc + adev->txdesc_size));
++
++ /* go to the next one */
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 (tx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_rx_desc_queue
++*/
++static void
++acxmem_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) rx_queue_start;
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ acx2cpu(rxdesc->pNextDesc);
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ mem_offs = (u32) adev->rxdesc_start;
++ while (mem_offs < (u32) adev->rxdesc_start + (RX_CNT * sizeof (*rxdesc))) {
++ write_slavemem32 (adev, mem_offs, 0);
++ mem_offs += 4;
++ }
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ /* point to next rxdesc */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) rxdesc + sizeof(*rxdesc)));
++ /* go to the next one */
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 (rx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_desc_queues
++*/
++void
++acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ u32 *p;
++ int i;
++
++ acxmem_create_tx_desc_queue(adev, tx_queue_start);
++ acxmem_create_rx_desc_queue(adev, rx_queue_start);
++ p = (u32 *) adev->acx_queue_indicator;
++ for (i = 0; i < 4; i++) {
++ write_slavemem32 (adev, (u32) p, 0);
++ p++;
++ }
++}
++
++
++/***************************************************************
++** acxmem_s_proc_diag_output
++*/
++char*
++acxmem_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ txdesc_t *txdesc;
++ u8 Ctl_8;
++ rxdesc_t *rxdesc;
++ int i;
++ u32 tmp;
++ txdesc_t txd;
++ u8 buf[0x200];
++ int j, k;
++
++ FN_ENTER;
++
++#if DUMP_MEM_DURING_DIAG > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("dump finished");
++#endif
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxdesc = adev->rxdesc_start;
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ Ctl_8 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u (%02x) FULL%s\n", i, Ctl_8, rtl);
++ else
++ p += sprintf(p, "%02u (%02x) empty%s\n", i, Ctl_8, rtl);
++ rxdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++
++ p += sprintf(p, "** Tx buf %d blocks total, %d available, free list head %04x\n",
++ adev->acx_txbuf_numblocks, adev->acx_txbuf_blocks_free, adev->acx_txbuf_free);
++ txdesc = adev->txdesc_start;
++ if (txdesc) {
++ for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ copy_from_slavemem (adev, (u8 *) &txd, (u32) txdesc, sizeof (txd));
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u ready to free (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u available (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u busy (%02X)%s%s", i, Ctl_8, thd, ttl);
++ tmp = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (tmp) {
++ p += sprintf (p, " %04x", tmp);
++ while ((tmp = read_slavemem32 (adev, (u32) tmp)) != 0x02000000) {
++ tmp <<= 5;
++ p += sprintf (p, " %04x", tmp);
++ }
++ }
++ p += sprintf (p, "\n");
++ p += sprintf (p, " %04x: %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %02x %02x %02x %02x\n"
++ "%02x %02x %02x %02x %04x\n",
++ (u32) txdesc,
++ txd.pNextDesc.v, txd.HostMemPtr.v, txd.AcxMemPtr.v, txd.tx_time,
++ txd.total_length, txd.Reserved,
++ txd.dummy[0], txd.dummy[1], txd.dummy[2], txd.dummy[3],
++ txd.Ctl_8, txd.Ctl2_8, txd.error, txd.ack_failures,
++ txd.u.rts.rts_failures, txd.u.rts.rts_ok, txd.u.r1.rate, txd.u.r1.queue_ctrl,
++ txd.queue_info
++ );
++ if (txd.AcxMemPtr.v) {
++ copy_from_slavemem (adev, buf, txd.AcxMemPtr.v, sizeof (buf));
++ for (j = 0; (j < txd.total_length) && (j<(sizeof(buf)-4)); j+=16) {
++ p += sprintf (p, " ");
++ for (k = 0; (k < 16) && (j+k < txd.total_length); k++) {
++ p += sprintf (p, " %02x", buf[j+k+4]);
++ }
++ p += sprintf (p, "\n");
++ }
++ }
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ }
++
++ p += sprintf(p,
++ "\n"
++ "** Generic slave data **\n"
++ "irq_mask 0x%04x irq_status 0x%04x irq on acx 0x%04x\n"
++ "txbuf_start 0x%p, txbuf_area_size %u\n"
++ "txdesc_size %u, txdesc_start 0x%p\n"
++ "txhostdesc_start 0x%p, txhostdesc_area_size %u\n"
++ "txbuf start 0x%04x, txbuf size %d\n"
++ "rxdesc_start 0x%p\n"
++ "rxhostdesc_start 0x%p, rxhostdesc_area_size %u\n"
++ "rxbuf_start 0x%p, rxbuf_area_size %u\n",
++ adev->irq_mask, adev->irq_status, read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES),
++ adev->txbuf_start, adev->txbuf_area_size,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ adev->acx_txbuf_start, adev->acx_txbuf_numblocks * adev->memblocksize,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ adev->rxbuf_start, adev->rxbuf_area_size);
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxmem_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxmem_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_OVERFLOW
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_BEACON_MISSED */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ /*
++ * The hx4700 EEPROM, at least, only supports 1 power setting. The configure
++ * routine matches the PA bias with the gain, so just use its default value.
++ * The values are: 0x2b for the gain and 0x03 for the PA bias. The firmware
++ * writes the gain level to the Tx gain control DAC and the PA bias to the Maxim
++ * radio's PA bias register. The firmware limits itself to 0 - 64 when writing to the
++ * gain control DAC.
++ *
++ * Physically between the ACX and the radio, higher Tx gain control DAC values result
++ * in less power output; 0 volts to the Maxim radio results in the highest output power
++ * level, which I'm assuming matches up with 0 in the Tx Gain DAC register.
++ *
++ * Although there is only the 1 power setting, one of the radio firmware functions adjusts
++ * the transmit power level up and down. That function is called by the ACX FIQ handler
++ * under certain conditions.
++ */
++ tx_level.level = 1;
++ //return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxmem_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++
++ return 0;
++}
++
++
++static struct platform_driver
++acxmem_drv_id = {
++ .driver = {
++ .name = "acx-mem",
++ },
++ .probe = acxmem_e_probe,
++ .remove = __devexit_p(acxmem_e_remove),
++#ifdef CONFIG_PM
++ .suspend = acxmem_e_suspend,
++ .resume = acxmem_e_resume
++#endif /* CONFIG_PM */
++};
++
++
++/***********************************************************************
++** acxmem_e_init_module
++**
++** Module initialization routine, called once at module load time
++*/
++int __init
++acxmem_e_init_module(void)
++{
++ int res;
++
++ FN_ENTER;
++
++#if (ACX_IO_WIDTH==32)
++ printk("acx: compiled to use 32bit I/O access. "
++ "I/O timing issues might occur, such as "
++ "non-working firmware upload. Report them\n");
++#else
++ printk("acx: compiled to use 16bit I/O access only "
++ "(compatibility mode)\n");
++#endif
++
++#ifdef __LITTLE_ENDIAN
++#define ENDIANNESS_STRING "running on a little-endian CPU\n"
++#else
++#define ENDIANNESS_STRING "running on a BIG-ENDIAN CPU\n"
++#endif
++ log(L_INIT,
++ ENDIANNESS_STRING
++ "PCI module " ACX_RELEASE " initialized, "
++ "waiting for cards to probe...\n"
++ );
++
++ res = platform_driver_register (&acxmem_drv_id);
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_e_cleanup_module
++**
++** Called at module unload time. This is our last chance to
++** clean up after ourselves.
++*/
++void __exit
++acxmem_e_cleanup_module(void)
++{
++ FN_ENTER;
++
++ printk ("cleanup_module\n");
++ platform_driver_unregister( &acxmem_drv_id );
++
++ FN_EXIT0;
++}
++
++void acxmem_e_release(struct device *dev) {
++}
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "ACX Slave Memory Driver" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/pci.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/pci.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,4234 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++#define ACX_PCI 1
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/dma-mapping.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++#define PCI_TYPE (PCI_USES_MEM | PCI_ADDR0 | PCI_NO_ACPI_WAKE)
++#define PCI_ACX100_REGION1 0x01
++#define PCI_ACX100_REGION1_SIZE 0x1000 /* Memory size - 4K bytes */
++#define PCI_ACX100_REGION2 0x02
++#define PCI_ACX100_REGION2_SIZE 0x10000 /* Memory size - 64K bytes */
++
++#define PCI_ACX111_REGION1 0x00
++#define PCI_ACX111_REGION1_SIZE 0x2000 /* Memory size - 8K bytes */
++#define PCI_ACX111_REGION2 0x01
++#define PCI_ACX111_REGION2_SIZE 0x20000 /* Memory size - 128K bytes */
++
++/* Texas Instruments Vendor ID */
++#define PCI_VENDOR_ID_TI 0x104c
++
++/* ACX100 22Mb/s WLAN controller */
++#define PCI_DEVICE_ID_TI_TNETW1100A 0x8400
++#define PCI_DEVICE_ID_TI_TNETW1100B 0x8401
++
++/* ACX111 54Mb/s WLAN controller */
++#define PCI_DEVICE_ID_TI_TNETW1130 0x9066
++
++/* PCI Class & Sub-Class code, Network-'Other controller' */
++#define PCI_CLASS_NETWORK_OTHERS 0x0280
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#ifndef PCI_D0
++/* From include/linux/pci.h */
++#define PCI_D0 0
++#define PCI_D1 1
++#define PCI_D2 2
++#define PCI_D3hot 3
++#define PCI_D3cold 4
++#define PCI_UNKNOWN 5
++#define PCI_POWER_ERROR -1
++#endif
++
++
++/***********************************************************************
++*/
++static void acxpci_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxpci_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxpci_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxpci_i_set_multicast_list(struct net_device *ndev);
++
++static int acxpci_e_open(struct net_device *ndev);
++static int acxpci_e_close(struct net_device *ndev);
++static void acxpci_s_up(struct net_device *ndev);
++static void acxpci_s_down(struct net_device *ndev);
++
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++#if ACX_IO_WIDTH == 32
++ return readl((u8 *)adev->iobase + adev->io[offset]);
++#else
++ return readw((u8 *)adev->iobase + adev->io[offset])
++ + (readw((u8 *)adev->iobase + adev->io[offset] + 2) << 16);
++#endif
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ return readw((u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ return readb((u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++#if ACX_IO_WIDTH == 32
++ writel(val, (u8 *)adev->iobase + adev->io[offset]);
++#else
++ writew(val & 0xffff, (u8 *)adev->iobase + adev->io[offset]);
++ writew(val >> 16, (u8 *)adev->iobase + adev->io[offset] + 2);
++#endif
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ writew(val, (u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ writeb(val, (u8 *)adev->iobase + adev->io[offset]);
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ readb(adev->iobase);
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxpci_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxpci_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxpci_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxpci_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxpci_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxpci_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxpci_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size;
++ u32 sum, v32;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ }
++
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxpci_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxpci_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match (0x%08X vs. 0x%08X)! "
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxpci_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char filename[sizeof("tiacx1NNcNN")];
++
++ FN_ENTER;
++
++ /* print exact chipset and radio ID to make sure people really get a clue on which files exactly they are supposed to provide,
++ * since firmware loading is the biggest enduser PITA with these chipsets.
++ * Not printing radio ID in 0xHEX in order to not confuse them into wrong file naming */
++ printk( "acx: need to load firmware for acx1%02d chipset with radio ID %02x, please provide via firmware hotplug:\n"
++ "acx: either one file only (<c>ombined firmware image file, radio-specific) or two files (radio-less base image file *plus* separate <r>adio-specific extension file)\n",
++ IS_ACX111(adev)*11, adev->radio_type);
++
++ /* Try combined, then main image */
++ adev->need_radio_fw = 0;
++ snprintf(filename, sizeof(filename), "tiacx1%02dc%02X",
++ IS_ACX111(adev)*11, adev->radio_type);
++
++ fw_image = acx_s_read_fw(&adev->pdev->dev, filename, &file_size);
++ if (!fw_image) {
++ adev->need_radio_fw = 1;
++ filename[sizeof("tiacx1NN")-1] = '\0';
++ fw_image = acx_s_read_fw(&adev->pdev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxpci_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main/combined): %d\n", res);
++ if (OK == res) {
++ res = acxpci_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main/combined): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxpci_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("tiacx1NNrNN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "tiacx1%02dr%02X",
++ IS_ACX111(adev)*11,
++ adev->radio_type);
++ radio_image = acx_s_read_fw(&adev->pdev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxpci_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxpci_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxpci_l_reset_mac(acx_device_t *adev)
++{
++ u16 temp;
++
++ FN_ENTER;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++
++ /* now do soft reset of eCPU, set bit */
++ temp = read_reg16(adev, IO_ACX_SOFT_RESET) | 0x1;
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++ write_reg16(adev, IO_ACX_SOFT_RESET, temp);
++ write_flush(adev);
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ write_reg16(adev, IO_ACX_SOFT_RESET, temp & ~0x1);
++
++ /* now start a burst read from initial EEPROM */
++ temp = read_reg16(adev, IO_ACX_EE_START) | 0x1;
++ write_reg16(adev, IO_ACX_EE_START, temp);
++ write_flush(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_verify_init
++*/
++static int
++acxpci_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u16 irqstat = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqstat & HOST_INT_FCS_THRESHOLD) {
++ result = OK;
++ write_reg16(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxpci_write_cmd_type_status
++*/
++
++static inline void
++acxpci_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ writel(type | (status << 16), adev->cmd_area);
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxpci_read_cmd_type_status
++*/
++static u32
++acxpci_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = readl(adev->cmd_area);
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxpci_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxpci_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8 *)adev->iobase2 + cmd_offs;
++ adev->info_area = (u8 *)adev->iobase2 + info_offs;
++ log(L_DEBUG, "iobase2=%p\n"
++ "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ adev->iobase2,
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxpci_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++
++static int
++acxpci_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++
++ FN_ENTER;
++
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ acxpci_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg16(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxpci_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ write_reg16(adev, IO_ACX_ECPU_CTRL, ecpu_ctrl & ~0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* wait for eCPU bootup */
++ if (OK != acxpci_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++
++ init_mboxes(adev);
++ acxpci_write_cmd_type_status(adev, 0, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxpci_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxpci_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxpci_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /* adev->cmd_area points to PCI device's memory, not to RAM! */
++ memcpy_toio(adev->cmd_area + 4, buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxpci_write_cmd_type_status(adev, cmd, 0);
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxpci_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxpci_write_cmd_type_status(adev, 0, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ /* adev->cmd_area points to PCI device's memory, not to RAM! */
++ memcpy_fromio(buffer, adev->cmd_area + 4, buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#ifdef NONESSENTIAL_FEATURES
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxpci_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++
++/***********************************************************************
++** acxpci_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++static inline void
++free_coherent(struct pci_dev *hwdev, size_t size,
++ void *vaddr, dma_addr_t dma_handle)
++{
++ dma_free_coherent(hwdev == NULL ? NULL : &hwdev->dev,
++ size, vaddr, dma_handle);
++}
++
++void
++acxpci_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ free_coherent(0, size, ptr, phyaddr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_delete_dma_regions
++*/
++static void
++acxpci_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxpci_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++static int __devinit
++acxpci_e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
++{
++ acx111_ie_configoption_t co;
++ unsigned long mem_region1 = 0;
++ unsigned long mem_region2 = 0;
++ unsigned long mem_region1_size;
++ unsigned long mem_region2_size;
++ unsigned long phymem1;
++ unsigned long phymem2;
++ void *mem1 = NULL;
++ void *mem2 = NULL;
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ u8 chip_type;
++
++ FN_ENTER;
++
++ /* Enable the PCI device */
++ if (pci_enable_device(pdev)) {
++ printk("acx: pci_enable_device() FAILED\n");
++ result = -ENODEV;
++ goto fail_pci_enable_device;
++ }
++
++ /* enable busmastering (required for CardBus) */
++ pci_set_master(pdev);
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = (u8)id->driver_data;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ mem_region1 = PCI_ACX100_REGION1;
++ mem_region1_size = PCI_ACX100_REGION1_SIZE;
++
++ mem_region2 = PCI_ACX100_REGION2;
++ mem_region2_size = PCI_ACX100_REGION2_SIZE;
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ mem_region1 = PCI_ACX111_REGION1;
++ mem_region1_size = PCI_ACX111_REGION1_SIZE;
++
++ mem_region2 = PCI_ACX111_REGION2;
++ mem_region2_size = PCI_ACX111_REGION2_SIZE;
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ /* Figure out our resources */
++ phymem1 = pci_resource_start(pdev, mem_region1);
++ phymem2 = pci_resource_start(pdev, mem_region2);
++ if (!request_mem_region(phymem1, pci_resource_len(pdev, mem_region1), "acx_1")) {
++ printk("acx: cannot reserve PCI memory region 1 (are you sure "
++ "you have CardBus support in kernel?)\n");
++ goto fail_request_mem_region1;
++ }
++ if (!request_mem_region(phymem2, pci_resource_len(pdev, mem_region2), "acx_2")) {
++ printk("acx: cannot reserve PCI memory region 2\n");
++ goto fail_request_mem_region2;
++ }
++
++ /* this used to be ioremap(), but ioremap_nocache()
++ * is much less risky, right? (and slower?)
++ * FIXME: we may want to go back to cached variant if it's
++ * certain that our code really properly handles
++ * cached operation (memory barriers, volatile?, ...)
++ * (but always keep this comment here regardless!)
++ * Possibly make this a driver config setting? */
++
++ mem1 = ioremap_nocache(phymem1, mem_region1_size);
++ if (!mem1) {
++ printk("acx: ioremap() FAILED\n");
++ goto fail_ioremap1;
++ }
++ mem2 = ioremap_nocache(phymem2, mem_region2_size);
++ if (!mem2) {
++ printk("acx: ioremap() #2 FAILED\n");
++ goto fail_ioremap2;
++ }
++
++ printk("acx: found %s-based wireless network card at %s, irq:%d, "
++ "phymem1:0x%lX, phymem2:0x%lX, mem1:0x%p, mem1_size:%ld, "
++ "mem2:0x%p, mem2_size:%ld\n",
++ chip_name, pci_name(pdev), pdev->irq, phymem1, phymem2,
++ mem1, mem_region1_size,
++ mem2, mem_region2_size);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++ if (0 == pdev->irq) {
++ printk("acx: can't use IRQ 0\n");
++ goto fail_irq;
++ }
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ goto fail_alloc_netdev;
++ }
++
++ ether_setup(ndev);
++ ndev->open = &acxpci_e_open;
++ ndev->stop = &acxpci_e_close;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxpci_i_set_multicast_list;
++ ndev->tx_timeout = &acxpci_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++ ndev->irq = pdev->irq;
++ ndev->base_addr = pci_resource_start(pdev, 0);
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->pdev = pdev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_PCI;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = phymem1;
++ adev->iobase = mem1;
++ adev->membase2 = phymem2;
++ adev->iobase2 = mem2;
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#ifdef NONESSENTIAL_FEATURES
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ SET_NETDEV_DEV(ndev, &pdev->dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", pdev->irq);
++
++ /* need to be able to restore PCI state after a suspend */
++ pci_save_state(pdev);
++ pci_set_drvdata(pdev, ndev);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxpci_s_reset_dev(adev))
++ goto fail_reset;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ memcpy_fromio(&co, adev->cmd_area, sizeof(co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ goto fail_init_mac;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxpci_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ goto fail_read_eeprom_version;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_set_defaults(adev);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxpci_s_delete_dma_regions(adev);
++ pci_set_drvdata(pdev, NULL);
++
++fail_init_mac:
++fail_read_eeprom_version:
++fail_reset:
++
++ free_netdev(ndev);
++fail_alloc_netdev:
++fail_irq:
++
++ iounmap(mem2);
++fail_ioremap2:
++
++ iounmap(mem1);
++fail_ioremap1:
++
++ release_mem_region(pci_resource_start(pdev, mem_region2),
++ pci_resource_len(pdev, mem_region2));
++fail_request_mem_region2:
++
++ release_mem_region(pci_resource_start(pdev, mem_region1),
++ pci_resource_len(pdev, mem_region1));
++fail_request_mem_region1:
++fail_unknown_chiptype:
++
++ pci_disable_device(pdev);
++fail_pci_enable_device:
++
++ pci_set_power_state(pdev, PCI_D3hot);
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static void __devexit
++acxpci_e_remove(struct pci_dev *pdev)
++{
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long mem_region1, mem_region2;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = (struct net_device*) pci_get_drvdata(pdev);
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxpci_l_power_led(adev, 0);
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxpci_l_reset_mac(adev);
++ } else {
++ u16 temp;
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxpci_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxpci_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ if (IS_ACX100(adev)) {
++ mem_region1 = PCI_ACX100_REGION1;
++ mem_region2 = PCI_ACX100_REGION2;
++ } else {
++ mem_region1 = PCI_ACX111_REGION1;
++ mem_region2 = PCI_ACX111_REGION2;
++ }
++
++ /* finally, clean up PCI bus state */
++ acxpci_s_delete_dma_regions(adev);
++ if (adev->iobase) iounmap(adev->iobase);
++ if (adev->iobase2) iounmap(adev->iobase2);
++ release_mem_region(pci_resource_start(pdev, mem_region1),
++ pci_resource_len(pdev, mem_region1));
++ release_mem_region(pci_resource_start(pdev, mem_region2),
++ pci_resource_len(pdev, mem_region2));
++ pci_disable_device(pdev);
++
++ /* remove dev registration */
++ pci_set_drvdata(pdev, NULL);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ /* put device into ACPI D3 mode (shutdown) */
++ pci_set_power_state(pdev, PCI_D3hot);
++
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxpci_e_suspend(struct pci_dev *pdev, pm_message_t state)
++#else
++acxpci_e_suspend(struct pci_dev *pdev, u32 state)
++#endif
++{
++ struct net_device *ndev = pci_get_drvdata(pdev);
++ acx_device_t *adev;
++
++ FN_ENTER;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(ndev); /* this one cannot sleep */
++ acxpci_s_down(ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxpci_s_delete_dma_regions(adev);
++ pci_save_state(pdev);
++ pci_set_power_state(pdev, PCI_D3hot);
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++static int
++acxpci_e_resume(struct pci_dev *pdev)
++{
++ struct net_device *ndev = pci_get_drvdata(pdev);
++ acx_device_t *adev;
++
++ FN_ENTER;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ pci_set_power_state(pdev, PCI_D0);
++ printk("rsm: power state PCI_D0 set\n");
++ pci_restore_state(pdev);
++ printk("rsm: PCI state restored\n");
++
++ if (OK != acxpci_s_reset_dev(adev))
++ goto end_unlock;
++ printk("rsm: device reset done\n");
++ if (OK != acx_s_init_mac(adev))
++ goto end_unlock;
++ printk("rsm: init MAC done\n");
++
++ acxpci_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-) */
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++end_unlock:
++ acx_sem_unlock(adev);
++end:
++ /* we need to return OK here anyway, right? */
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxpci_s_up
++**
++** This function is called by acxpci_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxpci_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_down
++**
++** NB: device may be already hot unplugged if called from acxpci_e_remove()
++**
++** Disables on-card interrupt request, stops softirq and timer, stops queue,
++** sets status == STOPPED
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxpci_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxpci_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxpci_i_interrupt, SA_SHIRQ, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++
++ /* ifup device */
++ acxpci_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxpci_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxpci_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxpci_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxpci_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxpci_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxpci_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxpci_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxpci_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ unsigned count, tail;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ if ((hostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (hostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_16=%04X Status=%08X\n",
++ tail, hostdesc->Ctl_16, hostdesc->Status);
++
++ acx_l_process_rxbuf(adev, hostdesc->data);
++
++ hostdesc->Status = 0;
++ /* flush all writes before adapter sees CTL_HOSTOWN change */
++ wmb();
++ /* Host no longer owns this, needs to be LAST */
++ CLEAR_BIT(hostdesc->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++
++ /* if next descriptor is empty, then bail out */
++ if (!(hostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ || !(hostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = readl(adev->info_area);
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ writel(info_type | 0x00010000, adev->info_area);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_RX_DATA) {
++ printk(" Rx_Data");
++ }
++ /* HOST_INT_TX_COMPLETE */
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ /* HOST_INT_RX_COMPLETE */
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxpci_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxpci_i_interrupt(int irq, void *dev_id)
++#else
++acxpci_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ log(L_IRQ, "got Rx_Complete IRQ\n");
++ acxpci_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxpci_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxpci_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ | HOST_INT_RX_DATA
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ /* | HOST_INT_RX_COMPLETE */
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxpci_l_power_led
++*/
++void
++acxpci_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100pci_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***************************************************************
++** acxpci_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxpci_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ txdesc = get_txdesc(adev, head);
++ ctl8 = txdesc->Ctl_8;
++
++ /* 2005-10-11: there were several bug reports on this happening
++ ** but now cause seems to be understood & fixed */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_ACXDONE_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ txdesc->Ctl_8 = DESC_CTL_ACXDONE_HOSTOWN;
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxpci_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxpci_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxpci_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++
++ FN_ENTER;
++
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = txdesc->Ctl_8;
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ txdesc->total_length = cpu_to_le16(len);
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ txdesc->u.r1.rate = rate_100;
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_AUTODMA | DESC_CTL_RECLAIM | DESC_CTL_FIRSTFRAG);
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ wmb();
++ CLEAR_BIT(hostdesc1->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++ CLEAR_BIT(hostdesc2->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++
++ /* write back modified flags */
++ txdesc->Ctl2_8 = Ctl2_8;
++ txdesc->Ctl_8 = Ctl_8;
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ txdesc->u.r1.rate,
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ printk(" %02X", txdesc->Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ /* possibly ACPI C-state powersaving related!!!
++ * (DMA timeout due to excessively high wakeup
++ * latency after C-state activation!?)
++ * Disable C-State powersaving and try again,
++ * then PLEASE REPORT, I'm VERY interested in
++ * whether my theory is correct that this is
++ * actually the problem here.
++ * In that case, use new Linux idle wakeup latency
++ * requirements kernel API to prevent this issue. */
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxpci_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ if ((txdesc->Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = txdesc->error;
++ ack_failures = txdesc->ack_failures;
++ rts_failures = txdesc->rts_failures;
++ rts_ok = txdesc->rts_ok;
++ r100 = txdesc->u.r1.rate;
++ r111 = le16_to_cpu(txdesc->u.r2.rate111);
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /* ...and free the desc */
++ txdesc->error = 0;
++ txdesc->ack_failures = 0;
++ txdesc->rts_failures = 0;
++ txdesc->rts_ok = 0;
++ /* signal host owning it LAST, since ACX already knows that this
++ ** descriptor is finished since it set Ctl_8 accordingly. */
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxpci_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ txdesc->ack_failures = 0;
++ txdesc->rts_failures = 0;
++ txdesc->rts_ok = 0;
++ txdesc->error = 0;
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++
++ ptr = dma_alloc_coherent(adev->pdev ? &adev->pdev->dev : NULL,
++ size, phy, GFP_KERNEL);
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++static int
++acxpci_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ dma_addr_t hostdesc_phy;
++ dma_addr_t txbuf_phy;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ hostdesc_phy = adev->txhostdesc_startphy;
++ txbuf = adev->txbuf_start;
++ txbuf_phy = adev->txbuf_startphy;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* done by memset(0): hostdesc->data_offset = 0; */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ /* done by memset(0): hostdesc->pNext = ptr2acx(NULL); */
++ /* hostdesc->Status = ... */
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ txbuf_phy += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++ hostdesc->desc_phy_next = cpu2acx(adev->txhostdesc_startphy);
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxpci_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxpci_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ dma_addr_t hostdesc_phy;
++ dma_addr_t rxbuf_phy;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ rxbuf_phy = adev->rxbuf_startphy;
++ hostdesc = adev->rxhostdesc_start;
++ hostdesc_phy = adev->rxhostdesc_startphy;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->data_phy = cpu2acx(rxbuf_phy);
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ CLEAR_BIT(hostdesc->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++ rxbuf++;
++ rxbuf_phy += sizeof(*rxbuf);
++ hostdesc_phy += sizeof(*hostdesc);
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc++;
++ }
++ hostdesc--;
++ hostdesc->desc_phy_next = cpu2acx(adev->rxhostdesc_startphy);
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxpci_s_create_hostdesc_queues
++*/
++int
++acxpci_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxpci_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxpci_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxpci_create_tx_desc_queue
++*/
++static void
++acxpci_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ txhostdesc_t *hostdesc;
++ dma_addr_t hostmemptr;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ adev->txdesc_start = (txdesc_t *) (adev->iobase2 + tx_queue_start);
++
++ log(L_DEBUG, "adev->iobase2=%p\n"
++ "tx_queue_start=%08X\n"
++ "adev->txdesc_start=%p\n",
++ adev->iobase2,
++ tx_queue_start,
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++ mem_offs = tx_queue_start;
++ hostmemptr = adev->txhostdesc_startphy;
++ hostdesc = adev->txhostdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->HostMemPtr = ptr2acx(hostmemptr);
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ hostdesc += 2;
++ hostmemptr += 2 * sizeof(*hostdesc);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++ memset(adev->txdesc_start, 0, TX_CNT * sizeof(*txdesc));
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* pointer to hostdesc memory */
++ txdesc->HostMemPtr = ptr2acx(hostmemptr);
++ /* initialise ctl */
++ txdesc->Ctl_8 = ( DESC_CTL_HOSTOWN | DESC_CTL_RECLAIM
++ | DESC_CTL_AUTODMA | DESC_CTL_FIRSTFRAG);
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++ /* point to next txdesc */
++ txdesc->pNextDesc = cpu2acx(mem_offs + adev->txdesc_size);
++ /* reserve two (hdr desc and payload desc) */
++ hostdesc += 2;
++ hostmemptr += 2 * sizeof(*hostdesc);
++ /* go to the next one */
++ mem_offs += adev->txdesc_size;
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ txdesc->pNextDesc = cpu2acx(tx_queue_start);
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_create_rx_desc_queue
++*/
++static void
++acxpci_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) ((u8 *)adev->iobase2 + rx_queue_start);
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ (adev->iobase2 + acx2cpu(rxdesc->pNextDesc));
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ memset(adev->rxdesc_start, 0, RX_CNT * sizeof(*rxdesc));
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ mem_offs = rx_queue_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ rxdesc->Ctl_8 = DESC_CTL_RECLAIM | DESC_CTL_AUTODMA;
++ /* point to next rxdesc */
++ rxdesc->pNextDesc = cpu2acx(mem_offs + sizeof(*rxdesc));
++ /* go to the next one */
++ mem_offs += sizeof(*rxdesc);
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ rxdesc->pNextDesc = cpu2acx(rx_queue_start);
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_create_desc_queues
++*/
++void
++acxpci_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ acxpci_create_tx_desc_queue(adev, tx_queue_start);
++ acxpci_create_rx_desc_queue(adev, rx_queue_start);
++}
++
++
++/***************************************************************
++** acxpci_s_proc_diag_output
++*/
++char*
++acxpci_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ rxhostdesc_t *rxhostdesc;
++ txdesc_t *txdesc;
++ int i;
++
++ FN_ENTER;
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxhostdesc = adev->rxhostdesc_start;
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)) )
++ p += sprintf(p, "%02u FULL%s\n", i, rtl);
++ else
++ p += sprintf(p, "%02u empty%s\n", i, rtl);
++ rxhostdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++ txdesc = adev->txdesc_start;
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ if (txdesc->Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u free (%02X)%s%s\n", i, txdesc->Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u tx (%02X)%s%s\n", i, txdesc->Ctl_8, thd, ttl);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ p += sprintf(p,
++ "\n"
++ "** PCI data **\n"
++ "txbuf_start %p, txbuf_area_size %u, txbuf_startphy %08llx\n"
++ "txdesc_size %u, txdesc_start %p\n"
++ "txhostdesc_start %p, txhostdesc_area_size %u, txhostdesc_startphy %08llx\n"
++ "rxdesc_start %p\n"
++ "rxhostdesc_start %p, rxhostdesc_area_size %u, rxhostdesc_startphy %08llx\n"
++ "rxbuf_start %p, rxbuf_area_size %u, rxbuf_startphy %08llx\n",
++ adev->txbuf_start, adev->txbuf_area_size,
++ (unsigned long long)adev->txbuf_startphy,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ (unsigned long long)adev->txhostdesc_startphy,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ (unsigned long long)adev->rxhostdesc_startphy,
++ adev->rxbuf_start, adev->rxbuf_area_size,
++ (unsigned long long)adev->rxbuf_startphy);
++
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxpci_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxpci_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxpci_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ /* | HOST_INT_RX_DATA */
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ | HOST_INT_RX_COMPLETE
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ /* | HOST_INT_UNKNOWN */
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ /* | HOST_INT_RX_DATA */
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ | HOST_INT_RX_COMPLETE
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_UNKNOWN */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100pci_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxpci_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++ return OK;
++}
++
++
++/***********************************************************************
++** Data for init_module/cleanup_module
++*/
++static const struct pci_device_id
++acxpci_id_tbl[] __devinitdata = {
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1100A,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX100,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1100B,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX100,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1130,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX111,
++ },
++ {
++ .vendor = 0,
++ .device = 0,
++ .subvendor = 0,
++ .subdevice = 0,
++ .driver_data = 0,
++ }
++};
++
++MODULE_DEVICE_TABLE(pci, acxpci_id_tbl);
++
++/* FIXME: checks should be removed once driver is included in the kernel */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
++/* pci_name() got introduced at start of 2.6.x,
++ * got mandatory (slot_name member removed) in 2.6.11-bk1 */
++#define pci_name(x) x->slot_name
++#endif
++
++static struct pci_driver
++acxpci_drv_id = {
++ .name = "acx_pci",
++ .id_table = acxpci_id_tbl,
++ .probe = acxpci_e_probe,
++ .remove = __devexit_p(acxpci_e_remove),
++#ifdef CONFIG_PM
++ .suspend = acxpci_e_suspend,
++ .resume = acxpci_e_resume
++#endif /* CONFIG_PM */
++};
++
++
++/***********************************************************************
++** acxpci_e_init_module
++**
++** Module initialization routine, called once at module load time
++*/
++int __init
++acxpci_e_init_module(void)
++{
++ int res;
++
++ FN_ENTER;
++
++#if (ACX_IO_WIDTH==32)
++ printk("acx: compiled to use 32bit I/O access. "
++ "I/O timing issues might occur, such as "
++ "non-working firmware upload. Report them\n");
++#else
++ printk("acx: compiled to use 16bit I/O access only "
++ "(compatibility mode)\n");
++#endif
++
++#ifdef __LITTLE_ENDIAN
++#define ENDIANNESS_STRING "running on a little-endian CPU\n"
++#else
++#define ENDIANNESS_STRING "running on a BIG-ENDIAN CPU\n"
++#endif
++ log(L_INIT,
++ ENDIANNESS_STRING
++ "PCI module " ACX_RELEASE " initialized, "
++ "waiting for cards to probe...\n"
++ );
++
++ res = pci_register_driver(&acxpci_drv_id);
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_e_cleanup_module
++**
++** Called at module unload time. This is our last chance to
++** clean up after ourselves.
++*/
++void __exit
++acxpci_e_cleanup_module(void)
++{
++ FN_ENTER;
++
++ pci_unregister_driver(&acxpci_drv_id);
++
++ FN_EXIT0;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/rx3000_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/rx3000_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,110 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HP iPAQ RX3000
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ * Copyright (c) 2006 Roman Moravcik
++ *
++ * 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.
++ *
++ * Based on hx4700_acx.c
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/dpm.h>
++#include <linux/leds.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/regs-gpio.h>
++#include <linux/mfd/asic3_base.h>
++#include <asm/arch/rx3000.h>
++#include <asm/arch/rx3000-asic3.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++extern struct platform_device s3c_device_asic3;
++
++static int rx3000_wlan_start(void)
++{
++ DPM_DEBUG("rx3000_acx: Turning on\n");
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, ASIC3_GPB3);
++ mdelay(20);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC13, ASIC3_GPC13);
++ mdelay(20);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC11, ASIC3_GPC11);
++ mdelay(100);
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, ASIC3_GPB3);
++ mdelay(20);
++ s3c2410_gpio_cfgpin(S3C2410_GPA15, S3C2410_GPA15_nGCS4);
++ mdelay(100);
++ s3c2410_gpio_setpin(S3C2410_GPA11, 0);
++ mdelay(50);
++ s3c2410_gpio_setpin(S3C2410_GPA11, 1);
++ led_trigger_event_shared(rx3000_radio_trig, LED_FULL);
++ return 0;
++}
++
++static int rx3000_wlan_stop(void)
++{
++ DPM_DEBUG("rx3000_acx: Turning off\n");
++ s3c2410_gpio_setpin(S3C2410_GPA15, 1);
++ s3c2410_gpio_cfgpin(S3C2410_GPA15, S3C2410_GPA15_OUT);
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, 0);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC13, 0);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC11, 0);
++ led_trigger_event_shared(rx3000_radio_trig, LED_OFF);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = RX3000_PA_WLAN,
++ .end = RX3000_PA_WLAN + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_EINT16,
++ .end = IRQ_EINT16,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = rx3000_wlan_start,
++ .stop_hw = rx3000_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE(acx_resources),
++ .resource = acx_resources,
++};
++
++static int __init rx3000_wlan_init(void)
++{
++ printk("rx3000_wlan_init: acx-mem platform_device_register\n");
++ return platform_device_register(&acx_device);
++}
++
++
++static void __exit rx3000_wlan_exit(void)
++{
++ platform_device_unregister(&acx_device);
++}
++
++module_init(rx3000_wlan_init);
++module_exit(rx3000_wlan_exit);
++
++MODULE_AUTHOR("Todd Blumer <todd@sdgsystems.com>, Roman Moravcik <roman.moravcik@gmail.com>");
++MODULE_DESCRIPTION("WLAN driver for HP iPAQ RX3000");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.23/drivers/net/wireless/acx/setrate.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/setrate.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,213 @@
++/* TODO: stop #including, move into wireless.c
++ * until then, keep in sync copies in prism54/ and acx/ dirs
++ * code+data size: less than 1k */
++
++enum {
++ DOT11_RATE_1,
++ DOT11_RATE_2,
++ DOT11_RATE_5,
++ DOT11_RATE_11,
++ DOT11_RATE_22,
++ DOT11_RATE_33,
++ DOT11_RATE_6,
++ DOT11_RATE_9,
++ DOT11_RATE_12,
++ DOT11_RATE_18,
++ DOT11_RATE_24,
++ DOT11_RATE_36,
++ DOT11_RATE_48,
++ DOT11_RATE_54
++};
++enum {
++ DOT11_MOD_DBPSK,
++ DOT11_MOD_DQPSK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_CCKOFDM,
++ DOT11_MOD_PBCC
++};
++static const u8 ratelist[] = { 1,2,5,11,22,33,6,9,12,18,24,36,48,54 };
++static const u8 dot11ratebyte[] = { 1*2,2*2,11,11*2,22*2,33*2,6*2,9*2,12*2,18*2,24*2,36*2,48*2,54*2 };
++static const u8 default_modulation[] = {
++ DOT11_MOD_DBPSK,
++ DOT11_MOD_DQPSK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_PBCC,
++ DOT11_MOD_PBCC,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM
++};
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++rate_mbit2enum(int n) {
++ int i=0;
++ while(i<sizeof(ratelist)) {
++ if(n==ratelist[i]) return i;
++ i++;
++ }
++ return -EINVAL;
++}
++
++static int
++get_modulation(int r_enum, char suffix) {
++ if(suffix==',' || suffix==' ' || suffix=='\0') {
++ /* could shorten default_mod by 8 bytes:
++ if(r_enum>=DOT11_RATE_6) return DOT11_MOD_OFDM; */
++ return default_modulation[r_enum];
++ }
++ if(suffix=='c') {
++ if(r_enum<DOT11_RATE_5 || r_enum>DOT11_RATE_11) return -EINVAL;
++ return DOT11_MOD_CCK;
++ }
++ if(suffix=='p') {
++ if(r_enum<DOT11_RATE_5 || r_enum>DOT11_RATE_33) return -EINVAL;
++ return DOT11_MOD_PBCC;
++ }
++ if(suffix=='o') {
++ if(r_enum<DOT11_RATE_6) return -EINVAL;
++ return DOT11_MOD_OFDM;
++ }
++ if(suffix=='d') {
++ if(r_enum<DOT11_RATE_6) return -EINVAL;
++ return DOT11_MOD_CCKOFDM;
++ }
++ return -EINVAL;
++}
++
++#ifdef UNUSED
++static int
++fill_ratevector(const char **pstr, u8 *vector, int size,
++ int (*supported)(int mbit, int mod, void *opaque), void *opaque, int or_mask)
++{
++ unsigned long rate_mbit;
++ int rate_enum,mod;
++ const char *str = *pstr;
++ char c;
++
++ do {
++ rate_mbit = simple_strtoul(str, (char**)&str, 10);
++ if(rate_mbit>INT_MAX) return -EINVAL;
++
++ rate_enum = rate_mbit2enum(rate_mbit);
++ if(rate_enum<0) return rate_enum;
++
++ c = *str;
++ mod = get_modulation(rate_enum, c);
++ if(mod<0) return mod;
++
++ if(c>='a' && c<='z') c = *++str;
++ if(c!=',' && c!=' ' && c!='\0') return -EINVAL;
++
++ if(supported) {
++ int r = supported(rate_mbit, mod, opaque);
++ if(r) return r;
++ }
++
++ *vector++ = dot11ratebyte[rate_enum] | or_mask;
++
++ size--;
++ str++;
++ } while(size>0 && c==',');
++
++ if(size<1) return -E2BIG;
++ *vector=0; /* TODO: sort, remove dups? */
++
++ *pstr = str-1;
++ return 0;
++}
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++fill_ratevectors(const char *str, u8 *brate, u8 *orate, int size,
++ int (*supported)(int mbit, int mod, void *opaque), void *opaque)
++{
++ int r;
++
++ r = fill_ratevector(&str, brate, size, supported, opaque, 0x80);
++ if(r) return r;
++
++ orate[0] = 0;
++ if(*str==' ') {
++ str++;
++ r = fill_ratevector(&str, orate, size, supported, opaque, 0);
++ if(r) return r;
++ /* TODO: sanitize, e.g. remove/error on rates already in basic rate set? */
++ }
++ if(*str)
++ return -EINVAL;
++
++ return 0;
++}
++#endif
++
++/* TODO: use u64 masks? */
++
++static int
++fill_ratemask(const char **pstr, u32* mask,
++ int (*supported)(int mbit, int mod,void *opaque),
++ u32 (*gen_mask)(int mbit, int mod,void *opaque),
++ void *opaque)
++{
++ unsigned long rate_mbit;
++ int rate_enum,mod;
++ u32 m = 0;
++ const char *str = *pstr;
++ char c;
++
++ do {
++ rate_mbit = simple_strtoul(str, (char**)&str, 10);
++ if(rate_mbit>INT_MAX) return -EINVAL;
++
++ rate_enum = rate_mbit2enum(rate_mbit);
++ if(rate_enum<0) return rate_enum;
++
++ c = *str;
++ mod = get_modulation(rate_enum, c);
++ if(mod<0) return mod;
++
++ if(c>='a' && c<='z') c = *++str;
++ if(c!=',' && c!=' ' && c!='\0') return -EINVAL;
++
++ if(supported) {
++ int r = supported(rate_mbit, mod, opaque);
++ if(r) return r;
++ }
++
++ m |= gen_mask(rate_mbit, mod, opaque);
++ str++;
++ } while(c==',');
++
++ *pstr = str-1;
++ *mask |= m;
++ return 0;
++}
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++fill_ratemasks(const char *str, u32 *bmask, u32 *omask,
++ int (*supported)(int mbit, int mod,void *opaque),
++ u32 (*gen_mask)(int mbit, int mod,void *opaque),
++ void *opaque)
++{
++ int r;
++
++ r = fill_ratemask(&str, bmask, supported, gen_mask, opaque);
++ if(r) return r;
++
++ if(*str==' ') {
++ str++;
++ r = fill_ratemask(&str, omask, supported, gen_mask, opaque);
++ if(r) return r;
++ }
++ if(*str)
++ return -EINVAL;
++ return 0;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/usb.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/usb.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,1922 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** USB support for TI ACX100 based devices. Many parts are taken from
++** the PCI driver.
++**
++** Authors:
++** Martin Wawro <martin.wawro AT uni-dortmund.de>
++** Andreas Mohr <andi AT lisas.de>
++**
++** LOCKING
++** callback functions called by USB core are running in interrupt context
++** and thus have names with _i_.
++*/
++#define ACX_USB 1
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/types.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/kernel.h>
++#include <linux/usb.h>
++#include <linux/netdevice.h>
++#include <linux/rtnetlink.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/vmalloc.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++/* number of endpoints of an interface */
++#define NUM_EP(intf) (intf)->altsetting[0].desc.bNumEndpoints
++#define EP(intf, nr) (intf)->altsetting[0].endpoint[(nr)].desc
++#define GET_DEV(udev) usb_get_dev((udev))
++#define PUT_DEV(udev) usb_put_dev((udev))
++#define SET_NETDEV_OWNER(ndev, owner) /* not needed anymore ??? */
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
++/* removed in 2.6.14. We will use fake value for now */
++#define URB_ASYNC_UNLINK 0
++#endif
++
++
++/***********************************************************************
++*/
++/* ACX100 (TNETW1100) USB device: D-Link DWL-120+ */
++#define ACX100_VENDOR_ID 0x2001
++#define ACX100_PRODUCT_ID_UNBOOTED 0x3B01
++#define ACX100_PRODUCT_ID_BOOTED 0x3B00
++
++/* TNETW1450 USB devices */
++#define VENDOR_ID_DLINK 0x07b8 /* D-Link Corp. */
++#define PRODUCT_ID_WUG2400 0xb21a /* AboCom WUG2400 or SafeCom SWLUT-54125 */
++#define VENDOR_ID_AVM_GMBH 0x057c
++#define PRODUCT_ID_AVM_WLAN_USB 0x5601
++#define PRODUCT_ID_AVM_WLAN_USB_si 0x6201 /* "self install" named Version: driver kills kernel on inbound scans from fritz box ??? */
++#define VENDOR_ID_ZCOM 0x0cde
++#define PRODUCT_ID_ZCOM_XG750 0x0017 /* not tested yet */
++#define VENDOR_ID_TI 0x0451
++#define PRODUCT_ID_TI_UNKNOWN 0x60c5 /* not tested yet */
++
++#define ACX_USB_CTRL_TIMEOUT 5500 /* steps in ms */
++
++/* Buffer size for fw upload, same for both ACX100 USB and TNETW1450 */
++#define USB_RWMEM_MAXLEN 2048
++
++/* The number of bulk URBs to use */
++#define ACX_TX_URB_CNT 8
++#define ACX_RX_URB_CNT 2
++
++/* Should be sent to the bulkout endpoint */
++#define ACX_USB_REQ_UPLOAD_FW 0x10
++#define ACX_USB_REQ_ACK_CS 0x11
++#define ACX_USB_REQ_CMD 0x12
++
++/***********************************************************************
++** Prototypes
++*/
++static int acxusb_e_probe(struct usb_interface *, const struct usb_device_id *);
++static void acxusb_e_disconnect(struct usb_interface *);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static void acxusb_i_complete_tx(struct urb *);
++static void acxusb_i_complete_rx(struct urb *);
++#else
++static void acxusb_i_complete_tx(struct urb *, struct pt_regs *);
++static void acxusb_i_complete_rx(struct urb *, struct pt_regs *);
++#endif
++static int acxusb_e_open(struct net_device *);
++static int acxusb_e_close(struct net_device *);
++static void acxusb_i_set_rx_mode(struct net_device *);
++static int acxusb_boot(struct usb_device *, int is_tnetw1450, int *radio_type);
++
++static void acxusb_l_poll_rx(acx_device_t *adev, usb_rx_t* rx);
++
++static void acxusb_i_tx_timeout(struct net_device *);
++
++/* static void dump_device(struct usb_device *); */
++/* static void dump_device_descriptor(struct usb_device_descriptor *); */
++/* static void dump_config_descriptor(struct usb_config_descriptor *); */
++
++/***********************************************************************
++** Module Data
++*/
++#define TXBUFSIZE sizeof(usb_txbuffer_t)
++/*
++ * Now, this is just plain lying, but the device insists in giving us
++ * huge packets. We supply extra space after rxbuffer. Need to understand
++ * it better...
++ */
++#define RXBUFSIZE (sizeof(rxbuffer_t) + \
++ (sizeof(usb_rx_t) - sizeof(struct usb_rx_plain)))
++
++static const struct usb_device_id
++acxusb_ids[] = {
++ { USB_DEVICE(ACX100_VENDOR_ID, ACX100_PRODUCT_ID_BOOTED) },
++ { USB_DEVICE(ACX100_VENDOR_ID, ACX100_PRODUCT_ID_UNBOOTED) },
++ { USB_DEVICE(VENDOR_ID_DLINK, PRODUCT_ID_WUG2400) },
++ { USB_DEVICE(VENDOR_ID_AVM_GMBH, PRODUCT_ID_AVM_WLAN_USB) },
++ { USB_DEVICE(VENDOR_ID_AVM_GMBH, PRODUCT_ID_AVM_WLAN_USB_si) },
++ { USB_DEVICE(VENDOR_ID_ZCOM, PRODUCT_ID_ZCOM_XG750) },
++ { USB_DEVICE(VENDOR_ID_TI, PRODUCT_ID_TI_UNKNOWN) },
++ {}
++};
++
++MODULE_DEVICE_TABLE(usb, acxusb_ids);
++
++/* USB driver data structure as required by the kernel's USB core */
++static struct usb_driver
++acxusb_driver = {
++ .name = "acx_usb",
++ .probe = acxusb_e_probe,
++ .disconnect = acxusb_e_disconnect,
++ .id_table = acxusb_ids
++};
++
++
++/***********************************************************************
++** USB helper
++**
++** ldd3 ch13 says:
++** When the function is usb_kill_urb, the urb lifecycle is stopped. This
++** function is usually used when the device is disconnected from the system,
++** in the disconnect callback. For some drivers, the usb_unlink_urb function
++** should be used to tell the USB core to stop an urb. This function does not
++** wait for the urb to be fully stopped before returning to the caller.
++** This is useful for stoppingthe urb while in an interrupt handler or when
++** a spinlock is held, as waiting for a urb to fully stop requires the ability
++** for the USB core to put the calling process to sleep. This function requires
++** that the URB_ASYNC_UNLINK flag value be set in the urb that is being asked
++** to be stopped in order to work properly.
++**
++** (URB_ASYNC_UNLINK is obsolete, usb_unlink_urb will always be
++** asynchronous while usb_kill_urb is synchronous and should be called
++** directly (drivers/usb/core/urb.c))
++**
++** In light of this, timeout is just for paranoid reasons...
++*
++* Actually, it's useful for debugging. If we reach timeout, we're doing
++* something wrong with the urbs.
++*/
++static void
++acxusb_unlink_urb(struct urb* urb)
++{
++ if (!urb)
++ return;
++
++ if (urb->status == -EINPROGRESS) {
++ int timeout = 10;
++
++ usb_unlink_urb(urb);
++ while (--timeout && urb->status == -EINPROGRESS) {
++ mdelay(1);
++ }
++ if (!timeout) {
++ printk("acx_usb: urb unlink timeout!\n");
++ }
++ }
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxusb_s_read_phy_reg
++*/
++int
++acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ /* mem_read_write_t mem; */
++
++ FN_ENTER;
++
++ printk("%s doesn't seem to work yet, disabled.\n", __func__);
++
++ /*
++ mem.addr = cpu_to_le16(reg);
++ mem.type = cpu_to_le16(0x82);
++ mem.len = cpu_to_le32(4);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_MEM_READ, &mem, sizeof(mem));
++ *charbuf = mem.data;
++ log(L_DEBUG, "read radio PHY[0x%04X]=0x%02X\n", reg, *charbuf);
++ */
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ mem_read_write_t mem;
++
++ FN_ENTER;
++
++ mem.addr = cpu_to_le16(reg);
++ mem.type = cpu_to_le16(0x82);
++ mem.len = cpu_to_le32(4);
++ mem.data = value;
++ acx_s_issue_cmd(adev, ACX1xx_CMD_MEM_WRITE, &mem, sizeof(mem));
++ log(L_DEBUG, "write radio PHY[0x%04X]=0x%02X\n", reg, value);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acxusb_s_issue_cmd_timeo
++** Excecutes a command in the command mailbox
++**
++** buffer = a pointer to the data.
++** The data must not include 4 byte command header
++*/
++
++/* TODO: ideally we shall always know how much we need
++** and this shall be 0 */
++#define BOGUS_SAFETY_PADDING 0x40
++
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxusb_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned timeout)
++{
++#else
++int
++acxusb_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned timeout,
++ const char* cmdstr)
++{
++#endif
++ /* USB ignores timeout param */
++
++ struct usb_device *usbdev;
++ struct {
++ u16 cmd;
++ u16 status;
++ u8 data[1];
++ } ACX_PACKED *loc;
++ const char *devname;
++ int acklen, blocklen, inpipe, outpipe;
++ int cmd_status;
++ int result;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ /* no "wlan%%d: ..." please */
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,type:0x%04X)\n",
++ cmdstr, buflen,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ loc = kmalloc(buflen + 4 + BOGUS_SAFETY_PADDING, GFP_KERNEL);
++ if (!loc) {
++ printk("%s: "FUNC"(): no memory for data buffer\n", devname);
++ goto bad;
++ }
++
++ /* get context from acx_device */
++ usbdev = adev->usbdev;
++
++ /* check which kind of command was issued */
++ loc->cmd = cpu_to_le16(cmd);
++ loc->status = 0;
++
++/* NB: buflen == frmlen + 4
++**
++** Interrogate: write 8 bytes: (cmd,status,rid,frmlen), then
++** read (cmd,status,rid,frmlen,data[frmlen]) back
++**
++** Configure: write (cmd,status,rid,frmlen,data[frmlen])
++**
++** Possibly bogus special handling of ACX1xx_IE_SCAN_STATUS removed
++*/
++
++ /* now write the parameters of the command if needed */
++ acklen = buflen + 4 + BOGUS_SAFETY_PADDING;
++ blocklen = buflen;
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++ if (cmd == ACX1xx_CMD_INTERROGATE) {
++ blocklen = 4;
++ acklen = buflen + 4;
++ }
++ memcpy(loc->data, buffer, blocklen);
++ }
++ blocklen += 4; /* account for cmd,status */
++
++ /* obtain the I/O pipes */
++ outpipe = usb_sndctrlpipe(usbdev, 0);
++ inpipe = usb_rcvctrlpipe(usbdev, 0);
++ log(L_CTL, "ctrl inpipe=0x%X outpipe=0x%X\n", inpipe, outpipe);
++ log(L_CTL, "sending USB control msg (out) (blocklen=%d)\n", blocklen);
++ if (acx_debug & L_DATA)
++ acx_dump_bytes(loc, blocklen);
++
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_CMD, /* request */
++ USB_TYPE_VENDOR|USB_DIR_OUT, /* requesttype */
++ 0, /* value */
++ 0, /* index */
++ loc, /* dataptr */
++ blocklen, /* size */
++ ACX_USB_CTRL_TIMEOUT /* timeout in ms */
++ );
++
++ if (result == -ENODEV) {
++ log(L_CTL, "no device present (unplug?)\n");
++ goto good;
++ }
++
++ log(L_CTL, "wrote %d bytes\n", result);
++ if (result < 0) {
++ goto bad;
++ }
++
++ /* check for device acknowledge */
++ log(L_CTL, "sending USB control msg (in) (acklen=%d)\n", acklen);
++ loc->status = 0; /* delete old status flag -> set to IDLE */
++ /* shall we zero out the rest? */
++ result = usb_control_msg(usbdev, inpipe,
++ ACX_USB_REQ_CMD, /* request */
++ USB_TYPE_VENDOR|USB_DIR_IN, /* requesttype */
++ 0, /* value */
++ 0, /* index */
++ loc, /* dataptr */
++ acklen, /* size */
++ ACX_USB_CTRL_TIMEOUT /* timeout in ms */
++ );
++ if (result < 0) {
++ printk("%s: "FUNC"(): USB read error %d\n", devname, result);
++ goto bad;
++ }
++ if (acx_debug & L_CTL) {
++ printk("read %d bytes: ", result);
++ acx_dump_bytes(loc, result);
++ }
++
++/*
++ check for result==buflen+4? Was seen:
++
++interrogate(type:ACX100_IE_DOT11_ED_THRESHOLD,len:4)
++issue_cmd(cmd:ACX1xx_CMD_INTERROGATE,buflen:8,type:4111)
++ctrl inpipe=0x80000280 outpipe=0x80000200
++sending USB control msg (out) (blocklen=8)
++01 00 00 00 0F 10 04 00
++wrote 8 bytes
++sending USB control msg (in) (acklen=12) sizeof(loc->data
++read 4 bytes <==== MUST BE 12!!
++*/
++
++ cmd_status = le16_to_cpu(loc->status);
++ if (cmd_status != 1) {
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s)\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status));
++ /* TODO: goto bad; ? */
++ }
++ if ((cmd == ACX1xx_CMD_INTERROGATE) && buffer && buflen) {
++ memcpy(buffer, loc->data, buflen);
++ log(L_CTL, "response frame: cmd=0x%04X status=%d\n",
++ le16_to_cpu(loc->cmd),
++ cmd_status);
++ }
++good:
++ kfree(loc);
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ kfree(loc);
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acxusb_boot()
++** Inputs:
++** usbdev -> Pointer to kernel's usb_device structure
++**
++** Returns:
++** (int) Errorcode or 0 on success
++**
++** This function triggers the loading of the firmware image from harddisk
++** and then uploads the firmware to the USB device. After uploading the
++** firmware and transmitting the checksum, the device resets and appears
++** as a new device on the USB bus (the device we can finally deal with)
++*/
++static inline int
++acxusb_fw_needs_padding(firmware_image_t *fw_image, unsigned int usb_maxlen)
++{
++ unsigned int num_xfers = ((fw_image->size - 1) / usb_maxlen) + 1;
++
++ return ((num_xfers % 2) == 0);
++}
++
++static int
++acxusb_boot(struct usb_device *usbdev, int is_tnetw1450, int *radio_type)
++{
++ char filename[sizeof("tiacx1NNusbcRR")];
++
++ firmware_image_t *fw_image = NULL;
++ char *usbbuf;
++ unsigned int offset;
++ unsigned int blk_len, inpipe, outpipe;
++ u32 num_processed;
++ u32 img_checksum, sum;
++ u32 file_size;
++ int result = -EIO;
++ int i;
++
++ FN_ENTER;
++
++ /* dump_device(usbdev); */
++
++ usbbuf = kmalloc(USB_RWMEM_MAXLEN, GFP_KERNEL);
++ if (!usbbuf) {
++ printk(KERN_ERR "acx: no memory for USB transfer buffer (%d bytes)\n", USB_RWMEM_MAXLEN);
++ result = -ENOMEM;
++ goto end;
++ }
++ if (is_tnetw1450) {
++ /* Obtain the I/O pipes */
++ outpipe = usb_sndbulkpipe(usbdev, 1);
++ inpipe = usb_rcvbulkpipe(usbdev, 2);
++
++ printk(KERN_DEBUG "wait for device ready\n");
++ for (i = 0; i <= 2; i++) {
++ result = usb_bulk_msg(usbdev, inpipe,
++ usbbuf,
++ USB_RWMEM_MAXLEN,
++ &num_processed,
++ 2000
++ );
++
++ if ((*(u32 *)&usbbuf[4] == 0x40000001)
++ && (*(u16 *)&usbbuf[2] == 0x1)
++ && ((*(u16 *)usbbuf & 0x3fff) == 0)
++ && ((*(u16 *)usbbuf & 0xc000) == 0xc000))
++ break;
++ msleep(10);
++ }
++ if (i == 2)
++ goto fw_end;
++
++ *radio_type = usbbuf[8];
++ } else {
++ /* Obtain the I/O pipes */
++ outpipe = usb_sndctrlpipe(usbdev, 0);
++ inpipe = usb_rcvctrlpipe(usbdev, 0);
++
++ /* FIXME: shouldn't be hardcoded */
++ *radio_type = RADIO_MAXIM_0D;
++ }
++
++ snprintf(filename, sizeof(filename), "tiacx1%02dusbc%02X",
++ is_tnetw1450 * 11, *radio_type);
++
++ fw_image = acx_s_read_fw(&usbdev->dev, filename, &file_size);
++ if (!fw_image) {
++ result = -EIO;
++ goto end;
++ }
++ log(L_INIT, "firmware size: %d bytes\n", file_size);
++
++ img_checksum = le32_to_cpu(fw_image->chksum);
++
++ if (is_tnetw1450) {
++ u8 cmdbuf[20];
++ const u8 *p;
++ u8 need_padding;
++ u32 tmplen, val;
++
++ memset(cmdbuf, 0, 16);
++
++ need_padding = acxusb_fw_needs_padding(fw_image, USB_RWMEM_MAXLEN);
++ tmplen = need_padding ? file_size-4 : file_size-8;
++ *(u16 *)&cmdbuf[0] = 0xc000;
++ *(u16 *)&cmdbuf[2] = 0x000b;
++ *(u32 *)&cmdbuf[4] = tmplen;
++ *(u32 *)&cmdbuf[8] = file_size-8;
++ *(u32 *)&cmdbuf[12] = img_checksum;
++
++ result = usb_bulk_msg(usbdev, outpipe, cmdbuf, 16, &num_processed, HZ);
++ if (result < 0)
++ goto fw_end;
++
++ p = (const u8 *)&fw_image->size;
++
++ /* first calculate checksum for image size part */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ /* now continue checksum for firmware data part */
++ tmplen = le32_to_cpu(fw_image->size);
++ for (i = 0; i < tmplen /* image size */; i++) {
++ sum += *p++;
++ }
++
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match! "
++ "(0x%08x vs. 0x%08x)\n",
++ sum, fw_image->chksum);
++ goto fw_end;
++ }
++
++ offset = 8;
++ while (offset < file_size) {
++ blk_len = file_size - offset;
++ if (blk_len > USB_RWMEM_MAXLEN) {
++ blk_len = USB_RWMEM_MAXLEN;
++ }
++
++ log(L_INIT, "uploading firmware (%d bytes, offset=%d)\n",
++ blk_len, offset);
++ memcpy(usbbuf, ((u8 *)fw_image) + offset, blk_len);
++
++ p = usbbuf;
++ for (i = 0; i < blk_len; i += 4) {
++ *(u32 *)p = be32_to_cpu(*(u32 *)p);
++ p += 4;
++ }
++
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, blk_len, &num_processed, HZ);
++ if ((result < 0) || (num_processed != blk_len))
++ goto fw_end;
++ offset += blk_len;
++ }
++ if (need_padding) {
++ printk(KERN_DEBUG "send padding\n");
++ memset(usbbuf, 0, 4);
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, 4, &num_processed, HZ);
++ if ((result < 0) || (num_processed != 4))
++ goto fw_end;
++ }
++ printk(KERN_DEBUG "read firmware upload result\n");
++ memset(cmdbuf, 0, 20); /* additional memset */
++ result = usb_bulk_msg(usbdev, inpipe, cmdbuf, 20, &num_processed, 2000);
++ if (result < 0)
++ goto fw_end;
++ if (*(u32 *)&cmdbuf[4] == 0x40000003)
++ goto fw_end;
++ if (*(u32 *)&cmdbuf[4])
++ goto fw_end;
++ if (*(u16 *)&cmdbuf[16] != 1)
++ goto fw_end;
++
++ val = *(u32 *)&cmdbuf[0];
++ if ((val & 0x3fff)
++ || ((val & 0xc000) != 0xc000))
++ goto fw_end;
++
++ val = *(u32 *)&cmdbuf[8];
++ if (val & 2) {
++ result = usb_bulk_msg(usbdev, inpipe, cmdbuf, 20, &num_processed, 2000);
++ if (result < 0)
++ goto fw_end;
++ val = *(u32 *)&cmdbuf[8];
++ }
++ /* yup, no "else" here! */
++ if (val & 1) {
++ memset(usbbuf, 0, 4);
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, 4, &num_processed, HZ);
++ if ((result < 0) || (!num_processed))
++ goto fw_end;
++ }
++
++ printk("TNETW1450 firmware upload successful!\n");
++ result = 0;
++ goto end;
++fw_end:
++ result = -EIO;
++ goto end;
++ } else {
++ /* ACX100 USB */
++
++ /* now upload the firmware, slice the data into blocks */
++ offset = 8;
++ while (offset < file_size) {
++ blk_len = file_size - offset;
++ if (blk_len > USB_RWMEM_MAXLEN) {
++ blk_len = USB_RWMEM_MAXLEN;
++ }
++ log(L_INIT, "uploading firmware (%d bytes, offset=%d)\n",
++ blk_len, offset);
++ memcpy(usbbuf, ((u8 *)fw_image) + offset, blk_len);
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_UPLOAD_FW,
++ USB_TYPE_VENDOR|USB_DIR_OUT,
++ (file_size - 8) & 0xffff, /* value */
++ (file_size - 8) >> 16, /* index */
++ usbbuf, /* dataptr */
++ blk_len, /* size */
++ 3000 /* timeout in ms */
++ );
++ offset += blk_len;
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during upload "
++ "of firmware, aborting\n", result);
++ goto end;
++ }
++ }
++
++ /* finally, send the checksum and reboot the device */
++ /* does this trigger the reboot? */
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_UPLOAD_FW,
++ USB_TYPE_VENDOR|USB_DIR_OUT,
++ img_checksum & 0xffff, /* value */
++ img_checksum >> 16, /* index */
++ NULL, /* dataptr */
++ 0, /* size */
++ 3000 /* timeout in ms */
++ );
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during tx of checksum, "
++ "aborting\n", result);
++ goto end;
++ }
++ result = usb_control_msg(usbdev, inpipe,
++ ACX_USB_REQ_ACK_CS,
++ USB_TYPE_VENDOR|USB_DIR_IN,
++ img_checksum & 0xffff, /* value */
++ img_checksum >> 16, /* index */
++ usbbuf, /* dataptr */
++ 8, /* size */
++ 3000 /* timeout in ms */
++ );
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during ACK of checksum, "
++ "aborting\n", result);
++ goto end;
++ }
++ if (*usbbuf != 0x10) {
++ printk(KERN_ERR "acx: invalid checksum?\n");
++ result = -EINVAL;
++ goto end;
++ }
++ result = 0;
++ }
++
++end:
++ vfree(fw_image);
++ kfree(usbbuf);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/* FIXME: maybe merge it with usual eeprom reading, into common code? */
++static void
++acxusb_s_read_eeprom_version(acx_device_t *adev)
++{
++ u8 eeprom_ver[0x8];
++
++ memset(eeprom_ver, 0, sizeof(eeprom_ver));
++ acx_s_interrogate(adev, &eeprom_ver, ACX1FF_IE_EEPROM_VER);
++
++ /* FIXME: which one of those values to take? */
++ adev->eeprom_version = eeprom_ver[5];
++}
++
++
++/*
++ * temporary helper function to at least fill important cfgopt members with
++ * useful replacement values until we figure out how one manages to fetch
++ * the configoption struct in the USB device case...
++ */
++static int
++acxusb_s_fill_configoption(acx_device_t *adev)
++{
++ adev->cfgopt_probe_delay = 200;
++ adev->cfgopt_dot11CCAModes = 4;
++ adev->cfgopt_dot11Diversity = 1;
++ adev->cfgopt_dot11ShortPreambleOption = 1;
++ adev->cfgopt_dot11PBCCOption = 1;
++ adev->cfgopt_dot11ChannelAgility = 0;
++ adev->cfgopt_dot11PhyType = 5;
++ adev->cfgopt_dot11TempType = 1;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxusb_e_probe()
++**
++** This function is invoked by the kernel's USB core whenever a new device is
++** attached to the system or the module is loaded. It is presented a usb_device
++** structure from which information regarding the device is obtained and evaluated.
++** In case this driver is able to handle one of the offered devices, it returns
++** a non-null pointer to a driver context and thereby claims the device.
++*/
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++static int
++acxusb_e_probe(struct usb_interface *intf, const struct usb_device_id *devID)
++{
++ struct usb_device *usbdev = interface_to_usbdev(intf);
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ struct usb_config_descriptor *config;
++ struct usb_endpoint_descriptor *epdesc;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ struct usb_host_endpoint *ep;
++#endif
++ struct usb_interface_descriptor *ifdesc;
++ const char* msg;
++ int numconfigs, numfaces, numep;
++ int result = OK;
++ int i;
++ int radio_type;
++ /* this one needs to be more precise in case there appears a TNETW1450 from the same vendor */
++ int is_tnetw1450 = (usbdev->descriptor.idVendor != ACX100_VENDOR_ID);
++
++ FN_ENTER;
++
++ if (is_tnetw1450) {
++ /* Boot the device (i.e. upload the firmware) */
++ acxusb_boot(usbdev, is_tnetw1450, &radio_type);
++
++ /* TNETW1450-based cards will continue right away with
++ * the same USB ID after booting */
++ } else {
++ /* First check if this is the "unbooted" hardware */
++ if (usbdev->descriptor.idProduct == ACX100_PRODUCT_ID_UNBOOTED) {
++
++ /* Boot the device (i.e. upload the firmware) */
++ acxusb_boot(usbdev, is_tnetw1450, &radio_type);
++
++ /* DWL-120+ will first boot the firmware,
++ * then later have a *separate* probe() run
++ * since its USB ID will have changed after
++ * firmware boot!
++ * Since the first probe() run has no
++ * other purpose than booting the firmware,
++ * simply return immediately.
++ */
++ log(L_INIT, "finished booting, returning from probe()\n");
++ result = OK; /* success */
++ goto end;
++ }
++ else
++ /* device not unbooted, but invalid USB ID!? */
++ if (usbdev->descriptor.idProduct != ACX100_PRODUCT_ID_BOOTED)
++ goto end_nodev;
++ }
++
++/* Ok, so it's our device and it has already booted */
++
++ /* Allocate memory for a network device */
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ msg = "acx: no memory for netdev\n";
++ goto end_nomem;
++ }
++
++ /* Register the callbacks for the network device functions */
++
++ ether_setup(ndev);
++ ndev->open = &acxusb_e_open;
++ ndev->stop = &acxusb_e_close;
++ ndev->hard_start_xmit = (void *)&acx_i_start_xmit;
++ ndev->get_stats = (void *)&acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = (void *)&acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = (void *)&acxusb_i_set_rx_mode;
++#ifdef HAVE_TX_TIMEOUT
++ ndev->tx_timeout = &acxusb_i_tx_timeout;
++ ndev->watchdog_timeo = 4 * HZ;
++#endif
++ ndev->change_mtu = &acx_e_change_mtu;
++ SET_MODULE_OWNER(ndev);
++
++ /* Setup private driver context */
++
++ adev = ndev2adev(ndev);
++ adev->ndev = ndev;
++
++ adev->dev_type = DEVTYPE_USB;
++ adev->radio_type = radio_type;
++ if (is_tnetw1450) {
++ /* well, actually it's a TNETW1450, but since it
++ * seems to be sufficiently similar to TNETW1130,
++ * I don't want to change large amounts of code now */
++ adev->chip_type = CHIPTYPE_ACX111;
++ } else {
++ adev->chip_type = CHIPTYPE_ACX100;
++ }
++
++ adev->usbdev = usbdev;
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++
++ /* Check that this is really the hardware we know about.
++ ** If not sure, at least notify the user that he
++ ** may be in trouble...
++ */
++ numconfigs = (int)usbdev->descriptor.bNumConfigurations;
++ if (numconfigs != 1)
++ printk("acx: number of configurations is %d, "
++ "this driver only knows how to handle 1, "
++ "be prepared for surprises\n", numconfigs);
++
++ config = &usbdev->config->desc;
++ numfaces = config->bNumInterfaces;
++ if (numfaces != 1)
++ printk("acx: number of interfaces is %d, "
++ "this driver only knows how to handle 1, "
++ "be prepared for surprises\n", numfaces);
++
++ ifdesc = &intf->altsetting->desc;
++ numep = ifdesc->bNumEndpoints;
++ log(L_DEBUG, "# of endpoints: %d\n", numep);
++
++ if (is_tnetw1450) {
++ adev->bulkoutep = 1;
++ adev->bulkinep = 2;
++ } else {
++ /* obtain information about the endpoint
++ ** addresses, begin with some default values
++ */
++ adev->bulkoutep = 1;
++ adev->bulkinep = 1;
++ for (i = 0; i < numep; i++) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ ep = usbdev->ep_in[i];
++ if (!ep)
++ continue;
++ epdesc = &ep->desc;
++#else
++ epdesc = usb_epnum_to_ep_desc(usbdev, i);
++ if (!epdesc)
++ continue;
++#endif
++ if (epdesc->bmAttributes & USB_ENDPOINT_XFER_BULK) {
++ if (epdesc->bEndpointAddress & 0x80)
++ adev->bulkinep = epdesc->bEndpointAddress & 0xF;
++ else
++ adev->bulkoutep = epdesc->bEndpointAddress & 0xF;
++ }
++ }
++ }
++ log(L_DEBUG, "bulkout ep: 0x%X\n", adev->bulkoutep);
++ log(L_DEBUG, "bulkin ep: 0x%X\n", adev->bulkinep);
++
++ /* already done by memset: adev->rxtruncsize = 0; */
++ log(L_DEBUG, "TXBUFSIZE=%d RXBUFSIZE=%d\n",
++ (int) TXBUFSIZE, (int) RXBUFSIZE);
++
++ /* Allocate the RX/TX containers. */
++ adev->usb_tx = kmalloc(sizeof(usb_tx_t) * ACX_TX_URB_CNT, GFP_KERNEL);
++ if (!adev->usb_tx) {
++ msg = "acx: no memory for tx container";
++ goto end_nomem;
++ }
++ adev->usb_rx = kmalloc(sizeof(usb_rx_t) * ACX_RX_URB_CNT, GFP_KERNEL);
++ if (!adev->usb_rx) {
++ msg = "acx: no memory for rx container";
++ goto end_nomem;
++ }
++
++ /* Setup URBs for bulk-in/out messages */
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ adev->usb_rx[i].urb = usb_alloc_urb(0, GFP_KERNEL);
++ if (!adev->usb_rx[i].urb) {
++ msg = "acx: no memory for input URB\n";
++ goto end_nomem;
++ }
++ adev->usb_rx[i].urb->status = 0;
++ adev->usb_rx[i].adev = adev;
++ adev->usb_rx[i].busy = 0;
++ }
++
++ for (i = 0; i< ACX_TX_URB_CNT; i++) {
++ adev->usb_tx[i].urb = usb_alloc_urb(0, GFP_KERNEL);
++ if (!adev->usb_tx[i].urb) {
++ msg = "acx: no memory for output URB\n";
++ goto end_nomem;
++ }
++ adev->usb_tx[i].urb->status = 0;
++ adev->usb_tx[i].adev = adev;
++ adev->usb_tx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++
++ usb_set_intfdata(intf, adev);
++ SET_NETDEV_DEV(ndev, &intf->dev);
++
++ /* TODO: move all of fw cmds to open()? But then we won't know our MAC addr
++ until ifup (it's available via reading ACX1xx_IE_DOT11_STATION_ID)... */
++
++ /* put acx out of sleep mode and initialize it */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++
++ result = acx_s_init_mac(adev);
++ if (result)
++ goto end;
++
++ /* TODO: see similar code in pci.c */
++ acxusb_s_read_eeprom_version(adev);
++ acxusb_s_fill_configoption(adev);
++ acx_s_set_defaults(adev);
++ acx_s_get_firmware_version(adev);
++ acx_display_hardware_details(adev);
++
++ /* Register the network device */
++ log(L_INIT, "registering network device\n");
++ result = register_netdev(ndev);
++ if (result) {
++ msg = "acx: failed to register USB network device "
++ "(error %d)\n";
++ goto end_nomem;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ printk("acx: USB module " ACX_RELEASE " loaded successfully\n");
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ /* Everything went OK, we are happy now */
++ result = OK;
++ goto end;
++
++end_nomem:
++ printk(msg, result);
++
++ if (ndev) {
++ if (adev->usb_rx) {
++ for (i = 0; i < ACX_RX_URB_CNT; i++)
++ usb_free_urb(adev->usb_rx[i].urb);
++ kfree(adev->usb_rx);
++ }
++ if (adev->usb_tx) {
++ for (i = 0; i < ACX_TX_URB_CNT; i++)
++ usb_free_urb(adev->usb_tx[i].urb);
++ kfree(adev->usb_tx);
++ }
++ free_netdev(ndev);
++ }
++
++ result = -ENOMEM;
++ goto end;
++
++end_nodev:
++ /* no device we could handle, return error. */
++ result = -EIO;
++
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxusb_e_disconnect()
++**
++** This function is invoked whenever the user pulls the plug from the USB
++** device or the module is removed from the kernel. In these cases, the
++** network devices have to be taken down and all allocated memory has
++** to be freed.
++*/
++static void
++acxusb_e_disconnect(struct usb_interface *intf)
++{
++ acx_device_t *adev = usb_get_intfdata(intf);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ /* No WLAN device... no sense */
++ if (!adev)
++ goto end;
++
++ /* Unregister network device
++ *
++ * If the interface is up, unregister_netdev() will take
++ * care of calling our close() function, which takes
++ * care of unlinking the urbs, sending the device to
++ * sleep, etc...
++ * This can't be called with sem or lock held because
++ * _close() will try to grab it as well if it's called,
++ * deadlocking the machine.
++ */
++ unregister_netdev(adev->ndev);
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++ /* This device exists no more */
++ usb_set_intfdata(intf, NULL);
++ acx_proc_unregister_entries(adev->ndev);
++
++ /*
++ * Here we only free them. _close() took care of
++ * unlinking them.
++ */
++ for (i = 0; i < ACX_RX_URB_CNT; ++i) {
++ usb_free_urb(adev->usb_rx[i].urb);
++ }
++ for (i = 0; i< ACX_TX_URB_CNT; ++i) {
++ usb_free_urb(adev->usb_tx[i].urb);
++ }
++
++ /* Freeing containers */
++ kfree(adev->usb_rx);
++ kfree(adev->usb_tx);
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ free_netdev(adev->ndev);
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_e_open()
++** This function is called when the user sets up the network interface.
++** It initializes a management timer, sets up the USB card and starts
++** the network tx queue and USB receive.
++*/
++static int
++acxusb_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* put the ACX100 out of sleep mode */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++
++ acx_init_task_scheduler(adev);
++
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* acx_s_start needs it */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ acx_s_start(adev);
++
++ /* don't acx_start_queue() here, we need to associate first */
++
++ acx_lock(adev, flags);
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ adev->usb_rx[i].urb->status = 0;
++ }
++
++ acxusb_l_poll_rx(adev, &adev->usb_rx[0]);
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return 0;
++}
++
++
++/***********************************************************************
++** acxusb_e_close()
++**
++** This function stops the network functionality of the interface (invoked
++** when the user calls ifconfig <wlan> down). The tx queue is halted and
++** the device is marked as down. In case there were any pending USB bulk
++** transfers, these are unlinked (asynchronously). The module in-use count
++** is also decreased in this function.
++*/
++static int
++acxusb_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++#ifdef WE_STILL_DONT_CARE_ABOUT_IT
++ /* Transmit a disassociate frame */
++ lock
++ acx_l_transmit_disassoc(adev, &client);
++ unlock
++#endif
++
++ acx_sem_lock(adev);
++
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++
++/* Code below is remarkably similar to acxpci_s_down(). Maybe we can merge them? */
++
++ /* Make sure we don't get any more rx requests */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++
++ /*
++ * We must do FLUSH *without* holding sem to avoid a deadlock.
++ * See pci.c:acxpci_s_down() for deails.
++ */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* Power down the device */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ /* Stop the transmit queue, mark the device as DOWN */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ /* stop pending rx/tx urb transfers */
++ for (i = 0; i < ACX_TX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_tx[i].urb);
++ adev->usb_tx[i].busy = 0;
++ }
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_rx[i].urb);
++ adev->usb_rx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++ acx_unlock(adev, flags);
++
++ /* Must do this outside of lock */
++ del_timer_sync(&adev->mgmt_timer);
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return 0;
++}
++
++
++/***********************************************************************
++** acxusb_l_poll_rx
++** This function (re)initiates a bulk-in USB transfer on a given urb
++*/
++static void
++acxusb_l_poll_rx(acx_device_t *adev, usb_rx_t* rx)
++{
++ struct usb_device *usbdev;
++ struct urb *rxurb;
++ int errcode, rxnum;
++ unsigned int inpipe;
++
++ FN_ENTER;
++
++ rxurb = rx->urb;
++ usbdev = adev->usbdev;
++
++ rxnum = rx - adev->usb_rx;
++
++ inpipe = usb_rcvbulkpipe(usbdev, adev->bulkinep);
++ if (unlikely(rxurb->status == -EINPROGRESS)) {
++ printk(KERN_ERR "acx: error, rx triggered while rx urb in progress\n");
++ /* FIXME: this is nasty, receive is being cancelled by this code
++ * on the other hand, this should not happen anyway...
++ */
++ usb_unlink_urb(rxurb);
++ } else
++ if (unlikely(rxurb->status == -ECONNRESET)) {
++ log(L_USBRXTX, "acx_usb: _poll_rx: connection reset\n");
++ goto end;
++ }
++ rxurb->actual_length = 0;
++ usb_fill_bulk_urb(rxurb, usbdev, inpipe,
++ &rx->bulkin, /* dataptr */
++ RXBUFSIZE, /* size */
++ acxusb_i_complete_rx, /* handler */
++ rx /* handler param */
++ );
++ rxurb->transfer_flags = URB_ASYNC_UNLINK;
++
++ /* ATOMIC: we may be called from complete_rx() usb callback */
++ errcode = usb_submit_urb(rxurb, GFP_ATOMIC);
++ /* FIXME: evaluate the error code! */
++ log(L_USBRXTX, "SUBMIT RX (%d) inpipe=0x%X size=%d errcode=%d\n",
++ rxnum, inpipe, (int) RXBUFSIZE, errcode);
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_i_complete_rx()
++** Inputs:
++** urb -> pointer to USB request block
++** regs -> pointer to register-buffer for syscalls (see asm/ptrace.h)
++**
++** This function is invoked by USB subsystem whenever a bulk receive
++** request returns.
++** The received data is then committed to the network stack and the next
++** USB receive is triggered.
++*/
++static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxusb_i_complete_rx(struct urb *urb)
++#else
++acxusb_i_complete_rx(struct urb *urb, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ rxbuffer_t *ptr;
++ rxbuffer_t *inbuf;
++ usb_rx_t *rx;
++ unsigned long flags;
++ int size, remsize, packetsize, rxnum;
++
++ FN_ENTER;
++
++ BUG_ON(!urb->context);
++
++ rx = (usb_rx_t *)urb->context;
++ adev = rx->adev;
++
++ acx_lock(adev, flags);
++
++ /*
++ * Happens on disconnect or close. Don't play with the urb.
++ * Don't resubmit it. It will get unlinked by close()
++ */
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ log(L_USBRXTX, "rx: device is down, not doing anything\n");
++ goto end_unlock;
++ }
++
++ inbuf = &rx->bulkin;
++ size = urb->actual_length;
++ remsize = size;
++ rxnum = rx - adev->usb_rx;
++
++ log(L_USBRXTX, "RETURN RX (%d) status=%d size=%d\n",
++ rxnum, urb->status, size);
++
++ /* Send the URB that's waiting. */
++ log(L_USBRXTX, "rxnum=%d, sending=%d\n", rxnum, rxnum^1);
++ acxusb_l_poll_rx(adev, &adev->usb_rx[rxnum^1]);
++
++ if (unlikely(size > sizeof(rxbuffer_t)))
++ printk("acx_usb: rx too large: %d, please report\n", size);
++
++ /* check if the transfer was aborted */
++ switch (urb->status) {
++ case 0: /* No error */
++ break;
++ case -EOVERFLOW:
++ printk(KERN_ERR "acx: rx data overrun\n");
++ adev->rxtruncsize = 0; /* Not valid anymore. */
++ goto end_unlock;
++ case -ECONNRESET:
++ adev->rxtruncsize = 0;
++ goto end_unlock;
++ case -ESHUTDOWN: /* rmmod */
++ adev->rxtruncsize = 0;
++ goto end_unlock;
++ default:
++ adev->rxtruncsize = 0;
++ adev->stats.rx_errors++;
++ printk("acx: rx error (urb status=%d)\n", urb->status);
++ goto end_unlock;
++ }
++
++ if (unlikely(!size))
++ printk("acx: warning, encountered zerolength rx packet\n");
++
++ if (urb->transfer_buffer != inbuf)
++ goto end_unlock;
++
++ /* check if previous frame was truncated
++ ** FIXME: this code can only handle truncation
++ ** of consecutive packets!
++ */
++ ptr = inbuf;
++ if (adev->rxtruncsize) {
++ int tail_size;
++
++ ptr = &adev->rxtruncbuf;
++ packetsize = RXBUF_BYTES_USED(ptr);
++ if (acx_debug & L_USBRXTX) {
++ printk("handling truncated frame (truncsize=%d size=%d "
++ "packetsize(from trunc)=%d)\n",
++ adev->rxtruncsize, size, packetsize);
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ acx_dump_bytes(inbuf, RXBUF_HDRSIZE);
++ }
++
++ /* bytes needed for rxtruncbuf completion: */
++ tail_size = packetsize - adev->rxtruncsize;
++
++ if (size < tail_size) {
++ /* there is not enough data to complete this packet,
++ ** simply append the stuff to the truncation buffer
++ */
++ memcpy(((char *)ptr) + adev->rxtruncsize, inbuf, size);
++ adev->rxtruncsize += size;
++ remsize = 0;
++ } else {
++ /* ok, this data completes the previously
++ ** truncated packet. copy it into a descriptor
++ ** and give it to the rest of the stack */
++
++ /* append tail to previously truncated part
++ ** NB: adev->rxtruncbuf (pointed to by ptr) can't
++ ** overflow because this is already checked before
++ ** truncation buffer was filled. See below,
++ ** "if (packetsize > sizeof(rxbuffer_t))..." code */
++ memcpy(((char *)ptr) + adev->rxtruncsize, inbuf, tail_size);
++
++ if (acx_debug & L_USBRXTX) {
++ printk("full trailing packet + 12 bytes:\n");
++ acx_dump_bytes(inbuf, tail_size + RXBUF_HDRSIZE);
++ }
++ acx_l_process_rxbuf(adev, ptr);
++ adev->rxtruncsize = 0;
++ ptr = (rxbuffer_t *) (((char *)inbuf) + tail_size);
++ remsize -= tail_size;
++ }
++ log(L_USBRXTX, "post-merge size=%d remsize=%d\n",
++ size, remsize);
++ }
++
++ /* size = USB data block size
++ ** remsize = unprocessed USB bytes left
++ ** ptr = current pos in USB data block
++ */
++ while (remsize) {
++ if (remsize < RXBUF_HDRSIZE) {
++ printk("acx: truncated rx header (%d bytes)!\n",
++ remsize);
++ if (ACX_DEBUG)
++ acx_dump_bytes(ptr, remsize);
++ break;
++ }
++
++ packetsize = RXBUF_BYTES_USED(ptr);
++ log(L_USBRXTX, "packet with packetsize=%d\n", packetsize);
++
++ if (RXBUF_IS_TXSTAT(ptr)) {
++ /* do rate handling */
++ usb_txstatus_t *stat = (void*)ptr;
++ u16 client_no = (u16)stat->hostdata;
++
++ log(L_USBRXTX, "tx: stat: mac_cnt_rcvd:%04X "
++ "queue_index:%02X mac_status:%02X hostdata:%08X "
++ "rate:%u ack_failures:%02X rts_failures:%02X "
++ "rts_ok:%02X\n",
++ stat->mac_cnt_rcvd,
++ stat->queue_index, stat->mac_status, stat->hostdata,
++ stat->rate, stat->ack_failures, stat->rts_failures,
++ stat->rts_ok);
++
++ if (adev->rate_auto && client_no < VEC_SIZE(adev->sta_list)) {
++ client_t *clt = &adev->sta_list[client_no];
++ u16 cur = stat->hostdata >> 16;
++
++ if (clt && clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ stat->rate, 0, /* actually used rate */
++ stat->mac_status, /* error? */
++ ACX_TX_URB_CNT - adev->tx_free);
++ }
++ }
++ goto next;
++ }
++
++ if (packetsize > sizeof(rxbuffer_t)) {
++ printk("acx: packet exceeds max wlan "
++ "frame size (%d > %d). size=%d\n",
++ packetsize, (int) sizeof(rxbuffer_t), size);
++ if (ACX_DEBUG)
++ acx_dump_bytes(ptr, 16);
++ /* FIXME: put some real error-handling in here! */
++ break;
++ }
++
++ if (packetsize > remsize) {
++ /* frame truncation handling */
++ if (acx_debug & L_USBRXTX) {
++ printk("need to truncate packet, "
++ "packetsize=%d remsize=%d "
++ "size=%d bytes:",
++ packetsize, remsize, size);
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ }
++ memcpy(&adev->rxtruncbuf, ptr, remsize);
++ adev->rxtruncsize = remsize;
++ break;
++ }
++
++ /* packetsize <= remsize */
++ /* now handle the received data */
++ acx_l_process_rxbuf(adev, ptr);
++next:
++ ptr = (rxbuffer_t *)(((char *)ptr) + packetsize);
++ remsize -= packetsize;
++ if ((acx_debug & L_USBRXTX) && remsize) {
++ printk("more than one packet in buffer, "
++ "second packet hdr:");
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ }
++ }
++
++end_unlock:
++ acx_unlock(adev, flags);
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_i_complete_tx()
++** Inputs:
++** urb -> pointer to USB request block
++** regs -> pointer to register-buffer for syscalls (see asm/ptrace.h)
++**
++** This function is invoked upon termination of a USB transfer.
++*/
++static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxusb_i_complete_tx(struct urb *urb)
++#else
++acxusb_i_complete_tx(struct urb *urb, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ usb_tx_t *tx;
++ unsigned long flags;
++ int txnum;
++
++ FN_ENTER;
++
++ BUG_ON(!urb->context);
++
++ tx = (usb_tx_t *)urb->context;
++ adev = tx->adev;
++
++ txnum = tx - adev->usb_tx;
++
++ acx_lock(adev, flags);
++
++ /*
++ * If the iface isn't up, we don't have any right
++ * to play with them. The urb may get unlinked.
++ */
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ log(L_USBRXTX, "tx: device is down, not doing anything\n");
++ goto end_unlock;
++ }
++
++ log(L_USBRXTX, "RETURN TX (%d): status=%d size=%d\n",
++ txnum, urb->status, urb->actual_length);
++
++ /* handle USB transfer errors */
++ switch (urb->status) {
++ case 0: /* No error */
++ break;
++ case -ESHUTDOWN:
++ goto end_unlock;
++ break;
++ case -ECONNRESET:
++ goto end_unlock;
++ break;
++ /* FIXME: real error-handling code here please */
++ default:
++ printk(KERN_ERR "acx: tx error, urb status=%d\n", urb->status);
++ /* FIXME: real error-handling code here please */
++ }
++
++ /* free the URB and check for more data */
++ tx->busy = 0;
++ adev->tx_free++;
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (%u free txbufs)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++end_unlock:
++ acx_unlock(adev, flags);
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxusb_l_alloc_tx
++** Actually returns a usb_tx_t* ptr
++*/
++tx_t*
++acxusb_l_alloc_tx(acx_device_t *adev)
++{
++ usb_tx_t *tx;
++ unsigned head;
++
++ FN_ENTER;
++
++ head = adev->tx_head;
++ do {
++ head = (head + 1) % ACX_TX_URB_CNT;
++ if (!adev->usb_tx[head].busy) {
++ log(L_USBRXTX, "allocated tx %d\n", head);
++ tx = &adev->usb_tx[head];
++ tx->busy = 1;
++ adev->tx_free--;
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "tx: stop queue "
++ "(%u free txbufs)\n", adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++ goto end;
++ }
++ } while (likely(head!=adev->tx_head));
++ tx = NULL;
++ printk_ratelimited("acx: tx buffers full\n");
++end:
++ adev->tx_head = head;
++ FN_EXIT0;
++ return (tx_t*)tx;
++}
++
++
++/***************************************************************
++** Used if alloc_tx()'ed buffer needs to be cancelled without doing tx
++*/
++void
++acxusb_l_dealloc_tx(tx_t *tx_opaque)
++{
++ usb_tx_t* tx = (usb_tx_t*)tx_opaque;
++ tx->busy = 0;
++}
++
++
++/***************************************************************
++*/
++void*
++acxusb_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ usb_tx_t* tx = (usb_tx_t*)tx_opaque;
++ return &tx->bulkout.data;
++}
++
++
++/***************************************************************
++** acxusb_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++*/
++void
++acxusb_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int wlanpkt_len)
++{
++ struct usb_device *usbdev;
++ struct urb* txurb;
++ usb_tx_t* tx;
++ usb_txbuffer_t* txbuf;
++ client_t *clt;
++ wlan_hdr_t* whdr;
++ unsigned int outpipe;
++ int ucode, txnum;
++
++ FN_ENTER;
++
++ tx = ((usb_tx_t *)tx_opaque);
++ txurb = tx->urb;
++ txbuf = &tx->bulkout;
++ whdr = (wlan_hdr_t *)txbuf->data;
++ txnum = tx - adev->usb_tx;
++
++ log(L_DEBUG, "using buf#%d free=%d len=%d\n",
++ txnum, adev->tx_free, wlanpkt_len);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, whdr->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ if (unlikely(clt && !clt->rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* fill the USB transfer header */
++ txbuf->desc = cpu_to_le16(USB_TXBUF_TXDESC);
++ txbuf->mpdu_len = cpu_to_le16(wlanpkt_len);
++ txbuf->queue_index = 1;
++ if (clt) {
++ txbuf->rate = clt->rate_100;
++ txbuf->hostdata = (clt - adev->sta_list) | (clt->rate_cur << 16);
++ } else {
++ txbuf->rate = adev->rate_bcast100;
++ txbuf->hostdata = ((u16)-1) | (adev->rate_bcast << 16);
++ }
++ txbuf->ctrl1 = DESC_CTL_FIRSTFRAG;
++ if (1 == adev->preamble_cur)
++ SET_BIT(txbuf->ctrl1, DESC_CTL_SHORT_PREAMBLE);
++ txbuf->ctrl2 = 0;
++ txbuf->data_len = cpu_to_le16(wlanpkt_len);
++
++ if (unlikely(acx_debug & L_DATA)) {
++ printk("dump of bulk out urb:\n");
++ acx_dump_bytes(txbuf, wlanpkt_len + USB_TXBUF_HDRSIZE);
++ }
++
++ if (unlikely(txurb->status == -EINPROGRESS)) {
++ printk("acx: trying to submit tx urb while already in progress\n");
++ }
++
++ /* now schedule the USB transfer */
++ usbdev = adev->usbdev;
++ outpipe = usb_sndbulkpipe(usbdev, adev->bulkoutep);
++
++ usb_fill_bulk_urb(txurb, usbdev, outpipe,
++ txbuf, /* dataptr */
++ wlanpkt_len + USB_TXBUF_HDRSIZE, /* size */
++ acxusb_i_complete_tx, /* handler */
++ tx /* handler param */
++ );
++
++ txurb->transfer_flags = URB_ASYNC_UNLINK|URB_ZERO_PACKET;
++ ucode = usb_submit_urb(txurb, GFP_ATOMIC);
++ log(L_USBRXTX, "SUBMIT TX (%d): outpipe=0x%X buf=%p txsize=%d "
++ "rate=%u errcode=%d\n", txnum, outpipe, txbuf,
++ wlanpkt_len + USB_TXBUF_HDRSIZE, txbuf->rate, ucode);
++
++ if (unlikely(ucode)) {
++ printk(KERN_ERR "acx: submit_urb() error=%d txsize=%d\n",
++ ucode, wlanpkt_len + USB_TXBUF_HDRSIZE);
++
++ /* on error, just mark the frame as done and update
++ ** the statistics
++ */
++ adev->stats.tx_errors++;
++ tx->busy = 0;
++ adev->tx_free++;
++ /* needed? if (adev->tx_free > TX_START_QUEUE) acx_wake_queue(...) */
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++*/
++static void
++acxusb_i_set_rx_mode(struct net_device *ndev)
++{
++}
++
++
++/***********************************************************************
++*/
++#ifdef HAVE_TX_TIMEOUT
++static void
++acxusb_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ /* unlink the URBs */
++ for (i = 0; i < ACX_TX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_tx[i].urb);
++ adev->usb_tx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++ /* TODO: stats update */
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++#endif
++
++
++/***********************************************************************
++** init_module()
++**
++** This function is invoked upon loading of the kernel module.
++** It registers itself at the kernel's USB subsystem.
++**
++** Returns: Errorcode on failure, 0 on success
++*/
++int __init
++acxusb_e_init_module(void)
++{
++ log(L_INIT, "USB module " ACX_RELEASE " initialized, "
++ "probing for devices...\n");
++ return usb_register(&acxusb_driver);
++}
++
++
++
++/***********************************************************************
++** cleanup_module()
++**
++** This function is invoked as last step of the module unloading. It simply
++** deregisters this module at the kernel's USB subsystem.
++*/
++void __exit
++acxusb_e_cleanup_module()
++{
++ usb_deregister(&acxusb_driver);
++}
++
++
++/***********************************************************************
++** DEBUG STUFF
++*/
++#if ACX_DEBUG
++
++#ifdef UNUSED
++static void
++dump_device(struct usb_device *usbdev)
++{
++ int i;
++ struct usb_config_descriptor *cd;
++
++ printk("acx device dump:\n");
++ printk(" devnum: %d\n", usbdev->devnum);
++ printk(" speed: %d\n", usbdev->speed);
++ printk(" tt: 0x%X\n", (unsigned int)(usbdev->tt));
++ printk(" ttport: %d\n", (unsigned int)(usbdev->ttport));
++ printk(" toggle[0]: 0x%X toggle[1]: 0x%X\n", (unsigned int)(usbdev->toggle[0]), (unsigned int)(usbdev->toggle[1]));
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ /* This saw a change after 2.6.10 */
++ printk(" ep_in wMaxPacketSize: ");
++ for (i = 0; i < 16; ++i)
++ if (usbdev->ep_in[i] != NULL)
++ printk("%d:%d ", i, usbdev->ep_in[i]->desc.wMaxPacketSize);
++ printk("\n");
++ printk(" ep_out wMaxPacketSize: ");
++ for (i = 0; i < VEC_SIZE(usbdev->ep_out); ++i)
++ if (usbdev->ep_out[i] != NULL)
++ printk("%d:%d ", i, usbdev->ep_out[i]->desc.wMaxPacketSize);
++ printk("\n");
++#else
++ printk(" epmaxpacketin: ");
++ for (i = 0; i < 16; i++)
++ printk("%d ", usbdev->epmaxpacketin[i]);
++ printk("\n");
++ printk(" epmaxpacketout: ");
++ for (i = 0; i < 16; i++)
++ printk("%d ", usbdev->epmaxpacketout[i]);
++ printk("\n");
++#endif
++ printk(" parent: 0x%X\n", (unsigned int)usbdev->parent);
++ printk(" bus: 0x%X\n", (unsigned int)usbdev->bus);
++#ifdef NO_DATATYPE
++ printk(" configs: ");
++ for (i = 0; i < usbdev->descriptor.bNumConfigurations; i++)
++ printk("0x%X ", usbdev->config[i]);
++ printk("\n");
++#endif
++ printk(" actconfig: %p\n", usbdev->actconfig);
++ dump_device_descriptor(&usbdev->descriptor);
++
++ cd = &usbdev->config->desc;
++ dump_config_descriptor(cd);
++}
++
++
++/***********************************************************************
++*/
++static void
++dump_config_descriptor(struct usb_config_descriptor *cd)
++{
++ printk("Configuration Descriptor:\n");
++ if (!cd) {
++ printk("NULL\n");
++ return;
++ }
++ printk(" bLength: %d (0x%X)\n", cd->bLength, cd->bLength);
++ printk(" bDescriptorType: %d (0x%X)\n", cd->bDescriptorType, cd->bDescriptorType);
++ printk(" bNumInterfaces: %d (0x%X)\n", cd->bNumInterfaces, cd->bNumInterfaces);
++ printk(" bConfigurationValue: %d (0x%X)\n", cd->bConfigurationValue, cd->bConfigurationValue);
++ printk(" iConfiguration: %d (0x%X)\n", cd->iConfiguration, cd->iConfiguration);
++ printk(" bmAttributes: %d (0x%X)\n", cd->bmAttributes, cd->bmAttributes);
++ /* printk(" MaxPower: %d (0x%X)\n", cd->bMaxPower, cd->bMaxPower); */
++}
++
++
++static void
++dump_device_descriptor(struct usb_device_descriptor *dd)
++{
++ printk("Device Descriptor:\n");
++ if (!dd) {
++ printk("NULL\n");
++ return;
++ }
++ printk(" bLength: %d (0x%X)\n", dd->bLength, dd->bLength);
++ printk(" bDescriptortype: %d (0x%X)\n", dd->bDescriptorType, dd->bDescriptorType);
++ printk(" bcdUSB: %d (0x%X)\n", dd->bcdUSB, dd->bcdUSB);
++ printk(" bDeviceClass: %d (0x%X)\n", dd->bDeviceClass, dd->bDeviceClass);
++ printk(" bDeviceSubClass: %d (0x%X)\n", dd->bDeviceSubClass, dd->bDeviceSubClass);
++ printk(" bDeviceProtocol: %d (0x%X)\n", dd->bDeviceProtocol, dd->bDeviceProtocol);
++ printk(" bMaxPacketSize0: %d (0x%X)\n", dd->bMaxPacketSize0, dd->bMaxPacketSize0);
++ printk(" idVendor: %d (0x%X)\n", dd->idVendor, dd->idVendor);
++ printk(" idProduct: %d (0x%X)\n", dd->idProduct, dd->idProduct);
++ printk(" bcdDevice: %d (0x%X)\n", dd->bcdDevice, dd->bcdDevice);
++ printk(" iManufacturer: %d (0x%X)\n", dd->iManufacturer, dd->iManufacturer);
++ printk(" iProduct: %d (0x%X)\n", dd->iProduct, dd->iProduct);
++ printk(" iSerialNumber: %d (0x%X)\n", dd->iSerialNumber, dd->iSerialNumber);
++ printk(" bNumConfigurations: %d (0x%X)\n", dd->bNumConfigurations, dd->bNumConfigurations);
++}
++#endif /* UNUSED */
++
++#endif /* ACX_DEBUG */
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,424 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/types.h>
++#include <linux/if_arp.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++#define LOG_BAD_EID(hdr,len,ie_ptr) acx_log_bad_eid(hdr, len, ((wlan_ie_t*)ie_ptr))
++
++#define IE_EID(ie_ptr) (((wlan_ie_t*)(ie_ptr))->eid)
++#define IE_LEN(ie_ptr) (((wlan_ie_t*)(ie_ptr))->len)
++#define OFFSET(hdr,off) (WLAN_HDR_A3_DATAP(hdr) + (off))
++
++
++/***********************************************************************
++** wlan_mgmt_decode_XXX
++**
++** Given a complete frame in f->hdr, sets the pointers in f to
++** the areas that correspond to the parts of the frame.
++**
++** Assumptions:
++** 1) f->len and f->hdr are already set
++** 2) f->len is the length of the MAC header + data, the FCS
++** is NOT included
++** 3) all members except len and hdr are zero
++** Arguments:
++** f frame structure
++**
++** Returns:
++** nothing
++**
++** Side effects:
++** frame structure members are pointing at their
++** respective portions of the frame buffer.
++*/
++void
++wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_BEACON;
++
++ /*-- Fixed Fields ----*/
++ f->ts = (u64 *) OFFSET(f->hdr, WLAN_BEACON_OFF_TS);
++ f->bcn_int = (u16 *) OFFSET(f->hdr, WLAN_BEACON_OFF_BCN_INT);
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_BEACON_OFF_CAPINFO);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_BEACON_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_FH_PARMS:
++ f->fh_parms = (wlan_ie_fh_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_DS_PARMS:
++ f->ds_parms = (wlan_ie_ds_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_CF_PARMS:
++ f->cf_parms = (wlan_ie_cf_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_IBSS_PARMS:
++ f->ibss_parms = (wlan_ie_ibss_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_TIM:
++ f->tim = (wlan_ie_tim_t *) ie_ptr;
++ break;
++ case WLAN_EID_ERP_INFO:
++ f->erp = (wlan_ie_erp_t *) ie_ptr;
++ break;
++
++ case WLAN_EID_COUNTRY:
++ /* was seen: 07 06 47 42 20 01 0D 14 */
++ case WLAN_EID_PWR_CONSTRAINT:
++ /* was seen by Ashwin Mansinghka <ashwin_man@yahoo.com> from
++ Atheros-based PCI card in AP mode using madwifi drivers: */
++ /* 20 01 00 */
++ case WLAN_EID_NONERP:
++ /* was seen from WRT54GS with OpenWrt: 2F 01 07 */
++ case WLAN_EID_UNKNOWN128:
++ /* was seen by Jacek Jablonski <conexion2000@gmail.com> from Orinoco AP */
++ /* 80 06 00 60 1D 2C 3B 00 */
++ case WLAN_EID_UNKNOWN133:
++ /* was seen by David Bronaugh <dbronaugh@linuxboxen.org> from ???? */
++ /* 85 1E 00 00 84 12 07 00 FF 00 11 00 61 70 63 31 */
++ /* 63 73 72 30 34 32 00 00 00 00 00 00 00 00 00 25 */
++ case WLAN_EID_UNKNOWN223:
++ /* was seen by Carlos Martin <carlosmn@gmail.com> from ???? */
++ /* DF 20 01 1E 04 00 00 00 06 63 09 02 FF 0F 30 30 */
++ /* 30 42 36 42 33 34 30 39 46 31 00 00 00 00 00 00 00 00 */
++ case WLAN_EID_GENERIC:
++ /* WPA: hostap code:
++ if (pos[1] >= 4 &&
++ pos[2] == 0x00 && pos[3] == 0x50 &&
++ pos[4] == 0xf2 && pos[5] == 1) {
++ wpa = pos;
++ wpa_len = pos[1] + 2;
++ }
++ TI x4 mode: seen DD 04 08 00 28 00
++ (08 00 28 is TI's OUI)
++ last byte is probably 0/1 - disabled/enabled
++ */
++ case WLAN_EID_RSN:
++ /* hostap does something with it:
++ rsn = pos;
++ rsn_len = pos[1] + 2;
++ */
++ break;
++
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++#ifdef UNUSED
++void wlan_mgmt_decode_ibssatim(wlan_fr_ibssatim_t * f)
++{
++ f->type = WLAN_FSTYPE_ATIM;
++ /*-- Fixed Fields ----*/
++ /*-- Information elements */
++}
++#endif /* UNUSED */
++
++void
++wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t * f)
++{
++ f->type = WLAN_FSTYPE_DISASSOC;
++
++ /*-- Fixed Fields ----*/
++ f->reason = (u16 *) OFFSET(f->hdr, WLAN_DISASSOC_OFF_REASON);
++
++ /*-- Information elements */
++}
++
++
++void
++wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++
++ f->type = WLAN_FSTYPE_ASSOCREQ;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_CAP_INFO);
++ f->listen_int = (u16 *) OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_LISTEN_INT);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t * f)
++{
++ f->type = WLAN_FSTYPE_ASSOCRESP;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_CAP_INFO);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_STATUS);
++ f->aid = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_AID);
++
++ /*-- Information elements */
++ f->supp_rates = (wlan_ie_supp_rates_t *)
++ OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_SUPP_RATES);
++}
++
++
++#ifdef UNUSED
++void
++wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_REASSOCREQ;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_CAP_INFO);
++ f->listen_int = (u16 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_LISTEN_INT);
++ f->curr_ap = (u8 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_CURR_AP);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t * f)
++{
++ f->type = WLAN_FSTYPE_REASSOCRESP;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_CAP_INFO);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_STATUS);
++ f->aid = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_AID);
++
++ /*-- Information elements */
++ f->supp_rates = (wlan_ie_supp_rates_t *)
++ OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_SUPP_RATES);
++}
++
++
++void
++wlan_mgmt_decode_probereq(wlan_fr_probereq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_PROBEREQ;
++
++ /*-- Fixed Fields ----*/
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_PROBEREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++#endif /* UNUSED */
++
++
++/* TODO: decoding of beacon and proberesp can be merged (similar structure) */
++void
++wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_PROBERESP;
++
++ /*-- Fixed Fields ----*/
++ f->ts = (u64 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_TS);
++ f->bcn_int = (u16 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_BCN_INT);
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_CAP_INFO);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_PROBERESP_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_FH_PARMS:
++ f->fh_parms = (wlan_ie_fh_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_DS_PARMS:
++ f->ds_parms = (wlan_ie_ds_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_CF_PARMS:
++ f->cf_parms = (wlan_ie_cf_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_IBSS_PARMS:
++ f->ibss_parms = (wlan_ie_ibss_parms_t *) ie_ptr;
++ break;
++#ifdef DONT_DO_IT_ADD_REAL_HANDLING_INSTEAD
++ case WLAN_EID_COUNTRY:
++ break;
++ ...
++#endif
++#ifdef SENT_HERE_BY_OPENWRT
++ /* should those be trapped or handled?? */
++ case WLAN_EID_ERP_INFO:
++ break;
++ case WLAN_EID_NONERP:
++ break;
++ case WLAN_EID_GENERIC:
++ break;
++#endif
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_authen(wlan_fr_authen_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_AUTHEN;
++
++ /*-- Fixed Fields ----*/
++ f->auth_alg = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_AUTH_ALG);
++ f->auth_seq = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_AUTH_SEQ);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_STATUS);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_AUTHEN_OFF_CHALLENGE);
++ if ((ie_ptr < end) && (IE_EID(ie_ptr) == WLAN_EID_CHALLENGE)) {
++ f->challenge = (wlan_ie_challenge_t *) ie_ptr;
++ }
++}
++
++
++void
++wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t * f)
++{
++ f->type = WLAN_FSTYPE_DEAUTHEN;
++
++ /*-- Fixed Fields ----*/
++ f->reason = (u16 *) OFFSET(f->hdr, WLAN_DEAUTHEN_OFF_REASON);
++
++ /*-- Information elements */
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_compat.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_compat.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,260 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/*=============================================================*/
++/*------ Establish Platform Identity --------------------------*/
++/*=============================================================*/
++/* Key macros: */
++/* WLAN_CPU_FAMILY */
++#define WLAN_Ix86 1
++#define WLAN_PPC 2
++#define WLAN_Ix96 3
++#define WLAN_ARM 4
++#define WLAN_ALPHA 5
++#define WLAN_MIPS 6
++#define WLAN_HPPA 7
++#define WLAN_SPARC 8
++#define WLAN_SH 9
++#define WLAN_x86_64 10
++/* WLAN_CPU_CORE */
++#define WLAN_I386CORE 1
++#define WLAN_PPCCORE 2
++#define WLAN_I296 3
++#define WLAN_ARMCORE 4
++#define WLAN_ALPHACORE 5
++#define WLAN_MIPSCORE 6
++#define WLAN_HPPACORE 7
++/* WLAN_CPU_PART */
++#define WLAN_I386PART 1
++#define WLAN_MPC860 2
++#define WLAN_MPC823 3
++#define WLAN_I296SA 4
++#define WLAN_PPCPART 5
++#define WLAN_ARMPART 6
++#define WLAN_ALPHAPART 7
++#define WLAN_MIPSPART 8
++#define WLAN_HPPAPART 9
++/* WLAN_SYSARCH */
++#define WLAN_PCAT 1
++#define WLAN_MBX 2
++#define WLAN_RPX 3
++#define WLAN_LWARCH 4
++#define WLAN_PMAC 5
++#define WLAN_SKIFF 6
++#define WLAN_BITSY 7
++#define WLAN_ALPHAARCH 7
++#define WLAN_MIPSARCH 9
++#define WLAN_HPPAARCH 10
++/* WLAN_HOSTIF (generally set on the command line, not detected) */
++#define WLAN_PCMCIA 1
++#define WLAN_ISA 2
++#define WLAN_PCI 3
++#define WLAN_USB 4
++#define WLAN_PLX 5
++
++/* Note: the PLX HOSTIF above refers to some vendors implementations for */
++/* PCI. It's a PLX chip that is a PCI to PCMCIA adapter, but it */
++/* isn't a real PCMCIA host interface adapter providing all the */
++/* card&socket services. */
++
++#ifdef __powerpc__
++#ifndef __ppc__
++#define __ppc__
++#endif
++#endif
++
++#if (defined(CONFIG_PPC) || defined(CONFIG_8xx))
++#ifndef __ppc__
++#define __ppc__
++#endif
++#endif
++
++#if defined(__x86_64__)
++ #define WLAN_CPU_FAMILY WLAN_x86_64
++ #define WLAN_SYSARCH WLAN_PCAT
++#elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)
++ #define WLAN_CPU_FAMILY WLAN_Ix86
++ #define WLAN_CPU_CORE WLAN_I386CORE
++ #define WLAN_CPU_PART WLAN_I386PART
++ #define WLAN_SYSARCH WLAN_PCAT
++#elif defined(__ppc__)
++ #define WLAN_CPU_FAMILY WLAN_PPC
++ #define WLAN_CPU_CORE WLAN_PPCCORE
++ #if defined(CONFIG_MBX)
++ #define WLAN_CPU_PART WLAN_MPC860
++ #define WLAN_SYSARCH WLAN_MBX
++ #elif defined(CONFIG_RPXLITE)
++ #define WLAN_CPU_PART WLAN_MPC823
++ #define WLAN_SYSARCH WLAN_RPX
++ #elif defined(CONFIG_RPXCLASSIC)
++ #define WLAN_CPU_PART WLAN_MPC860
++ #define WLAN_SYSARCH WLAN_RPX
++ #else
++ #define WLAN_CPU_PART WLAN_PPCPART
++ #define WLAN_SYSARCH WLAN_PMAC
++ #endif
++#elif defined(__arm__)
++ #define WLAN_CPU_FAMILY WLAN_ARM
++ #define WLAN_CPU_CORE WLAN_ARMCORE
++ #define WLAN_CPU_PART WLAN_ARM_PART
++ #define WLAN_SYSARCH WLAN_SKIFF
++#elif defined(__alpha__)
++ #define WLAN_CPU_FAMILY WLAN_ALPHA
++ #define WLAN_CPU_CORE WLAN_ALPHACORE
++ #define WLAN_CPU_PART WLAN_ALPHAPART
++ #define WLAN_SYSARCH WLAN_ALPHAARCH
++#elif defined(__mips__)
++ #define WLAN_CPU_FAMILY WLAN_MIPS
++ #define WLAN_CPU_CORE WLAN_MIPSCORE
++ #define WLAN_CPU_PART WLAN_MIPSPART
++ #define WLAN_SYSARCH WLAN_MIPSARCH
++#elif defined(__hppa__)
++ #define WLAN_CPU_FAMILY WLAN_HPPA
++ #define WLAN_CPU_CORE WLAN_HPPACORE
++ #define WLAN_CPU_PART WLAN_HPPAPART
++ #define WLAN_SYSARCH WLAN_HPPAARCH
++#elif defined(__sparc__)
++ #define WLAN_CPU_FAMILY WLAN_SPARC
++ #define WLAN_SYSARCH WLAN_SPARC
++#elif defined(__sh__)
++ #define WLAN_CPU_FAMILY WLAN_SH
++ #define WLAN_SYSARCH WLAN_SHARCH
++ #ifndef __LITTLE_ENDIAN__
++ #define __LITTLE_ENDIAN__
++ #endif
++#else
++ #error "No CPU identified!"
++#endif
++
++/*
++ Some big endian machines implicitly do all I/O in little endian mode.
++
++ In particular:
++ Linux/PPC on PowerMacs (PCI)
++ Arm/Intel Xscale (PCI)
++
++ This may also affect PLX boards and other BE &| PPC platforms;
++ as new ones are discovered, add them below.
++*/
++
++#if ((WLAN_SYSARCH == WLAN_SKIFF) || (WLAN_SYSARCH == WLAN_PMAC))
++#define REVERSE_ENDIAN
++#endif
++
++/*=============================================================*/
++/*------ Hardware Portability Macros --------------------------*/
++/*=============================================================*/
++#if (WLAN_CPU_FAMILY == WLAN_PPC)
++#define wlan_inw(a) in_be16((unsigned short *)((a)+_IO_BASE))
++#define wlan_inw_le16_to_cpu(a) inw((a))
++#define wlan_outw(v,a) out_be16((unsigned short *)((a)+_IO_BASE), (v))
++#define wlan_outw_cpu_to_le16(v,a) outw((v),(a))
++#else
++#define wlan_inw(a) inw((a))
++#define wlan_inw_le16_to_cpu(a) __cpu_to_le16(inw((a)))
++#define wlan_outw(v,a) outw((v),(a))
++#define wlan_outw_cpu_to_le16(v,a) outw(__cpu_to_le16((v)),(a))
++#endif
++
++/*=============================================================*/
++/*------ Bit settings -----------------------------------------*/
++/*=============================================================*/
++#define ieee2host16(n) __le16_to_cpu(n)
++#define ieee2host32(n) __le32_to_cpu(n)
++#define host2ieee16(n) __cpu_to_le16(n)
++#define host2ieee32(n) __cpu_to_le32(n)
++
++/* for constants */
++#ifdef __LITTLE_ENDIAN
++ #define IEEE16(a,n) a = n, a##i = n,
++#else
++ #ifdef __BIG_ENDIAN
++ /* shifts would produce gcc warnings. Oh well... */
++ #define IEEE16(a,n) a = n, a##i = ((n&0xff)*256 + ((n&0xff00)/256)),
++ #else
++ #error give me endianness or give me death
++ #endif
++#endif
++
++/*=============================================================*/
++/*------ Compiler Portability Macros --------------------------*/
++/*=============================================================*/
++#define WLAN_PACKED __attribute__ ((packed))
++
++/* Interrupt handler backwards compatibility stuff */
++#ifndef IRQ_NONE
++#define IRQ_NONE
++#define IRQ_HANDLED
++typedef void irqreturn_t;
++#endif
++
++#ifndef ARPHRD_IEEE80211_PRISM
++#define ARPHRD_IEEE80211_PRISM 802
++#endif
++
++#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
++
++/*============================================================================*
++ * Constants *
++ *============================================================================*/
++#define WLAN_IEEE_OUI_LEN 3
++
++/*============================================================================*
++ * Types *
++ *============================================================================*/
++
++/* local ether header type */
++typedef struct wlan_ethhdr {
++ u8 daddr[ETH_ALEN];
++ u8 saddr[ETH_ALEN];
++ u16 type;
++} WLAN_PACKED wlan_ethhdr_t;
++
++/* local llc header type */
++typedef struct wlan_llc {
++ u8 dsap;
++ u8 ssap;
++ u8 ctl;
++} WLAN_PACKED wlan_llc_t;
++
++/* local snap header type */
++typedef struct wlan_snap {
++ u8 oui[WLAN_IEEE_OUI_LEN];
++ u16 type;
++} WLAN_PACKED wlan_snap_t;
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_hdr.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_hdr.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,497 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/* mini-doc
++
++Here are all 11b/11g/11a rates and modulations:
++
++ 11b 11g 11a
++ --- --- ---
++ 1 |B |B |
++ 2 |Q |Q |
++ 5.5|Cp |C p|
++ 6 | |Od |O
++ 9 | |od |o
++11 |Cp |C p|
++12 | |Od |O
++18 | |od |o
++22 | | p|
++24 | |Od |O
++33 | | p|
++36 | |od |o
++48 | |od |o
++54 | |od |o
++
++Mandatory:
++ B - DBPSK (Differential Binary Phase Shift Keying)
++ Q - DQPSK (Differential Quaternary Phase Shift Keying)
++ C - CCK (Complementary Code Keying, a form of DSSS
++ (Direct Sequence Spread Spectrum) modulation)
++ O - OFDM (Orthogonal Frequency Division Multiplexing)
++Optional:
++ o - OFDM
++ d - CCK-OFDM (also known as DSSS-OFDM)
++ p - PBCC (Packet Binary Convolutional Coding)
++
++The term CCK-OFDM may be used interchangeably with DSSS-OFDM
++(the IEEE 802.11g-2003 standard uses the latter terminology).
++In the CCK-OFDM, the PLCP header of the frame uses the CCK form of DSSS,
++while the PLCP payload (the MAC frame) is modulated using OFDM.
++
++Basically, you must use CCK-OFDM if you have mixed 11b/11g environment,
++or else (pure OFDM) 11b equipment may not realize that AP
++is sending a packet and start sending its own one.
++Sadly, looks like acx111 does not support CCK-OFDM, only pure OFDM.
++
++Re PBCC: avoid using it. It makes sense only if you have
++TI "11b+" hardware. You _must_ use PBCC in order to reach 22Mbps on it.
++
++Preambles:
++
++Long preamble (at 1Mbit rate, takes 144 us):
++ 16 bytes ones
++ 2 bytes 0xF3A0 (lsb sent first)
++PLCP header follows (at 1Mbit also):
++ 1 byte Signal: speed, in 0.1Mbit units, except for:
++ 33Mbit: 33 (instead of 330 - doesn't fit in octet)
++ all CCK-OFDM rates: 30
++ 1 byte Service
++ 0,1,4: reserved
++ 2: 1=locked clock
++ 3: 1=PBCC
++ 5: Length Extension (PBCC 22,33Mbit (11g only)) <-
++ 6: Length Extension (PBCC 22,33Mbit (11g only)) <- BLACK MAGIC HERE
++ 7: Length Extension <-
++ 2 bytes Length (time needed to tx this frame)
++ a) 5.5 Mbit/s CCK
++ Length = octets*8/5.5, rounded up to integer
++ b) 11 Mbit/s CCK
++ Length = octets*8/11, rounded up to integer
++ Service bit 7:
++ 0 = rounding took less than 8/11
++ 1 = rounding took more than or equal to 8/11
++ c) 5.5 Mbit/s PBCC
++ Length = (octets+1)*8/5.5, rounded up to integer
++ d) 11 Mbit/s PBCC
++ Length = (octets+1)*8/11, rounded up to integer
++ Service bit 7:
++ 0 = rounding took less than 8/11
++ 1 = rounding took more than or equal to 8/11
++ e) 22 Mbit/s PBCC
++ Length = (octets+1)*8/22, rounded up to integer
++ Service bits 6,7:
++ 00 = rounding took less than 8/22ths
++ 01 = rounding took 8/22...15/22ths
++ 10 = rounding took 16/22ths or more.
++ f) 33 Mbit/s PBCC
++ Length = (octets+1)*8/33, rounded up to integer
++ Service bits 5,6,7:
++ 000 rounding took less than 8/33
++ 001 rounding took 8/33...15/33
++ 010 rounding took 16/33...23/33
++ 011 rounding took 24/33...31/33
++ 100 rounding took 32/33 or more
++ 2 bytes CRC
++
++PSDU follows (up to 2346 bytes at selected rate)
++
++While Signal value alone is not enough to determine rate and modulation,
++Signal+Service is always sufficient.
++
++Short preamble (at 1Mbit rate, takes 72 us):
++ 7 bytes zeroes
++ 2 bytes 0x05CF (lsb sent first)
++PLCP header follows *at 2Mbit/s*. Format is the same as in long preamble.
++PSDU follows (up to 2346 bytes at selected rate)
++
++OFDM preamble is completely different, uses OFDM
++modulation from the start and thus easily identifiable.
++Not shown here.
++*/
++
++
++/***********************************************************************
++** Constants
++*/
++
++#define WLAN_HDR_A3_LEN 24
++#define WLAN_HDR_A4_LEN 30
++/* IV structure:
++** 3 bytes: Initialization Vector (24 bits)
++** 1 byte: 0..5: padding, must be 0; 6..7: key selector (0-3)
++*/
++#define WLAN_WEP_IV_LEN 4
++/* 802.11 says 2312 but looks like 2312 is a max size of _WEPed data_ */
++#define WLAN_DATA_MAXLEN 2304
++#define WLAN_WEP_ICV_LEN 4
++#define WLAN_FCS_LEN 4
++#define WLAN_A3FR_MAXLEN (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN)
++#define WLAN_A4FR_MAXLEN (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN)
++#define WLAN_A3FR_MAXLEN_FCS (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN + 4)
++#define WLAN_A4FR_MAXLEN_FCS (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + 4)
++#define WLAN_A3FR_MAXLEN_WEP (WLAN_A3FR_MAXLEN + 8)
++#define WLAN_A4FR_MAXLEN_WEP (WLAN_A4FR_MAXLEN + 8)
++#define WLAN_A3FR_MAXLEN_WEP_FCS (WLAN_A3FR_MAXLEN_FCS + 8)
++#define WLAN_A4FR_MAXLEN_WEP_FCS (WLAN_A4FR_MAXLEN_FCS + 8)
++
++#define WLAN_BSS_TS_LEN 8
++#define WLAN_SSID_MAXLEN 32
++#define WLAN_BEACON_FR_MAXLEN (WLAN_HDR_A3_LEN + 334)
++#define WLAN_ATIM_FR_MAXLEN (WLAN_HDR_A3_LEN + 0)
++#define WLAN_DISASSOC_FR_MAXLEN (WLAN_HDR_A3_LEN + 2)
++#define WLAN_ASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 48)
++#define WLAN_ASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16)
++#define WLAN_REASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 54)
++#define WLAN_REASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16)
++#define WLAN_PROBEREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 44)
++#define WLAN_PROBERESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 78)
++#define WLAN_AUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 261)
++#define WLAN_DEAUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 2)
++#define WLAN_CHALLENGE_IE_LEN 130
++#define WLAN_CHALLENGE_LEN 128
++#define WLAN_WEP_MAXKEYLEN 13
++#define WLAN_WEP_NKEYS 4
++
++/*--- Frame Control Field -------------------------------------*/
++/* Frame Types */
++#define WLAN_FTYPE_MGMT 0x00
++#define WLAN_FTYPE_CTL 0x01
++#define WLAN_FTYPE_DATA 0x02
++
++/* Frame subtypes */
++/* Management */
++#define WLAN_FSTYPE_ASSOCREQ 0x00
++#define WLAN_FSTYPE_ASSOCRESP 0x01
++#define WLAN_FSTYPE_REASSOCREQ 0x02
++#define WLAN_FSTYPE_REASSOCRESP 0x03
++#define WLAN_FSTYPE_PROBEREQ 0x04
++#define WLAN_FSTYPE_PROBERESP 0x05
++#define WLAN_FSTYPE_BEACON 0x08
++#define WLAN_FSTYPE_ATIM 0x09
++#define WLAN_FSTYPE_DISASSOC 0x0a
++#define WLAN_FSTYPE_AUTHEN 0x0b
++#define WLAN_FSTYPE_DEAUTHEN 0x0c
++
++/* Control */
++#define WLAN_FSTYPE_PSPOLL 0x0a
++#define WLAN_FSTYPE_RTS 0x0b
++#define WLAN_FSTYPE_CTS 0x0c
++#define WLAN_FSTYPE_ACK 0x0d
++#define WLAN_FSTYPE_CFEND 0x0e
++#define WLAN_FSTYPE_CFENDCFACK 0x0f
++
++/* Data */
++#define WLAN_FSTYPE_DATAONLY 0x00
++#define WLAN_FSTYPE_DATA_CFACK 0x01
++#define WLAN_FSTYPE_DATA_CFPOLL 0x02
++#define WLAN_FSTYPE_DATA_CFACK_CFPOLL 0x03
++#define WLAN_FSTYPE_NULL 0x04
++#define WLAN_FSTYPE_CFACK 0x05
++#define WLAN_FSTYPE_CFPOLL 0x06
++#define WLAN_FSTYPE_CFACK_CFPOLL 0x07
++
++/*--- FC Constants v. 2.0 ------------------------------------*/
++/* Each constant is defined twice: WF_CONST is in host */
++/* byteorder, WF_CONSTi is in ieee byteorder. */
++/* Usage: */
++/* printf("the frame subtype is %X", WF_FC_FTYPEi & rx.fc); */
++/* tx.fc = WF_FTYPE_CTLi | WF_FSTYPE_RTSi; */
++/*------------------------------------------------------------*/
++
++enum {
++/*--- Frame Control Field -------------------------------------*/
++/* Protocol version: always 0 for current 802.11 standards */
++IEEE16(WF_FC_PVER, 0x0003)
++IEEE16(WF_FC_FTYPE, 0x000c)
++IEEE16(WF_FC_FSTYPE, 0x00f0)
++IEEE16(WF_FC_TODS, 0x0100)
++IEEE16(WF_FC_FROMDS, 0x0200)
++IEEE16(WF_FC_FROMTODS, 0x0300)
++IEEE16(WF_FC_MOREFRAG, 0x0400)
++IEEE16(WF_FC_RETRY, 0x0800)
++/* Indicates PS mode in which STA will be after successful completion
++** of current frame exchange sequence. Always 0 for AP frames */
++IEEE16(WF_FC_PWRMGT, 0x1000)
++/* What MoreData=1 means:
++** From AP to STA in PS mode: don't sleep yet, I have more frames for you
++** From Contention-Free (CF) Pollable STA in response to a CF-Poll:
++** STA has buffered frames for transmission in response to next CF-Poll
++** Bcast/mcast frames transmitted from AP:
++** when additional bcast/mcast frames remain to be transmitted by AP
++** during this beacon interval
++** In all other cases MoreData=0 */
++IEEE16(WF_FC_MOREDATA, 0x2000)
++IEEE16(WF_FC_ISWEP, 0x4000)
++IEEE16(WF_FC_ORDER, 0x8000)
++
++/* Frame Types */
++IEEE16(WF_FTYPE_MGMT, 0x00)
++IEEE16(WF_FTYPE_CTL, 0x04)
++IEEE16(WF_FTYPE_DATA, 0x08)
++
++/* Frame subtypes */
++/* Management */
++IEEE16(WF_FSTYPE_ASSOCREQ, 0x00)
++IEEE16(WF_FSTYPE_ASSOCRESP, 0x10)
++IEEE16(WF_FSTYPE_REASSOCREQ, 0x20)
++IEEE16(WF_FSTYPE_REASSOCRESP, 0x30)
++IEEE16(WF_FSTYPE_PROBEREQ, 0x40)
++IEEE16(WF_FSTYPE_PROBERESP, 0x50)
++IEEE16(WF_FSTYPE_BEACON, 0x80)
++IEEE16(WF_FSTYPE_ATIM, 0x90)
++IEEE16(WF_FSTYPE_DISASSOC, 0xa0)
++IEEE16(WF_FSTYPE_AUTHEN, 0xb0)
++IEEE16(WF_FSTYPE_DEAUTHEN, 0xc0)
++
++/* Control */
++IEEE16(WF_FSTYPE_PSPOLL, 0xa0)
++IEEE16(WF_FSTYPE_RTS, 0xb0)
++IEEE16(WF_FSTYPE_CTS, 0xc0)
++IEEE16(WF_FSTYPE_ACK, 0xd0)
++IEEE16(WF_FSTYPE_CFEND, 0xe0)
++IEEE16(WF_FSTYPE_CFENDCFACK, 0xf0)
++
++/* Data */
++IEEE16(WF_FSTYPE_DATAONLY, 0x00)
++IEEE16(WF_FSTYPE_DATA_CFACK, 0x10)
++IEEE16(WF_FSTYPE_DATA_CFPOLL, 0x20)
++IEEE16(WF_FSTYPE_DATA_CFACK_CFPOLL, 0x30)
++IEEE16(WF_FSTYPE_NULL, 0x40)
++IEEE16(WF_FSTYPE_CFACK, 0x50)
++IEEE16(WF_FSTYPE_CFPOLL, 0x60)
++IEEE16(WF_FSTYPE_CFACK_CFPOLL, 0x70)
++};
++
++
++/***********************************************************************
++** Macros
++*/
++
++/*--- Duration Macros ----------------------------------------*/
++/* Macros to get/set the bitfields of the Duration Field */
++/* - the duration value is only valid when bit15 is zero */
++/* - the firmware handles these values, so I'm not going */
++/* to use these macros right now. */
++/*------------------------------------------------------------*/
++
++/*--- Sequence Control Macros -------------------------------*/
++/* Macros to get/set the bitfields of the Sequence Control */
++/* Field. */
++/*------------------------------------------------------------*/
++#define WLAN_GET_SEQ_FRGNUM(n) ((u16)(n) & 0x000f)
++#define WLAN_GET_SEQ_SEQNUM(n) (((u16)(n) & 0xfff0) >> 4)
++
++/*--- Data ptr macro -----------------------------------------*/
++/* Creates a u8* to the data portion of a frame */
++/* Assumes you're passing in a ptr to the beginning of the hdr*/
++/*------------------------------------------------------------*/
++#define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN)
++#define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN)
++
++
++/***********************************************************************
++** Types
++*/
++
++/* 802.11 header type
++**
++** Note the following:
++** a1 *always* is receiver's mac or bcast/mcast
++** a2 *always* is transmitter's mac, if a2 exists
++** seq: [0:3] frag#, [4:15] seq# - used for dup detection
++** (dups from retries have same seq#) */
++typedef struct wlan_hdr {
++ u16 fc;
++ u16 dur;
++ u8 a1[ETH_ALEN];
++ u8 a2[ETH_ALEN];
++ u8 a3[ETH_ALEN];
++ u16 seq;
++ u8 a4[ETH_ALEN];
++} WLAN_PACKED wlan_hdr_t;
++
++/* Separate structs for use if frame type is known */
++typedef struct wlan_hdr_a3 {
++ u16 fc;
++ u16 dur;
++ u8 a1[ETH_ALEN];
++ u8 a2[ETH_ALEN];
++ u8 a3[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED wlan_hdr_a3_t;
++
++typedef struct wlan_hdr_mgmt {
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED wlan_hdr_mgmt_t;
++
++#ifdef NOT_NEEDED_YET
++typedef struct { /* ad-hoc peer->peer (to/from DS = 0/0) */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED ibss;
++typedef struct { /* ap->sta (to/from DS = 0/1) */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED fromap;
++typedef struct { /* sta->ap (to/from DS = 1/0) */
++ u16 fc;
++ u16 dur;
++ u8 bssid[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 da[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED toap;
++typedef struct { /* wds->wds (to/from DS = 1/1), the only 4addr pkt */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++ u8 da[ETH_ALEN];
++ u16 seq;
++ u8 sa[ETH_ALEN];
++} WLAN_PACKED wds;
++typedef struct { /* all management packets */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED mgmt;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++} WLAN_PACKED rts;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++} WLAN_PACKED cts;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++} WLAN_PACKED ack;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ /* NB: this one holds Assoc ID in dur field: */
++ u16 aid;
++ u8 bssid[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++} WLAN_PACKED pspoll;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++} WLAN_PACKED cfend;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++} WLAN_PACKED cfendcfack;
++#endif
++
++/* Prism header emulation (monitor mode) */
++typedef struct wlanitem_u32 {
++ u32 did;
++ u16 status;
++ u16 len;
++ u32 data;
++} WLAN_PACKED wlanitem_u32_t;
++#define WLANITEM_STATUS_data_ok 0
++#define WLANITEM_STATUS_no_value 1
++#define WLANITEM_STATUS_invalid_itemname 2
++#define WLANITEM_STATUS_invalid_itemdata 3
++#define WLANITEM_STATUS_missing_itemdata 4
++#define WLANITEM_STATUS_incomplete_itemdata 5
++#define WLANITEM_STATUS_invalid_msg_did 6
++#define WLANITEM_STATUS_invalid_mib_did 7
++#define WLANITEM_STATUS_missing_conv_func 8
++#define WLANITEM_STATUS_string_too_long 9
++#define WLANITEM_STATUS_data_out_of_range 10
++#define WLANITEM_STATUS_string_too_short 11
++#define WLANITEM_STATUS_missing_valid_func 12
++#define WLANITEM_STATUS_unknown 13
++#define WLANITEM_STATUS_invalid_did 14
++#define WLANITEM_STATUS_missing_print_func 15
++
++#define WLAN_DEVNAMELEN_MAX 16
++typedef struct wlansniffrm {
++ u32 msgcode;
++ u32 msglen;
++ u8 devname[WLAN_DEVNAMELEN_MAX];
++ wlanitem_u32_t hosttime;
++ wlanitem_u32_t mactime;
++ wlanitem_u32_t channel;
++ wlanitem_u32_t rssi;
++ wlanitem_u32_t sq;
++ wlanitem_u32_t signal;
++ wlanitem_u32_t noise;
++ wlanitem_u32_t rate;
++ wlanitem_u32_t istx; /* tx? 0:no 1:yes */
++ wlanitem_u32_t frmlen;
++} WLAN_PACKED wlansniffrm_t;
++#define WLANSNIFFFRM 0x0041
++#define WLANSNIFFFRM_hosttime 0x1041
++#define WLANSNIFFFRM_mactime 0x2041
++#define WLANSNIFFFRM_channel 0x3041
++#define WLANSNIFFFRM_rssi 0x4041
++#define WLANSNIFFFRM_sq 0x5041
++#define WLANSNIFFFRM_signal 0x6041
++#define WLANSNIFFFRM_noise 0x7041
++#define WLANSNIFFFRM_rate 0x8041
++#define WLANSNIFFFRM_istx 0x9041
++#define WLANSNIFFFRM_frmlen 0xA041
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_mgmt.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_mgmt.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,582 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/***********************************************************************
++** Constants
++*/
++
++/*-- Information Element IDs --------------------*/
++#define WLAN_EID_SSID 0
++#define WLAN_EID_SUPP_RATES 1
++#define WLAN_EID_FH_PARMS 2
++#define WLAN_EID_DS_PARMS 3
++#define WLAN_EID_CF_PARMS 4
++#define WLAN_EID_TIM 5
++#define WLAN_EID_IBSS_PARMS 6
++#define WLAN_EID_COUNTRY 7 /* 802.11d */
++#define WLAN_EID_FH_HOP_PARMS 8 /* 802.11d */
++#define WLAN_EID_FH_TABLE 9 /* 802.11d */
++#define WLAN_EID_REQUEST 10 /* 802.11d */
++/*-- values 11-15 reserved --*/
++#define WLAN_EID_CHALLENGE 16
++/*-- values 17-31 reserved for challenge text extension --*/
++#define WLAN_EID_PWR_CONSTRAINT 32 /* 11h PowerConstraint */
++#define WLAN_EID_ERP_INFO 42 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_NONERP 47 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_RSN 48
++#define WLAN_EID_EXT_RATES 50
++#define WLAN_EID_UNKNOWN128 128
++#define WLAN_EID_UNKNOWN133 133
++#define WLAN_EID_GENERIC 221 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_UNKNOWN223 223
++
++#if 0
++#define WLAN_EID_PWR_CAP 33 /* 11h PowerCapability */
++#define WLAN_EID_TPC_REQUEST 34 /* 11h TPC Request */
++#define WLAN_EID_TPC_REPORT 35 /* 11h TPC Report */
++#define WLAN_EID_SUPP_CHANNELS 36 /* 11h Supported Channels */
++#define WLAN_EID_CHANNEL_SWITCH 37 /* 11h ChannelSwitch */
++#define WLAN_EID_MEASURE_REQUEST 38 /* 11h MeasurementRequest */
++#define WLAN_EID_MEASURE_REPORT 39 /* 11h MeasurementReport */
++#define WLAN_EID_QUIET_ID 40 /* 11h Quiet */
++#define WLAN_EID_IBSS_DFS_ID 41 /* 11h IBSS_DFS */
++#endif
++
++/*-- Reason Codes -------------------------------*/
++#define WLAN_MGMT_REASON_RSVD 0
++#define WLAN_MGMT_REASON_UNSPEC 1
++#define WLAN_MGMT_REASON_PRIOR_AUTH_INVALID 2
++#define WLAN_MGMT_REASON_DEAUTH_LEAVING 3
++#define WLAN_MGMT_REASON_DISASSOC_INACTIVE 4
++#define WLAN_MGMT_REASON_DISASSOC_AP_BUSY 5
++#define WLAN_MGMT_REASON_CLASS2_NONAUTH 6
++#define WLAN_MGMT_REASON_CLASS3_NONASSOC 7
++#define WLAN_MGMT_REASON_DISASSOC_STA_HASLEFT 8
++#define WLAN_MGMT_REASON_CANT_ASSOC_NONAUTH 9
++
++/*-- Status Codes -------------------------------*/
++#define WLAN_MGMT_STATUS_SUCCESS 0
++#define WLAN_MGMT_STATUS_UNSPEC_FAILURE 1
++#define WLAN_MGMT_STATUS_CAPS_UNSUPPORTED 10
++#define WLAN_MGMT_STATUS_REASSOC_NO_ASSOC 11
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC 12
++#define WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG 13
++#define WLAN_MGMT_STATUS_RX_AUTH_NOSEQ 14
++#define WLAN_MGMT_STATUS_CHALLENGE_FAIL 15
++#define WLAN_MGMT_STATUS_AUTH_TIMEOUT 16
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY 17
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_RATES 18
++/* p80211b additions */
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOSHORT 19
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOPBCC 20
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOAGILITY 21
++
++/*-- Auth Algorithm Field ---------------------------*/
++#define WLAN_AUTH_ALG_OPENSYSTEM 0
++#define WLAN_AUTH_ALG_SHAREDKEY 1
++
++/*-- Management Frame Field Offsets -------------*/
++/* Note: Not all fields are listed because of variable lengths */
++/* Note: These offsets are from the start of the frame data */
++
++#define WLAN_BEACON_OFF_TS 0
++#define WLAN_BEACON_OFF_BCN_INT 8
++#define WLAN_BEACON_OFF_CAPINFO 10
++#define WLAN_BEACON_OFF_SSID 12
++
++#define WLAN_DISASSOC_OFF_REASON 0
++
++#define WLAN_ASSOCREQ_OFF_CAP_INFO 0
++#define WLAN_ASSOCREQ_OFF_LISTEN_INT 2
++#define WLAN_ASSOCREQ_OFF_SSID 4
++
++#define WLAN_ASSOCRESP_OFF_CAP_INFO 0
++#define WLAN_ASSOCRESP_OFF_STATUS 2
++#define WLAN_ASSOCRESP_OFF_AID 4
++#define WLAN_ASSOCRESP_OFF_SUPP_RATES 6
++
++#define WLAN_REASSOCREQ_OFF_CAP_INFO 0
++#define WLAN_REASSOCREQ_OFF_LISTEN_INT 2
++#define WLAN_REASSOCREQ_OFF_CURR_AP 4
++#define WLAN_REASSOCREQ_OFF_SSID 10
++
++#define WLAN_REASSOCRESP_OFF_CAP_INFO 0
++#define WLAN_REASSOCRESP_OFF_STATUS 2
++#define WLAN_REASSOCRESP_OFF_AID 4
++#define WLAN_REASSOCRESP_OFF_SUPP_RATES 6
++
++#define WLAN_PROBEREQ_OFF_SSID 0
++
++#define WLAN_PROBERESP_OFF_TS 0
++#define WLAN_PROBERESP_OFF_BCN_INT 8
++#define WLAN_PROBERESP_OFF_CAP_INFO 10
++#define WLAN_PROBERESP_OFF_SSID 12
++
++#define WLAN_AUTHEN_OFF_AUTH_ALG 0
++#define WLAN_AUTHEN_OFF_AUTH_SEQ 2
++#define WLAN_AUTHEN_OFF_STATUS 4
++#define WLAN_AUTHEN_OFF_CHALLENGE 6
++
++#define WLAN_DEAUTHEN_OFF_REASON 0
++
++enum {
++IEEE16(WF_MGMT_CAP_ESS, 0x0001)
++IEEE16(WF_MGMT_CAP_IBSS, 0x0002)
++/* In (re)assoc request frames by STA:
++** Pollable=0, PollReq=0: STA is not CF-Pollable
++** 0 1: STA is CF-Pollable, not requesting to be placed on the CF-Polling list
++** 1 0: STA is CF-Pollable, requesting to be placed on the CF-Polling list
++** 1 1: STA is CF-Pollable, requesting never to be polled
++** In beacon, proberesp, (re)assoc resp frames by AP:
++** 0 0: No point coordinator at AP
++** 0 1: Point coordinator at AP for delivery only (no polling)
++** 1 0: Point coordinator at AP for delivery and polling
++** 1 1: Reserved */
++IEEE16(WF_MGMT_CAP_CFPOLLABLE, 0x0004)
++IEEE16(WF_MGMT_CAP_CFPOLLREQ, 0x0008)
++/* 1=non-WEP data frames are disallowed */
++IEEE16(WF_MGMT_CAP_PRIVACY, 0x0010)
++/* In beacon, proberesp, (re)assocresp by AP/AdHoc:
++** 1=use of shortpre is allowed ("I can receive shortpre") */
++IEEE16(WF_MGMT_CAP_SHORT, 0x0020)
++IEEE16(WF_MGMT_CAP_PBCC, 0x0040)
++IEEE16(WF_MGMT_CAP_AGILITY, 0x0080)
++/* In (re)assoc request frames by STA:
++** 1=short slot time implemented and enabled
++** NB: AP shall use long slot time beginning at the next Beacon after assoc
++** of STA with this bit set to 0
++** In beacon, proberesp, (re)assoc resp frames by AP:
++** currently used slot time value: 0/1 - long/short */
++IEEE16(WF_MGMT_CAP_SHORTSLOT, 0x0400)
++/* In (re)assoc request frames by STA: 1=CCK-OFDM is implemented and enabled
++** In beacon, proberesp, (re)assoc resp frames by AP/AdHoc:
++** 1=CCK-OFDM is allowed */
++IEEE16(WF_MGMT_CAP_CCKOFDM, 0x2000)
++};
++
++
++/***********************************************************************
++** Types
++*/
++
++/* Information Element types */
++
++/* prototype structure, all IEs start with these members */
++typedef struct wlan_ie {
++ u8 eid;
++ u8 len;
++} WLAN_PACKED wlan_ie_t;
++
++/*-- Service Set Identity (SSID) -----------------*/
++typedef struct wlan_ie_ssid {
++ u8 eid;
++ u8 len;
++ u8 ssid[1]; /* may be zero */
++} WLAN_PACKED wlan_ie_ssid_t;
++
++/*-- Supported Rates -----------------------------*/
++typedef struct wlan_ie_supp_rates {
++ u8 eid;
++ u8 len;
++ u8 rates[1]; /* had better be at LEAST one! */
++} WLAN_PACKED wlan_ie_supp_rates_t;
++
++/*-- FH Parameter Set ----------------------------*/
++typedef struct wlan_ie_fh_parms {
++ u8 eid;
++ u8 len;
++ u16 dwell;
++ u8 hopset;
++ u8 hoppattern;
++ u8 hopindex;
++} WLAN_PACKED wlan_ie_fh_parms_t;
++
++/*-- DS Parameter Set ----------------------------*/
++typedef struct wlan_ie_ds_parms {
++ u8 eid;
++ u8 len;
++ u8 curr_ch;
++} WLAN_PACKED wlan_ie_ds_parms_t;
++
++/*-- CF Parameter Set ----------------------------*/
++typedef struct wlan_ie_cf_parms {
++ u8 eid;
++ u8 len;
++ u8 cfp_cnt;
++ u8 cfp_period;
++ u16 cfp_maxdur;
++ u16 cfp_durremaining;
++} WLAN_PACKED wlan_ie_cf_parms_t;
++
++/*-- TIM ------------------------------------------*/
++typedef struct wlan_ie_tim {
++ u8 eid;
++ u8 len;
++ u8 dtim_cnt;
++ u8 dtim_period;
++ u8 bitmap_ctl;
++ u8 virt_bm[1];
++} WLAN_PACKED wlan_ie_tim_t;
++
++/*-- IBSS Parameter Set ---------------------------*/
++typedef struct wlan_ie_ibss_parms {
++ u8 eid;
++ u8 len;
++ u16 atim_win;
++} WLAN_PACKED wlan_ie_ibss_parms_t;
++
++/*-- Challenge Text ------------------------------*/
++typedef struct wlan_ie_challenge {
++ u8 eid;
++ u8 len;
++ u8 challenge[1];
++} WLAN_PACKED wlan_ie_challenge_t;
++
++/*-- ERP (42) -------------------------------------*/
++typedef struct wlan_ie_erp {
++ u8 eid;
++ u8 len;
++ /* bit 0:Non ERP present
++ ** 1:Use Protection
++ ** 2:Barker Preamble mode
++ ** 3-7:reserved */
++ u8 erp;
++} WLAN_PACKED wlan_ie_erp_t;
++
++/* Types for parsing mgmt frames */
++
++/* prototype structure, all mgmt frame types will start with these members */
++typedef struct wlan_fr_mgmt {
++ u16 type;
++ u16 len; /* DOES NOT include FCS */
++ wlan_hdr_t *hdr;
++ /* used for target specific data, skb in Linux */
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++} WLAN_PACKED wlan_fr_mgmt_t;
++
++/*-- Beacon ---------------------------------------*/
++typedef struct wlan_fr_beacon {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u64 *ts;
++ u16 *bcn_int;
++ u16 *cap_info;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++ wlan_ie_fh_parms_t *fh_parms;
++ wlan_ie_ds_parms_t *ds_parms;
++ wlan_ie_cf_parms_t *cf_parms;
++ wlan_ie_ibss_parms_t *ibss_parms;
++ wlan_ie_tim_t *tim; /* in beacon only, not proberesp */
++ wlan_ie_erp_t *erp; /* in beacon only, not proberesp */
++} wlan_fr_beacon_t;
++#define wlan_fr_proberesp wlan_fr_beacon
++#define wlan_fr_proberesp_t wlan_fr_beacon_t
++
++/*-- IBSS ATIM ------------------------------------*/
++typedef struct wlan_fr_ibssatim {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++ /* this frame type has a null body */
++} wlan_fr_ibssatim_t;
++
++/*-- Disassociation -------------------------------*/
++typedef struct wlan_fr_disassoc {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *reason;
++ /*-- info elements ----------*/
++} wlan_fr_disassoc_t;
++
++/*-- Association Request --------------------------*/
++typedef struct wlan_fr_assocreq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *listen_int;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_assocreq_t;
++
++/*-- Association Response -------------------------*/
++typedef struct wlan_fr_assocresp {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *status;
++ u16 *aid;
++ /*-- info elements ----------*/
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_assocresp_t;
++
++/*-- Reassociation Request ------------------------*/
++typedef struct wlan_fr_reassocreq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *listen_int;
++ u8 *curr_ap;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_reassocreq_t;
++
++/*-- Reassociation Response -----------------------*/
++typedef struct wlan_fr_reassocresp {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *status;
++ u16 *aid;
++ /*-- info elements ----------*/
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_reassocresp_t;
++
++/*-- Probe Request --------------------------------*/
++typedef struct wlan_fr_probereq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_probereq_t;
++
++/*-- Authentication -------------------------------*/
++typedef struct wlan_fr_authen {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *auth_alg;
++ u16 *auth_seq;
++ u16 *status;
++ /*-- info elements ----------*/
++ wlan_ie_challenge_t *challenge;
++} wlan_fr_authen_t;
++
++/*-- Deauthenication -----------------------------*/
++typedef struct wlan_fr_deauthen {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *reason;
++ /*-- info elements ----------*/
++} wlan_fr_deauthen_t;
++
++/* Types for building mgmt frames */
++
++/* Warning. Several types used in below structs are
++** in fact variable length. Use structs with such fields with caution */
++typedef struct auth_frame_body {
++ u16 auth_alg;
++ u16 auth_seq;
++ u16 status;
++ wlan_ie_challenge_t challenge;
++} WLAN_PACKED auth_frame_body_t;
++
++typedef struct assocresp_frame_body {
++ u16 cap_info;
++ u16 status;
++ u16 aid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED assocresp_frame_body_t;
++
++typedef struct reassocreq_frame_body {
++ u16 cap_info;
++ u16 listen_int;
++ u8 current_ap[ETH_ALEN];
++ wlan_ie_ssid_t ssid;
++/* access to this one is disabled since ssid_t is variable length: */
++ /* wlan_ie_supp_rates_t rates; */
++} WLAN_PACKED reassocreq_frame_body_t;
++
++typedef struct reassocresp_frame_body {
++ u16 cap_info;
++ u16 status;
++ u16 aid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED reassocresp_frame_body_t;
++
++typedef struct deauthen_frame_body {
++ u16 reason;
++} WLAN_PACKED deauthen_frame_body_t;
++
++typedef struct disassoc_frame_body {
++ u16 reason;
++} WLAN_PACKED disassoc_frame_body_t;
++
++typedef struct probereq_frame_body {
++ wlan_ie_ssid_t ssid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED probereq_frame_body_t;
++
++typedef struct proberesp_frame_body {
++ u8 timestamp[8];
++ u16 beacon_int;
++ u16 cap_info;
++ wlan_ie_ssid_t ssid;
++/* access to these is disabled since ssid_t is variable length: */
++ /* wlan_ie_supp_rates_t rates; */
++ /* fhps_t fhps; */
++ /* dsps_t dsps; */
++ /* cfps_t cfps; */
++} WLAN_PACKED proberesp_frame_body_t;
++
++
++/***********************************************************************
++** Functions
++*/
++
++/* Helpers for parsing mgmt frames */
++void wlan_mgmt_decode_ibssatim(wlan_fr_ibssatim_t *f);
++void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f);
++void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f);
++void wlan_mgmt_decode_authen(wlan_fr_authen_t *f);
++void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f);
++void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f);
++void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f);
++void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f);
++void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f);
++void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f);
++void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f);
++
++/* Helpers for building mgmt frames */
++static inline u8*
++wlan_fill_ie_ssid(u8 *p, int len, const char *ssid)
++{
++ struct wlan_ie_ssid *ie = (void*)p;
++ ie->eid = WLAN_EID_SSID;
++ ie->len = len;
++ memcpy(ie->ssid, ssid, len);
++ return p + len + 2;
++}
++/* This controls whether we create 802.11g 'ext supported rates' IEs
++** or just create overlong 'supported rates' IEs instead
++** (non-11g compliant) */
++#define WE_OBEY_802_11G 1
++static inline u8*
++wlan_fill_ie_rates(u8 *p, int len, const u8 *rates)
++{
++ struct wlan_ie_supp_rates *ie = (void*)p;
++#if WE_OBEY_802_11G
++ if (len > 8 ) len = 8;
++#endif
++ /* supported rates (1 to 8 octets) */
++ ie->eid = WLAN_EID_SUPP_RATES;
++ ie->len = len;
++ memcpy(ie->rates, rates, len);
++ return p + len + 2;
++}
++/* This one wouldn't create an IE at all if not needed */
++static inline u8*
++wlan_fill_ie_rates_ext(u8 *p, int len, const u8 *rates)
++{
++ struct wlan_ie_supp_rates *ie = (void*)p;
++#if !WE_OBEY_802_11G
++ return p;
++#endif
++ len -= 8;
++ if (len <= 0) return p;
++ /* ext supported rates */
++ ie->eid = WLAN_EID_EXT_RATES;
++ ie->len = len;
++ memcpy(ie->rates, rates+8, len);
++ return p + len + 2;
++}
++static inline u8*
++wlan_fill_ie_ds_parms(u8 *p, int channel)
++{
++ struct wlan_ie_ds_parms *ie = (void*)p;
++ ie->eid = WLAN_EID_DS_PARMS;
++ ie->len = 1;
++ ie->curr_ch = channel;
++ return p + sizeof(*ie);
++}
++static inline u8*
++wlan_fill_ie_ibss_parms(u8 *p, int atim_win)
++{
++ struct wlan_ie_ibss_parms *ie = (void*)p;
++ ie->eid = WLAN_EID_IBSS_PARMS;
++ ie->len = 2;
++ ie->atim_win = atim_win;
++ return p + sizeof(*ie);
++}
++static inline u8*
++wlan_fill_ie_tim(u8 *p, int rem, int period, int bcast,
++ int ofs, int len, const u8 *vbm)
++{
++ struct wlan_ie_tim *ie = (void*)p;
++ ie->eid = WLAN_EID_TIM;
++ ie->len = len + 3;
++ ie->dtim_cnt = rem;
++ ie->dtim_period = period;
++ ie->bitmap_ctl = ofs | (bcast!=0);
++ if (vbm)
++ memcpy(ie->virt_bm, vbm, len); /* min 1 byte */
++ else
++ ie->virt_bm[0] = 0;
++ return p + len + 3 + 2;
++}
+Index: linux-2.6.23/drivers/net/wireless/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/net/wireless/Kconfig 2008-01-20 21:13:17.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/Kconfig 2008-01-20 21:15:12.000000000 +0000
+@@ -5,6 +5,36 @@
+ menu "Wireless LAN"
+ depends on !S390
+
++config NET_RADIO
++ bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions"
++ select WIRELESS_EXT
++ ---help---
++ Support for wireless LANs and everything having to do with radio,
++ but not with amateur radio or FM broadcasting.
++
++ Saying Y here also enables the Wireless Extensions (creates
++ /proc/net/wireless and enables iwconfig access). The Wireless
++ Extension is a generic API allowing a driver to expose to the user
++ space configuration and statistics specific to common Wireless LANs.
++ The beauty of it is that a single set of tool can support all the
++ variations of Wireless LANs, regardless of their type (as long as
++ the driver supports Wireless Extension). Another advantage is that
++ these parameters may be changed on the fly without restarting the
++ driver (or Linux). If you wish to use Wireless Extensions with
++ wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch
++ the tools from
++ <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
++
++config NET_WIRELESS_RTNETLINK
++ bool "Wireless Extension API over RtNetlink"
++ depends on NET_RADIO
++ ---help---
++ Support the Wireless Extension API over the RtNetlink socket
++ in addition to the traditional ioctl interface (selected above).
++
++ For now, few tools use this facility, but it might grow in the
++ future. The only downside is that it adds 4.5 kB to your kernel.
++
+ config WLAN_PRE80211
+ bool "Wireless LAN (pre-802.11)"
+ depends on NETDEVICES
+@@ -650,6 +680,7 @@ config P54_PCI
+
+ source "drivers/net/wireless/iwlwifi/Kconfig"
+ source "drivers/net/wireless/hostap/Kconfig"
++source "drivers/net/wireless/acx/Kconfig"
+ source "drivers/net/wireless/bcm43xx/Kconfig"
+ source "drivers/net/wireless/b43/Kconfig"
+ source "drivers/net/wireless/b43legacy/Kconfig"
+Index: linux-2.6.23/drivers/net/wireless/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/net/wireless/Makefile 2008-01-20 21:13:17.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/Makefile 2008-01-20 21:13:40.000000000 +0000
+@@ -34,6 +34,8 @@ obj-$(CONFIG_PCMCIA_ATMEL) += atmel
+
+ obj-$(CONFIG_PRISM54) += prism54/
+
++obj-$(CONFIG_ACX) += acx/
++
+ obj-$(CONFIG_HOSTAP) += hostap/
+ obj-$(CONFIG_BCM43XX) += bcm43xx/
+ obj-$(CONFIG_B43) += b43/
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/htcuni.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/htcuni.patch
new file mode 100644
index 0000000000..783f55b064
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/htcuni.patch
@@ -0,0 +1,7899 @@
+---
+ arch/arm/Kconfig | 2
+ arch/arm/mach-pxa/Kconfig | 89 +
+ arch/arm/mach-pxa/Makefile | 1
+ arch/arm/mach-pxa/generic.c | 13
+ arch/arm/mach-pxa/htcuniversal/Makefile | 19
+ arch/arm/mach-pxa/htcuniversal/htcuniversal.c | 468 +++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c | 917 +++++++++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h | 65
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c | 143 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c | 61
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c | 135 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h | 17
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c | 87 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c | 226 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c | 212 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c | 167 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h | 16
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c | 69
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c | 97 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c | 490 ++++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c | 71
+ arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h | 20
+ drivers/input/keyboard/Kconfig | 7
+ drivers/input/keyboard/Makefile | 1
+ drivers/input/keyboard/asic3_keys.c | 131 +
+ drivers/leds/Kconfig | 7
+ drivers/leds/Makefile | 1
+ drivers/leds/leds-asic3.c | 189 ++
+ drivers/mfd/Kconfig | 10
+ drivers/mfd/Makefile | 2
+ drivers/mfd/asic3_base.c | 1208 +++++++++++++++
+ drivers/mfd/soc-core.c | 106 +
+ drivers/mfd/soc-core.h | 30
+ drivers/mmc/host/Kconfig | 6
+ drivers/mmc/host/Makefile | 1
+ drivers/mmc/host/asic3_mmc.c | 900 +++++++++++
+ drivers/mmc/host/asic3_mmc.h | 25
+ drivers/serial/pxa.c | 22
+ include/asm-arm/arch-pxa/clock.h | 27
+ include/asm-arm/arch-pxa/htcuniversal-asic.h | 213 ++
+ include/asm-arm/arch-pxa/htcuniversal-gpio.h | 220 ++
+ include/asm-arm/arch-pxa/htcuniversal-init.h | 14
+ include/asm-arm/arch-pxa/htcuniversal.h | 3
+ include/asm-arm/arch-pxa/irqs.h | 2
+ include/asm-arm/arch-pxa/pxa-pm_ll.h | 6
+ include/asm-arm/arch-pxa/pxa-regs.h | 2
+ include/asm-arm/arch-pxa/serial.h | 78
+ include/asm-arm/hardware/asic3_keys.h | 18
+ include/asm-arm/hardware/asic3_leds.h | 34
+ include/asm-arm/hardware/ipaq-asic3.h | 602 +++++++
+ include/linux/backlight.h | 7
+ include/linux/gpiodev.h | 44
+ include/linux/input_pda.h | 47
+ include/linux/ioport.h | 1
+ include/linux/soc/asic3_base.h | 104 +
+ include/linux/soc/tmio_mmc.h | 17
+ 56 files changed, 7469 insertions(+), 1 deletion(-)
+
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/Makefile 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,19 @@
++#
++# Makefile for HTC Universal
++#
++
++snd-htcuniversal-ak4641-objs := htcuniversal_ak4641.o
++
++obj-$(CONFIG_MACH_HTCUNIVERSAL) += htcuniversal.o
++obj-$(CONFIG_HTCUNIVERSAL_CORE) += htcuniversal_core.o
++obj-$(CONFIG_HTCUNIVERSAL_POWER) += htcuniversal_power2.o
++obj-$(CONFIG_HTCUNIVERSAL_LCD) += htcuniversal_lcd.o
++obj-$(CONFIG_HTCUNIVERSAL_BACKLIGHT) += htcuniversal_bl.o
++obj-$(CONFIG_HTCUNIVERSAL_TS2) += htcuniversal_ts2.o
++obj-$(CONFIG_HTCUNIVERSAL_BUTTONS) += htcuniversal_buttons.o
++obj-$(CONFIG_HTCUNIVERSAL_BLUETOOTH) += htcuniversal_bt.o
++obj-$(CONFIG_HTCUNIVERSAL_PHONE) += htcuniversal_phone.o
++obj-$(CONFIG_HTCUNIVERSAL_ASIC3_LEDS) += htcuniversal_asic3_leds.o
++obj-$(CONFIG_HTCUNIVERSAL_UDC) += htcuniversal_udc.o
++
++obj-$(CONFIG_HTCUNIVERSAL_AK4641) += htcuniversal_ak4641.o
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,468 @@
++/*
++ * Hardware definitions for HTC Universal
++ *
++ * Copyright (c) 2006 Oleg Gusev
++ *
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++#include <linux/input.h>
++#include <linux/gpio_keys.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/setup.h>
++
++#include <asm/mach/irq.h>
++#include <asm/mach/arch.h>
++
++#include <asm/arch/bitfield.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/serial.h>
++#include <asm/arch/pxa27x_keyboard.h>
++#include <asm/arch/pxafb.h>
++#include <asm/arch/irda.h>
++#include <asm/arch/ohci.h>
++
++#include <asm/arch/htcuniversal.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-init.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++
++#include "../generic.h"
++
++#include "htcuniversal_bt.h"
++#include "htcuniversal_phone.h"
++#include "tsc2046_ts.h"
++
++/*
++ * IRDA
++ */
++
++static void htcuniversal_irda_transceiver_mode(struct device *dev, int mode)
++{
++ /* */
++}
++
++static struct pxaficp_platform_data htcuniversal_ficp_platform_data = {
++ .transceiver_cap = IR_SIRMODE | IR_FIRMODE,
++ .transceiver_mode = htcuniversal_irda_transceiver_mode,
++};
++
++/*
++ * Bluetooth - Relies on other loadable modules, like ASIC3 and Core,
++ * so make the calls indirectly through pointers. Requires that the
++ * htcuniversal_bt module be loaded before any attempt to use
++ * bluetooth (obviously).
++ */
++
++static struct htcuniversal_bt_funcs bt_funcs;
++
++static void
++htcuniversal_bt_configure( int state )
++{
++ if (bt_funcs.configure != NULL)
++ bt_funcs.configure( state );
++}
++
++static struct htcuniversal_phone_funcs phone_funcs;
++
++static void
++htcuniversal_phone_configure( int state )
++{
++ if (phone_funcs.configure != NULL)
++ phone_funcs.configure( state );
++}
++
++//void htcuniversal_ll_pm_init(void);
++
++extern struct platform_device htcuniversal_bl;
++static struct platform_device htcuniversal_lcd = { .name = "htcuniversal_lcd", };
++//static struct platform_device htcuniversal_kbd = { .name = "htcuniversal_kbd", };
++static struct platform_device htcuniversal_buttons = { .name = "htcuniversal_buttons", };
++//static struct platform_device htcuniversal_ts = { .name = "htcuniversal_ts", };
++//static struct platform_device htcuniversal_bt = { .name = "htcuniversal_bt", };
++//static struct platform_device htcuniversal_phone = { .name = "htcuniversal_phone", };
++static struct platform_device htcuniversal_power = { .name = "htcuniversal_power", };
++static struct platform_device htcuniversal_udc = { .name = "htcuniversal_udc", };
++
++static struct tsc2046_mach_info htcuniversal_ts_platform_data = {
++ .port = 1,
++ .clock = CKEN_SSP1,
++ .pwrbit_X = 1,
++ .pwrbit_Y = 1,
++ .irq = 0 /* asic3 irq */
++};
++
++static struct platform_device htcuniversal_ts = {
++ .name = "htcuniversal_ts",
++ .dev = {
++ .platform_data = &htcuniversal_ts_platform_data,
++ },
++};
++
++
++/* Bluetooth */
++
++static struct platform_device htcuniversal_bt = {
++ .name = "htcuniversal_bt",
++ .id = -1,
++ .dev = {
++ .platform_data = &bt_funcs,
++ },
++};
++
++static struct platform_device htcuniversal_phone = {
++ .name = "htcuniversal_phone",
++ .id = -1,
++ .dev = {
++ .platform_data = &phone_funcs,
++ },
++};
++
++/* PXA2xx Keys */
++
++static struct gpio_keys_button htcuniversal_button_table[] = {
++ { KEY_POWER, GPIO_NR_HTCUNIVERSAL_KEY_ON_N, 1 },
++};
++
++static struct gpio_keys_platform_data htcuniversal_pxa_keys_data = {
++ .buttons = htcuniversal_button_table,
++ .nbuttons = ARRAY_SIZE(htcuniversal_button_table),
++};
++
++static struct platform_device htcuniversal_pxa_keys = {
++ .name = "gpio-keys",
++ .dev = {
++ .platform_data = &htcuniversal_pxa_keys_data,
++ },
++ .id = -1,
++};
++
++/****************************************************************
++ * Keyboard
++ ****************************************************************/
++
++static struct pxa27x_keyboard_platform_data htcuniversal_kbd = {
++ .nr_rows = 8,
++ .nr_cols = 8,
++ .keycodes = {
++ {
++ /* row 0 */
++ KEY_ENTER,
++ KEY_MINUS,
++ KEY_ESC,
++ KEY_1,
++ KEY_TAB,
++ KEY_CAPSLOCK,
++ KEY_LEFTSHIFT,
++ KEY_RIGHTALT, /* Fn */
++ }, { /* row 1 */
++ KEY_COMMA,
++ KEY_EQUAL,
++ KEY_F1,
++ KEY_2,
++ KEY_Q,
++ KEY_A,
++ KEY_Z,
++ KEY_LEFTCTRL,
++ }, { /* row 2 */
++ KEY_UP,
++ KEY_I,
++ KEY_F2,
++ KEY_3,
++ KEY_W,
++ KEY_S,
++ KEY_X,
++ KEY_F6,
++ }, { /* row 3 */
++ KEY_DOT,
++ KEY_O,
++ KEY_F3,
++ KEY_4,
++ KEY_E,
++ KEY_D,
++ KEY_C,
++ KEY_LEFTALT,
++ }, { /* row 4 */
++ KEY_F9,
++ KEY_P,
++ KEY_F4,
++ KEY_5,
++ KEY_R,
++ KEY_F,
++ KEY_V,
++ KEY_SPACE,
++ }, { /* row 5 */
++ KEY_RIGHT,
++ KEY_BACKSPACE,
++ KEY_F5,
++ KEY_6,
++ KEY_T,
++ KEY_G,
++ KEY_B,
++ KEY_F7,
++ }, { /* row 6 */
++ KEY_F9,
++ KEY_K,
++ KEY_9,
++ KEY_7,
++ KEY_Y,
++ KEY_H,
++ KEY_N,
++ KEY_LEFT,
++ }, { /* row 7 */
++ KEY_F10,
++ KEY_L,
++ KEY_0,
++ KEY_8,
++ KEY_U,
++ KEY_J,
++ KEY_M,
++ KEY_DOWN,
++ },
++ },
++ .gpio_modes = {
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN0_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN1_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN2_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN3_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN4_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN5_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN6_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN7_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT0_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT1_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT2_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT3_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT4_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT5_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT6_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT7_MD,
++ },
++};
++
++static struct platform_device htcuniversal_pxa_keyboard = {
++ .name = "pxa27x-keyboard",
++ .id = -1,
++ .dev = {
++ .platform_data = &htcuniversal_kbd,
++ },
++};
++/* Core Hardware Functions */
++
++struct platform_device htcuniversal_core = {
++ .name = "htcuniversal_core",
++ .id = 0,
++ .dev = {
++ .platform_data = NULL,
++ },
++};
++
++static struct platform_device *devices[] __initdata = {
++ &htcuniversal_core,
++// &htcuniversal_flash,
++ &htcuniversal_pxa_keyboard,
++ &htcuniversal_pxa_keys,
++};
++
++static struct platform_device *htcuniversal_asic3_devices[] __initdata = {
++ &htcuniversal_lcd,
++#ifdef CONFIG_HTCUNIVERSAL_BACKLIGHT
++ &htcuniversal_bl,
++#endif
++ &htcuniversal_buttons,
++ &htcuniversal_ts,
++ &htcuniversal_bt,
++ &htcuniversal_phone,
++ &htcuniversal_power,
++ &htcuniversal_udc,
++};
++
++static struct asic3_platform_data htcuniversal_asic3_platform_data = {
++
++ /* Setting ASIC3 GPIO registers to the below initialization states
++ * HTC Universal asic3 information:
++ * http://wiki.xda-developers.com/index.php?pagename=UniversalASIC3
++ * http://wiki.xda-developers.com/index.php?pagename=ASIC3
++ *
++ * dir: Direction of the GPIO pin. 0: input, 1: output.
++ * If unknown, set as output to avoid power consuming floating input nodes
++ * init: Initial state of the GPIO bits
++ *
++ * These registers are configured as they are on Wince.
++ */
++ .gpio_a = {
++ .dir = (1<<GPIOA_LCD_PWR5_ON) |
++ (1<<GPIOA_FLASHLIGHT) |
++ (1<<GPIOA_UNKNOWN9) |
++ (1<<GPIOA_SPK_PWR2_ON) |
++ (1<<GPIOA_UNKNOWN4) |
++ (1<<GPIOA_EARPHONE_PWR_ON)|
++ (1<<GPIOA_AUDIO_PWR_ON) |
++ (1<<GPIOA_SPK_PWR1_ON) |
++ (1<<GPIOA_I2C_EN),
++ .init = (1<<GPIOA_LCD_PWR5_ON) |
++ (1<<GPIOA_I2C_EN),
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x000c,
++ },
++ .gpio_b = {
++ .dir = 0xc142,
++ .init = 0x8842, // TODO: 0x0900
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x000c,
++ },
++ .gpio_c = {
++ .dir = 0xc7e7,
++ .init = 0xc6e0, // TODO: 0x8000
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0007, // GPIOC_LED_RED | GPIOC_LED_GREEN | GPIOC_LED_BLUE
++ .sleep_conf = 0x000c,
++ },
++ .gpio_d = {
++ .dir = 0xffc0,
++ .init = 0x7840, // TODO: 0x0000
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x0008,
++ },
++ .bus_shift = 1,
++ .irq_base = HTCUNIVERSAL_ASIC3_IRQ_BASE,
++
++ .child_platform_devs = htcuniversal_asic3_devices,
++ .num_child_platform_devs = ARRAY_SIZE(htcuniversal_asic3_devices),
++};
++
++static struct resource htcuniversal_asic3_resources[] = {
++ [0] = {
++ .start = HTCUNIVERSAL_ASIC3_GPIO_PHYS,
++ .end = HTCUNIVERSAL_ASIC3_GPIO_PHYS + IPAQ_ASIC3_MAP_SIZE,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = HTCUNIVERSAL_IRQ(ASIC3_EXT_INT),
++ .end = HTCUNIVERSAL_IRQ(ASIC3_EXT_INT),
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .start = HTCUNIVERSAL_ASIC3_MMC_PHYS,
++ .end = HTCUNIVERSAL_ASIC3_MMC_PHYS + IPAQ_ASIC3_MAP_SIZE,
++ .flags = IORESOURCE_MEM,
++ },
++ [3] = {
++ .start = HTCUNIVERSAL_IRQ(ASIC3_SDIO_INT_N),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device htcuniversal_asic3 = {
++ .name = "asic3",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(htcuniversal_asic3_resources),
++ .resource = htcuniversal_asic3_resources,
++ .dev = { .platform_data = &htcuniversal_asic3_platform_data, },
++};
++EXPORT_SYMBOL(htcuniversal_asic3);
++
++static struct pxafb_mode_info htcuniversal_lcd_modes[] = {
++{
++ .pixclock = 96153,
++ .xres = 480,
++ .yres = 640,
++ .bpp = 16,
++ .hsync_len = 4,
++ .vsync_len = 1,
++ .left_margin = 20,
++ .right_margin = 8,
++ .upper_margin = 7,
++ .lower_margin = 8,
++
++// .sync = FB_SYNC_HOR_LOW_ACT|FB_SYNC_VERT_LOW_ACT,
++
++},
++};
++
++static struct pxafb_mach_info sony_acx526akm = {
++ .modes = htcuniversal_lcd_modes,
++ .num_modes = ARRAY_SIZE(htcuniversal_lcd_modes),
++
++ /* fixme: use constants defined in pxafb.h */
++ .lccr0 = 0x00000080,
++ .lccr3 = 0x00400000,
++// .lccr4 = 0x80000000,
++};
++
++static void __init htcuniversal_init_irq(void)
++{
++ pxa27x_init_irq();
++}
++
++static struct platform_pxa_serial_funcs htcuniversal_pxa_bt_funcs = {
++ .configure = htcuniversal_bt_configure,
++};
++static struct platform_pxa_serial_funcs htcuniversal_pxa_phone_funcs = {
++ .configure = htcuniversal_phone_configure,
++};
++
++/* USB OHCI */
++
++static int htcuniversal_ohci_init(struct device *dev)
++{
++ /* missing GPIO setup here */
++
++ /* got the value from wince */
++ UHCHR=UHCHR_CGR;
++
++ return 0;
++}
++
++static struct pxaohci_platform_data htcuniversal_ohci_platform_data = {
++ .port_mode = PMM_PERPORT_MODE,
++ .init = htcuniversal_ohci_init,
++};
++
++static void __init htcuniversal_map_io(void)
++{
++ pxa_map_io();
++
++ pxa_set_btuart_info(&htcuniversal_pxa_bt_funcs);
++ pxa_set_ffuart_info(&htcuniversal_pxa_phone_funcs);
++}
++
++static void __init htcuniversal_init(void)
++{
++ set_pxa_fb_info(&sony_acx526akm);
++
++ platform_device_register(&htcuniversal_asic3);
++ platform_add_devices(devices, ARRAY_SIZE(devices) );
++ pxa_set_ficp_info(&htcuniversal_ficp_platform_data);
++ pxa_set_ohci_info(&htcuniversal_ohci_platform_data);
++}
++
++MACHINE_START(HTCUNIVERSAL, "HTC Universal")
++ /* Maintainer xanadux.org */
++ .phys_io = 0x40000000,
++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
++ .boot_params = 0xa0000100,
++ .map_io = htcuniversal_map_io,
++ .init_irq = htcuniversal_init_irq,
++ .init_machine = htcuniversal_init,
++ .timer = &pxa_timer,
++MACHINE_END
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,917 @@
++/*
++ * Audio support for codec Asahi Kasei AK4641
++ *
++ * 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.
++ *
++ * Copyright (c) 2006 Giorgio Padrin <giorgio@mandarinlogiq.org>
++ *
++ * History:
++ *
++ * 2006-03 Written -- Giorgio Padrin
++ * 2006-09 Test and debug on machine (HP hx4700) -- Elshin Roman <roxmail@list.ru>
++ *
++ * AK4641 codec device driver
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * Based on code:
++ * Copyright (c) 2002 Hewlett-Packard Company
++ * Copyright (c) 2000 Nicolas Pitre <nico@cam.org>
++ * Copyright (c) 2000 Lernout & Hauspie Speech Products, N.V.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License.
++ */
++
++#include <sound/driver.h>
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/types.h>
++#include <linux/string.h>
++#include <linux/slab.h>
++#include <linux/errno.h>
++#include <linux/ioctl.h>
++#include <linux/delay.h>
++#include <linux/i2c.h>
++
++#include <sound/core.h>
++#include <sound/control.h>
++#include <sound/initval.h>
++#include <sound/info.h>
++
++#include "htcuniversal_ak4641.h"
++
++/* Registers */
++#define R_PM1 0x00
++#define R_PM2 0x01
++#define R_SEL1 0x02
++#define R_SEL2 0x03
++#define R_MODE1 0x04
++#define R_MODE2 0x05
++#define R_DAC 0x06
++#define R_MIC 0x07
++#define REG_TIMER 0x08
++#define REG_ALC1 0x09
++#define REG_ALC2 0x0a
++#define R_PGA 0x0b
++#define R_ATTL 0x0c
++#define R_ATTR 0x0d
++#define REG_VOL 0x0e
++#define R_STATUS 0x0f
++#define REG_EQLO 0x10
++#define REG_EQMID 0x11
++#define REG_EQHI 0x12
++#define REG_BTIF 0x13
++
++/* Register flags */
++/* REG_PWR1 */
++#define R_PM1_PMADC 0x01
++#define R_PM1_PMMIC 0x02
++#define REG_PWR1_PMAUX 0x04
++#define REG_PWR1_PMMO 0x08
++#define R_PM1_PMLO 0x10
++/* unused 0x20 */
++/* unused 0x40 */
++#define R_PM1_PMVCM 0x80
++
++/* REG_PWR2 */
++#define R_PM2_PMDAC 0x01
++/* unused 0x02 */
++/* unused 0x04 */
++#define R_PM2_PMMO2 0x08
++#define REG_PWR2_MCKAC 0x10
++/* unused 0x20 */
++/* unused 0x40 */
++#define R_PM2_MCKPD 0x80
++
++/* REG_SEL1 */
++#define R_SEL1_PSMO2 0x01
++/* unused 0x02 */
++/* unused 0x04 */
++/* unused 0x08 */
++#define REG_SEL1_MICM 0x10
++#define REG_SEL1_DACM 0x20
++#define REG_SEL1_PSMO 0x40
++#define REG_SEL1_MOGN 0x80
++
++/* REG_SEL2 */
++#define R_SEL2_PSLOR 0x01
++#define R_SEL2_PSLOL 0x02
++#define REG_SEL2_AUXSI 0x04
++/* unused 0x08 */
++#define REG_SEL2_MICL 0x10
++#define REG_SEL2_AUXL 0x20
++/* unused 0x40 */
++#define R_SEL2_DACL 0x80
++
++/* REG_MODE1 */
++#define REG_MODE1_DIF0 0x01
++#define REG_MODE1_DIF1 0x02
++/* unused 0x04 */
++/* unused 0x08 */
++/* unused 0x10 */
++/* unused 0x20 */
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_MODE2 */
++/* unused 0x01 */
++#define REG_MODE2_LOOP 0x02
++#define REG_MODE2_HPM 0x04
++/* unused 0x08 */
++/* unused 0x10 */
++#define REG_MODE2_MCK0 0x20
++#define REG_MODE2_MCK1 0x40
++/* unused 0x80 */
++
++/* REG_DAC */
++#define REG_DAC_DEM0 0x01
++#define REG_DAC_DEM1 0x02
++#define REG_DAC_EQ 0x04
++/* unused 0x08 */
++#define R_DAC_DATTC 0x10
++#define R_DAC_SMUTE 0x20
++#define REG_DAC_TM 0x40
++/* unused 0x80 */
++
++/* REG_MIC */
++#define R_MIC_MGAIN 0x01
++#define R_MIC_MSEL 0x02
++#define R_MIC_MICAD 0x04
++#define R_MIC_MPWRI 0x08
++#define R_MIC_MPWRE 0x10
++#define REG_MIC_AUXAD 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_TIMER */
++
++#define REG_TIMER_LTM0 0x01
++#define REG_TIMER_LTM1 0x02
++#define REG_TIMER_WTM0 0x04
++#define REG_TIMER_WTM1 0x08
++#define REG_TIMER_ZTM0 0x10
++#define REG_TIMER_ZTM1 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++#define REG_ALC1_LMTH 0x01
++#define REG_ALC1_RATT 0x02
++#define REG_ALC1_LMAT0 0x04
++#define REG_ALC1_LMAT1 0x08
++#define REG_ALC1_ZELM 0x10
++#define REG_ALC1_ALC1 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_ALC2 */
++
++/* REG_PGA */
++
++/* REG_ATTL */
++
++/* REG_ATTR */
++
++/* REG_VOL */
++#define REG_VOL_ATTM 0x80
++
++/* REG_STATUS */
++#define R_STATUS_DTMIC 0x01
++
++/* REG_EQ controls use 4 bits for each of 5 EQ levels */
++
++/* Bluetooth not yet implemented */
++#define REG_BTIF_PMAD2 0x01
++#define REG_BTIF_PMDA2 0x02
++#define REG_BTIF_PMBIF 0x04
++#define REG_BTIF_ADC2 0x08
++#define REG_BTIF_DAC2 0x10
++#define REG_BTIF_BTFMT0 0x20
++#define REG_BTIF_BTFMT1 0x40
++/* unused 0x80 */
++
++/* begin {{ I2C }} */
++
++static struct i2c_driver snd_ak4641_i2c_driver = {
++ .driver = {
++ .name = "ak4641-i2c"
++ },
++};
++
++static int snd_ak4641_i2c_init(void)
++{
++ return i2c_add_driver(&snd_ak4641_i2c_driver);
++}
++
++static void snd_ak4641_i2c_free(void)
++{
++ i2c_del_driver(&snd_ak4641_i2c_driver);
++}
++
++static inline int snd_ak4641_i2c_probe(struct snd_ak4641 *ak)
++{
++ if (ak->i2c_client.adapter == NULL) return -EINVAL;
++ ak->i2c_client.addr = 0x12;
++ if (i2c_smbus_xfer(ak->i2c_client.adapter, ak->i2c_client.addr,
++ 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0)
++ return -ENODEV;
++ else return 0;
++}
++
++static int snd_ak4641_i2c_attach(struct snd_ak4641 *ak)
++{
++ int ret = 0;
++ if ((ret = snd_ak4641_i2c_probe(ak)) < 0) return ret;
++ snprintf(ak->i2c_client.name, sizeof(ak->i2c_client.name),
++ "ak4641-i2c at %d-%04x",
++ i2c_adapter_id(ak->i2c_client.adapter), ak->i2c_client.addr);
++ return i2c_attach_client(&ak->i2c_client);
++}
++
++static void snd_ak4641_i2c_detach(struct snd_ak4641 *ak)
++{
++ i2c_detach_client(&ak->i2c_client);
++}
++
++/* end {{ I2C }} */
++
++
++/* begin {{ Registers & Cache Ops }} */
++
++static int snd_ak4641_hwsync(struct snd_ak4641 *ak, int read, u8 reg)
++{
++ struct i2c_msg msgs[2];
++ u8 buf[2];
++ int ret;
++
++ snd_assert(reg < ARRAY_SIZE(ak->regs), return -EINVAL);
++
++ /* setup i2c msgs */
++ msgs[0].addr = ak->i2c_client.addr;
++ msgs[0].flags = 0;
++ msgs[0].buf = buf;
++ if (!read)
++ msgs[0].len = 2;
++ else {
++ msgs[1].flags = I2C_M_RD;
++ msgs[1].addr = msgs[0].addr;
++ msgs[1].buf = msgs[0].buf + 1;
++ msgs[0].len = 1;
++ msgs[1].len = 1;
++ }
++
++ buf[0] = reg;
++
++ /* regs[reg] -> buffer, on write */
++ if (!read) buf[1] = ak->regs[reg];
++
++ /* i2c transfer */
++ ret = i2c_transfer(ak->i2c_client.adapter, msgs, read ? 2 : 1);
++ if (ret != (read ? 2 : 1)) return ret; /* transfer error */ //@@ error ret < 0, or not ?
++
++ /* regs[reg] <- buffer, on read */
++ if (read) ak->regs[reg] = buf[1];
++
++ return 0;
++}
++
++static inline int snd_ak4641_hwsync_read(struct snd_ak4641 *ak, u8 reg)
++{
++ return snd_ak4641_hwsync(ak, 1, reg);
++}
++
++static inline int snd_ak4641_hwsync_write(struct snd_ak4641 *ak, u8 reg)
++{
++ return snd_ak4641_hwsync(ak, 0, reg);
++}
++
++static int snd_ak4641_hwsync_read_all(struct snd_ak4641 *ak)
++{
++ u8 reg;
++ for (reg = 0; reg < ARRAY_SIZE(ak->regs); reg++)
++ if (snd_ak4641_hwsync_read(ak, reg) < 0) return -1;
++ return 0;
++}
++
++static int snd_ak4641_hwsync_write_all(struct snd_ak4641 *ak)
++{
++ u8 reg;
++ for (reg = 0; reg < ARRAY_SIZE(ak->regs); reg++)
++ if (snd_ak4641_hwsync_write(ak, reg) < 0) return -1;
++ return 0;
++}
++
++static int snd_ak4641_reg_changed(struct snd_ak4641 *ak, u8 reg)
++{
++ if ((reg != R_PGA && ak->powered_on) ||
++ (reg == R_PGA && (ak->regs[R_PM1] & R_PM1_PMMIC)))
++ return snd_ak4641_hwsync_write(ak, reg);
++ return 0;
++}
++
++/* end {{ Registers & Cache Ops }}*/
++
++
++static inline void snd_ak4641_lock(struct snd_ak4641 *ak)
++{
++ down(&ak->sem);
++}
++
++static inline void snd_ak4641_unlock(struct snd_ak4641 *ak)
++{
++ up(&ak->sem);
++}
++
++#define WRITE_MASK(i, val, mask) (((i) & ~(mask)) | ((val) & (mask)))
++
++
++/* begin {{ Controls }} */
++
++#define INV_RANGE(val, mask) \
++ (~(val) & (mask))
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_actl_playback_volume_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 2;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 0xff;
++ return 0;
++}
++
++static int snd_ak4641_actl_playback_volume_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ucontrol->value.integer.value[0] = INV_RANGE(ak->regs[R_ATTL], 0xff);
++ ucontrol->value.integer.value[1] = INV_RANGE(ak->regs[R_ATTR], 0xff);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static int snd_ak4641_actl_playback_volume_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ak->regs[R_ATTL] = INV_RANGE(ucontrol->value.integer.value[0], 0xff);
++ ak->regs[R_ATTR] = INV_RANGE(ucontrol->value.integer.value[1], 0xff);
++ snd_ak4641_reg_changed(ak, R_ATTL);
++ snd_ak4641_reg_changed(ak, R_ATTR);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_actl_mic_gain_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 1;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 0x7f;
++ return 0;
++}
++
++static int snd_ak4641_actl_mic_gain_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ ucontrol->value.integer.value[0] = ak->regs[R_PGA];
++ return 0;
++}
++
++static int snd_ak4641_actl_mic_gain_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ak->regs[R_PGA] = ucontrol->value.integer.value[0];
++ snd_ak4641_reg_changed(ak, R_PGA);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++#define ACTL(ctl_name, _name) \
++static struct snd_kcontrol_new snd_ak4641_actl_ ## ctl_name = \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = _name, \
++ .info = snd_ak4641_actl_ ## ctl_name ## _info, \
++ .get = snd_ak4641_actl_ ## ctl_name ## _get, .put = snd_ak4641_actl_ ## ctl_name ## _put };
++
++ACTL(playback_volume, "Master Playback Volume")
++ACTL(mic_gain, "Mic Capture Gain")
++
++struct snd_ak4641_uctl_bool {
++ int (*get) (struct snd_ak4641 *uda);
++ int (*set) (struct snd_ak4641 *uda, int on);
++};
++
++static int snd_ak4641_actl_bool_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
++ uinfo->count = 1;
++ return 0;
++}
++
++static int snd_ak4641_actl_bool_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++ struct snd_ak4641_uctl_bool *uctl =
++ (struct snd_ak4641_uctl_bool *) kcontrol->private_value;
++
++ ucontrol->value.integer.value[0] = uctl->get(ak);
++ return 0;
++}
++
++static int snd_ak4641_actl_bool_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++ struct snd_ak4641_uctl_bool *uctl =
++ (struct snd_ak4641_uctl_bool *) kcontrol->private_value;
++
++ return uctl->set(ak, ucontrol->value.integer.value[0]);
++}
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_playback_switch_get(struct snd_ak4641 *ak)
++{
++ return (ak->regs[R_DAC] & R_DAC_SMUTE) == 0x00;
++}
++
++static int snd_ak4641_uctl_playback_switch_set(struct snd_ak4641 *ak, int on)
++{
++ snd_ak4641_lock(ak);
++ ak->regs[R_DAC] = WRITE_MASK(ak->regs[R_DAC],
++ on ? 0x00 : R_DAC_SMUTE, R_DAC_SMUTE);
++ snd_ak4641_reg_changed(ak, R_DAC);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_mic_boost_get(struct snd_ak4641 *ak)
++{
++ return (ak->regs[R_MIC] & R_MIC_MGAIN) == R_MIC_MGAIN;
++}
++
++static int snd_ak4641_uctl_mic_boost_set(struct snd_ak4641 *ak, int on)
++{
++ snd_ak4641_lock(ak);
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC],
++ on ? R_MIC_MGAIN : 0x00, R_MIC_MGAIN);
++ snd_ak4641_reg_changed(ak, R_MIC);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_mono_out_get(struct snd_ak4641 *ak)
++{
++ printk("mono_out status 0x%8.8x -> 0x%8.8x\n",ak->regs[R_SEL1], ak->regs[R_SEL1] & REG_SEL1_PSMO);
++ return (ak->regs[R_SEL1] & REG_SEL1_PSMO) == REG_SEL1_PSMO;
++}
++
++static int snd_ak4641_uctl_mono_out_set(struct snd_ak4641 *ak, int on)
++{
++ printk("phone mic enable called. on=%d\n",on);
++ snd_ak4641_lock(ak);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], on ? R_PM1_PMMIC : 0x00, R_PM1_PMMIC);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], on ? REG_PWR1_PMMO : 0x00, REG_PWR1_PMMO);
++ snd_ak4641_reg_changed(ak, R_PM1);
++
++ snd_ak4641_hwsync_write(ak, R_PGA); /* mic PGA gain is reset when PMMIC = 0 */
++
++ /* internal mic */
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], on ? R_MIC_MPWRI : 0x0, R_MIC_MPWRI);
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], 0x0, R_MIC_MSEL);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++
++// ak->regs[REG_BTIF] = WRITE_MASK(ak->regs[REG_BTIF], 0x0, REG_BTIF_DAC2);
++// snd_ak4641_hwsync_write(ak, REG_BTIF);
++ /* */
++// ak->regs[REG_VOL] = WRITE_MASK(ak->regs[REG_VOL], on ? REG_VOL_ATTM : 0x00, REG_VOL_ATTM);
++// ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_MOGN : 0x00, REG_SEL1_MOGN);
++ ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_MICM : 0x00, REG_SEL1_MICM);
++ ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_PSMO : 0x00, REG_SEL1_PSMO);
++ snd_ak4641_reg_changed(ak, R_SEL1);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++#define ACTL_BOOL(ctl_name, _name) \
++static struct snd_ak4641_uctl_bool snd_ak4641_actl_ ## ctl_name ## _pvalue = \
++{ .get = snd_ak4641_uctl_ ## ctl_name ## _get, \
++ .set = snd_ak4641_uctl_ ## ctl_name ## _set }; \
++static struct snd_kcontrol_new snd_ak4641_actl_ ## ctl_name = \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = _name, .info = snd_ak4641_actl_bool_info, \
++ .get = snd_ak4641_actl_bool_get, .put = snd_ak4641_actl_bool_put, \
++ .private_value = (unsigned long) &snd_ak4641_actl_ ## ctl_name ## _pvalue };
++
++ACTL_BOOL(playback_switch, "Master Playback Switch")
++ACTL_BOOL(mic_boost, "Mic Boost (+20dB)")
++ACTL_BOOL(mono_out, "Phone mic enable")
++
++static void snd_ak4641_headphone_on(struct snd_ak4641 *ak, int on);
++static void snd_ak4641_speaker_on(struct snd_ak4641 *ak, int on);
++static void snd_ak4641_select_mic(struct snd_ak4641 *ak);
++
++void snd_ak4641_hp_connected(struct snd_ak4641 *ak, int connected)
++{
++ snd_ak4641_lock(ak);
++ if (connected != ak->hp_connected) {
++ ak->hp_connected = connected;
++
++ /* headphone or speaker, on playback */
++ if (ak->playback_on) {
++ if (connected) {
++ snd_ak4641_headphone_on(ak, 1);
++ snd_ak4641_speaker_on(ak, 0);
++ } else {
++ snd_ak4641_speaker_on(ak, 1);
++ snd_ak4641_headphone_on(ak, 0);
++ }
++ }
++
++ /* headset or internal mic, on capture */
++ if (ak->capture_on)
++ snd_ak4641_select_mic(ak);
++ }
++ snd_ak4641_unlock(ak);
++}
++
++/* end {{ Controls }} */
++
++
++/* begin {{ Headphone Detected Notification }} */
++
++static void snd_ak4641_hp_detected_w_fn(void *p)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *)p;
++
++ snd_ak4641_hp_connected(ak, ak->hp_detected.detected);
++}
++
++void snd_ak4641_hp_detected(struct snd_ak4641 *ak, int detected)
++{
++ if (detected != ak->hp_detected.detected) {
++ ak->hp_detected.detected = detected;
++ queue_work(ak->hp_detected.wq, &ak->hp_detected.w);
++ }
++}
++
++static int snd_ak4641_hp_detected_init(struct snd_ak4641 *ak)
++{
++ INIT_WORK(&ak->hp_detected.w, snd_ak4641_hp_detected_w_fn);
++ ak->hp_detected.detected = ak->hp_connected;
++ ak->hp_detected.wq = create_singlethread_workqueue("ak4641");
++ if (ak->hp_detected.wq) return 0;
++ else return -1;
++}
++
++static void snd_ak4641_hp_detected_free(struct snd_ak4641 *ak)
++{
++ destroy_workqueue(ak->hp_detected.wq);
++}
++
++/* end {{ Headphone Detected Notification }} */
++
++
++/* begin {{ Codec Control }} */
++
++static void snd_ak4641_headphone_on(struct snd_ak4641 *ak, int on)
++{
++ if (on) {
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ ak->headphone_out_on(1);
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ R_SEL2_PSLOL | R_SEL2_PSLOR,
++ R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ } else {
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ 0x00, R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ ak->headphone_out_on(0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ }
++}
++
++static void snd_ak4641_speaker_on(struct snd_ak4641 *ak, int on)
++{
++ if (on) {
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ ak->speaker_out_on(1);
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ R_SEL2_PSLOL | R_SEL2_PSLOR,
++ R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ } else {
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ 0x00, R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ ak->speaker_out_on(0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ }
++}
++
++static inline int snd_ak4641_power_on(struct snd_ak4641 *ak)
++{
++ ak->reset_pin(1);
++ ak->power_on_chip(1);
++ msleep(1);
++ ak->reset_pin(0);
++ ak->powered_on = 1;
++ return 0;
++}
++
++static inline int snd_ak4641_power_off(struct snd_ak4641 *ak)
++{
++ ak->powered_on = 0;
++ ak->power_on_chip(0);
++ return 0;
++}
++
++static inline void snd_ak4641_headphone_out_on(struct snd_ak4641 *ak, int on)
++{
++ if (ak->headphone_out_on) ak->headphone_out_on(on);
++}
++
++static inline void snd_ak4641_speaker_out_on(struct snd_ak4641 *ak, int on)
++{
++ if (ak->speaker_out_on) ak->speaker_out_on(on);
++}
++
++static int snd_ak4641_playback_on(struct snd_ak4641 *ak)
++{
++ if (ak->playback_on) return 0;
++
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2],
++ R_PM2_PMDAC, R_PM2_MCKPD | R_PM2_PMDAC);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ if (ak->hp_connected) snd_ak4641_headphone_on(ak, 1);
++ else snd_ak4641_speaker_on(ak, 1);
++
++ ak->playback_on = 1;
++
++ return 0;
++}
++
++static int snd_ak4641_playback_off(struct snd_ak4641 *ak)
++{
++ if (!ak->playback_on) return 0;
++
++ ak->playback_on = 0;
++
++ if (ak->hp_connected) snd_ak4641_headphone_on(ak, 0);
++ else snd_ak4641_speaker_on(ak, 0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2],
++ (!ak->capture_on ? R_PM2_MCKPD : 0x00) | R_PM2_PMDAC,
++ R_PM2_MCKPD | R_PM2_PMDAC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++
++ return 0;
++}
++
++static void snd_ak4641_select_mic(struct snd_ak4641 *ak)
++{
++ int mic = 0;
++ u8 r_mic;
++
++ if (ak->hp_connected) {
++ /* check headset mic */
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], R_MIC_MPWRE, R_MIC_MPWRE);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ snd_ak4641_hwsync_read(ak, R_STATUS);
++ mic = (ak->regs[R_STATUS] & R_STATUS_DTMIC) == R_STATUS_DTMIC;
++
++ printk("htcuniversal_ak4641_select_mic: mic=%d\n",mic);
++
++ r_mic = WRITE_MASK(ak->regs[R_MIC],
++ R_MIC_MSEL | (ak->capture_on ? R_MIC_MPWRE : 0x00),
++ R_MIC_MSEL | R_MIC_MPWRI | R_MIC_MPWRE);
++ }
++ else
++ r_mic = WRITE_MASK(ak->regs[R_MIC],
++ 0x00 | (ak->capture_on ? R_MIC_MPWRI : 0x00),
++ R_MIC_MSEL | R_MIC_MPWRI | R_MIC_MPWRE);
++
++ if (r_mic != ak->regs[R_MIC]) {
++ ak->regs[R_MIC] = r_mic;
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ }
++}
++
++static int snd_ak4641_capture_on(struct snd_ak4641 *ak)
++{
++ if (ak->capture_on) return 0;
++
++ if (!ak->playback_on) {
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2], 0x00, R_PM2_MCKPD);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ }
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMMIC | R_PM1_PMADC,
++ R_PM1_PMMIC | R_PM1_PMADC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_PGA); /* mic PGA gain is reset when PMMIC = 0 */
++
++ ak->capture_on = 1;
++
++ snd_ak4641_select_mic(ak);
++
++ msleep(47); /* accounts for ADC init cycle, time enough for fs >= 44.1 kHz */
++
++ return 0;
++}
++
++static int snd_ak4641_capture_off(struct snd_ak4641 *ak)
++{
++ if (!ak->capture_on) return 0;
++
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC],
++ 0x00, R_MIC_MPWRI | R_MIC_MPWRE | R_MIC_MSEL);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMMIC | R_PM1_PMADC);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ if (!ak->playback_on) {
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2], R_PM2_MCKPD, R_PM2_MCKPD);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ }
++
++ ak->capture_on = 0;
++
++ return 0;
++}
++
++int snd_ak4641_open_stream(struct snd_ak4641 *ak, int stream)
++{
++ snd_ak4641_lock(ak);
++ if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ ak->playback_stream_opened = 1;
++ snd_ak4641_playback_on(ak);
++ } else {
++ ak->capture_stream_opened = 1;
++ snd_ak4641_capture_on(ak);
++ }
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++int snd_ak4641_close_stream(struct snd_ak4641 *ak, int stream)
++{
++ snd_ak4641_lock(ak);
++ if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ ak->playback_stream_opened = 0;
++ snd_ak4641_playback_off(ak);
++ } else {
++ ak->capture_stream_opened = 0;
++ snd_ak4641_capture_off(ak);
++ }
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static int snd_ak4641_init_regs(struct snd_ak4641 *ak)
++{
++ snd_ak4641_hwsync_read_all(ak);
++
++ //@@ MEMO: add some configs
++
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMVCM, R_PM1_PMVCM);
++ ak->regs[R_DAC] = WRITE_MASK(ak->regs[R_DAC], 0x00, R_DAC_DATTC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_DAC);
++
++ return 0;
++}
++
++int snd_ak4641_suspend(struct snd_ak4641 *ak, pm_message_t state)
++{
++ snd_ak4641_lock(ak);
++ if (ak->playback_on) snd_ak4641_playback_off(ak);
++ if (ak->capture_on) snd_ak4641_capture_off(ak);
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++int snd_ak4641_resume(struct snd_ak4641 *ak)
++{
++ snd_ak4641_lock(ak);
++ snd_ak4641_power_on(ak);
++ snd_ak4641_hwsync_write_all(ak);
++ if (ak->playback_stream_opened) snd_ak4641_playback_on(ak);
++ if (ak->capture_stream_opened) snd_ak4641_capture_on(ak);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static void snd_ak4641_init_ak(struct snd_ak4641 *ak)
++{
++ init_MUTEX(&ak->sem);
++ ak->i2c_client.driver = &snd_ak4641_i2c_driver;
++}
++
++int snd_ak4641_activate(struct snd_ak4641 *ak)
++{
++ int ret = 0;
++
++ snd_ak4641_init_ak(ak);
++ snd_ak4641_lock(ak);
++ snd_ak4641_power_on(ak);
++ if ((ret = snd_ak4641_i2c_attach(ak)) < 0)
++ goto failed_i2c_attach;
++ snd_ak4641_init_regs(ak);
++ if ((ret = snd_ak4641_hp_detected_init(ak)) < 0)
++ goto failed_hp_detected_init;
++ snd_ak4641_unlock(ak);
++ return 0;
++
++ failed_hp_detected_init:
++ snd_ak4641_i2c_detach(ak);
++ failed_i2c_attach:
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++ return ret;
++}
++
++void snd_ak4641_deactivate(struct snd_ak4641 *ak)
++{
++ snd_ak4641_lock(ak);
++ snd_ak4641_hp_detected_free(ak);
++ snd_ak4641_i2c_detach(ak);
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++}
++
++int snd_ak4641_add_mixer_controls(struct snd_ak4641 *ak, struct snd_card *card)
++{
++ snd_ak4641_lock(ak);
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_playback_volume, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_playback_switch, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mic_gain, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mic_boost, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mono_out, ak));
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++/* end {{ Codec Control }} */
++
++
++/* begin {{ Module }} */
++
++static int __init snd_ak4641_module_on_load(void)
++{
++ snd_ak4641_i2c_init();
++ return 0;
++}
++
++static void __exit snd_ak4641_module_on_unload(void)
++{
++ snd_ak4641_i2c_free();
++}
++
++module_init(snd_ak4641_module_on_load);
++module_exit(snd_ak4641_module_on_unload);
++
++EXPORT_SYMBOL(snd_ak4641_activate);
++EXPORT_SYMBOL(snd_ak4641_deactivate);
++EXPORT_SYMBOL(snd_ak4641_add_mixer_controls);
++EXPORT_SYMBOL(snd_ak4641_open_stream);
++EXPORT_SYMBOL(snd_ak4641_close_stream);
++EXPORT_SYMBOL(snd_ak4641_suspend);
++EXPORT_SYMBOL(snd_ak4641_resume);
++EXPORT_SYMBOL(snd_ak4641_hp_connected);
++EXPORT_SYMBOL(snd_ak4641_hp_detected);
++
++MODULE_AUTHOR("Giorgio Padrin");
++MODULE_DESCRIPTION("Audio support for codec Asahi Kasei AK4641");
++MODULE_LICENSE("GPL");
++
++/* end {{ Module }} */
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,65 @@
++/*
++ * Audio support for codec Asahi Kasei AK4641
++ *
++ * 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.
++ *
++ * Copyright (c) 2006 Giorgio Padrin <giorgio@mandarinlogiq.org>
++ */
++
++#ifndef __SOUND_AK4641_H
++#define __SOUND_AK4641_H
++
++#include <linux/i2c.h>
++
++struct snd_ak4641 {
++ struct semaphore sem;
++
++ u8 regs[0x14]; /* registers cache */
++
++ unsigned int
++ powered_on:1,
++ playback_on:1,
++ playback_stream_opened:1,
++ capture_on:1,
++ capture_stream_opened:1;
++
++ unsigned int
++ hp_connected:1;
++
++ /* -- configuration (to fill before activation) -- */
++ void (*power_on_chip)(int on);
++ void (*reset_pin)(int on);
++ void (*headphone_out_on)(int on);
++ void (*speaker_out_on)(int on);
++
++ struct i2c_client i2c_client; /* to fill .adapter */
++ /* ----------------------------------------------- */
++
++ struct {
++ int detected;
++ struct workqueue_struct *wq;
++ struct work_struct w;
++ } hp_detected;
++};
++
++
++/* Note: opening, closing, suspending and resuming a stream
++ * require the clocks (MCLK and I2S ones) running
++ */
++
++/* don't forget to specify I2C adapter in i2c_client field */
++int snd_ak4641_activate(struct snd_ak4641 *ak);
++
++void snd_ak4641_deactivate(struct snd_ak4641 *ak);
++int snd_ak4641_add_mixer_controls(struct snd_ak4641 *ak, struct snd_card *card);
++int snd_ak4641_open_stream(struct snd_ak4641 *ak, int stream);
++int snd_ak4641_close_stream(struct snd_ak4641 *ak, int stream);
++int snd_ak4641_suspend(struct snd_ak4641 *ak, pm_message_t state);
++int snd_ak4641_resume(struct snd_ak4641 *ak);
++
++void snd_ak4641_hp_connected(struct snd_ak4641 *ak, int connected); /* non atomic context */
++void snd_ak4641_hp_detected(struct snd_ak4641 *ak, int detected); /* atomic context */
++
++#endif /* __SOUND_AK4641_H */
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,143 @@
++/*
++ * LEDs support for the HP iPaq hx4700
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * 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/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_leds.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++//FIXME
++//DEFINE_LED_TRIGGER_SHARED_GLOBAL(htcuniversal_radio_trig);
++//EXPORT_LED_TRIGGER_SHARED(htcuniversal_radio_trig);
++
++static struct asic3_led htcuniversal_leds[] = {
++ {
++ .led_cdev = {
++ .name = "htcuniversal:red",
++ .default_trigger = "htcuniversal-charging",
++ },
++ .hw_num = 2,
++
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:green",
++ .default_trigger = "htcuniversal-chargefull",
++ },
++ .hw_num = 1,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:wifi-bt",
++ .default_trigger = "htcuniversal-radio",
++ },
++ .hw_num = 0,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:phonebuttons",
++ .default_trigger = "htcuniversal-phonebuttons",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_BL_KEYP_PWR_ON,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:vibra",
++ .default_trigger = "htcuniversal-vibra",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_VIBRA_PWR_ON,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:flashlight1",
++ .default_trigger = "htcuniversal-flashlight1",
++ },
++ .hw_num = -1,
++ .gpio_num = ('A'-'A')*16+GPIOA_FLASHLIGHT,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:kbdbacklight",
++ .default_trigger = "htcuniversal-kbdbacklight",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_BL_KEYB_PWR_ON,
++ },
++};
++
++void htcuniversal_leds_release(struct device *dev)
++{
++ return;
++}
++
++static
++struct asic3_leds_machinfo htcuniversal_leds_machinfo = {
++ .num_leds = ARRAY_SIZE(htcuniversal_leds),
++ .leds = htcuniversal_leds,
++ .asic3_pdev = &htcuniversal_asic3,
++};
++
++static
++struct platform_device htcuniversal_leds_pdev = {
++ .name = "asic3-leds",
++ .dev = {
++ .platform_data = &htcuniversal_leds_machinfo,
++ .release = htcuniversal_leds_release,
++ },
++};
++
++static
++int __init htcuniversal_leds_init(void)
++{
++ int ret;
++ printk("htcuniversal LEDs Driver\n");
++// led_trigger_register_shared("htcuniversal-radio", &htcuniversal_radio_trig);
++
++ ret = asic3_leds_register();
++ if (ret) goto asic3_leds_failed;
++
++ ret = platform_device_register(&htcuniversal_leds_pdev);
++ if (ret) goto platform_device_failed;
++
++ goto success;
++
++platform_device_failed:
++ asic3_leds_unregister();
++asic3_leds_failed:
++// led_trigger_unregister_shared(htcuniversal_radio_trig);
++ printk("htcuniversal LEDs Driver failed to init");
++success:
++ return ret;
++}
++
++static
++void __exit htcuniversal_leds_exit(void)
++{
++// led_trigger_unregister_shared(htcuniversal_radio_trig);
++ platform_device_unregister(&htcuniversal_leds_pdev);
++ asic3_leds_unregister();
++ return;
++}
++
++module_init(htcuniversal_leds_init);
++module_exit(htcuniversal_leds_exit);
++
++MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
++MODULE_DESCRIPTION("htcuniversal LEDs driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,61 @@
++/*
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * Copyright (C) 2006 Paul Sokolosvky
++ * Based on code from older versions of htcuniversal_lcd.c
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/platform_device.h>
++#include <asm/arch/hardware.h> /* for pxa-regs.h (__REG) */
++#include <asm/arch/pxa-regs.h>
++#include <asm/mach-types.h> /* machine_is_htcuniversal */
++//#include <linux/corgi_bl.h>
++#include <linux/backlight.h>
++#include <linux/err.h>
++
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++#define HTCUNIVERSAL_MAX_INTENSITY 0xc7
++
++static void htcuniversal_set_bl_intensity(int intensity)
++{
++ PWM_CTRL1 = 1; /* pre-scaler */
++ PWM_PWDUTY1 = intensity; /* duty cycle */
++ PWM_PERVAL1 = HTCUNIVERSAL_MAX_INTENSITY+1; /* period */
++
++ if (intensity > 0) {
++ pxa_set_cken(CKEN_PWM1, 1);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev,
++ (1<<GPIOD_FL_PWR_ON), (1<<GPIOD_FL_PWR_ON));
++ } else {
++ pxa_set_cken(CKEN_PWM1, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev,
++ (1<<GPIOD_FL_PWR_ON), 0);
++ }
++}
++
++
++static struct generic_bl_info htcuniversal_bl_machinfo = {
++ .default_intensity = HTCUNIVERSAL_MAX_INTENSITY / 4,
++ .limit_mask = 0xff,
++ .max_intensity = HTCUNIVERSAL_MAX_INTENSITY,
++ .set_bl_intensity = htcuniversal_set_bl_intensity,
++};
++
++struct platform_device htcuniversal_bl = {
++ .name = "corgi-bl",
++ .dev = {
++ .platform_data = &htcuniversal_bl_machinfo,
++ },
++};
++
++MODULE_AUTHOR("Paul Sokolovsky <pmiscml@gmail.com>");
++MODULE_DESCRIPTION("Backlight driver for HTC Universal");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,135 @@
++/* Bluetooth interface driver for TI BRF6150 on HX4700
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-04-21 Todd Blumer Created.
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware.h>
++#include <asm/arch/serial.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include "htcuniversal_bt.h"
++
++static uint use_led=1;
++
++static void
++htcuniversal_bt_configure( int state )
++{
++ int tries;
++
++ printk( KERN_NOTICE "htcuniversal configure bluetooth: %d\n", state );
++ switch (state) {
++
++ case PXA_UART_CFG_PRE_STARTUP:
++ break;
++
++ case PXA_UART_CFG_POST_STARTUP:
++ /* pre-serial-up hardware configuration */
++ htcuniversal_egpio_enable(1<<EGPIO5_BT_3V3_ON);
++ mdelay(50);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_PWR_ON, 1<<GPIOC_BT_PWR_ON);
++ mdelay(10);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_RESET, 0);
++ mdelay(10);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_RESET, 1<<GPIOC_BT_RESET);
++ mdelay(10);
++
++ /*
++ * BRF6150's RTS goes low when firmware is ready
++ * so check for CTS=1 (nCTS=0 -> CTS=1). Typical 150ms
++ */
++ tries = 0;
++ do {
++ mdelay(10);
++ } while ((BTMSR & MSR_CTS) == 0 && tries++ < 50);
++ if (use_led) {
++// htcuniversal_set_led(2, 16, 16);
++ }
++ break;
++
++ case PXA_UART_CFG_PRE_SHUTDOWN:
++ htcuniversal_egpio_disable(1<<EGPIO5_BT_3V3_ON );
++ mdelay(50);
++// htcuniversal_clear_led(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_PWR_ON, 0);
++ break;
++
++ default:
++ break;
++ }
++}
++
++
++static int
++htcuniversal_bt_probe( struct platform_device *dev )
++{
++ struct htcuniversal_bt_funcs *funcs = dev->dev.platform_data;
++
++ /* configure bluetooth UART */
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_RXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_TXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_UART_CTS_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_UART_RTS_MD );
++
++ funcs->configure = htcuniversal_bt_configure;
++
++ /* Make sure the LED is off */
++// htcuniversal_clear_led(2);
++
++ return 0;
++}
++
++static int
++htcuniversal_bt_remove( struct platform_device *dev )
++{
++ struct htcuniversal_bt_funcs *funcs = dev->dev.platform_data;
++
++ funcs->configure = NULL;
++
++ /* Make sure the LED is off */
++// htcuniversal_clear_led(2);
++
++ return 0;
++}
++
++static struct platform_driver bt_driver = {
++ .driver = {
++ .name = "htcuniversal_bt",
++ },
++ .probe = htcuniversal_bt_probe,
++ .remove = htcuniversal_bt_remove,
++};
++
++module_param(use_led, uint, 0);
++
++static int __init
++htcuniversal_bt_init( void )
++{
++ printk(KERN_NOTICE "htcuniversal Bluetooth Driver\n");
++ return platform_driver_register( &bt_driver );
++}
++
++static void __exit
++htcuniversal_bt_exit( void )
++{
++ platform_driver_unregister( &bt_driver );
++}
++
++module_init( htcuniversal_bt_init );
++module_exit( htcuniversal_bt_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Bluetooth Support Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
++
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,17 @@
++/*
++ * Bluetooth support file for calling bluetooth configuration functions
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-06 Todd Blumer Initial Revision
++ */
++
++#ifndef _HTCUNIVERSAL_BT_H
++#define _HTCUNIVERSAL_BT_H
++
++struct htcuniversal_bt_funcs {
++ void (*configure) ( int state );
++};
++
++
++#endif
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,87 @@
++/*
++ * Buttons driver for HTC Universal
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.
++ *
++ * Copyright (C) 2005 Pawel Kolodziejski
++ * Copyright (C) 2003 Joshua Wise
++ *
++ */
++
++#include <linux/input.h>
++#include <linux/input_pda.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/irq.h>
++#include <linux/platform_device.h>
++#include <linux/gpio_keys.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_keys.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static struct asic3_keys_button asic3_buttons[] = {
++//{KEY_SCREEN, ASIC3_GPIOA_IRQ_BASE+GPIOA_COVER_ROTATE_N, 1, "screen_cover", EV_SW},
++//{KEY_SWITCHVIDEOMODE, ASIC3_GPIOB_IRQ_BASE+GPIOB_CLAMSHELL_N, 1, "clamshell_rotate", EV_SW},
++//{KEY_KBDILLUMTOGGLE, ASIC3_GPIOB_IRQ_BASE+GPIOB_NIGHT_SENSOR, 1, "night_sensor", EV_SW},
++{SW_LID, ASIC3_GPIOA_IRQ_BASE+GPIOA_COVER_ROTATE_N, 1, "screen_cover", EV_SW},
++{SW_TABLET_MODE, ASIC3_GPIOB_IRQ_BASE+GPIOB_CLAMSHELL_N, 1, "clamshell_rotate", EV_SW},
++//{SW_NIGHT_SENSOR, ASIC3_GPIOB_IRQ_BASE+GPIOB_NIGHT_SENSOR, 1, "night_sensor", EV_SW},
++{KEY_F10, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_BACKLIGHT_N, 1, "backlight_button"},
++{KEY_RECORD, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_RECORD_N, 1, "record_button"},
++{KEY_CAMERA, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_CAMERA_N, 1, "camera_button"},
++{KEY_VOLUMEDOWN, ASIC3_GPIOA_IRQ_BASE+GPIOA_VOL_UP_N, 1, "volume_slider_down"},
++{KEY_VOLUMEUP, ASIC3_GPIOA_IRQ_BASE+GPIOA_VOL_DOWN_N, 1, "volume_slider_up"},
++{KEY_KPENTER, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_OK_N, 1, "select"},
++{KEY_RIGHT, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_RIGHT_N, 1, "right"},
++{KEY_LEFT, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_LEFT_N, 1, "left"},
++{KEY_DOWN, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_DOWN_N, 1, "down"},
++{KEY_UP, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_UP_N, 1, "up"},
++};
++
++static struct asic3_keys_platform_data asic3_keys_data = {
++ .buttons = asic3_buttons,
++ .nbuttons = ARRAY_SIZE(asic3_buttons),
++ .asic3_dev = &htcuniversal_asic3.dev,
++};
++
++static struct platform_device htcuniversal_keys_asic3 = {
++ .name = "asic3-keys",
++ .dev = { .platform_data = &asic3_keys_data, }
++};
++
++static int __init htcuniversal_buttons_probe(struct platform_device *dev)
++{
++ platform_device_register(&htcuniversal_keys_asic3);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_buttons_driver = {
++ .driver = {
++ .name = "htcuniversal_buttons",
++ },
++ .probe = htcuniversal_buttons_probe,
++};
++
++static int __init htcuniversal_buttons_init(void)
++{
++ if (!machine_is_htcuniversal())
++ return -ENODEV;
++
++ return platform_driver_register(&htcuniversal_buttons_driver);
++}
++
++static void __exit htcuniversal_buttons_exit(void)
++{
++ platform_driver_unregister(&htcuniversal_buttons_driver);
++}
++
++module_init(htcuniversal_buttons_init);
++module_exit(htcuniversal_buttons_exit);
++
++MODULE_AUTHOR ("Joshua Wise, Pawel Kolodziejski, Paul Sokolosvky");
++MODULE_DESCRIPTION ("Buttons support for HTC Universal");
++MODULE_LICENSE ("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,226 @@
++/* Core Hardware driver for Hx4700 (Serial, ASIC3, EGPIOs)
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-03-29 Todd Blumer Converted basic structure to support hx4700
++ * 2005-04-30 Todd Blumer Add IRDA code from H2200
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/pm.h>
++#include <linux/irq.h>
++
++#include <asm/io.h>
++#include <asm/mach/irq.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa-pm_ll.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include <linux/soc/asic3_base.h>
++#include <asm/hardware/ipaq-asic3.h>
++
++volatile u_int16_t *egpios;
++u_int16_t egpio_reg;
++
++static int htc_bootloader = 0; /* Is the stock HTC bootloader installed? */
++
++/*
++ * may make sense to put egpios elsewhere, but they're here now
++ * since they share some of the same address space with the TI WLAN
++ *
++ * EGPIO register is write-only
++ */
++
++void
++htcuniversal_egpio_enable( u_int16_t bits )
++{
++ unsigned long flags;
++
++ local_irq_save(flags);
++
++ egpio_reg |= bits;
++ *egpios = egpio_reg;
++
++ local_irq_restore(flags);
++}
++EXPORT_SYMBOL_GPL(htcuniversal_egpio_enable);
++
++void
++htcuniversal_egpio_disable( u_int16_t bits )
++{
++ unsigned long flags;
++
++ local_irq_save(flags);
++
++ egpio_reg &= ~bits;
++ *egpios = egpio_reg;
++
++ local_irq_restore(flags);
++}
++EXPORT_SYMBOL_GPL(htcuniversal_egpio_disable);
++
++#ifdef CONFIG_PM
++
++//void htcuniversal_ll_pm_init(void);
++
++static int htcuniversal_suspend(struct platform_device *dev, pm_message_t state)
++{
++ /* Turn off external clocks here, because htcuniversal_power and asic3_mmc
++ * scared to do so to not hurt each other. (-5 mA) */
++
++
++ /* 0x20c2 is HTC clock value
++ * CLOCK_CDEX_SOURCE 2
++ * CLOCK_CDEX_SPI 0
++ * CLOCK_CDEX_OWM 0
++ *
++ * CLOCK_CDEX_PWM0 0
++ * CLOCK_CDEX_PWM1 0
++ * CLOCK_CDEX_LED0 1
++ * CLOCK_CDEX_LED1 1
++ *
++ * CLOCK_CDEX_LED2 0
++ * CLOCK_CDEX_SD_HOST 0
++ * CLOCK_CDEX_SD_BUS 0
++ * CLOCK_CDEX_SMBUS 0
++ *
++ * CLOCK_CDEX_CONTROL_CX 0
++ * CLOCK_CDEX_EX0 1
++ * CLOCK_CDEX_EX1 0
++ * */
++ asic3_set_clock_cdex(&htcuniversal_asic3.dev, 0xffff, CLOCK_CDEX_SOURCE1
++ |CLOCK_CDEX_LED0
++ |CLOCK_CDEX_LED1
++ |CLOCK_CDEX_LED2
++ |CLOCK_CDEX_EX0
++ |CLOCK_CDEX_EX1);
++
++ *egpios = 0; /* turn off all egpio power */
++
++ /* Wake up enable. */
++ PWER = PWER_GPIO0
++ | PWER_GPIO1 /* reset */
++ | PWER_GPIO9 /* USB */
++ | PWER_GPIO10 /* AC on USB */
++ | PWER_GPIO14 /* ASIC3 mux */
++ | PWER_RTC;
++ /* Wake up on falling edge. */
++ PFER = PWER_GPIO0
++ | PWER_GPIO1
++ | PWER_GPIO9
++ | PWER_GPIO10
++ | PWER_GPIO14;
++
++ /* Wake up on rising edge. */
++ PRER = PWER_GPIO0
++ | PWER_GPIO1
++ | PWER_GPIO9
++ | PWER_GPIO10;
++ /* 3.6864 MHz oscillator power-down enable */
++ PCFR = PCFR_OPDE | PCFR_PI2CEN | PCFR_GPROD | PCFR_GPR_EN;
++
++ PGSR0 = 0x09088004;
++ PGSR1 = 0x00020002;
++ PGSR2 = 0x8001c000;
++ PGSR3 = 0x00106284;
++
++ PSLR = 0xcc000000;
++
++#if 0
++ /*
++ * If we're using bootldr and not the stock HTC bootloader,
++ * we want to wake up periodically to see if the charge is full while
++ * it is suspended. We do this with the OS timer 4 in the pxa270.
++ */
++ if (!htc_bootloader) {
++ OMCR4 = 0x4b; /* Periodic, self-resetting, 1-second timer */
++ OSMR4 = 5; /* Wake up bootldr after x seconds so it can
++ figure out what to do with the LEDs. */
++ OIER |= 0x10; /* Enable interrupt source for Timer 4 */
++ OSCR4 = 0; /* This starts the timer */
++ }
++#endif
++
++ asic3_set_extcf_select(&htcuniversal_asic3.dev, ASIC3_EXTCF_OWM_EN, 0);
++
++ return 0;
++}
++
++static int htcuniversal_resume(struct platform_device *dev)
++{
++ htcuniversal_egpio_enable(0);
++
++ return 0;
++}
++#else
++# define htcuniversal_suspend NULL
++# define htcuniversal_resume NULL
++#endif
++
++static int
++htcuniversal_core_probe( struct platform_device *dev )
++{
++
++ printk( KERN_NOTICE "HTC Universal Core Hardware Driver\n" );
++
++ egpios = (volatile u_int16_t *)ioremap_nocache(HTCUNIVERSAL_EGPIO_BASE, sizeof *egpios );
++ if (!egpios)
++ return -ENODEV;
++ else
++ printk( KERN_NOTICE "HTC Universal Core: egpio at phy=0x%8.8x is at virt=0x%p\n",
++ HTCUNIVERSAL_EGPIO_BASE, egpios );
++
++ printk("Using stock HTC first stage bootloader\n");
++ htc_bootloader = 1;
++
++// htcuniversal_ll_pm_init();
++
++ return 0;
++}
++
++static int
++htcuniversal_core_remove( struct platform_device *dev )
++{
++
++ if (egpios != NULL)
++ iounmap( (void *)egpios );
++
++ return 0;
++}
++
++static struct platform_driver htcuniversal_core_driver = {
++ .driver = {
++ .name = "htcuniversal_core",
++ },
++ .probe = htcuniversal_core_probe,
++ .remove = htcuniversal_core_remove,
++ .suspend = htcuniversal_suspend,
++ .resume = htcuniversal_resume,
++};
++
++static int __init
++htcuniversal_core_init( void )
++{
++ return platform_driver_register( &htcuniversal_core_driver );
++}
++
++
++static void __exit
++htcuniversal_core_exit( void )
++{
++ platform_driver_unregister( &htcuniversal_core_driver );
++}
++
++module_init( htcuniversal_core_init );
++module_exit( htcuniversal_core_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Core Hardware Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,212 @@
++/*
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * History:
++ *
++ * 2004-03-01 Eddi De Pieri Adapted for htcuniversal using h3900_lcd.c
++ * 2004 Shawn Anderson Lcd hacking on htcuniversal
++ * see h3900_lcd.c for more history.
++ *
++ */
++
++#include <linux/types.h>
++#include <asm/arch/hardware.h> /* for pxa-regs.h (__REG) */
++#include <linux/platform_device.h>
++#include <asm/arch/pxa-regs.h> /* LCCR[0,1,2,3]* */
++#include <asm/arch/bitfield.h> /* for pxa-regs.h (Fld, etc) */
++#include <asm/arch/pxafb.h> /* pxafb_mach_info, set_pxa_fb_info */
++#include <asm/mach-types.h> /* machine_is_htcuniversal */
++#include <linux/lcd.h> /* lcd_device */
++#include <linux/err.h>
++#include <linux/delay.h>
++
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++static int saved_lcdpower=-1;
++
++static int powerup_lcd(void)
++{
++ printk( KERN_INFO "htcuniversal powerup_lcd: called\n");
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++#if 1
++ LCCR4|=LCCR4_PCDDIV;
++#endif
++ pxa_set_cken(CKEN_LCD, 0);
++
++ mdelay(100);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 1<<GPIOA_LCD_PWR5_ON);
++ mdelay(5);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 1<<GPIOB_LCD_PWR3_ON);
++ mdelay(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 1<<GPIOC_LCD_PWR1_ON);
++ mdelay(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 1<<GPIOC_LCD_PWR2_ON);
++ mdelay(20);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 1<<GPIOD_LCD_PWR4_ON);
++ mdelay(1);
++ pxa_set_cken(CKEN_LCD, 1);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,1);
++ SET_HTCUNIVERSAL_GPIO(LCD2,1);
++ return 0;
++}
++
++static int powerdown_lcd(void)
++{
++ printk( KERN_INFO "htcuniversal powerdown_lcd: called\n");
++
++#if 1
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ mdelay(100);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ mdelay(10);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++ pxa_set_cken(CKEN_LCD, 0);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,0);
++ SET_HTCUNIVERSAL_GPIO(LCD2,0);
++#else
++ pxa_set_cken(CKEN_LCD, 0);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,0);
++ SET_HTCUNIVERSAL_GPIO(LCD2,0);
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ mdelay(100);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ mdelay(10);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++#endif
++ return 0;
++}
++
++static int htcuniversal_lcd_set_power(struct lcd_device *lm, int power)
++{
++ /* Enable or disable power to the LCD (0: on; 4: off) */
++
++ if ( power < 1 ) {
++
++ powerup_lcd();
++
++ } else {
++
++ powerdown_lcd();
++
++ }
++
++ saved_lcdpower=power;
++
++ return 0;
++}
++
++static int htcuniversal_lcd_get_power(struct lcd_device *lm)
++{
++ /* Get the LCD panel power status (0: full on, 1..3: controller
++ * power on, flat panel power off, 4: full off) */
++
++ if (saved_lcdpower == -1)
++ {
++ htcuniversal_lcd_set_power(lm, 4);
++ saved_lcdpower=4;
++ }
++
++ return saved_lcdpower;
++}
++
++static struct lcd_ops htcuniversal_lcd_properties =
++{
++ .get_power = htcuniversal_lcd_get_power,
++ .set_power = htcuniversal_lcd_set_power,
++};
++
++static struct lcd_device *htcuniversal_lcd_dev;
++
++static int htcuniversal_lcd_probe(struct platform_device * dev)
++{
++ htcuniversal_lcd_dev = lcd_device_register("pxa2xx-fb", &dev->dev, NULL,
++ &htcuniversal_lcd_properties);
++ if (IS_ERR(htcuniversal_lcd_dev)) {
++ printk("htcuniversal_lcd_probe: error registering devices\n");
++ return -1;
++ }
++
++ return 0;
++}
++
++static int htcuniversal_lcd_remove(struct platform_device * dev)
++{
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 4);
++ lcd_device_unregister(htcuniversal_lcd_dev);
++
++ return 0;
++}
++
++static int htcuniversal_lcd_suspend(struct platform_device * dev, pm_message_t state)
++{
++// printk("htcuniversal_lcd_suspend: called.\n");
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 4);
++ return 0;
++}
++
++static int htcuniversal_lcd_resume(struct platform_device * dev)
++{
++// printk("htcuniversal_lcd_resume: called.\n");
++
++ /* */
++#if 1
++ LCCR4|=LCCR4_PCDDIV;
++#endif
++
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 0);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_lcd_driver = {
++ .driver = {
++ .name = "htcuniversal_lcd",
++ },
++ .probe = htcuniversal_lcd_probe,
++ .remove = htcuniversal_lcd_remove,
++ .suspend = htcuniversal_lcd_suspend,
++ .resume = htcuniversal_lcd_resume,
++};
++
++static int htcuniversal_lcd_init(void)
++{
++ if (!machine_is_htcuniversal())
++ return -ENODEV;
++
++ return platform_driver_register(&htcuniversal_lcd_driver);
++}
++
++static void htcuniversal_lcd_exit(void)
++{
++ lcd_device_unregister(htcuniversal_lcd_dev);
++ platform_driver_unregister(&htcuniversal_lcd_driver);
++}
++
++module_init(htcuniversal_lcd_init);
++module_exit(htcuniversal_lcd_exit);
++
++MODULE_AUTHOR("xanadux.org");
++MODULE_DESCRIPTION("Framebuffer driver for HTC Universal");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,167 @@
++
++/* Phone interface driver for Qualcomm MSM6250 on HTC Universal
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-04-21 Todd Blumer Created.
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware.h>
++#include <asm/arch/serial.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include "htcuniversal_phone.h"
++
++static void phone_reset(void)
++{
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_RESET2, 0);
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_RESET,0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++ mdelay(1);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 1<<GPIOD_BB_RESET1);
++ mdelay(20);
++ SET_HTCUNIVERSAL_GPIO(PHONE_RESET,1);
++ mdelay(200);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++}
++
++static void phone_off(void)
++{
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 1<<GPIOD_BB_RESET1);
++ mdelay(2000);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_RESET2, 1<<GPIOB_BB_RESET2);
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0);
++}
++
++static void
++htcuniversal_phone_configure( int state )
++{
++ int tries;
++ unsigned short statusb;
++
++ printk( KERN_NOTICE "htcuniversal configure phone: %d\n", state );
++ switch (state) {
++
++ case PXA_UART_CFG_PRE_STARTUP:
++ break;
++
++ case PXA_UART_CFG_POST_STARTUP:
++ /* pre-serial-up hardware configuration */
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_START,0); /* "bootloader" */
++ SET_HTCUNIVERSAL_GPIO(PHONE_UNKNOWN,0); /* not used */
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0); /* PHONE_OFF */
++
++ phone_reset();
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_START,1); /* phone */
++
++ phone_reset();
++
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_READY, 0);
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_UNKNOWN3, 0);
++
++ /*
++ */
++ tries = 0;
++ do {
++ mdelay(10);
++ statusb = asic3_get_gpio_status_b( &htcuniversal_asic3.dev );
++ } while ( (statusb & (1<<GPIOB_UMTS_DCD)) == 0 && tries++ < 200);
++
++ printk("UMTS_DCD tries=%d of 200\n",tries);
++
++ tries = 0;
++ do {
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,1);
++ mdelay(10);
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0);
++ mdelay(20);
++ statusb = asic3_get_gpio_status_b( &htcuniversal_asic3.dev );
++ } while ( (statusb & (1<<GPIOB_BB_READY)) == 0 && tries++ < 200);
++
++ printk("BB_READY tries=%d of 200\n",tries);
++
++ break;
++
++ case PXA_UART_CFG_PRE_SHUTDOWN:
++
++ phone_off();
++
++ break;
++
++ default:
++ break;
++ }
++}
++
++
++static int
++htcuniversal_phone_probe( struct platform_device *dev )
++{
++ struct htcuniversal_phone_funcs *funcs = dev->dev.platform_data;
++
++ /* configure phone UART */
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_RXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_TXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS_MD );
++
++ funcs->configure = htcuniversal_phone_configure;
++
++ return 0;
++}
++
++static int
++htcuniversal_phone_remove( struct platform_device *dev )
++{
++ struct htcuniversal_phone_funcs *funcs = dev->dev.platform_data;
++
++ funcs->configure = NULL;
++
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_READY, 1<<GPIOB_BB_READY);
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_UNKNOWN3, 1<<GPIOB_BB_UNKNOWN3);
++
++ return 0;
++}
++
++static struct platform_driver phone_driver = {
++ .driver = {
++ .name = "htcuniversal_phone",
++ },
++ .probe = htcuniversal_phone_probe,
++ .remove = htcuniversal_phone_remove,
++};
++
++static int __init
++htcuniversal_phone_init( void )
++{
++ printk(KERN_NOTICE "htcuniversal Phone Driver\n");
++ return platform_driver_register( &phone_driver );
++}
++
++static void __exit
++htcuniversal_phone_exit( void )
++{
++ platform_driver_unregister( &phone_driver );
++}
++
++module_init( htcuniversal_phone_init );
++module_exit( htcuniversal_phone_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Phone Support Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,16 @@
++/*
++ * Bluetooth support file for calling bluetooth configuration functions
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-06 Todd Blumer Initial Revision
++ */
++
++#ifndef _HTCUNIVERSAL_PHONE_H
++#define _HTCUNIVERSAL_PHONE_H
++
++struct htcuniversal_phone_funcs {
++ void (*configure) ( int state );
++};
++
++#endif
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,69 @@
++/*
++ * MyPal 716 power management support for the original HTC IPL in DoC G3
++ *
++ * Use consistent with the GNU GPL is permitted, provided that this
++ * copyright notice is preserved in its entirety in all copies and
++ * derived works.
++ *
++ * Copyright (C) 2005 Pawel Kolodziejski
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/device.h>
++#include <linux/pm.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa-pm_ll.h>
++
++#ifdef CONFIG_PM
++
++static u32 *addr_a0040000;
++static u32 *addr_a0040004;
++static u32 *addr_a0040008;
++static u32 *addr_a004000c;
++
++static u32 save_a0040000;
++static u32 save_a0040004;
++static u32 save_a0040008;
++static u32 save_a004000c;
++
++static void htcuniversal_pxa_ll_pm_suspend(unsigned long resume_addr)
++{
++ save_a0040000 = *addr_a0040000;
++ save_a0040004 = *addr_a0040004;
++ save_a0040008 = *addr_a0040008;
++ save_a004000c = *addr_a004000c;
++
++ /* jump to PSPR */
++ *addr_a0040000 = 0xe3a00101; // mov r0, #0x40000000
++ *addr_a0040004 = 0xe380060f; // orr r0, r0, #0x0f000000
++ *addr_a0040008 = 0xe3800008; // orr r0, r0, #8
++ *addr_a004000c = 0xe590f000; // ldr pc, [r0]
++}
++
++static void htcuniversal_pxa_ll_pm_resume(void)
++{
++ *addr_a0040000 = save_a0040000;
++ *addr_a0040004 = save_a0040004;
++ *addr_a0040008 = save_a0040008;
++ *addr_a004000c = save_a004000c;
++}
++
++static struct pxa_ll_pm_ops htcuniversal_ll_pm_ops = {
++ .suspend = htcuniversal_pxa_ll_pm_suspend,
++ .resume = htcuniversal_pxa_ll_pm_resume,
++};
++
++void htcuniversal_ll_pm_init(void) {
++ addr_a0040000 = phys_to_virt(0xa0040000);
++ addr_a0040004 = phys_to_virt(0xa0040004);
++ addr_a0040008 = phys_to_virt(0xa0040008);
++ addr_a004000c = phys_to_virt(0xa004000c);
++
++ pxa_pm_set_ll_ops(&htcuniversal_ll_pm_ops);
++}
++#endif /* CONFIG_PM */
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,97 @@
++/*
++ * pda_power driver for HTC Universal
++ *
++ * 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/platform_device.h>
++#include <linux/module.h>
++#include <linux/pda_power.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static void charge_on(int flags)
++{
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_CHARGE_EN, 0);
++}
++
++static int ac_on(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(POWER_DET) == 0);
++}
++
++static int usb_on(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(USB_DET) == 0);
++}
++
++static char *supplicants[] = {
++ "ds2760-battery.0", "backup-battery"
++};
++
++static struct pda_power_pdata power_pdata = {
++ .is_ac_online = ac_on,
++ .is_usb_online = usb_on,
++ .set_charge = charge_on,
++ .supplied_to = supplicants,
++ .num_supplicants = ARRAY_SIZE(supplicants),
++};
++
++static struct resource power_resources[] = {
++ [0] = {
++ .name = "ac",
++ .start = HTCUNIVERSAL_IRQ(POWER_DET),
++ .end = HTCUNIVERSAL_IRQ(POWER_DET),
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE,
++ },
++ [1] = {
++ .name = "usb",
++ .start = HTCUNIVERSAL_IRQ(USB_DET),
++ .end = HTCUNIVERSAL_IRQ(USB_DET),
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE,
++ },
++};
++
++static void dev_release(struct device *dev)
++{
++ return;
++}
++
++static struct platform_device power_dev =
++{
++ .name = "pda-power",
++ .id = -1,
++ .resource = power_resources,
++ .num_resources = ARRAY_SIZE(power_resources),
++ .dev =
++ {
++ .platform_data = &power_pdata,
++ .release = dev_release,
++ },
++};
++
++static int htcuniversal_power_init(void)
++{
++ return platform_device_register(&power_dev);
++}
++
++static void htcuniversal_power_exit(void)
++{
++ platform_device_unregister(&power_dev);
++
++ return;
++}
++
++module_init(htcuniversal_power_init);
++module_exit(htcuniversal_power_exit);
++
++MODULE_DESCRIPTION("Power driver for HTC Universal");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,490 @@
++/* Touch screen driver for the TI something-or-other
++ *
++ * Copyright © 2005 SDG Systems, LLC
++ *
++ * Based on code that was based on the SAMCOP driver.
++ * Copyright © 2003, 2004 Compaq Computer Corporation.
++ *
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Keith Packard <keith.packard@hp.com>
++ * May 2003
++ *
++ * Updates:
++ *
++ * 2004-02-11 Michael Opdenacker Renamed names from samcop to shamcop,
++ * Goal:support HAMCOP and SAMCOP.
++ * 2004-02-14 Michael Opdenacker Temporary fix for device id handling
++ *
++ * 2005-02-18 Aric Blumer Converted basic structure to support hx4700
++ *
++ * 2005-06-07 Aric Blumer Added tssim device handling so we can
++ * hook in the fbvncserver.
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++
++#include <linux/init.h>
++#include <linux/fs.h>
++#include <linux/cdev.h>
++#include <linux/interrupt.h>
++#include <linux/sched.h>
++#include <linux/pm.h>
++#include <linux/delay.h>
++#include <linux/input.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/mach/irq.h>
++#include <asm/io.h>
++
++/* remove me */
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/mach-types.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++
++#include "tsc2046_ts.h"
++
++enum touchscreen_state {
++ STATE_WAIT_FOR_TOUCH, /* Waiting for a PEN interrupt */
++ STATE_SAMPLING /* Actively sampling ADC */
++};
++
++struct touchscreen_data {
++ enum touchscreen_state state;
++ struct timer_list timer;
++ int irq;
++ struct input_dev *input;
++ /* */
++ int port;
++ int clock;
++ int pwrbit_X;
++ int pwrbit_Y;
++ int (*pen_down)(void);
++};
++
++static unsigned long poll_sample_time = 10; /* Sample every 10 milliseconds */
++
++static struct touchscreen_data *ts_data;
++
++static int irqblock;
++
++module_param(poll_sample_time, ulong, 0644);
++MODULE_PARM_DESC(poll_sample_time, "Poll sample time");
++
++static inline void
++report_touchpanel(struct touchscreen_data *ts, int pressure, int x, int y)
++{
++ input_report_abs(ts->input, ABS_PRESSURE, pressure);
++ input_report_abs(ts->input, ABS_X, x);
++ input_report_abs(ts->input, ABS_Y, y);
++ input_sync(ts->input);
++}
++
++static void start_read(struct touchscreen_data *touch);
++
++static irqreturn_t
++pen_isr(int irq, void *irq_desc)
++{
++ struct touchscreen_data *ts = ts_data;
++
++ if(irq == ts->irq /* && !irqblock */) {
++ irqblock = 1;
++
++ /*
++ * Disable the pen interrupt. It's reenabled when the user lifts the
++ * pen.
++ */
++ disable_irq(ts->irq);
++
++ if (ts->state == STATE_WAIT_FOR_TOUCH) {
++ ts->state = STATE_SAMPLING;
++ start_read(ts);
++ } else {
++ /* Shouldn't happen */
++ printk(KERN_ERR "Unexpected ts interrupt\n");
++ }
++
++ }
++ return IRQ_HANDLED;
++}
++
++static void
++ssp_init(int port, int clock)
++{
++
++ pxa_set_cken(clock, 0);
++
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_CLK_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_FRM_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DO_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DI_MD);
++
++ SET_HTCUNIVERSAL_GPIO(SPI_FRM,1);
++
++ /* *** Set up the SPI Registers *** */
++ SSCR0_P(port) =
++ SSCR0_EDSS /* Extended Data Size Select */
++ | SSCR0_SerClkDiv(7) /* Serial Clock Rate */
++ /* Synchronous Serial Enable (Disable for now) */
++ | SSCR0_Motorola /* Motorola SPI Interface */
++ | SSCR0_DataSize(8) /* Data Size Select (24-bit) */
++ ;
++ SSCR1_P(port) = 0;
++ SSPSP_P(port) = 0;
++
++ /* Clear the Status */
++ SSSR_P(port) = SSSR_P(port) & 0x00fcfffc;
++
++ /* Now enable it */
++ SSCR0_P(port) =
++ SSCR0_EDSS /* Extended Data Size Select */
++ | SSCR0_SerClkDiv(7) /* Serial Clock Rate */
++ | SSCR0_SSE /* Synchronous Serial Enable */
++ | SSCR0_Motorola /* Motorola SPI Interface */
++ | SSCR0_DataSize(8) /* Data Size Select (24-bit) */
++ ;
++
++ pxa_set_cken(clock, 1);
++}
++
++static void
++start_read(struct touchscreen_data *touch)
++{
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ int i;
++
++ /* Write here to the serial port. We request X and Y only for now.
++ * Then we have to wait for poll_sample_time before we read out the serial
++ * port. Then, when we read it out, we check to see if the pen is still
++ * down. If so, then we issue another request here.
++ */
++#define TS_SAMPLES 7
++
++ /*
++ * We do four samples for each, and throw out the highest and lowest, then
++ * average the other two.
++ */
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ while(!(SSSR_P(touch->port) & SSSR_TNF))
++ ;
++ /* It's not full. Write the command for X */
++ SSDR_P(touch->port) = (TSC2046_SAMPLE_X|(touch->pwrbit_X))<<16;
++ }
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ while(!(SSSR_P(touch->port) & SSSR_TNF))
++ ;
++ /* It's not full. Write the command for Y */
++ SSDR_P(touch->port) = (TSC2046_SAMPLE_Y|(touch->pwrbit_Y))<<16;
++ }
++
++ /*
++ * Enable the timer. We should get an interrupt, but we want keep a timer
++ * to ensure that we can detect missing data
++ */
++ mod_timer(&touch->timer, jiffies + inc);
++}
++
++static void
++ts_timer_callback(unsigned long data)
++{
++ struct touchscreen_data *ts = (struct touchscreen_data *)data;
++ int x, a[TS_SAMPLES], y;
++ static int oldx, oldy;
++ int ssrval;
++
++ /*
++ * Check here to see if there is anything in the SPI FIFO. If so,
++ * return it if there has been a change. If not, then we have a
++ * timeout. Generate an erro somehow.
++ */
++ ssrval = SSSR_P(ts->port);
++
++ if(ssrval & SSSR_RNE) { /* Look at Rx Not Empty bit */
++ int number_of_entries_in_fifo;
++
++ /* The FIFO is not emtpy. Good! Now make sure there are at least two
++ * entries. (Should be two exactly.) */
++
++ number_of_entries_in_fifo = ((ssrval >> 12) & 0xf) + 1;
++
++ if(number_of_entries_in_fifo < TS_SAMPLES * 2) {
++ /* Not ready yet. Come back later. */
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ mod_timer(&ts->timer, jiffies + inc);
++ return;
++ }
++
++ if(number_of_entries_in_fifo == TS_SAMPLES * 2) {
++ int i, j;
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ a[i] = SSDR_P(ts->port);
++ }
++ /* Sort them (bubble) */
++ for(j = TS_SAMPLES - 1; j > 0; j--) {
++ for(i = 0; i < j; i++) {
++ if(a[i] > a[i + 1]) {
++ int tmp;
++ tmp = a[i+1];
++ a[i+1] = a[i];
++ a[i] = tmp;
++ }
++ }
++ }
++
++ /* Take the average of the middle two */
++ /* x = (a[TS_SAMPLES/2 - 1] + a[TS_SAMPLES/2] + a[TS_SAMPLES/2+1] + a[TS_SAMPLES/2+2]) >> 2; */
++ x = a[TS_SAMPLES/2];
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ a[i] = SSDR_P(ts->port);
++ }
++ /* Sort them (bubble) */
++ for(j = TS_SAMPLES - 1; j > 0; j--) {
++ for(i = 0; i < j; i++) {
++ if(a[i] > a[i + 1]) {
++ int tmp;
++ tmp = a[i+1];
++ a[i+1] = a[i];
++ a[i] = tmp;
++ }
++ }
++ }
++
++
++ /* Take the average of the middle two */
++ /* y = (a[TS_SAMPLES/2 - 1] + a[TS_SAMPLES/2] + a[TS_SAMPLES/2+1] + a[TS_SAMPLES/2+2]) >> 2; */
++ y = a[TS_SAMPLES/2];
++ } else {
++ /* We have an error! Too many entries. */
++ printk(KERN_ERR "TS: Expected %d entries. Got %d\n", TS_SAMPLES*2, number_of_entries_in_fifo);
++ /* Try to clear the FIFO */
++ while(number_of_entries_in_fifo--) {
++ (void)SSDR_P(ts->port);
++ }
++
++ if (ts->pen_down())
++ start_read(ts);
++
++ return;
++ }
++ } else {
++ /* Not ready yet. Come back later. */
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ mod_timer(&ts->timer, jiffies + inc);
++ return;
++ }
++
++ /*
++ * Now we check to see if the pen is still down. If it is, then call
++ * start_read().
++ */
++ if (ts->pen_down())
++ {
++ /* Still down */
++ if(oldx != x || oldy != y) {
++ oldx = x;
++ oldy = y;
++ report_touchpanel(ts, 1, x, y);
++ }
++ start_read(ts);
++ } else {
++ /* Up */
++ report_touchpanel(ts, 0, 0, 0);
++ irqblock = 0;
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ /* Re-enable pen down interrupt */
++ enable_irq(ts->irq);
++ }
++}
++
++static int pen_down(void)
++{
++ return ( asic3_get_gpio_status_a( &htcuniversal_asic3.dev ) & (1<<GPIOA_TOUCHSCREEN_N)) == 0 ;
++}
++
++static int
++ts_probe (struct platform_device *dev)
++{
++ int retval;
++ struct touchscreen_data *ts;
++ struct tsc2046_mach_info *mach = dev->dev.platform_data;
++
++ printk("htcuniversal: ts_probe\n");
++
++ ts = ts_data = kmalloc (sizeof (*ts), GFP_KERNEL);
++ if (ts == NULL) {
++ printk( KERN_NOTICE "htcuniversal_ts: unable to allocate memory\n" );
++ return -ENOMEM;
++ }
++ memset (ts, 0, sizeof (*ts));
++
++ ts->input = input_allocate_device();
++ if (ts->input == NULL) {
++ printk( KERN_NOTICE "htcuniversal_ts: unable to allocation touchscreen input\n" );
++ kfree(ts);
++ return -ENOMEM;
++ }
++ ts->input->evbit[0] = BIT(EV_ABS);
++ ts->input->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
++ ts->input->absmin[ABS_X] = 0;
++ ts->input->absmax[ABS_X] = 32767;
++ ts->input->absmin[ABS_Y] = 0;
++ ts->input->absmax[ABS_Y] = 32767;
++ ts->input->absmin[ABS_PRESSURE] = 0;
++ ts->input->absmax[ABS_PRESSURE] = 1;
++
++ ts->input->name = "htcuniversal_ts";
++ ts->input->phys = "touchscreen/htcuniversal_ts";
++ ts->input->private = ts;
++
++ input_register_device(ts->input);
++
++ ts->timer.function = ts_timer_callback;
++ ts->timer.data = (unsigned long)ts;
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ init_timer (&ts->timer);
++
++ platform_set_drvdata(dev, ts);
++
++ ts->port=-1;
++
++ if (mach) {
++ ts->port = mach->port;
++ ts->clock = mach->clock;
++ ts->pwrbit_X = mach->pwrbit_X;
++ ts->pwrbit_Y = mach->pwrbit_Y;
++
++ /* static irq */
++ if (mach->irq)
++ ts->irq = mach->irq;
++
++ if (mach->pen_down)
++ ts->pen_down=mach->pen_down;
++ }
++
++ if (ts->port == -1)
++ {
++ printk("tsc2046: your device is not supported by this driver\n");
++ return -ENODEV;
++ }
++
++ /* *** Initialize the SSP interface *** */
++ ssp_init(ts->port, ts->clock);
++
++ while(!(SSSR_P(ts->port) & SSSR_TNF))
++ ;
++ SSDR_P(ts->port) = (TSC2046_SAMPLE_X|(ts->pwrbit_X))<<16;
++
++ for(retval = 0; retval < 100; retval++) {
++ if(SSSR_P(ts->port) & SSSR_RNE) {
++ while(SSSR_P(ts->port) & SSSR_RNE) {
++ (void)SSDR_P(ts->port);
++ }
++ break;
++ }
++ mdelay(1);
++ }
++
++ if (machine_is_htcuniversal() )
++ {
++ ts->irq = asic3_irq_base( &htcuniversal_asic3.dev ) + ASIC3_GPIOA_IRQ_BASE + GPIOA_TOUCHSCREEN_N;
++ ts->pen_down=pen_down;
++ }
++
++ retval = request_irq(ts->irq, pen_isr, IRQF_DISABLED, "tsc2046_ts", ts);
++ if(retval) {
++ printk("Unable to get interrupt\n");
++ input_unregister_device (ts->input);
++ return -ENODEV;
++ }
++ set_irq_type(ts->irq, IRQ_TYPE_EDGE_FALLING);
++
++ return 0;
++}
++
++static int
++ts_remove (struct platform_device *dev)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ input_unregister_device (ts->input);
++ del_timer_sync (&ts->timer);
++ free_irq (ts->irq, ts);
++ pxa_set_cken(ts->clock, 0);
++
++ kfree(ts);
++ return 0;
++}
++
++static int
++ts_suspend (struct platform_device *dev, pm_message_t state)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ disable_irq(ts->irq);
++
++ printk("htcuniversal_ts2_suspend: called.\n");
++ return 0;
++}
++
++static int
++ts_resume (struct platform_device *dev)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ ssp_init(ts->port, ts->clock);
++ enable_irq(ts->irq);
++
++ printk("htcuniversal_ts2_resume: called.\n");
++ return 0;
++}
++
++static struct platform_driver ts_driver = {
++ .probe = ts_probe,
++ .remove = ts_remove,
++ .suspend = ts_suspend,
++ .resume = ts_resume,
++ .driver = {
++ .name = "htcuniversal_ts",
++ },
++};
++
++
++static int
++ts_module_init (void)
++{
++ printk(KERN_NOTICE "HTC Universal Touch Screen Driver\n");
++
++ return platform_driver_register(&ts_driver);
++}
++
++static void
++ts_module_cleanup (void)
++{
++ platform_driver_unregister (&ts_driver);
++}
++
++module_init(ts_module_init);
++module_exit(ts_module_cleanup);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Aric Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Touch Screen Driver");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,71 @@
++
++/*
++ *
++ * htcuniversal_udc.c:
++ * htcuniversal specific code for the pxa27x usb device controller.
++ *
++ * Use consistent with the GNU GPL is permitted.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/udc.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static void htcuniversal_udc_command(int cmd)
++{
++ switch (cmd) {
++ case PXA2XX_UDC_CMD_DISCONNECT:
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev,
++ 1<<GPIOB_USB_PUEN, 0);
++// SET_HTCUNIVERSAL_GPIO(USB_PUEN,0);
++ break;
++ case PXA2XX_UDC_CMD_CONNECT:
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev,
++ 1<<GPIOB_USB_PUEN, 1<<GPIOB_USB_PUEN);
++// SET_HTCUNIVERSAL_GPIO(USB_PUEN,1);
++ break;
++ default:
++ printk("_udc_control: unknown command!\n");
++ break;
++ }
++}
++
++static int htcuniversal_udc_is_connected(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(USB_DET) != 0);
++}
++
++static struct pxa2xx_udc_mach_info htcuniversal_udc_info __initdata = {
++ .udc_is_connected = htcuniversal_udc_is_connected,
++ .udc_command = htcuniversal_udc_command,
++};
++
++static int htcuniversal_udc_probe(struct platform_device * dev)
++{
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_USB_PUEN, 1<<GPIOB_USB_PUEN);
++
++ pxa_set_udc_info(&htcuniversal_udc_info);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_udc_driver = {
++ .driver = {
++ .name = "htcuniversal_udc",
++ },
++ .probe = htcuniversal_udc_probe,
++};
++
++static int __init htcuniversal_udc_init(void)
++{
++ return platform_driver_register(&htcuniversal_udc_driver);
++}
++
++module_init(htcuniversal_udc_init);
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,20 @@
++/*
++ * temporary TSC2046 touchscreen hack
++ */
++
++#ifndef _TSC2046_TS_H
++#define _TSC2046_TS_H
++
++struct tsc2046_mach_info {
++ int port;
++ int clock;
++ int pwrbit_X;
++ int pwrbit_Y;
++ int irq;
++ int (*pen_down)(void);
++};
++
++#define TSC2046_SAMPLE_X 0xd0
++#define TSC2046_SAMPLE_Y 0x90
++
++#endif
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/Kconfig 2008-06-01 18:49:43.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/Kconfig 2008-06-01 18:49:45.000000000 +0100
+@@ -147,6 +147,14 @@
+ select PXA27x
+ select IWMMXT
+
++config MACH_HTCUNIVERSAL
++ bool "HTC Universal"
++ select PXA27x
++ help
++ Say Y here if you intend to run this kernel on a
++ HTC Universal. Currently there is only basic support
++ for this PDA.
++
+ endchoice
+
+ choice
+@@ -204,6 +212,86 @@
+
+ endif
+
++if MACH_HTCUNIVERSAL
++
++menu "HTC Universal support"
++
++config HTCUNIVERSAL_CORE
++ tristate "HTC Universal core"
++ depends on MACH_HTCUNIVERSAL
++ help
++ This selection enables HTC Universal core support.
++
++config HTCUNIVERSAL_UDC
++ bool "USB Device Controller support"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && USB_PXA27X
++ help
++ Enables HTC Universal specific USB detection
++
++config HTCUNIVERSAL_POWER
++ tristate "HTC Universal power"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++ help
++ This selection enables HTC Universal power monitoring
++ hardware support (through ASIC3).
++
++config HTCUNIVERSAL_BACKLIGHT
++ bool "HTC Universal Backlight"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE
++ help
++ This driver provides support for changing power and brightness
++ on HTC Universal LCD backlight.
++
++config HTCUNIVERSAL_LCD
++ tristate "HTC Universal LCD"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && LCD_CLASS_DEVICE
++ help
++ This driver provides support for changing power and brightness
++ on HTC Universal LCD display.
++
++config HTCUNIVERSAL_TS2
++ tristate "HTC Universal Touchscreen (old)"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++ help
++ Enable support for the HTC Universal Touchscreen Panel.
++
++config HTCUNIVERSAL_BUTTONS
++ tristate "HTC Universal buttons support"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++
++config HTCUNIVERSAL_BLUETOOTH
++ tristate "HTC Universal Bluetooth"
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ help
++ Enables support for the TI BRF6150 Bluetooth Module
++ in the HTC Universal.
++
++config HTCUNIVERSAL_ASIC3_LEDS
++ tristate "HTC Universal ASIC3 LED support"
++ select LEDS_ASIC3
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ ---help---
++ Support for right (colors red+green+(amber)) and left (green+blue) led
++ Off/on hook keys LED backlight
++ Keyboard backlight
++ Vibra
++ Flashlight
++
++config HTCUNIVERSAL_PHONE
++ tristate "HTC Universal Phone"
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ help
++ Enables support for the Qualcomm MSM6520 Phone Module
++ in the HTC Universal.
++
++config HTCUNIVERSAL_AK4641
++ depends on SND && I2C
++ tristate "AK4641 chipset support"
++
++endmenu
++
++endif
++
+ endmenu
+
+ config MACH_POODLE
+@@ -289,4 +377,3 @@
+ depends on (PXA25x || PXA27x) && INPUT
+
+ endif
+-
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/Makefile 2008-06-01 18:49:43.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/Makefile 2008-06-01 18:50:46.000000000 +0100
+@@ -36,6 +36,7 @@
+ obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
+ obj-$(CONFIG_MACH_TOSA) += tosa.o
+ obj-$(CONFIG_MACH_EM_X270) += em-x270.o
++obj-$(CONFIG_MACH_HTCUNIVERSAL) += htcuniversal/
+ obj-$(CONFIG_MACH_MAGICIAN) += magician.o
+ obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
+
+Index: linux-2.6.26-rc4/drivers/leds/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/leds/Kconfig 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/leds/Kconfig 2008-06-01 18:49:45.000000000 +0100
+@@ -147,6 +147,13 @@
+ To compile this driver as a module, choose M here: the
+ module will be called leds-clevo-mail.
+
++config LEDS_ASIC3
++ tristate "LED Support for the HTC ASIC3 chip"
++ depends on LEDS_CLASS && HTC_ASIC3
++ help
++ This option enables support for the LEDs connected to the
++ HTC ASIC3 chip.
++
+ comment "LED Triggers"
+
+ config LEDS_TRIGGERS
+Index: linux-2.6.26-rc4/drivers/leds/leds-asic3.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/leds/leds-asic3.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,189 @@
++/*
++ * LEDs support for HTC ASIC3 devices.
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * 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/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include "leds.h"
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_leds.h>
++
++#ifdef DEBUG
++#define dbg(msg, ...) printk(msg, __VA_ARGS__)
++#else
++#define dbg(msg, ...)
++#endif
++
++static
++void asic3_leds_set(struct led_classdev *led_cdev, enum led_brightness b)
++{
++ struct asic3_led *led = container_of(led_cdev, struct asic3_led,
++ led_cdev);
++ struct asic3_leds_machinfo *machinfo = led->machinfo;
++ struct device *asic3_dev = &machinfo->asic3_pdev->dev;
++
++ dbg("%s:%s %d(%d)-%s %d\n", __FILE__, __FUNCTION__, led->hw_num,
++ led->gpio_num, led->led_cdev.name, b);
++
++ if (led->hw_num == -1) {
++ asic3_gpio_set_value(asic3_dev, led->gpio_num, b);
++ return;
++ }
++
++ if (b == LED_OFF) {
++ asic3_set_led(asic3_dev, led->hw_num, 0, 16, 6);
++ asic3_set_gpio_out_c(asic3_dev, led->hw_num, 0);
++ }
++ else {
++ asic3_set_gpio_out_c(asic3_dev, led->hw_num, led->hw_num);
++ #ifdef CONFIG_LEDS_TRIGGER_HWTIMER
++ if (led_cdev->trigger && led_cdev->trigger->is_led_supported &&
++ (led_cdev->trigger->is_led_supported(led_cdev) &
++ LED_SUPPORTS_HWTIMER)) {
++ struct hwtimer_data *td = led_cdev->trigger_data;
++ if (!td) return;
++ asic3_set_led(asic3_dev, led->hw_num, td->delay_on/8,
++ (td->delay_on + td->delay_off)/8, 6);
++ }
++ else
++ #endif
++ asic3_set_led(asic3_dev, led->hw_num, 16, 16, 6);
++ }
++
++ return;
++}
++
++static
++int asic3_leds_probe(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int ret, i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ // Turn on clocks early, for the case if trigger would enable
++ // led immediately after led_classdev_register().
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2);
++
++ for (i = 0; i < machinfo->num_leds; i++) {
++ leds[i].machinfo = machinfo;
++ leds[i].led_cdev.brightness_set = asic3_leds_set;
++ ret = led_classdev_register(&pdev->dev, &leds[i].led_cdev);
++ if (ret) {
++ printk(KERN_ERR "Error: can't register %s led\n",
++ leds[i].led_cdev.name);
++ goto out_err;
++ }
++ }
++
++ return 0;
++
++out_err:
++ while (--i >= 0) led_classdev_unregister(&leds[i].led_cdev);
++
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ 0 | 0 | 0);
++
++ return ret;
++}
++
++static
++int asic3_leds_remove(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_unregister(&leds[i].led_cdev);
++
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ 0 | 0 | 0);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++
++static
++int asic3_leds_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_suspend(&leds[i].led_cdev);
++
++ return 0;
++}
++
++static
++int asic3_leds_resume(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_resume(&leds[i].led_cdev);
++
++ return 0;
++}
++
++#endif
++
++static
++struct platform_driver asic3_leds_driver = {
++ .probe = asic3_leds_probe,
++ .remove = asic3_leds_remove,
++#ifdef CONFIG_PM
++ .suspend = asic3_leds_suspend,
++ .resume = asic3_leds_resume,
++#endif
++ .driver = {
++ .name = "asic3-leds",
++ },
++};
++
++int asic3_leds_register(void)
++{
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++ return platform_driver_register(&asic3_leds_driver);
++}
++
++void asic3_leds_unregister(void)
++{
++ platform_driver_unregister(&asic3_leds_driver);
++ return;
++}
++
++EXPORT_SYMBOL_GPL(asic3_leds_register);
++EXPORT_SYMBOL_GPL(asic3_leds_unregister);
++
++MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
++MODULE_DESCRIPTION("HTC ASIC3 LEDs driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/drivers/mfd/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/mfd/Kconfig 2008-06-01 18:49:43.000000000 +0100
++++ linux-2.6.26-rc4/drivers/mfd/Kconfig 2008-06-01 18:49:45.000000000 +0100
+@@ -44,6 +44,16 @@
+ help
+ Support for TI TSC2101 Touchscreen and Audio Codec
+
++config HTC_ASIC3
++ tristate "HTC ASIC3 (iPAQ h1900/h3900/h4000/hx4700/rx3000) support"
++
++config HTC_ASIC3_DS1WM
++ bool "Support HTC ASIC3 builtin DS1WM block"
++ help
++ Choose Y here if you want to include support for ASIC3's builtin
++ W1 controller. Some devices do not use it, and yet other have
++ separate DS1WM controller. For them, choose N.
++
+ endmenu
+
+ menu "Multimedia Capabilities Port drivers"
+Index: linux-2.6.26-rc4/drivers/mfd/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/mfd/Makefile 2008-06-01 18:49:43.000000000 +0100
++++ linux-2.6.26-rc4/drivers/mfd/Makefile 2008-06-01 18:49:45.000000000 +0100
+@@ -2,6 +2,8 @@
+ # Makefile for multifunction miscellaneous devices
+ #
+
++obj-$(CONFIG_HTC_ASIC3) += asic3_base.o soc-core.o
++
+ obj-$(CONFIG_MFD_SM501) += sm501.o
+ obj-$(CONFIG_MFD_ASIC3) += asic3.o
+
+Index: linux-2.6.26-rc4/drivers/mfd/asic3_base.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mfd/asic3_base.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,1208 @@
++/*
++ * Driver interface to HTC "ASIC3"
++ *
++ * Copyright 2001 Compaq Computer Corporation.
++ * Copyright 2004-2005 Phil Blundell
++ *
++ * 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.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Andrew Christian
++ * <Andrew.Christian@compaq.com>
++ * October 2001
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/init.h>
++#include <linux/irq.h>
++#include <linux/clk.h>
++#include <linux/ds1wm.h>
++#include <asm/arch/clock.h>
++
++#include <asm/hardware.h>
++#include <asm/irq.h>
++#include <asm/io.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++#include <linux/soc/tmio_mmc.h>
++#include "soc-core.h"
++
++
++struct asic3_data {
++ void *mapping;
++ unsigned int bus_shift;
++ int irq_base;
++ int irq_nr;
++
++ u16 irq_bothedge[4];
++ struct device *dev;
++
++ struct platform_device *mmc_dev;
++};
++
++static DEFINE_SPINLOCK(asic3_gpio_lock);
++
++static int asic3_remove(struct platform_device *dev);
++
++static inline unsigned long asic3_address(struct device *dev,
++ unsigned int reg)
++{
++ struct asic3_data *adata;
++
++ adata = (struct asic3_data *)dev->driver_data;
++
++ return (unsigned long)adata->mapping + (reg >> (2 - adata->bus_shift));
++}
++
++void asic3_write_register(struct device *dev, unsigned int reg, u32 value)
++{
++ __raw_writew(value, asic3_address(dev, reg));
++}
++EXPORT_SYMBOL(asic3_write_register);
++
++u32 asic3_read_register(struct device *dev, unsigned int reg)
++{
++ return __raw_readw(asic3_address(dev, reg));
++}
++EXPORT_SYMBOL(asic3_read_register);
++
++static inline void __asic3_write_register(struct asic3_data *asic,
++ unsigned int reg, u32 value)
++{
++ __raw_writew(value, (unsigned long)asic->mapping
++ + (reg >> (2 - asic->bus_shift)));
++}
++
++static inline u32 __asic3_read_register(struct asic3_data *asic,
++ unsigned int reg)
++{
++ return __raw_readw((unsigned long)asic->mapping
++ + (reg >> (2 - asic->bus_shift)));
++}
++
++#define ASIC3_GPIO_FN(get_fn_name, set_fn_name, REG) \
++u32 get_fn_name(struct device *dev) \
++{ \
++ return asic3_read_register(dev, REG); \
++} \
++EXPORT_SYMBOL(get_fn_name); \
++ \
++void set_fn_name(struct device *dev, u32 bits, u32 val) \
++{ \
++ unsigned long flags; \
++ \
++ spin_lock_irqsave(&asic3_gpio_lock, flags); \
++ val |= (asic3_read_register(dev, REG) & ~bits); \
++ asic3_write_register(dev, REG, val); \
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags); \
++} \
++EXPORT_SYMBOL(set_fn_name);
++
++#define ASIC3_GPIO_REGISTER(ACTION, action, fn, FN) \
++ ASIC3_GPIO_FN(asic3_get_gpio_ ## action ## _ ## fn , \
++ asic3_set_gpio_ ## action ## _ ## fn , \
++ _IPAQ_ASIC3_GPIO_ ## FN ## _Base \
++ + _IPAQ_ASIC3_GPIO_ ## ACTION )
++
++#define ASIC3_GPIO_FUNCTIONS(fn, FN) \
++ ASIC3_GPIO_REGISTER(Direction, dir, fn, FN) \
++ ASIC3_GPIO_REGISTER(Out, out, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepMask, sleepmask, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepOut, sleepout, fn, FN) \
++ ASIC3_GPIO_REGISTER(BattFaultOut, battfaultout, fn, FN) \
++ ASIC3_GPIO_REGISTER(AltFunction, alt_fn, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepConf, sleepconf, fn, FN) \
++ ASIC3_GPIO_REGISTER(Status, status, fn, FN)
++
++#if 0
++ ASIC3_GPIO_REGISTER(Mask, mask, fn, FN)
++ ASIC3_GPIO_REGISTER(TriggerType, trigtype, fn, FN)
++ ASIC3_GPIO_REGISTER(EdgeTrigger, rising, fn, FN)
++ ASIC3_GPIO_REGISTER(LevelTrigger, triglevel, fn, FN)
++ ASIC3_GPIO_REGISTER(IntStatus, intstatus, fn, FN)
++#endif
++
++ASIC3_GPIO_FUNCTIONS(a, A)
++ASIC3_GPIO_FUNCTIONS(b, B)
++ASIC3_GPIO_FUNCTIONS(c, C)
++ASIC3_GPIO_FUNCTIONS(d, D)
++
++int asic3_gpio_get_value(struct device *dev, unsigned gpio)
++{
++ u32 mask = ASIC3_GPIO_bit(gpio);
++ printk("%s(%d)\n", __FUNCTION__, gpio);
++ switch (gpio >> 4) {
++ case _IPAQ_ASIC3_GPIO_BANK_A:
++ return asic3_get_gpio_status_a(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_B:
++ return asic3_get_gpio_status_b(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_C:
++ return asic3_get_gpio_status_c(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_D:
++ return asic3_get_gpio_status_d(dev) & mask;
++ }
++
++ printk(KERN_ERR "%s: invalid GPIO value 0x%x", __FUNCTION__, gpio);
++ return 0;
++}
++EXPORT_SYMBOL(asic3_gpio_get_value);
++
++void asic3_gpio_set_value(struct device *dev, unsigned gpio, int val)
++{
++ u32 mask = ASIC3_GPIO_bit(gpio);
++ u32 bitval = 0;
++ if (val) bitval = mask;
++ printk("%s(%d, %d)\n", __FUNCTION__, gpio, val);
++
++ switch (gpio >> 4) {
++ case _IPAQ_ASIC3_GPIO_BANK_A:
++ asic3_set_gpio_out_a(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_B:
++ asic3_set_gpio_out_b(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_C:
++ asic3_set_gpio_out_c(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_D:
++ asic3_set_gpio_out_d(dev, mask, bitval);
++ return;
++ }
++
++ printk(KERN_ERR "%s: invalid GPIO value 0x%x", __FUNCTION__, gpio);
++}
++EXPORT_SYMBOL(asic3_gpio_set_value);
++
++int asic3_irq_base(struct device *dev)
++{
++ struct asic3_data *asic = dev->driver_data;
++
++ return asic->irq_base;
++}
++EXPORT_SYMBOL(asic3_irq_base);
++
++static int asic3_gpio_to_irq(struct device *dev, unsigned gpio)
++{
++ struct asic3_data *asic = dev->driver_data;
++ printk("%s(%d)\n", __FUNCTION__, gpio);
++
++ return asic->irq_base + gpio;
++}
++
++void asic3_set_led(struct device *dev, int led_num, int duty_time,
++ int cycle_time, int timebase)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned int led_base;
++
++ /* it's a macro thing: see #define _IPAQ_ASIC_LED_0_Base for why you
++ * can't substitute led_num in the macros below...
++ */
++
++ switch (led_num) {
++ case 0:
++ led_base = _IPAQ_ASIC3_LED_0_Base;
++ break;
++ case 1:
++ led_base = _IPAQ_ASIC3_LED_1_Base;
++ break;
++ case 2:
++ led_base = _IPAQ_ASIC3_LED_2_Base;
++ break;
++ default:
++ printk(KERN_ERR "%s: invalid led number %d", __FUNCTION__,
++ led_num);
++ return;
++ }
++
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_TimeBase,
++ timebase | LED_EN);
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_PeriodTime,
++ cycle_time);
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_DutyTime,
++ 0);
++ udelay(20); /* asic voodoo - possibly need a whole duty cycle? */
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_DutyTime,
++ duty_time);
++}
++EXPORT_SYMBOL(asic3_set_led);
++
++void asic3_set_clock_sel(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_clock_sel);
++
++void asic3_set_clock_cdex(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_clock_cdex);
++
++static void asic3_clock_cdex_enable(struct clk *clk)
++{
++ struct asic3_data *asic = (struct asic3_data *)clk->parent->ctrlbit;
++ unsigned long flags, val;
++
++ local_irq_save(flags);
++
++ val = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ val |= clk->ctrlbit;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), val);
++
++ local_irq_restore(flags);
++}
++
++static void asic3_clock_cdex_disable(struct clk *clk)
++{
++ struct asic3_data *asic = (struct asic3_data *)clk->parent->ctrlbit;
++ unsigned long flags, val;
++
++ local_irq_save(flags);
++
++ val = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ val &= ~clk->ctrlbit;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), val);
++
++ local_irq_restore(flags);
++}
++
++/* base clocks */
++
++static struct clk clk_g = {
++ .name = "gclk",
++ .rate = 0,
++ .parent = NULL,
++};
++
++/* clock definitions */
++
++static struct clk asic3_clocks[] = {
++ {
++ .name = "spi",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_SPI,
++ },
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ {
++ .name = "ds1wm",
++ .id = -1,
++ .rate = 5000000,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_OWM,
++ },
++#endif
++ {
++ .name = "pwm0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_PWM0,
++ },
++ {
++ .name = "pwm1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_PWM1,
++ },
++ {
++ .name = "led0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED0,
++ },
++ {
++ .name = "led1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED1,
++ },
++ {
++ .name = "led2",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED2,
++ },
++ {
++ .name = "smbus",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_SMBUS,
++ },
++ {
++ .name = "ex0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_EX0,
++ },
++ {
++ .name = "ex1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_EX1,
++ },
++};
++
++void asic3_set_extcf_select(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Select));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Select), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_extcf_select);
++
++void asic3_set_extcf_reset(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Reset));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Reset), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_extcf_reset);
++
++void asic3_set_sdhwctrl(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave (&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(SDHWCTRL, SDConf));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(SDHWCTRL, SDConf), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_sdhwctrl);
++
++
++#define MAX_ASIC_ISR_LOOPS 20
++#define _IPAQ_ASIC3_GPIO_Base_INCR \
++ (_IPAQ_ASIC3_GPIO_B_Base - _IPAQ_ASIC3_GPIO_A_Base)
++
++static inline void asic3_irq_flip_edge(struct asic3_data *asic,
++ u32 base, int bit)
++{
++ u16 edge = __asic3_read_register(asic,
++ base + _IPAQ_ASIC3_GPIO_EdgeTrigger);
++ edge ^= bit;
++ __asic3_write_register(asic,
++ base + _IPAQ_ASIC3_GPIO_EdgeTrigger, edge);
++}
++
++static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
++{
++ int iter;
++ struct asic3_data *asic;
++
++ /* Acknowledge the parrent (i.e. CPU's) IRQ */
++ desc->chip->ack(irq);
++
++ asic = desc->handler_data;
++
++ /* printk( KERN_NOTICE "asic3_irq_demux: irq=%d\n", irq ); */
++ for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) {
++ u32 status;
++ int bank;
++
++ status = __asic3_read_register(asic,
++ IPAQ_ASIC3_OFFSET(INTR, PIntStat));
++ /* Check all ten register bits */
++ if ((status & 0x3ff) == 0)
++ break;
++
++ /* Handle GPIO IRQs */
++ for (bank = 0; bank < 4; bank++) {
++ if (status & (1 << bank)) {
++ unsigned long base, i, istat;
++
++ base = _IPAQ_ASIC3_GPIO_A_Base
++ + bank * _IPAQ_ASIC3_GPIO_Base_INCR;
++ istat = __asic3_read_register(asic,
++ base + _IPAQ_ASIC3_GPIO_IntStatus);
++ /* IntStatus is write 0 to clear */
++ /* XXX could miss interrupts! */
++ __asic3_write_register(asic,
++ base + _IPAQ_ASIC3_GPIO_IntStatus, 0);
++
++ for (i = 0; i < 16; i++) {
++ int bit = (1 << i);
++ unsigned int irqnr;
++ if (!(istat & bit))
++ continue;
++
++ irqnr = asic->irq_base
++ + (16 * bank) + i;
++ desc = irq_desc + irqnr;
++ desc->handle_irq(irqnr, desc);
++ if (asic->irq_bothedge[bank] & bit) {
++ asic3_irq_flip_edge(asic, base,
++ bit);
++ }
++ }
++ }
++ }
++
++ /* Handle remaining IRQs in the status register */
++ {
++ int i;
++
++ for (i = ASIC3_LED0_IRQ; i <= ASIC3_OWM_IRQ; i++) {
++ /* They start at bit 4 and go up */
++ if (status & (1 << (i - ASIC3_LED0_IRQ + 4))) {
++ desc = irq_desc + asic->irq_base + i;
++ desc->handle_irq(asic->irq_base + i,
++ desc);
++ }
++ }
++ }
++
++ }
++
++ if (iter >= MAX_ASIC_ISR_LOOPS)
++ printk(KERN_ERR "%s: interrupt processing overrun\n",
++ __FUNCTION__);
++}
++
++static inline int asic3_irq_to_bank(struct asic3_data *asic, int irq)
++{
++ int n;
++
++ n = (irq - asic->irq_base) >> 4;
++
++ return (n * (_IPAQ_ASIC3_GPIO_B_Base - _IPAQ_ASIC3_GPIO_A_Base));
++}
++
++static inline int asic3_irq_to_index(struct asic3_data *asic, int irq)
++{
++ return (irq - asic->irq_base) & 15;
++}
++
++static void asic3_mask_gpio_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 val, bank, index;
++ unsigned long flags;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ val = __asic3_read_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask);
++ val |= 1 << index;
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask, val);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++
++static void asic3_mask_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ int regval;
++
++ if (irq < ASIC3_NR_GPIO_IRQS) {
++ printk(KERN_ERR "asic3_base: gpio mask attempt, irq %d\n",
++ irq);
++ return;
++ }
++
++ regval = __asic3_read_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask);
++
++ switch (irq - asic->irq_base) {
++ case ASIC3_LED0_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK0);
++ break;
++ case ASIC3_LED1_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK1);
++ break;
++ case ASIC3_LED2_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK2);
++ break;
++ case ASIC3_SPI_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK3);
++ break;
++ case ASIC3_SMBUS_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK4);
++ break;
++ case ASIC3_OWM_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK5);
++ break;
++ default:
++ printk(KERN_ERR "asic3_base: bad non-gpio irq %d\n", irq);
++ break;
++ }
++}
++
++static void asic3_unmask_gpio_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 val, bank, index;
++ unsigned long flags;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ val = __asic3_read_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask);
++ val &= ~(1 << index);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask, val);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++
++static void asic3_unmask_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ int regval;
++
++ if (irq < ASIC3_NR_GPIO_IRQS) {
++ printk(KERN_ERR "asic3_base: gpio unmask attempt, irq %d\n",
++ irq);
++ return;
++ }
++
++ regval = __asic3_read_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask);
++
++ switch (irq - asic->irq_base) {
++ case ASIC3_LED0_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK0);
++ break;
++ case ASIC3_LED1_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK1);
++ break;
++ case ASIC3_LED2_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK2);
++ break;
++ case ASIC3_SPI_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK3);
++ break;
++ case ASIC3_SMBUS_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK4);
++ break;
++ case ASIC3_OWM_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK5);
++ break;
++ default:
++ printk(KERN_ERR "asic3_base: bad non-gpio irq %d\n", irq);
++ break;
++ }
++}
++
++static int asic3_gpio_irq_type(unsigned int irq, unsigned int type)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 bank, index;
++ unsigned long flags;
++ u16 trigger, level, edge, bit;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++ bit = 1<<index;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ level = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_LevelTrigger);
++ edge = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_EdgeTrigger);
++ trigger = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_TriggerType);
++ asic->irq_bothedge[(irq - asic->irq_base) >> 4] &= ~bit;
++
++ if (type == IRQT_RISING) {
++ trigger |= bit;
++ edge |= bit;
++ } else if (type == IRQT_FALLING) {
++ trigger |= bit;
++ edge &= ~bit;
++ } else if (type == IRQT_BOTHEDGE) {
++ trigger |= bit;
++ if (asic3_gpio_get_value(asic->dev, irq - asic->irq_base))
++ edge &= ~bit;
++ else
++ edge |= bit;
++ asic->irq_bothedge[(irq - asic->irq_base) >> 4] |= bit;
++ } else if (type == IRQT_LOW) {
++ trigger &= ~bit;
++ level &= ~bit;
++ } else if (type == IRQT_HIGH) {
++ trigger &= ~bit;
++ level |= bit;
++ } else {
++ /*
++ * if type == IRQT_NOEDGE, we should mask interrupts, but
++ * be careful to not unmask them if mask was also called.
++ * Probably need internal state for mask.
++ */
++ printk(KERN_NOTICE "asic3: irq type not changed.\n");
++ }
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_LevelTrigger,
++ level);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_EdgeTrigger,
++ edge);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_TriggerType,
++ trigger);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++ return 0;
++}
++
++static struct irq_chip asic3_gpio_irq_chip = {
++ .name = "ASIC3-GPIO",
++ .ack = asic3_mask_gpio_irq,
++ .mask = asic3_mask_gpio_irq,
++ .unmask = asic3_unmask_gpio_irq,
++ .set_type = asic3_gpio_irq_type,
++};
++
++static struct irq_chip asic3_irq_chip = {
++ .name = "ASIC3",
++ .ack = asic3_mask_irq,
++ .mask = asic3_mask_irq,
++ .unmask = asic3_unmask_irq,
++};
++
++static void asic3_release(struct device *dev)
++{
++ struct platform_device *sdev = to_platform_device(dev);
++
++ kfree(sdev->resource);
++ kfree(sdev);
++}
++
++int asic3_register_mmc(struct device *dev)
++{
++ struct platform_device *sdev = kzalloc(sizeof(*sdev), GFP_KERNEL);
++ struct tmio_mmc_hwconfig *mmc_config = kmalloc(sizeof(*mmc_config),
++ GFP_KERNEL);
++ struct platform_device *pdev = to_platform_device(dev);
++ struct asic3_data *asic = dev->driver_data;
++ struct asic3_platform_data *asic3_pdata = dev->platform_data;
++ struct resource *res;
++ int rc;
++
++ if (sdev == NULL || mmc_config == NULL)
++ return -ENOMEM;
++
++ if (asic3_pdata->tmio_mmc_hwconfig) {
++ memcpy(mmc_config, asic3_pdata->tmio_mmc_hwconfig,
++ sizeof(*mmc_config));
++ } else {
++ memset(mmc_config, 0, sizeof(*mmc_config));
++ }
++ mmc_config->address_shift = asic->bus_shift;
++
++ sdev->id = -1;
++ sdev->name = "asic3_mmc";
++ sdev->dev.parent = dev;
++ sdev->num_resources = 2;
++ sdev->dev.platform_data = mmc_config;
++ sdev->dev.release = asic3_release;
++
++ res = kzalloc(sdev->num_resources * sizeof(struct resource),
++ GFP_KERNEL);
++ if (res == NULL) {
++ kfree(sdev);
++ kfree(mmc_config);
++ return -ENOMEM;
++ }
++ sdev->resource = res;
++
++ res[0].start = pdev->resource[2].start;
++ res[0].end = pdev->resource[2].end;
++ res[0].flags = IORESOURCE_MEM;
++ res[1].start = res[1].end = pdev->resource[3].start;
++ res[1].flags = IORESOURCE_IRQ;
++
++ rc = platform_device_register(sdev);
++ if (rc) {
++ printk(KERN_ERR "asic3_base: "
++ "Could not register asic3_mmc device\n");
++ kfree(res);
++ kfree(sdev);
++ return rc;
++ }
++
++ asic->mmc_dev = sdev;
++
++ return 0;
++}
++EXPORT_SYMBOL(asic3_register_mmc);
++
++int asic3_unregister_mmc(struct device *dev)
++{
++ struct asic3_data *asic = dev->driver_data;
++ platform_device_unregister(asic->mmc_dev);
++ asic->mmc_dev = 0;
++
++ return 0;
++}
++EXPORT_SYMBOL(asic3_unregister_mmc);
++
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++/*
++ * DS1WM subdevice
++ */
++
++static void asic3_ds1wm_enable(struct platform_device *ds1wm_dev)
++{
++ struct device *dev = ds1wm_dev->dev.parent;
++
++ /* Turn on external clocks and the OWM clock */
++ asic3_set_clock_cdex(dev,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM);
++
++ mdelay(1);
++
++ asic3_set_extcf_reset(dev, ASIC3_EXTCF_OWM_RESET,
++ ASIC3_EXTCF_OWM_RESET);
++ mdelay(1);
++ asic3_set_extcf_reset(dev, ASIC3_EXTCF_OWM_RESET, 0);
++ mdelay(1);
++
++ /* Clear OWM_SMB, set OWM_EN */
++ asic3_set_extcf_select(dev,
++ ASIC3_EXTCF_OWM_SMB | ASIC3_EXTCF_OWM_EN,
++ 0 | ASIC3_EXTCF_OWM_EN);
++
++ mdelay(1);
++}
++
++static void asic3_ds1wm_disable(struct platform_device *ds1wm_dev)
++{
++ struct device *dev = ds1wm_dev->dev.parent;
++
++ asic3_set_extcf_select(dev,
++ ASIC3_EXTCF_OWM_SMB | ASIC3_EXTCF_OWM_EN,
++ 0 | 0);
++
++ asic3_set_clock_cdex(dev,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | 0);
++}
++
++
++static struct resource asic3_ds1wm_resources[] = {
++ {
++ .start = _IPAQ_ASIC3_OWM_Base,
++ .end = _IPAQ_ASIC3_OWM_Base + 0x14 - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = ASIC3_OWM_IRQ,
++ .end = ASIC3_OWM_IRQ,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
++ IORESOURCE_IRQ_SOC_SUBDEVICE,
++ },
++};
++
++static struct ds1wm_platform_data ds1wm_pd = {
++ .enable = asic3_ds1wm_enable,
++ .disable = asic3_ds1wm_disable,
++};
++#endif
++
++static struct soc_device_data asic3_blocks[] = {
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ {
++ .name = "ds1wm",
++ .res = asic3_ds1wm_resources,
++ .num_resources = ARRAY_SIZE(asic3_ds1wm_resources),
++ .hwconfig = &ds1wm_pd,
++ },
++#endif
++};
++
++static int asic3_probe(struct platform_device *pdev)
++{
++ struct asic3_platform_data *pdata = pdev->dev.platform_data;
++ struct asic3_data *asic;
++ struct device *dev = &pdev->dev;
++ unsigned long clksel;
++ int i, rc;
++
++ asic = kzalloc(sizeof(struct asic3_data), GFP_KERNEL);
++ if (!asic)
++ return -ENOMEM;
++
++ platform_set_drvdata(pdev, asic);
++ asic->dev = &pdev->dev;
++
++ asic->mapping = ioremap(pdev->resource[0].start, IPAQ_ASIC3_MAP_SIZE);
++ if (!asic->mapping) {
++ printk(KERN_ERR "asic3: couldn't ioremap ASIC3\n");
++ kfree (asic);
++ return -ENOMEM;
++ }
++
++ if (pdata && pdata->bus_shift)
++ asic->bus_shift = pdata->bus_shift;
++ else
++ asic->bus_shift = 2;
++
++ /* XXX: should get correct SD clock values from pdata struct */
++ clksel = 0;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), clksel);
++
++ /* Register ASIC3's clocks. */
++ clk_g.ctrlbit = (int)asic;
++
++ if (clk_register(&clk_g) < 0)
++ printk(KERN_ERR "asic3: failed to register ASIC3 gclk\n");
++
++ for (i = 0; i < ARRAY_SIZE(asic3_clocks); i++) {
++ rc = clk_register(&asic3_clocks[i]);
++ if (rc < 0)
++ printk(KERN_ERR "asic3: "
++ "failed to register clock %s (%d)\n",
++ asic3_clocks[i].name, rc);
++ }
++
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(A, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(B, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(C, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(D, Mask), 0xffff);
++
++ asic3_set_gpio_sleepmask_a(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_b(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_c(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_d(dev, 0xffff, 0xffff);
++
++ if (pdata) {
++ asic3_set_gpio_out_a(dev, 0xffff, pdata->gpio_a.init);
++ asic3_set_gpio_out_b(dev, 0xffff, pdata->gpio_b.init);
++ asic3_set_gpio_out_c(dev, 0xffff, pdata->gpio_c.init);
++ asic3_set_gpio_out_d(dev, 0xffff, pdata->gpio_d.init);
++
++ asic3_set_gpio_dir_a(dev, 0xffff, pdata->gpio_a.dir);
++ asic3_set_gpio_dir_b(dev, 0xffff, pdata->gpio_b.dir);
++ asic3_set_gpio_dir_c(dev, 0xffff, pdata->gpio_c.dir);
++ asic3_set_gpio_dir_d(dev, 0xffff, pdata->gpio_d.dir);
++
++ asic3_set_gpio_sleepmask_a(dev, 0xffff,
++ pdata->gpio_a.sleep_mask);
++ asic3_set_gpio_sleepmask_b(dev, 0xffff,
++ pdata->gpio_b.sleep_mask);
++ asic3_set_gpio_sleepmask_c(dev, 0xffff,
++ pdata->gpio_c.sleep_mask);
++ asic3_set_gpio_sleepmask_d(dev, 0xffff,
++ pdata->gpio_d.sleep_mask);
++
++ asic3_set_gpio_sleepout_a(dev, 0xffff,
++ pdata->gpio_a.sleep_out);
++ asic3_set_gpio_sleepout_b(dev, 0xffff,
++ pdata->gpio_b.sleep_out);
++ asic3_set_gpio_sleepout_c(dev, 0xffff,
++ pdata->gpio_c.sleep_out);
++ asic3_set_gpio_sleepout_d(dev, 0xffff,
++ pdata->gpio_d.sleep_out);
++
++ asic3_set_gpio_battfaultout_a(dev, 0xffff,
++ pdata->gpio_a.batt_fault_out);
++ asic3_set_gpio_battfaultout_b(dev, 0xffff,
++ pdata->gpio_b.batt_fault_out);
++ asic3_set_gpio_battfaultout_c(dev, 0xffff,
++ pdata->gpio_c.batt_fault_out);
++ asic3_set_gpio_battfaultout_d(dev, 0xffff,
++ pdata->gpio_d.batt_fault_out);
++
++ asic3_set_gpio_sleepconf_a(dev, 0xffff,
++ pdata->gpio_a.sleep_conf);
++ asic3_set_gpio_sleepconf_b(dev, 0xffff,
++ pdata->gpio_b.sleep_conf);
++ asic3_set_gpio_sleepconf_c(dev, 0xffff,
++ pdata->gpio_c.sleep_conf);
++ asic3_set_gpio_sleepconf_d(dev, 0xffff,
++ pdata->gpio_d.sleep_conf);
++
++ asic3_set_gpio_alt_fn_a(dev, 0xffff,
++ pdata->gpio_a.alt_function);
++ asic3_set_gpio_alt_fn_b(dev, 0xffff,
++ pdata->gpio_b.alt_function);
++ asic3_set_gpio_alt_fn_c(dev, 0xffff,
++ pdata->gpio_c.alt_function);
++ asic3_set_gpio_alt_fn_d(dev, 0xffff,
++ pdata->gpio_d.alt_function);
++ }
++
++ asic->irq_nr = -1;
++ asic->irq_base = -1;
++
++ if (pdev->num_resources > 1)
++ asic->irq_nr = pdev->resource[1].start;
++
++ if (asic->irq_nr != -1) {
++ unsigned int i;
++
++ if (!pdata->irq_base) {
++ printk(KERN_ERR "asic3: IRQ base not specified\n");
++ asic3_remove(pdev);
++ return -EINVAL;
++ }
++
++ asic->irq_base = pdata->irq_base;
++
++ /* turn on clock to IRQ controller */
++ clksel |= CLOCK_SEL_CX;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL),
++ clksel);
++
++ printk(KERN_INFO "asic3: using irq %d-%d on irq %d\n",
++ asic->irq_base, asic->irq_base + ASIC3_NR_IRQS - 1,
++ asic->irq_nr);
++
++ for (i = 0 ; i < ASIC3_NR_IRQS ; i++) {
++ int irq = i + asic->irq_base;
++ if (i < ASIC3_NR_GPIO_IRQS) {
++ set_irq_chip(irq, &asic3_gpio_irq_chip);
++ set_irq_chip_data(irq, asic);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ } else {
++ /* The remaining IRQs are not GPIO */
++ set_irq_chip(irq, &asic3_irq_chip);
++ set_irq_chip_data(irq, asic);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ }
++ }
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ ASIC3_INTMASK_GINTMASK);
++
++ set_irq_chained_handler(asic->irq_nr, asic3_irq_demux);
++ set_irq_type(asic->irq_nr, IRQT_RISING);
++ set_irq_data(asic->irq_nr, asic);
++ }
++
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ ds1wm_pd.bus_shift = asic->bus_shift;
++#endif
++
++ pdata->gpiodev_ops.get = asic3_gpio_get_value;
++ pdata->gpiodev_ops.set = asic3_gpio_set_value;
++ pdata->gpiodev_ops.to_irq = asic3_gpio_to_irq;
++
++ soc_add_devices(pdev, asic3_blocks, ARRAY_SIZE(asic3_blocks),
++ &pdev->resource[0],
++ asic->bus_shift - ASIC3_DEFAULT_ADDR_SHIFT,
++ asic->irq_base);
++
++ if (pdev->num_resources > 2) {
++ int rc;
++ rc = asic3_register_mmc(dev);
++ if (rc) {
++ asic3_remove(pdev);
++ return rc;
++ }
++ }
++
++ if (pdata && pdata->num_child_platform_devs != 0)
++ platform_add_devices(pdata->child_platform_devs,
++ pdata->num_child_platform_devs);
++
++ return 0;
++}
++
++static int asic3_remove(struct platform_device *pdev)
++{
++ struct asic3_platform_data *pdata = pdev->dev.platform_data;
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ int i;
++
++ if (pdata && pdata->num_child_platform_devs != 0) {
++ for (i = 0; i < pdata->num_child_platform_devs; i++) {
++ platform_device_unregister(
++ pdata->child_platform_devs[i]);
++ }
++ }
++
++ if (asic->irq_nr != -1) {
++ unsigned int i;
++
++ for (i = 0 ; i < ASIC3_NR_IRQS ; i++) {
++ int irq = i + asic->irq_base;
++ set_irq_flags(irq, 0);
++ set_irq_handler (irq, NULL);
++ set_irq_chip (irq, NULL);
++ set_irq_chip_data(irq, NULL);
++ }
++
++ set_irq_chained_handler(asic->irq_nr, NULL);
++ }
++
++ if (asic->mmc_dev)
++ asic3_unregister_mmc(&pdev->dev);
++
++ for (i = 0; i < ARRAY_SIZE(asic3_clocks); i++)
++ clk_unregister(&asic3_clocks[i]);
++ clk_unregister(&clk_g);
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), 0);
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask), 0);
++
++ iounmap(asic->mapping);
++
++ kfree(asic);
++
++ return 0;
++}
++
++static void asic3_shutdown(struct platform_device *pdev)
++{
++}
++
++#define ASIC3_SUSPEND_CDEX_MASK \
++ (CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2)
++static unsigned short suspend_cdex;
++
++static int asic3_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ suspend_cdex = __asic3_read_register(asic,
++ _IPAQ_ASIC3_CLOCK_Base + _IPAQ_ASIC3_CLOCK_CDEX);
++ /* The LEDs are still active during suspend */
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_CLOCK_Base + _IPAQ_ASIC3_CLOCK_CDEX,
++ suspend_cdex & ASIC3_SUSPEND_CDEX_MASK);
++ return 0;
++}
++
++static int asic3_resume(struct platform_device *pdev)
++{
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ unsigned short intmask;
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX),
++ suspend_cdex);
++
++ if (asic->irq_nr != -1) {
++ /* Toggle the interrupt mask to try to get ASIC3 to show
++ * the CPU an interrupt edge. For more details see the
++ * kernel-discuss thread around 13 June 2005 with the
++ * subject "asic3 suspend / resume". */
++ intmask = __asic3_read_register(asic,
++ IPAQ_ASIC3_OFFSET(INTR, IntMask));
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ intmask & ~ASIC3_INTMASK_GINTMASK);
++ mdelay(1);
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ intmask | ASIC3_INTMASK_GINTMASK);
++ }
++
++ return 0;
++}
++
++static struct platform_driver asic3_device_driver = {
++ .driver = {
++ .name = "asic3",
++ },
++ .probe = asic3_probe,
++ .remove = asic3_remove,
++ .suspend = asic3_suspend,
++ .resume = asic3_resume,
++ .shutdown = asic3_shutdown,
++};
++
++static int __init asic3_base_init(void)
++{
++ int retval = 0;
++ retval = platform_driver_register(&asic3_device_driver);
++ return retval;
++}
++
++static void __exit asic3_base_exit(void)
++{
++ platform_driver_unregister(&asic3_device_driver);
++}
++
++#ifdef MODULE
++module_init(asic3_base_init);
++#else /* start early for dependencies */
++subsys_initcall(asic3_base_init);
++#endif
++module_exit(asic3_base_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Phil Blundell <pb@handhelds.org>");
++MODULE_DESCRIPTION("Core driver for HTC ASIC3");
++MODULE_SUPPORTED_DEVICE("asic3");
+Index: linux-2.6.26-rc4/drivers/mfd/soc-core.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mfd/soc-core.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,106 @@
++/*
++ * drivers/soc/soc-core.c
++ *
++ * core SoC support
++ * Copyright (c) 2006 Ian Molton
++ *
++ * 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 file contains functionality used by many SoC type devices.
++ *
++ * Created: 2006-11-28
++ *
++ */
++
++#include <linux/ioport.h>
++#include <linux/slab.h>
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include "soc-core.h"
++
++void soc_free_devices(struct platform_device *devices, int nr_devs)
++{
++ struct platform_device *dev = devices;
++ int i;
++
++ for (i = 0; i < nr_devs; i++) {
++ struct resource *res = dev->resource;
++ platform_device_unregister(dev++);
++ kfree(res);
++ }
++ kfree(devices);
++}
++EXPORT_SYMBOL_GPL(soc_free_devices);
++
++#define SIGNED_SHIFT(val, shift) ((shift) >= 0 ? ((val) << (shift)) : ((val) >> -(shift)))
++
++struct platform_device *soc_add_devices(struct platform_device *dev,
++ struct soc_device_data *soc, int nr_devs,
++ struct resource *mem,
++ int relative_addr_shift, int irq_base)
++{
++ struct platform_device *devices;
++ int i, r, base;
++
++ devices = kzalloc(nr_devs * sizeof(struct platform_device), GFP_KERNEL);
++ if (!devices)
++ return NULL;
++
++ for (i = 0; i < nr_devs; i++) {
++ struct platform_device *sdev = &devices[i];
++ struct soc_device_data *blk = &soc[i];
++ struct resource *res;
++
++ sdev->id = -1;
++ sdev->name = blk->name;
++
++ sdev->dev.parent = &dev->dev;
++ sdev->dev.platform_data = (void *)blk->hwconfig;
++ sdev->num_resources = blk->num_resources;
++
++ /* Allocate space for the subdevice resources */
++ res = kzalloc (blk->num_resources * sizeof (struct resource), GFP_KERNEL);
++ if (!res)
++ goto fail;
++
++ for (r = 0 ; r < blk->num_resources ; r++) {
++ res[r].name = blk->res[r].name; // Fixme - should copy
++
++ /* Find out base to use */
++ base = 0;
++ if (blk->res[r].flags & IORESOURCE_MEM) {
++ base = mem->start;
++ } else if ((blk->res[r].flags & IORESOURCE_IRQ) &&
++ (blk->res[r].flags & IORESOURCE_IRQ_SOC_SUBDEVICE)) {
++ base = irq_base;
++ }
++
++ /* Adjust resource */
++ if (blk->res[r].flags & IORESOURCE_MEM) {
++ res[r].parent = mem;
++ res[r].start = base + SIGNED_SHIFT(blk->res[r].start, relative_addr_shift);
++ res[r].end = base + SIGNED_SHIFT(blk->res[r].end, relative_addr_shift);
++ } else {
++ res[r].start = base + blk->res[r].start;
++ res[r].end = base + blk->res[r].end;
++ }
++ res[r].flags = blk->res[r].flags;
++ }
++
++ sdev->resource = res;
++ if (platform_device_register(sdev)) {
++ kfree(res);
++ goto fail;
++ }
++
++ printk(KERN_INFO "SoC: registering %s\n", blk->name);
++ }
++ return devices;
++
++fail:
++ soc_free_devices(devices, i + 1);
++ return NULL;
++}
++EXPORT_SYMBOL_GPL(soc_add_devices);
+Index: linux-2.6.26-rc4/drivers/mfd/soc-core.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mfd/soc-core.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,30 @@
++/*
++ * drivers/soc/soc-core.h
++ *
++ * core SoC support
++ * Copyright (c) 2006 Ian Molton
++ *
++ * 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 file contains prototypes for the functions in soc-core.c
++ *
++ * Created: 2006-11-28
++ *
++ */
++
++struct soc_device_data {
++ char *name;
++ struct resource *res;
++ int num_resources;
++ void *hwconfig; /* platform_data to pass to the subdevice */
++};
++
++struct platform_device *soc_add_devices(struct platform_device *dev,
++ struct soc_device_data *soc, int n_devs,
++ struct resource *mem,
++ int relative_addr_shift, int irq_base);
++
++void soc_free_devices(struct platform_device *devices, int nr_devs);
++
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/clock.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/clock.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,27 @@
++/*
++ * linux/include/asm-arm/arch-pxa/clock.h
++ *
++ * Copyright (C) 2006 Erik Hovland
++ *
++ * 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.
++ */
++
++struct clk {
++ struct list_head node;
++ struct module *owner;
++ struct clk *parent;
++ const char *name;
++ int id;
++ unsigned int enabled;
++ unsigned long rate;
++ unsigned long ctrlbit;
++
++ void (*enable)(struct clk *);
++ void (*disable)(struct clk *);
++};
++
++
++extern int clk_register(struct clk *clk);
++extern void clk_unregister(struct clk *clk);
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-asic.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-asic.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,213 @@
++/*
++ * include/asm/arm/arch-pxa/htcuniversal-asic.h
++ *
++ * Authors: Giuseppe Zompatori <giuseppe_zompatori@yahoo.it>
++ *
++ * based on previews work, see below:
++ *
++ * include/asm/arm/arch-pxa/hx4700-asic.h
++ * Copyright (c) 2004 SDG Systems, LLC
++ *
++ */
++
++#ifndef _HTCUNIVERSAL_ASIC_H_
++#define _HTCUNIVERSAL_ASIC_H_
++
++#include <asm/hardware/ipaq-asic3.h>
++
++/* ASIC3 */
++
++#define HTCUNIVERSAL_ASIC3_GPIO_PHYS PXA_CS4_PHYS
++#define HTCUNIVERSAL_ASIC3_MMC_PHYS PXA_CS3_PHYS
++
++/* TODO: some information is missing here */
++
++/* ASIC3 GPIO A bank */
++
++#define GPIOA_I2C_EN 0 /* Output */
++#define GPIOA_SPK_PWR1_ON 1 /* Output */
++#define GPIOA_AUDIO_PWR_ON 2 /* Output */
++#define GPIOA_EARPHONE_PWR_ON 3 /* Output */
++
++#define GPIOA_UNKNOWN4 4 /* Output */
++#define GPIOA_BUTTON_BACKLIGHT_N 5 /* Input */
++#define GPIOA_SPK_PWR2_ON 6 /* Output */
++#define GPIOA_BUTTON_RECORD_N 7 /* Input */
++
++#define GPIOA_BUTTON_CAMERA_N 8 /* Input */
++#define GPIOA_UNKNOWN9 9 /* Output */
++#define GPIOA_FLASHLIGHT 10 /* Output */
++#define GPIOA_COVER_ROTATE_N 11 /* Input */
++
++#define GPIOA_TOUCHSCREEN_N 12 /* Input */
++#define GPIOA_VOL_UP_N 13 /* Input */
++#define GPIOA_VOL_DOWN_N 14 /* Input */
++#define GPIOA_LCD_PWR5_ON 15 /* Output */
++
++/* ASIC3 GPIO B bank */
++
++#define GPIOB_BB_READY 0 /* Input */
++#define GPIOB_CODEC_PDN 1 /* Output */
++#define GPIOB_UNKNOWN2 2 /* Input */
++#define GPIOB_BB_UNKNOWN3 3 /* Input */
++
++#define GPIOB_BT_IRQ 4 /* Input */
++#define GPIOB_CLAMSHELL_N 5 /* Input */
++#define GPIOB_LCD_PWR3_ON 6 /* Output */
++#define GPIOB_BB_ALERT 7 /* Input */
++
++#define GPIOB_BB_RESET2 8 /* Output */
++#define GPIOB_EARPHONE_N 9 /* Input */
++#define GPIOB_MICRECORD_N 10 /* Input */
++#define GPIOB_NIGHT_SENSOR 11 /* Input */
++
++#define GPIOB_UMTS_DCD 12 /* Input */
++#define GPIOB_UNKNOWN13 13 /* Input */
++#define GPIOB_CHARGE_EN 14 /* Output */
++#define GPIOB_USB_PUEN 15 /* Output */
++
++/* ASIC3 GPIO C bank */
++
++#define GPIOC_LED_BTWIFI 0 /* Output */
++#define GPIOC_LED_RED 1 /* Output */
++#define GPIOC_LED_GREEN 2 /* Output */
++#define GPIOC_BOARDID3 3 /* Input */
++
++#define GPIOC_WIFI_IRQ_N 4 /* Input */
++#define GPIOC_WIFI_RESET 5 /* Output */
++#define GPIOC_WIFI_PWR1_ON 6 /* Output */
++#define GPIOC_BT_RESET 7 /* Output */
++
++#define GPIOC_UNKNOWN8 8 /* Output */
++#define GPIOC_LCD_PWR1_ON 9 /* Output */
++#define GPIOC_LCD_PWR2_ON 10 /* Output */
++#define GPIOC_BOARDID2 11 /* Input */
++
++#define GPIOC_BOARDID1 12 /* Input */
++#define GPIOC_BOARDID0 13 /* Input */
++#define GPIOC_BT_PWR_ON 14 /* Output */
++#define GPIOC_CHARGE_ON 15 /* Output */
++
++/* ASIC3 GPIO D bank */
++
++#define GPIOD_KEY_OK_N 0 /* Input */
++#define GPIOD_KEY_RIGHT_N 1 /* Input */
++#define GPIOD_KEY_LEFT_N 2 /* Input */
++#define GPIOD_KEY_DOWN_N 3 /* Input */
++
++#define GPIOD_KEY_UP_N 4 /* Input */
++#define GPIOD_SDIO_DET 5 /* Input */
++#define GPIOD_WIFI_PWR2_ON 6 /* Output */
++#define GPIOD_HW_REBOOT 7 /* Output */
++
++#define GPIOD_BB_RESET1 8 /* Output */
++#define GPIOD_UNKNOWN9 9 /* Output */
++#define GPIOD_VIBRA_PWR_ON 10 /* Output */
++#define GPIOD_WIFI_PWR3_ON 11 /* Output */
++
++#define GPIOD_FL_PWR_ON 12 /* Output */
++#define GPIOD_LCD_PWR4_ON 13 /* Output */
++#define GPIOD_BL_KEYP_PWR_ON 14 /* Output */
++#define GPIOD_BL_KEYB_PWR_ON 15 /* Output */
++
++extern struct platform_device htcuniversal_asic3;
++
++/* ASIC3 GPIO A bank */
++
++#define GPIO_I2C_EN 0*16+GPIOA_I2C_EN
++#define GPIO_SPK_PWR1_ON 0*16+GPIOA_SPK_PWR1_ON
++#define GPIO_AUDIO_PWR_ON 0*16+GPIOA_AUDIO_PWR_ON
++#define GPIO_EARPHONE_PWR_ON 0*16+GPIOA_EARPHONE_PWR_ON
++
++#define GPIO_UNKNOWNA4 0*16+GPIOA_UNKNOWN4
++#define GPIO_BUTTON_BACKLIGHT_N 0*16+GPIOA_BUTTON_BACKLIGHT_N
++#define GPIO_SPK_PWR2_ON 0*16+GPIOA_SPK_PWR2_ON
++#define GPIO_BUTTON_RECORD_N 0*16+GPIOA_BUTTON_RECORD_N
++
++#define GPIO_BUTTON_CAMERA_N 0*16+GPIOA_BUTTON_CAMERA_N
++#define GPIO_UNKNOWNA9 0*16+GPIOA_UNKNOWN9
++#define GPIO_FLASHLIGHT 0*16+GPIOA_FLASHLIGHT
++#define GPIO_COVER_ROTATE_N 0*16+GPIOA_COVER_ROTATE_N
++
++#define GPIO_TOUCHSCREEN_N 0*16+GPIOA_TOUCHSCREEN_N
++#define GPIO_VOL_UP_N 0*16+GPIOA_VOL_UP_N
++#define GPIO_VOL_DOWN_N 0*16+GPIOA_VOL_DOWN_N
++#define GPIO_LCD_PWR5_ON 0*16+GPIOA_LCD_PWR5_ON
++
++/* ASIC3 GPIO B bank */
++
++#define GPIO_BB_READY 1*16+GPIOB_BB_READY
++#define GPIO_CODEC_PDN 1*16+GPIOB_CODEC_PDN
++#define GPIO_UNKNOWNB2 1*16+GPIOB_UNKNOWN2
++#define GPIO_BB_UNKNOWN3 1*16+GPIOB_BB_UNKNOWN3
++
++#define GPIO_BT_IRQ 1*16+GPIOB_BT_IRQ
++#define GPIO_CLAMSHELL_N 1*16+GPIOB_CLAMSHELL_N
++#define GPIO_LCD_PWR3_ON 1*16+GPIOB_LCD_PWR3_ON
++#define GPIO_BB_ALERT 1*16+GPIOB_BB_ALERT
++
++#define GPIO_BB_RESET2 1*16+GPIOB_BB_RESET2
++#define GPIO_EARPHONE_N 1*16+GPIOB_EARPHONE_N
++#define GPIO_MICRECORD_N 1*16+GPIOB_MICRECORD_N
++#define GPIO_NIGHT_SENSOR 1*16+GPIOB_NIGHT_SENSOR
++
++#define GPIO_UMTS_DCD 1*16+GPIOB_UMTS_DCD
++#define GPIO_UNKNOWNB13 1*16+GPIOB_UNKNOWN13
++#define GPIO_CHARGE_EN 1*16+GPIOB_CHARGE_EN
++#define GPIO_USB_PUEN 1*16+GPIOB_USB_PUEN
++
++/* ASIC3 GPIO C bank */
++
++#define GPIO_LED_BTWIFI 2*16+GPIOC_LED_BTWIFI
++#define GPIO_LED_RED 2*16+GPIOC_LED_RED
++#define GPIO_LED_GREEN 2*16+GPIOC_LED_GREEN
++#define GPIO_BOARDID3 2*16+GPIOC_BOARDID3
++
++#define GPIO_WIFI_IRQ_N 2*16+GPIOC_WIFI_IRQ_N
++#define GPIO_WIFI_RESET 2*16+GPIOC_WIFI_RESET
++#define GPIO_WIFI_PWR1_ON 2*16+GPIOC_WIFI_PWR1_ON
++#define GPIO_BT_RESET 2*16+GPIOC_BT_RESET
++
++#define GPIO_UNKNOWNC8 2*16+GPIOC_UNKNOWN8
++#define GPIO_LCD_PWR1_ON 2*16+GPIOC_LCD_PWR1_ON
++#define GPIO_LCD_PWR2_ON 2*16+GPIOC_LCD_PWR2_ON
++#define GPIO_BOARDID2 2*16+GPIOC_BOARDID2
++
++#define GPIO_BOARDID1 2*16+GPIOC_BOARDID1
++#define GPIO_BOARDID0 2*16+GPIOC_BOARDID0
++#define GPIO_BT_PWR_ON 2*16+GPIOC_BT_PWR_ON
++#define GPIO_CHARGE_ON 2*16+GPIOC_CHARGE_ON
++
++/* ASIC3 GPIO D bank */
++
++#define GPIO_KEY_OK_N 3*16+GPIOD_KEY_OK_N
++#define GPIO_KEY_RIGHT_N 3*16+GPIOD_KEY_RIGHT_N
++#define GPIO_KEY_LEFT_N 3*16+GPIOD_KEY_LEFT_N
++#define GPIO_KEY_DOWN_N 3*16+GPIOD_KEY_DOWN_N
++
++#define GPIO_KEY_UP_N 3*16+GPIOD_KEY_UP_N
++#define GPIO_SDIO_DET 3*16+GPIOD_SDIO_DET
++#define GPIO_WIFI_PWR2_ON 3*16+GPIOD_WIFI_PWR2_ON
++#define GPIO_HW_REBOOT 3*16+GPIOD_HW_REBOOT
++
++#define GPIO_BB_RESET1 3*16+GPIOD_BB_RESET1
++#define GPIO_UNKNOWND9 3*16+GPIOD_UNKNOWN9
++#define GPIO_VIBRA_PWR_ON 3*16+GPIOD_VIBRA_PWR_ON
++#define GPIO_WIFI_PWR3_ON 3*16+GPIOD_WIFI_PWR3_ON
++
++#define GPIO_FL_PWR_ON 3*16+GPIOD_FL_PWR_ON
++#define GPIO_LCD_PWR4_ON 3*16+GPIOD_LCD_PWR4_ON
++#define GPIO_BL_KEYP_PWR_ON 3*16+GPIOD_BL_KEYP_PWR_ON
++#define GPIO_BL_KEYB_PWR_ON 3*16+GPIOD_BL_KEYB_PWR_ON
++
++#define HTCUNIVERSAL_EGPIO_BASE PXA_CS2_PHYS+0x02000000
++
++#define EGPIO4_ON 4 /* something */
++#define EGPIO5_BT_3V3_ON 5 /* Bluetooth related */
++#define EGPIO6_WIFI_ON 6 /* WLAN related*/
++
++extern void htcuniversal_egpio_enable( u_int16_t bits );
++extern void htcuniversal_egpio_disable( u_int16_t bits );
++
++#endif /* _HTCUNIVERSAL_ASIC_H_ */
++
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-gpio.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-gpio.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,220 @@
++/*
++ * include/asm-arm/arch-pxa/htcuniversal-gpio.h
++ * History:
++ *
++ * 2004-12-10 Michael Opdenacker. Wrote down GPIO settings as identified by Jamey Hicks.
++ * Reused the h2200-gpio.h file as a template.
++ */
++
++#ifndef _HTCUNIVERSAL_GPIO_H_
++#define _HTCUNIVERSAL_GPIO_H_
++
++#include <asm/arch/pxa-regs.h>
++
++#define GET_HTCUNIVERSAL_GPIO(gpio) \
++ (GPLR(GPIO_NR_HTCUNIVERSAL_ ## gpio) & GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio))
++
++#define SET_HTCUNIVERSAL_GPIO(gpio, setp) \
++do { \
++if (setp) \
++ GPSR(GPIO_NR_HTCUNIVERSAL_ ## gpio) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio); \
++else \
++ GPCR(GPIO_NR_HTCUNIVERSAL_ ## gpio) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio); \
++} while (0)
++
++#define SET_HTCUNIVERSAL_GPIO_N(gpio, setp) \
++do { \
++if (setp) \
++ GPCR(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N); \
++else \
++ GPSR(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N); \
++} while (0)
++
++#define HTCUNIVERSAL_IRQ(gpio) \
++ IRQ_GPIO(GPIO_NR_HTCUNIVERSAL_ ## gpio)
++
++#define GPIO_NR_HTCUNIVERSAL_KEY_ON_N 0
++#define GPIO_NR_HTCUNIVERSAL_GP_RST_N 1
++
++#define GPIO_NR_HTCUNIVERSAL_USB_DET 9
++#define GPIO_NR_HTCUNIVERSAL_POWER_DET 10
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD7 12
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_SDIO_INT_N 13
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_EXT_INT 14
++#define GPIO_NR_HTCUNIVERSAL_CS1_N 15
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD6 17
++#define GPIO_NR_HTCUNIVERSAL_RDY 18
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_START 19
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT7 22
++#define GPIO_NR_HTCUNIVERSAL_SPI_CLK 23
++#define GPIO_NR_HTCUNIVERSAL_SPI_FRM 24
++#define GPIO_NR_HTCUNIVERSAL_SPI_DO 25
++#define GPIO_NR_HTCUNIVERSAL_SPI_DI 26
++
++#define GPIO_NR_HTCUNIVERSAL_CODEC_ON 27
++#define GPIO_NR_HTCUNIVERSAL_I2S_BCK 28
++#define GPIO_NR_HTCUNIVERSAL_I2S_DIN 29
++#define GPIO_NR_HTCUNIVERSAL_I2S_DOUT 30
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYNC 31
++
++#define GPIO_NR_HTCUNIVERSAL_RS232_ON 32
++#define GPIO_NR_HTCUNIVERSAL_CS5_N 33
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RXD 34
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS 35
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN7 36
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN3 37
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN4 38
++#define GPIO_NR_HTCUNIVERSAL_PHONE_TXD 39
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT6 40
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS 41
++#define GPIO_NR_HTCUNIVERSAL_BT_RXD 42
++#define GPIO_NR_HTCUNIVERSAL_BT_TXD 43
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_CTS 44
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_RTS 45
++
++#define GPIO_NR_HTCUNIVERSAL_SIR_RXD 42
++#define GPIO_NR_HTCUNIVERSAL_SIR_TXD 43
++
++#define GPIO_NR_HTCUNIVERSAL_POE_N 48
++#define GPIO_NR_HTCUNIVERSAL_PWE_N 49
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD3 50
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD2 51
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD4 52
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_MCLK 53
++#define GPIO_NR_HTCUNIVERSAL_CIF_PCLK 54
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD1 55
++
++#define GPIO_NR_HTCUNIVERSAL_LDD0 58
++#define GPIO_NR_HTCUNIVERSAL_LDD1 59
++#define GPIO_NR_HTCUNIVERSAL_LDD2 60
++#define GPIO_NR_HTCUNIVERSAL_LDD3 61
++#define GPIO_NR_HTCUNIVERSAL_LDD4 62
++#define GPIO_NR_HTCUNIVERSAL_LDD5 63
++#define GPIO_NR_HTCUNIVERSAL_LDD6 64
++#define GPIO_NR_HTCUNIVERSAL_LDD7 65
++#define GPIO_NR_HTCUNIVERSAL_LDD8 66
++#define GPIO_NR_HTCUNIVERSAL_LDD9 67
++#define GPIO_NR_HTCUNIVERSAL_LDD10 68
++#define GPIO_NR_HTCUNIVERSAL_LDD11 69
++#define GPIO_NR_HTCUNIVERSAL_LDD12 70
++#define GPIO_NR_HTCUNIVERSAL_LDD13 71
++#define GPIO_NR_HTCUNIVERSAL_LDD14 72
++#define GPIO_NR_HTCUNIVERSAL_LDD15 73
++
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_RD 74
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_A0 75
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_WR 76
++#define GPIO_NR_HTCUNIVERSAL_LBIAS 77
++
++#define GPIO_NR_HTCUNIVERSAL_CS2_N 78
++#define GPIO_NR_HTCUNIVERSAL_CS3_N 79
++#define GPIO_NR_HTCUNIVERSAL_CS4_N 80
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD0 81
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD5 82
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_LV 84
++#define GPIO_NR_HTCUNIVERSAL_CIF_FV 85
++
++#define GPIO_NR_HTCUNIVERSAL_LCD1 86
++#define GPIO_NR_HTCUNIVERSAL_LCD2 87
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN5 90
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN6 91
++
++#define GPIO_NR_HTCUNIVERSAL_DREQ1 97
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RESET 98
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN0 100
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN1 101
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN2 102
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT0 103
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT1 104
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT2 105
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT3 106
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT4 107
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT5 108
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UNKNOWN 109
++#define GPIO_NR_HTCUNIVERSAL_PHONE_OFF 110
++
++#define GPIO_NR_HTCUNIVERSAL_USB_PUEN 112
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYSCLK 113
++
++#define GPIO_NR_HTCUNIVERSAL_PWM_OUT1 115
++
++#define GPIO_NR_HTCUNIVERSAL_I2C_SCL 117
++#define GPIO_NR_HTCUNIVERSAL_I2C_SDA 118
++
++#if 0
++#define GPIO_NR_HTCUNIVERSAL_CPU_BATT_FAULT_N
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_RESET_N
++#define GPIO_NR_HTCUNIVERSAL_CHARGE_EN_N
++#define GPIO_NR_HTCUNIVERSAL_FLASH_VPEN
++#define GPIO_NR_HTCUNIVERSAL_BATT_OFF
++#define GPIO_NR_HTCUNIVERSAL_USB_CHARGE_RATE
++#define GPIO_NR_HTCUNIVERSAL_BL_DETECT_N
++#define GPIO_NR_HTCUNIVERSAL_CPU_HW_RESET_N
++#endif
++
++
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_CLK_MD (23 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_FRM_MD (24 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DO_MD (25 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DI_MD (26 | GPIO_ALT_FN_1_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_I2S_BCK_MD (28 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2S_DIN_MD (29 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_I2S_DOUT_MD (30 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYNC_MD (31 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RXD_MD (34 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS_MD (35 | GPIO_ALT_FN_1_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_TXD_MD (39 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS_MD (41 | GPIO_ALT_FN_2_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_BT_RXD_MD (42 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_BT_TXD_MD (43 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_CTS_MD (44 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_RTS_MD (45 | GPIO_ALT_FN_2_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_SIR_RXD_MD (46 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_SIR_TXD_MD (47 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_POE_N_MD (48 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH)
++#define GPIO_NR_HTCUNIVERSAL_PWE_N_MD (49 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH)
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN0_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN0 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN1_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN1 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN2_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN2 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN3_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN3 | GPIO_ALT_FN_3_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN4_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN4 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN5_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN5 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN6_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN6 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN7_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN7 | GPIO_ALT_FN_3_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT0_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT0 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT1_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT1 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT2_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT2 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT3_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT3 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT4_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT4 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT5_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT5 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT6_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT6 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT7_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT7 | GPIO_ALT_FN_1_OUT)
++
++
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_PWM1OUT_MD (115 | GPIO_ALT_FN_3_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_I2C_SCL_MD (117 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2C_SDA_MD (118 | GPIO_ALT_FN_1_OUT)
++
++#endif /* _HTCUNIVERSAL_GPIO_H */
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-init.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-init.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,14 @@
++/*
++ * include/asm/arm/arch-pxa/htcuniversal-init.h
++ * Copyright (c) 2004 SDG Systems, LLC
++ */
++
++#ifndef _HTCUNIVERSAL_INIT_H_
++#define _HTCUNIVERSAL_INIT_H_
++
++/* htcuniversal initialization data should be found here
++ * See -init.h files from other devices for details
++ */
++
++#endif /* _HTCUNIVERSAL_INIT_H_ */
++
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,3 @@
++#include <asm/arch/irqs.h>
++
++#define HTCUNIVERSAL_ASIC3_IRQ_BASE IRQ_BOARD_START
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa-pm_ll.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa-pm_ll.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,6 @@
++struct pxa_ll_pm_ops {
++ void (*suspend)(unsigned long);
++ void (*resume)(void);
++};
++
++extern struct pxa_ll_pm_ops *pxa_pm_set_ll_ops(struct pxa_ll_pm_ops *new_ops);
+Index: linux-2.6.26-rc4/include/asm-arm/hardware/asic3_keys.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/hardware/asic3_keys.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,18 @@
++#include <linux/input.h>
++
++struct asic3_keys_button {
++ /* Configuration parameters */
++ int keycode;
++ int gpio;
++ int active_low;
++ char *desc;
++ int type;
++ /* Internal state vars - add below */
++};
++
++struct asic3_keys_platform_data {
++ struct asic3_keys_button *buttons;
++ int nbuttons;
++ struct input_dev *input;
++ struct device *asic3_dev;
++};
+Index: linux-2.6.26-rc4/include/asm-arm/hardware/asic3_leds.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/hardware/asic3_leds.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,34 @@
++/*
++ * LEDs support for HTC ASIC3 devices.
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * 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/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++
++struct asic3_leds_machinfo;
++
++struct asic3_led {
++ struct led_classdev led_cdev;
++ int hw_num; /* Number of "hardware-accelerated" led */
++ int gpio_num; /* Number of GPIO if hw_num == -1 */
++ struct asic3_leds_machinfo *machinfo;
++};
++
++struct asic3_leds_machinfo {
++ int num_leds;
++ struct asic3_led *leds;
++ struct platform_device *asic3_pdev;
++};
++
++extern int asic3_leds_register(void);
++extern void asic3_leds_unregister(void);
++
+Index: linux-2.6.26-rc4/include/asm-arm/hardware/ipaq-asic3.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/hardware/ipaq-asic3.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,602 @@
++/*
++ *
++ * Definitions for the HTC ASIC3 chip found in several handheld devices
++ *
++ * Copyright 2001 Compaq Computer 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.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Andrew Christian
++ *
++ */
++
++#ifndef IPAQ_ASIC3_H
++#define IPAQ_ASIC3_H
++
++/****************************************************/
++/* IPAQ, ASIC #3, replaces ASIC #1 */
++
++#define IPAQ_ASIC3_OFFSET(x,y) (_IPAQ_ASIC3_ ## x ## _Base + _IPAQ_ASIC3_ ## x ## _ ## y)
++#define IPAQ_ASIC3_GPIO_OFFSET(x,y) (_IPAQ_ASIC3_GPIO_ ## x ## _Base + _IPAQ_ASIC3_GPIO_ ## y)
++
++
++/* All offsets below are specified with the following address bus shift */
++#define ASIC3_DEFAULT_ADDR_SHIFT 2
++
++#define _IPAQ_ASIC3_GPIO_A_Base 0x0000
++#define _IPAQ_ASIC3_GPIO_B_Base 0x0100
++#define _IPAQ_ASIC3_GPIO_C_Base 0x0200
++#define _IPAQ_ASIC3_GPIO_D_Base 0x0300
++
++#define _IPAQ_ASIC3_GPIO_Mask 0x00 /* R/W 0:don't mask, 1:mask interrupt */
++#define _IPAQ_ASIC3_GPIO_Direction 0x04 /* R/W 0:input, 1:output */
++#define _IPAQ_ASIC3_GPIO_Out 0x08 /* R/W 0:output low, 1:output high */
++#define _IPAQ_ASIC3_GPIO_TriggerType 0x0c /* R/W 0:level, 1:edge */
++#define _IPAQ_ASIC3_GPIO_EdgeTrigger 0x10 /* R/W 0:falling, 1:rising */
++#define _IPAQ_ASIC3_GPIO_LevelTrigger 0x14 /* R/W 0:low, 1:high level detect */
++#define _IPAQ_ASIC3_GPIO_SleepMask 0x18 /* R/W 0:don't mask, 1:mask trigger in sleep mode */
++#define _IPAQ_ASIC3_GPIO_SleepOut 0x1c /* R/W level 0:low, 1:high in sleep mode */
++#define _IPAQ_ASIC3_GPIO_BattFaultOut 0x20 /* R/W level 0:low, 1:high in batt_fault */
++#define _IPAQ_ASIC3_GPIO_IntStatus 0x24 /* R/W 0:none, 1:detect */
++#define _IPAQ_ASIC3_GPIO_AltFunction 0x28 /* R/W 0:normal control 1:LED register control */
++#define _IPAQ_ASIC3_GPIO_SleepConf 0x2c /* R/W bit 1: autosleep 0: disable gposlpout in normal mode, enable gposlpout in sleep mode */
++#define _IPAQ_ASIC3_GPIO_Status 0x30 /* R Pin status */
++
++#define IPAQ_ASIC3_GPIO_A_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Mask )
++#define IPAQ_ASIC3_GPIO_A_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Direction )
++#define IPAQ_ASIC3_GPIO_A_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Out )
++#define IPAQ_ASIC3_GPIO_A_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, A, TriggerType )
++#define IPAQ_ASIC3_GPIO_A_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, A, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_A_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, A, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepMask )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepOut )
++#define IPAQ_ASIC3_GPIO_A_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_A_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, A, IntStatus )
++#define IPAQ_ASIC3_GPIO_A_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, A, AltFunction )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepConf )
++#define IPAQ_ASIC3_GPIO_A_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Status )
++
++#define IPAQ_ASIC3_GPIO_B_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Mask )
++#define IPAQ_ASIC3_GPIO_B_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Direction )
++#define IPAQ_ASIC3_GPIO_B_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Out )
++#define IPAQ_ASIC3_GPIO_B_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, B, TriggerType )
++#define IPAQ_ASIC3_GPIO_B_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, B, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_B_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, B, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepMask )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepOut )
++#define IPAQ_ASIC3_GPIO_B_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_B_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, B, IntStatus )
++#define IPAQ_ASIC3_GPIO_B_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, B, AltFunction )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepConf )
++#define IPAQ_ASIC3_GPIO_B_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Status )
++
++#define IPAQ_ASIC3_GPIO_C_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Mask )
++#define IPAQ_ASIC3_GPIO_C_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Direction )
++#define IPAQ_ASIC3_GPIO_C_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Out )
++#define IPAQ_ASIC3_GPIO_C_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, C, TriggerType )
++#define IPAQ_ASIC3_GPIO_C_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, C, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_C_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, C, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepMask )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepOut )
++#define IPAQ_ASIC3_GPIO_C_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_C_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, C, IntStatus )
++#define IPAQ_ASIC3_GPIO_C_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, C, AltFunction )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepConf )
++#define IPAQ_ASIC3_GPIO_C_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Status )
++
++#define IPAQ_ASIC3_GPIO_D_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Mask )
++#define IPAQ_ASIC3_GPIO_D_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Direction )
++#define IPAQ_ASIC3_GPIO_D_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Out )
++#define IPAQ_ASIC3_GPIO_D_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, D, TriggerType )
++#define IPAQ_ASIC3_GPIO_D_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, D, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_D_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, D, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepMask )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepOut )
++#define IPAQ_ASIC3_GPIO_D_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_D_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, D, IntStatus )
++#define IPAQ_ASIC3_GPIO_D_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, D, AltFunction )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepConf )
++#define IPAQ_ASIC3_GPIO_D_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Status )
++
++#define _IPAQ_ASIC3_SPI_Base 0x0400
++#define _IPAQ_ASIC3_SPI_Control 0x0000
++#define _IPAQ_ASIC3_SPI_TxData 0x0004
++#define _IPAQ_ASIC3_SPI_RxData 0x0008
++#define _IPAQ_ASIC3_SPI_Int 0x000c
++#define _IPAQ_ASIC3_SPI_Status 0x0010
++
++#define IPAQ_ASIC3_SPI_Control(_b) IPAQ_ASIC3( _b, u16, SPI, Control )
++#define IPAQ_ASIC3_SPI_TxData(_b) IPAQ_ASIC3( _b, u16, SPI, TxData )
++#define IPAQ_ASIC3_SPI_RxData(_b) IPAQ_ASIC3( _b, u16, SPI, RxData )
++#define IPAQ_ASIC3_SPI_Int(_b) IPAQ_ASIC3( _b, u16, SPI, Int )
++#define IPAQ_ASIC3_SPI_Status(_b) IPAQ_ASIC3( _b, u16, SPI, Status )
++
++#define SPI_CONTROL_SPR(clk) ((clk) & 0x0f) /* Clock rate */
++
++#define _IPAQ_ASIC3_PWM_0_Base 0x0500
++#define _IPAQ_ASIC3_PWM_1_Base 0x0600
++#define _IPAQ_ASIC3_PWM_TimeBase 0x0000
++#define _IPAQ_ASIC3_PWM_PeriodTime 0x0004
++#define _IPAQ_ASIC3_PWM_DutyTime 0x0008
++
++#define IPAQ_ASIC3_PWM_TimeBase(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, TimeBase )
++#define IPAQ_ASIC3_PWM_PeriodTime(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, PeriodTime )
++#define IPAQ_ASIC3_PWM_DutyTime(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, DutyTime )
++
++#define PWM_TIMEBASE_VALUE(x) ((x)&0xf) /* Low 4 bits sets time base */
++#define PWM_TIMEBASE_ENABLE (1 << 4) /* Enable clock */
++
++#define _IPAQ_ASIC3_LED_0_Base 0x0700
++#define _IPAQ_ASIC3_LED_1_Base 0x0800
++#define _IPAQ_ASIC3_LED_2_Base 0x0900
++#define _IPAQ_ASIC3_LED_TimeBase 0x0000 /* R/W 7 bits */
++#define _IPAQ_ASIC3_LED_PeriodTime 0x0004 /* R/W 12 bits */
++#define _IPAQ_ASIC3_LED_DutyTime 0x0008 /* R/W 12 bits */
++#define _IPAQ_ASIC3_LED_AutoStopCount 0x000c /* R/W 16 bits */
++
++#define IPAQ_ASIC3_LED_TimeBase(_b, x) IPAQ_ASIC3_N( _b, u8, LED, x, TimeBase )
++#define IPAQ_ASIC3_LED_PeriodTime(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, PeriodTime )
++#define IPAQ_ASIC3_LED_DutyTime(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, DutyTime )
++#define IPAQ_ASIC3_LED_AutoStopCount(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, AutoStopCount )
++
++/* LED TimeBase bits - match ASIC2 */
++#define LED_TBS 0x0f /* Low 4 bits sets time base, max = 13 */
++ /* Note: max = 5 on hx4700 */
++ /* 0: maximum time base */
++ /* 1: maximum time base / 2 */
++ /* n: maximum time base / 2^n */
++
++#define LED_EN (1 << 4) /* LED ON/OFF 0:off, 1:on */
++#define LED_AUTOSTOP (1 << 5) /* LED ON/OFF auto stop set 0:disable, 1:enable */
++#define LED_ALWAYS (1 << 6) /* LED Interrupt Mask 0:No mask, 1:mask */
++
++#define _IPAQ_ASIC3_CLOCK_Base 0x0A00
++#define _IPAQ_ASIC3_CLOCK_CDEX 0x00
++#define _IPAQ_ASIC3_CLOCK_SEL 0x04
++
++#define IPAQ_ASIC3_CLOCK_CDEX(_b) IPAQ_ASIC3( _b, u16, CLOCK, CDEX )
++#define IPAQ_ASIC3_CLOCK_SEL(_b) IPAQ_ASIC3( _b, u16, CLOCK, SEL )
++
++#define CLOCK_CDEX_SOURCE (1 << 0) /* 2 bits */
++#define CLOCK_CDEX_SOURCE0 (1 << 0)
++#define CLOCK_CDEX_SOURCE1 (1 << 1)
++#define CLOCK_CDEX_SPI (1 << 2)
++#define CLOCK_CDEX_OWM (1 << 3)
++#define CLOCK_CDEX_PWM0 (1 << 4)
++#define CLOCK_CDEX_PWM1 (1 << 5)
++#define CLOCK_CDEX_LED0 (1 << 6)
++#define CLOCK_CDEX_LED1 (1 << 7)
++#define CLOCK_CDEX_LED2 (1 << 8)
++
++#define CLOCK_CDEX_SD_HOST (1 << 9) /* R/W: SD host clock source 24.576M/12.288M */
++#define CLOCK_CDEX_SD_BUS (1 << 10) /* R/W: SD bus clock source control 24.576M/12.288M */
++#define CLOCK_CDEX_SMBUS (1 << 11)
++#define CLOCK_CDEX_CONTROL_CX (1 << 12)
++
++#define CLOCK_CDEX_EX0 (1 << 13) /* R/W: 32.768 kHz crystal */
++#define CLOCK_CDEX_EX1 (1 << 14) /* R/W: 24.576 MHz crystal */
++
++#define CLOCK_SEL_SD_HCLK_SEL (1 << 0) /* R/W: SDIO host clock select - 1: 24.576 Mhz, 0: 12.288 MHz */
++#define CLOCK_SEL_SD_BCLK_SEL (1 << 1) /* R/W: SDIO bus clock select - 1: 24.576 MHz, 0: 12.288 MHz */
++#define CLOCK_SEL_CX (1 << 2) /* R/W: INT clock source control (32.768 kHz) */
++
++
++#define _IPAQ_ASIC3_INTR_Base 0x0B00
++
++#define _IPAQ_ASIC3_INTR_IntMask 0x00 /* Interrupt mask control */
++#define _IPAQ_ASIC3_INTR_PIntStat 0x04 /* Peripheral interrupt status */
++#define _IPAQ_ASIC3_INTR_IntCPS 0x08 /* Interrupt timer clock pre-scale */
++#define _IPAQ_ASIC3_INTR_IntTBS 0x0c /* Interrupt timer set */
++
++#define IPAQ_ASIC3_INTR_IntMask(_b) IPAQ_ASIC3( _b, u8, INTR, IntMask )
++#define IPAQ_ASIC3_INTR_PIntStat(_b) IPAQ_ASIC3( _b, u8, INTR, PIntStat )
++#define IPAQ_ASIC3_INTR_IntCPS(_b) IPAQ_ASIC3( _b, u8, INTR, IntCPS )
++#define IPAQ_ASIC3_INTR_IntTBS(_b) IPAQ_ASIC3( _b, u16, INTR, IntTBS )
++
++#define ASIC3_INTMASK_GINTMASK (1 << 0) /* Global interrupt mask 1:enable */
++#define ASIC3_INTMASK_GINTEL (1 << 1) /* 1: rising edge, 0: hi level */
++#define ASIC3_INTMASK_MASK0 (1 << 2)
++#define ASIC3_INTMASK_MASK1 (1 << 3)
++#define ASIC3_INTMASK_MASK2 (1 << 4)
++#define ASIC3_INTMASK_MASK3 (1 << 5)
++#define ASIC3_INTMASK_MASK4 (1 << 6)
++#define ASIC3_INTMASK_MASK5 (1 << 7)
++
++#define ASIC3_INTR_PERIPHERAL_A (1 << 0)
++#define ASIC3_INTR_PERIPHERAL_B (1 << 1)
++#define ASIC3_INTR_PERIPHERAL_C (1 << 2)
++#define ASIC3_INTR_PERIPHERAL_D (1 << 3)
++#define ASIC3_INTR_LED0 (1 << 4)
++#define ASIC3_INTR_LED1 (1 << 5)
++#define ASIC3_INTR_LED2 (1 << 6)
++#define ASIC3_INTR_SPI (1 << 7)
++#define ASIC3_INTR_SMBUS (1 << 8)
++#define ASIC3_INTR_OWM (1 << 9)
++
++#define ASIC3_INTR_CPS(x) ((x)&0x0f) /* 4 bits, max 14 */
++#define ASIC3_INTR_CPS_SET ( 1 << 4 ) /* Time base enable */
++
++
++/* Basic control of the SD ASIC */
++#define _IPAQ_ASIC3_SDHWCTRL_Base 0x0E00
++
++#define _IPAQ_ASIC3_SDHWCTRL_SDConf 0x00
++#define IPAQ_ASIC3_SDHWCTRL_SDConf(_b) IPAQ_ASIC3( _b, u8, SDHWCTRL, SDConf )
++
++#define ASIC3_SDHWCTRL_SUSPEND (1 << 0) /* 1=suspend all SD operations */
++#define ASIC3_SDHWCTRL_CLKSEL (1 << 1) /* 1=SDICK, 0=HCLK */
++#define ASIC3_SDHWCTRL_PCLR (1 << 2) /* All registers of SDIO cleared */
++#define ASIC3_SDHWCTRL_LEVCD (1 << 3) /* Level of SD card detection: 1:high, 0:low */
++#define ASIC3_SDHWCTRL_LEVWP (1 << 4) /* Level of SD card write protection: 1=low, 0=high */
++#define ASIC3_SDHWCTRL_SDLED (1 << 5) /* SD card LED signal 1=enable, 0=disable */
++#define ASIC3_SDHWCTRL_SDPWR (1 << 6) /* SD card power supply control 1=enable */
++
++
++/* This is a pointer to an array of 12 u32 values - but only the lower 2 bytes matter */
++/* Use it as "IPAQ_ASIC3_HWPROTECT_ARRAY[x]" */
++
++#define _IPAQ_ASIC3_HWPROTECT_Base 0x1000
++#define IPAQ_ASIC3_HWPROTECT_ARRAY ((volatile u32*)(_IPAQ_ASIC3_Base + _IPAQ_ASIC3_HWPROTECT_Base))
++#define HWPROTECT_ARRAY_LEN 12
++#define HWPROTECT_ARRAY_VALUES {0x4854,0x432d,0x5344,0x494f,0x2050,0x2f4e,0x3a33,0x3048,0x3830,0x3032,0x382d,0x3030}
++
++
++#define _IPAQ_ASIC3_EXTCF_Base 0x1100
++
++#define _IPAQ_ASIC3_EXTCF_Select 0x00
++#define _IPAQ_ASIC3_EXTCF_Reset 0x04
++
++#define IPAQ_ASIC3_EXTCF_Select(_b) IPAQ_ASIC3( _b, u16, EXTCF, Select )
++#define IPAQ_ASIC3_EXTCF_Reset(_b) IPAQ_ASIC3( _b, u16, EXTCF, Reset )
++
++#define ASIC3_EXTCF_SMOD0 (1 << 0) /* slot number of mode 0 */
++#define ASIC3_EXTCF_SMOD1 (1 << 1) /* slot number of mode 1 */
++#define ASIC3_EXTCF_SMOD2 (1 << 2) /* slot number of mode 2 */
++#define ASIC3_EXTCF_OWM_EN (1 << 4) /* enable onewire module */
++#define ASIC3_EXTCF_OWM_SMB (1 << 5) /* OWM bus selection */
++#define ASIC3_EXTCF_OWM_RESET (1 << 6) /* undocumented, used by OWM and CF */
++#define ASIC3_EXTCF_CF0_SLEEP_MODE (1 << 7) /* CF0 sleep state control */
++#define ASIC3_EXTCF_CF1_SLEEP_MODE (1 << 8) /* CF1 sleep state control */
++#define ASIC3_EXTCF_CF0_PWAIT_EN (1 << 10) /* CF0 PWAIT_n control */
++#define ASIC3_EXTCF_CF1_PWAIT_EN (1 << 11) /* CF1 PWAIT_n control */
++#define ASIC3_EXTCF_CF0_BUF_EN (1 << 12) /* CF0 buffer control */
++#define ASIC3_EXTCF_CF1_BUF_EN (1 << 13) /* CF1 buffer control */
++#define ASIC3_EXTCF_SD_MEM_ENABLE (1 << 14)
++#define ASIC3_EXTCF_CF_SLEEP (1 << 15) /* CF sleep mode control */
++
++/*****************************************************************************
++ * The Onewire interface registers
++ *
++ * OWM_CMD
++ * OWM_DAT
++ * OWM_INTR
++ * OWM_INTEN
++ * OWM_CLKDIV
++ *
++ *****************************************************************************/
++
++#define _IPAQ_ASIC3_OWM_Base 0xC00
++
++#define _IPAQ_ASIC3_OWM_CMD 0x00
++#define _IPAQ_ASIC3_OWM_DAT 0x04
++#define _IPAQ_ASIC3_OWM_INTR 0x08
++#define _IPAQ_ASIC3_OWM_INTEN 0x0C
++#define _IPAQ_ASIC3_OWM_CLKDIV 0x10
++
++#define ASIC3_OWM_CMD_ONEWR (1 << 0)
++#define ASIC3_OWM_CMD_SRA (1 << 1)
++#define ASIC3_OWM_CMD_DQO (1 << 2)
++#define ASIC3_OWM_CMD_DQI (1 << 3)
++
++#define ASIC3_OWM_INTR_PD (1 << 0)
++#define ASIC3_OWM_INTR_PDR (1 << 1)
++#define ASIC3_OWM_INTR_TBE (1 << 2)
++#define ASIC3_OWM_INTR_TEMP (1 << 3)
++#define ASIC3_OWM_INTR_RBF (1 << 4)
++
++#define ASIC3_OWM_INTEN_EPD (1 << 0)
++#define ASIC3_OWM_INTEN_IAS (1 << 1)
++#define ASIC3_OWM_INTEN_ETBE (1 << 2)
++#define ASIC3_OWM_INTEN_ETMT (1 << 3)
++#define ASIC3_OWM_INTEN_ERBF (1 << 4)
++
++#define ASIC3_OWM_CLKDIV_PRE (3 << 0) /* two bits wide at bit position 0 */
++#define ASIC3_OWM_CLKDIV_DIV (7 << 2) /* 3 bits wide at bit position 2 */
++
++
++/*****************************************************************************
++ * The SD configuration registers are at a completely different location
++ * in memory. They are divided into three sets of registers:
++ *
++ * SD_CONFIG Core configuration register
++ * SD_CTRL Control registers for SD operations
++ * SDIO_CTRL Control registers for SDIO operations
++ *
++ *****************************************************************************/
++
++#define IPAQ_ASIC3_SD_CONFIG(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SD_CONFIG_Base + (_IPAQ_ASIC3_SD_CONFIG_ ## x))))
++
++#define _IPAQ_ASIC3_SD_CONFIG_Base 0x0400 // Assumes 32 bit addressing
++
++#define _IPAQ_ASIC3_SD_CONFIG_Command 0x08 /* R/W: Command */
++#define _IPAQ_ASIC3_SD_CONFIG_Addr0 0x20 /* [9:31] SD Control Register Base Address */
++#define _IPAQ_ASIC3_SD_CONFIG_Addr1 0x24 /* [9:31] SD Control Register Base Address */
++#define _IPAQ_ASIC3_SD_CONFIG_IntPin 0x78 /* R/O: interrupt assigned to pin */
++#define _IPAQ_ASIC3_SD_CONFIG_ClkStop 0x80 /* Set to 0x1f to clock SD controller, 0 otherwise. */
++ /* at 0x82 - Gated Clock Control */
++#define _IPAQ_ASIC3_SD_CONFIG_ClockMode 0x84 /* Control clock of SD controller */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_PinStatus 0x88 /* R/0: read status of SD pins */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Power1 0x90 /* Power1 - manual power control */
++ /* Power2 is at 0x92 - auto power up after card inserted */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Power3 0x94 /* auto power down when card removed */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_CardDetect 0x98 /* */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Slot 0xA0 /* R/O: define support slot number */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk1 0x1E0 /* Could be used for gated clock (don't use) */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk2 0x1E2 /* Could be used for gated clock (don't use) */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_GPIO_OutAndEnable 0x1E8 /* GPIO Output Reg. , at 0x1EA - GPIO Output Enable Reg. */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_GPIO_Status 0x1EC /* GPIO Status Reg. */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk3 0x1F0 /* Bit 1: double buffer/single buffer */
++
++#define IPAQ_ASIC3_SD_CONFIG_Command(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Command )
++#define IPAQ_ASIC3_SD_CONFIG_Addr0(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Addr0 )
++#define IPAQ_ASIC3_SD_CONFIG_Addr1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Addr1 )
++#define IPAQ_ASIC3_SD_CONFIG_IntPin(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, IntPin )
++#define IPAQ_ASIC3_SD_CONFIG_ClkStop(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, ClkStop )
++#define IPAQ_ASIC3_SD_CONFIG_ClockMode(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, ClockMode )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_PinStatus(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_PinStatus )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Power1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Power1 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Power3(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Power3 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_CardDetect(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_CardDetect )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Slot(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Slot )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_ExtGateClk1 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk3(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_ExtGateClk3 )
++
++#define SD_CONFIG_
++
++#define SD_CONFIG_COMMAND_MAE (1<<1) /* Memory access enable (set to 1 to access SD Controller) */
++
++#define SD_CONFIG_CLK_ENABLE_ALL 0x1f
++
++#define SD_CONFIG_POWER1_PC_33V 0x0200 /* Set for 3.3 volts */
++#define SD_CONFIG_POWER1_PC_OFF 0x0000 /* Turn off power */
++
++#define SD_CONFIG_CARDDETECTMODE_CLK ((x)&0x3) /* two bits - number of cycles for card detection */
++
++
++#define _IPAQ_ASIC3_SD_CTRL_Base 0x1000
++
++#define IPAQ_ASIC3_SD(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SD_CTRL_Base + (_IPAQ_ASIC3_SD_CTRL_ ## x))))
++
++#define _IPAQ_ASIC3_SD_CTRL_Cmd 0x00
++#define _IPAQ_ASIC3_SD_CTRL_Arg0 0x08
++#define _IPAQ_ASIC3_SD_CTRL_Arg1 0x0C
++#define _IPAQ_ASIC3_SD_CTRL_StopInternal 0x10
++#define _IPAQ_ASIC3_SD_CTRL_TransferSectorCount 0x14
++#define _IPAQ_ASIC3_SD_CTRL_Response0 0x18
++#define _IPAQ_ASIC3_SD_CTRL_Response1 0x1C
++#define _IPAQ_ASIC3_SD_CTRL_Response2 0x20
++#define _IPAQ_ASIC3_SD_CTRL_Response3 0x24
++#define _IPAQ_ASIC3_SD_CTRL_Response4 0x28
++#define _IPAQ_ASIC3_SD_CTRL_Response5 0x2C
++#define _IPAQ_ASIC3_SD_CTRL_Response6 0x30
++#define _IPAQ_ASIC3_SD_CTRL_Response7 0x34
++#define _IPAQ_ASIC3_SD_CTRL_CardStatus 0x38
++#define _IPAQ_ASIC3_SD_CTRL_BufferCtrl 0x3C
++#define _IPAQ_ASIC3_SD_CTRL_IntMaskCard 0x40
++#define _IPAQ_ASIC3_SD_CTRL_IntMaskBuffer 0x44
++#define _IPAQ_ASIC3_SD_CTRL_CardClockCtrl 0x48
++#define _IPAQ_ASIC3_SD_CTRL_MemCardXferDataLen 0x4C
++#define _IPAQ_ASIC3_SD_CTRL_MemCardOptionSetup 0x50
++#define _IPAQ_ASIC3_SD_CTRL_ErrorStatus0 0x58
++#define _IPAQ_ASIC3_SD_CTRL_ErrorStatus1 0x5C
++#define _IPAQ_ASIC3_SD_CTRL_DataPort 0x60
++#define _IPAQ_ASIC3_SD_CTRL_TransactionCtrl 0x68
++#define _IPAQ_ASIC3_SD_CTRL_SoftwareReset 0x1C0
++
++#define IPAQ_ASIC3_SD_CTRL_Cmd(_b) IPAQ_ASIC3_SD( _b, u16, Cmd ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Arg0(_b) IPAQ_ASIC3_SD( _b, u16, Arg0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Arg1(_b) IPAQ_ASIC3_SD( _b, u16, Arg1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_StopInternal(_b) IPAQ_ASIC3_SD( _b, u16, StopInternal ) /* */
++#define IPAQ_ASIC3_SD_CTRL_TransferSectorCount(_b) IPAQ_ASIC3_SD( _b, u16, TransferSectorCount ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response0(_b) IPAQ_ASIC3_SD( _b, u16, Response0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response1(_b) IPAQ_ASIC3_SD( _b, u16, Response1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response2(_b) IPAQ_ASIC3_SD( _b, u16, Response2 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response3(_b) IPAQ_ASIC3_SD( _b, u16, Response3 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response4(_b) IPAQ_ASIC3_SD( _b, u16, Response4 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response5(_b) IPAQ_ASIC3_SD( _b, u16, Response5 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response6(_b) IPAQ_ASIC3_SD( _b, u16, Response6 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response7(_b) IPAQ_ASIC3_SD( _b, u16, Response7 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_CardStatus(_b) IPAQ_ASIC3_SD( _b, u16, CardStatus ) /* */
++#define IPAQ_ASIC3_SD_CTRL_BufferCtrl(_b) IPAQ_ASIC3_SD( _b, u16, BufferCtrl ) /* and error status*/
++#define IPAQ_ASIC3_SD_CTRL_IntMaskCard(_b) IPAQ_ASIC3_SD( _b, u16, IntMaskCard ) /* */
++#define IPAQ_ASIC3_SD_CTRL_IntMaskBuffer(_b) IPAQ_ASIC3_SD( _b, u16, IntMaskBuffer ) /* */
++#define IPAQ_ASIC3_SD_CTRL_CardClockCtrl(_b) IPAQ_ASIC3_SD( _b, u16, CardClockCtrl ) /* */
++#define IPAQ_ASIC3_SD_CTRL_MemCardXferDataLen(_b) IPAQ_ASIC3_SD( _b, u16, MemCardXferDataLen ) /* */
++#define IPAQ_ASIC3_SD_CTRL_MemCardOptionSetup(_b) IPAQ_ASIC3_SD( _b, u16, MemCardOptionSetup ) /* */
++#define IPAQ_ASIC3_SD_CTRL_ErrorStatus0(_b) IPAQ_ASIC3_SD( _b, u16, ErrorStatus0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_ErrorStatus1(_b) IPAQ_ASIC3_SD( _b, u16, ErrorStatus1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_DataPort(_b) IPAQ_ASIC3_SD( _b, u16, DataPort ) /* */
++#define IPAQ_ASIC3_SD_CTRL_TransactionCtrl(_b) IPAQ_ASIC3_SD( _b, u16, TransactionCtrl ) /* */
++#define IPAQ_ASIC3_SD_CTRL_SoftwareReset(_b) IPAQ_ASIC3_SD( _b, u16, SoftwareReset ) /* */
++
++#define SD_CTRL_SOFTWARE_RESET_CLEAR (1<<0)
++
++#define SD_CTRL_TRANSACTIONCONTROL_SET (1<<8) // 0x0100
++
++#define SD_CTRL_CARDCLOCKCONTROL_FOR_SD_CARD (1<<15)// 0x8000
++#define SD_CTRL_CARDCLOCKCONTROL_ENABLE_CLOCK (1<<8) // 0x0100
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_512 (1<<7) // 0x0080
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_256 (1<<6) // 0x0040
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_128 (1<<5) // 0x0020
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_64 (1<<4) // 0x0010
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_32 (1<<3) // 0x0008
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_16 (1<<2) // 0x0004
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_8 (1<<1) // 0x0002
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_4 (1<<0) // 0x0001
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_2 (0<<0) // 0x0000
++
++#define MEM_CARD_OPTION_REQUIRED 0x000e
++#define MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(x) (((x)&0x0f)<<4) /* Four bits */
++#define MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT (1<<14) // 0x4000
++#define MEM_CARD_OPTION_DATA_XFR_WIDTH_1 (1<<15) // 0x8000
++#define MEM_CARD_OPTION_DATA_XFR_WIDTH_4 (0<<15) //~0x8000
++
++#define SD_CTRL_COMMAND_INDEX(x) ((x)&0x3f) /* 0=CMD0, 1=CMD1, ..., 63=CMD63 */
++#define SD_CTRL_COMMAND_TYPE_CMD (0 << 6)
++#define SD_CTRL_COMMAND_TYPE_ACMD (1 << 6)
++#define SD_CTRL_COMMAND_TYPE_AUTHENTICATION (2 << 6)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_NORMAL (0 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1 (4 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1B (5 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R2 (6 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R3 (7 << 8)
++#define SD_CTRL_COMMAND_DATA_PRESENT (1 << 11)
++#define SD_CTRL_COMMAND_TRANSFER_READ (1 << 12)
++#define SD_CTRL_COMMAND_TRANSFER_WRITE (0 << 12)
++#define SD_CTRL_COMMAND_MULTI_BLOCK (1 << 13)
++#define SD_CTRL_COMMAND_SECURITY_CMD (1 << 14)
++
++#define SD_CTRL_STOP_INTERNAL_ISSSUE_CMD12 (1 << 0)
++#define SD_CTRL_STOP_INTERNAL_AUTO_ISSUE_CMD12 (1 << 8)
++
++#define SD_CTRL_CARDSTATUS_RESPONSE_END (1 << 0)
++#define SD_CTRL_CARDSTATUS_RW_END (1 << 2)
++#define SD_CTRL_CARDSTATUS_CARD_REMOVED_0 (1 << 3)
++#define SD_CTRL_CARDSTATUS_CARD_INSERTED_0 (1 << 4)
++#define SD_CTRL_CARDSTATUS_SIGNAL_STATE_PRESENT_0 (1 << 5)
++#define SD_CTRL_CARDSTATUS_WRITE_PROTECT (1 << 7)
++#define SD_CTRL_CARDSTATUS_CARD_REMOVED_3 (1 << 8)
++#define SD_CTRL_CARDSTATUS_CARD_INSERTED_3 (1 << 9)
++#define SD_CTRL_CARDSTATUS_SIGNAL_STATE_PRESENT_3 (1 << 10)
++
++#define SD_CTRL_BUFFERSTATUS_CMD_INDEX_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_BUFFERSTATUS_CRC_ERROR (1 << 1) // 0x0002
++#define SD_CTRL_BUFFERSTATUS_STOP_BIT_END_ERROR (1 << 2) // 0x0004
++#define SD_CTRL_BUFFERSTATUS_DATA_TIMEOUT (1 << 3) // 0x0008
++#define SD_CTRL_BUFFERSTATUS_BUFFER_OVERFLOW (1 << 4) // 0x0010
++#define SD_CTRL_BUFFERSTATUS_BUFFER_UNDERFLOW (1 << 5) // 0x0020
++#define SD_CTRL_BUFFERSTATUS_CMD_TIMEOUT (1 << 6) // 0x0040
++#define SD_CTRL_BUFFERSTATUS_UNK7 (1 << 7) // 0x0080
++#define SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE (1 << 8) // 0x0100
++#define SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE (1 << 9) // 0x0200
++#define SD_CTRL_BUFFERSTATUS_ILLEGAL_FUNCTION (1 << 13)// 0x2000
++#define SD_CTRL_BUFFERSTATUS_CMD_BUSY (1 << 14)// 0x4000
++#define SD_CTRL_BUFFERSTATUS_ILLEGAL_ACCESS (1 << 15)// 0x8000
++
++#define SD_CTRL_INTMASKCARD_RESPONSE_END (1 << 0) // 0x0001
++#define SD_CTRL_INTMASKCARD_RW_END (1 << 2) // 0x0004
++#define SD_CTRL_INTMASKCARD_CARD_REMOVED_0 (1 << 3) // 0x0008
++#define SD_CTRL_INTMASKCARD_CARD_INSERTED_0 (1 << 4) // 0x0010
++#define SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_0 (1 << 5) // 0x0020
++#define SD_CTRL_INTMASKCARD_UNK6 (1 << 6) // 0x0040
++#define SD_CTRL_INTMASKCARD_WRITE_PROTECT (1 << 7) // 0x0080
++#define SD_CTRL_INTMASKCARD_CARD_REMOVED_3 (1 << 8) // 0x0100
++#define SD_CTRL_INTMASKCARD_CARD_INSERTED_3 (1 << 9) // 0x0200
++#define SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_3 (1 << 10)// 0x0400
++
++#define SD_CTRL_INTMASKBUFFER_CMD_INDEX_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_INTMASKBUFFER_CRC_ERROR (1 << 1) // 0x0002
++#define SD_CTRL_INTMASKBUFFER_STOP_BIT_END_ERROR (1 << 2) // 0x0004
++#define SD_CTRL_INTMASKBUFFER_DATA_TIMEOUT (1 << 3) // 0x0008
++#define SD_CTRL_INTMASKBUFFER_BUFFER_OVERFLOW (1 << 4) // 0x0010
++#define SD_CTRL_INTMASKBUFFER_BUFFER_UNDERFLOW (1 << 5) // 0x0020
++#define SD_CTRL_INTMASKBUFFER_CMD_TIMEOUT (1 << 6) // 0x0040
++#define SD_CTRL_INTMASKBUFFER_UNK7 (1 << 7) // 0x0080
++#define SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE (1 << 8) // 0x0100
++#define SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE (1 << 9) // 0x0200
++#define SD_CTRL_INTMASKBUFFER_ILLEGAL_FUNCTION (1 << 13)// 0x2000
++#define SD_CTRL_INTMASKBUFFER_CMD_BUSY (1 << 14)// 0x4000
++#define SD_CTRL_INTMASKBUFFER_ILLEGAL_ACCESS (1 << 15)// 0x8000
++
++#define SD_CTRL_DETAIL0_RESPONSE_CMD_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_RESPONSE_NON_CMD12 (1 << 2) // 0x0004
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_RESPONSE_CMD12 (1 << 3) // 0x0008
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_READ_DATA (1 << 4) // 0x0010
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_WRITE_CRC_STATUS (1 << 5) // 0x0020
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_RESPONSE_NON_CMD12 (1 << 8) // 0x0100
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_RESPONSE_CMD12 (1 << 9) // 0x0200
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_READ_DATA (1 << 10)// 0x0400
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_WRITE_CMD (1 << 11)// 0x0800
++
++#define SD_CTRL_DETAIL1_NO_CMD_RESPONSE (1 << 0) // 0x0001
++#define SD_CTRL_DETAIL1_TIMEOUT_READ_DATA (1 << 4) // 0x0010
++#define SD_CTRL_DETAIL1_TIMEOUT_CRS_STATUS (1 << 5) // 0x0020
++#define SD_CTRL_DETAIL1_TIMEOUT_CRC_BUSY (1 << 6) // 0x0040
++
++#define _IPAQ_ASIC3_SDIO_CTRL_Base 0x1200
++
++#define IPAQ_ASIC3_SDIO(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SDIO_CTRL_Base + (_IPAQ_ASIC3_SDIO_CTRL_ ## x))))
++
++#define _IPAQ_ASIC3_SDIO_CTRL_Cmd 0x00
++#define _IPAQ_ASIC3_SDIO_CTRL_CardPortSel 0x04
++#define _IPAQ_ASIC3_SDIO_CTRL_Arg0 0x08
++#define _IPAQ_ASIC3_SDIO_CTRL_Arg1 0x0C
++#define _IPAQ_ASIC3_SDIO_CTRL_TransferBlockCount 0x14
++#define _IPAQ_ASIC3_SDIO_CTRL_Response0 0x18
++#define _IPAQ_ASIC3_SDIO_CTRL_Response1 0x1C
++#define _IPAQ_ASIC3_SDIO_CTRL_Response2 0x20
++#define _IPAQ_ASIC3_SDIO_CTRL_Response3 0x24
++#define _IPAQ_ASIC3_SDIO_CTRL_Response4 0x28
++#define _IPAQ_ASIC3_SDIO_CTRL_Response5 0x2C
++#define _IPAQ_ASIC3_SDIO_CTRL_Response6 0x30
++#define _IPAQ_ASIC3_SDIO_CTRL_Response7 0x34
++#define _IPAQ_ASIC3_SDIO_CTRL_CardStatus 0x38
++#define _IPAQ_ASIC3_SDIO_CTRL_BufferCtrl 0x3C
++#define _IPAQ_ASIC3_SDIO_CTRL_IntMaskCard 0x40
++#define _IPAQ_ASIC3_SDIO_CTRL_IntMaskBuffer 0x44
++#define _IPAQ_ASIC3_SDIO_CTRL_CardXferDataLen 0x4C
++#define _IPAQ_ASIC3_SDIO_CTRL_CardOptionSetup 0x50
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorStatus0 0x54
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorStatus1 0x58
++#define _IPAQ_ASIC3_SDIO_CTRL_DataPort 0x60
++#define _IPAQ_ASIC3_SDIO_CTRL_TransactionCtrl 0x68
++#define _IPAQ_ASIC3_SDIO_CTRL_CardIntCtrl 0x6C
++#define _IPAQ_ASIC3_SDIO_CTRL_ClocknWaitCtrl 0x70
++#define _IPAQ_ASIC3_SDIO_CTRL_HostInformation 0x74
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorCtrl 0x78
++#define _IPAQ_ASIC3_SDIO_CTRL_LEDCtrl 0x7C
++#define _IPAQ_ASIC3_SDIO_CTRL_SoftwareReset 0x1C0
++
++#define IPAQ_ASIC3_SDIO_CTRL_Cmd(_b) IPAQ_ASIC3_SDIO( _b, u16, Cmd ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardPortSel(_b) IPAQ_ASIC3_SDIO( _b, u16, CardPortSel ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Arg0(_b) IPAQ_ASIC3_SDIO( _b, u16, Arg0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Arg1(_b) IPAQ_ASIC3_SDIO( _b, u16, Arg1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_TransferBlockCount(_b) IPAQ_ASIC3_SDIO( _b, u16, TransferBlockCount ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response0(_b) IPAQ_ASIC3_SDIO( _b, u16, Response0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response1(_b) IPAQ_ASIC3_SDIO( _b, u16, Response1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response2(_b) IPAQ_ASIC3_SDIO( _b, u16, Response2 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response3(_b) IPAQ_ASIC3_SDIO( _b, u16, Response3 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response4(_b) IPAQ_ASIC3_SDIO( _b, u16, Response4 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response5(_b) IPAQ_ASIC3_SDIO( _b, u16, Response5 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response6(_b) IPAQ_ASIC3_SDIO( _b, u16, Response6 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response7(_b) IPAQ_ASIC3_SDIO( _b, u16, Response7 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardStatus(_b) IPAQ_ASIC3_SDIO( _b, u16, CardStatus ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_BufferCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, BufferCtrl ) /* and error status*/
++#define IPAQ_ASIC3_SDIO_CTRL_IntMaskCard(_b) IPAQ_ASIC3_SDIO( _b, u16, IntMaskCard ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_IntMaskBuffer(_b) IPAQ_ASIC3_SDIO( _b, u16, IntMaskBuffer ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardXferDataLen(_b) IPAQ_ASIC3_SDIO( _b, u16, CardXferDataLen ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardOptionSetup(_b) IPAQ_ASIC3_SDIO( _b, u16, CardOptionSetup ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorStatus0(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorStatus0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorStatus1(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorStatus1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_DataPort(_b) IPAQ_ASIC3_SDIO( _b, u16, DataPort ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_TransactionCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, TransactionCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardIntCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, CardIntCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ClocknWaitCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, ClocknWaitCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_HostInformation(_b) IPAQ_ASIC3_SDIO( _b, u16, HostInformation ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_LEDCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, LEDCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_SoftwareReset(_b) IPAQ_ASIC3_SDIO( _b, u16, SoftwareReset ) /* */
++
++#define IPAQ_ASIC3_MAP_SIZE 0x2000
++
++#endif
+Index: linux-2.6.26-rc4/include/linux/gpiodev.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/linux/gpiodev.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,44 @@
++#ifndef __GPIODEV_H
++#define __GPIODEV_H
++
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <asm/gpio.h>
++
++/* Interface */
++
++/* This structure must be first member of device platform_data structure
++ of a device which provides gpiodev interface. All method pointers
++ must be non-NULL, so stubs must be used for non-implemented ones. */
++struct gpiodev_ops {
++ int (*get)(struct device *this, unsigned gpio_no);
++ void (*set)(struct device *this, unsigned gpio_no, int val);
++ int (*to_irq)(struct device *this, unsigned gpio_no);
++};
++
++/* Generalized GPIO structure */
++
++struct gpio {
++ struct device *gpio_dev;
++ unsigned gpio_no;
++};
++
++/* API functions */
++
++static inline int gpiodev_get_value(struct gpio *gpio)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ return ops->get(gpio->gpio_dev, gpio->gpio_no);
++}
++static inline void gpiodev_set_value(struct gpio *gpio, int val)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ ops->set(gpio->gpio_dev, gpio->gpio_no, val);
++}
++static inline int gpiodev_to_irq(struct gpio *gpio)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ return ops->to_irq(gpio->gpio_dev, gpio->gpio_no);
++}
++
++#endif /* __GPIODEV_H */
+Index: linux-2.6.26-rc4/include/linux/input_pda.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/linux/input_pda.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,47 @@
++#ifndef _INPUT_PDA_H
++#define _INPUT_PDA_H
++
++/*
++ * This is temporary virtual button key codes map
++ * for keyboardless handheld computers.
++ * Its purpose is to provide map common to all devices
++ * and known to work with current software and its bugs
++ * and misfeatures. Once issues with the software are
++ * solved, codes from input.h will be used directly
++ * (missing key definitions will be added).
++ */
++
++/* Some directly usable keycodes:
++KEY_POWER - Power/suspend button
++KEY_ENTER - Enter/Action/Central button on joypad
++KEY_UP
++KEY_DOWN
++KEY_LEFT
++KEY_RIGHT
++*/
++
++/* XXX Instead of using any values in include/linux/input.h, we have to use
++ use values < 128 due to some munging that kdrive does to get keystrokes.
++ When kdrive gets its key events from evdev instead of the console,
++ we should be able to switch to using input.h values and get rid of
++ xmodmap. */
++
++#define _KEY_APP1 KEY_F9 // xmodmap sees 67 + 8 = 75
++#define _KEY_APP2 KEY_F10 // xmodmap 76
++#define _KEY_APP3 KEY_F11 // xmodmap 95
++#define _KEY_APP4 KEY_F12 // xmodmap 96
++
++#define _KEY_RECORD KEY_RO
++
++/* It is highly recommended to use exactly 4 codes above for
++ 4 buttons the device has. This will ensure that console and
++ framebuffer applications (e.g. games) will work ok on all
++ devices. If you'd like more distinguishable names, following
++ convenience defines are provided, suiting many devices. */
++
++#define _KEY_CALENDAR _KEY_APP1
++#define _KEY_CONTACTS _KEY_APP2
++#define _KEY_MAIL _KEY_APP3
++#define _KEY_HOMEPAGE _KEY_APP4
++
++#endif
+Index: linux-2.6.26-rc4/include/linux/soc/asic3_base.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/linux/soc/asic3_base.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,104 @@
++#include <asm/types.h>
++#include <linux/gpiodev.h>
++
++/* Private API - for ASIC3 devices internal use only */
++#define HDR_IPAQ_ASIC3_ACTION(ACTION,action,fn,FN) \
++u32 asic3_get_gpio_ ## action ## _ ## fn (struct device *dev); \
++void asic3_set_gpio_ ## action ## _ ## fn (struct device *dev, u32 bits, u32 val);
++
++#define HDR_IPAQ_ASIC3_FN(fn,FN) \
++ HDR_IPAQ_ASIC3_ACTION ( MASK,mask,fn,FN) \
++ HDR_IPAQ_ASIC3_ACTION ( DIR, dir, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( OUT, out, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( LEVELTRI, trigtype, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( RISING, rising, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( LEVEL, triglevel, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_MASK, sleepmask, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_OUT, sleepout, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( BATT_FAULT_OUT, battfaultout, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( INT_STATUS, intstatus, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( ALT_FUNCTION, alt_fn, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_CONF, sleepconf, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( STATUS, status, fn, FN)
++
++/* Public API */
++
++#define ASIC3_GPIOA_IRQ_BASE 0
++#define ASIC3_GPIOB_IRQ_BASE 16
++#define ASIC3_GPIOC_IRQ_BASE 32
++#define ASIC3_GPIOD_IRQ_BASE 48
++#define ASIC3_LED0_IRQ 64
++#define ASIC3_LED1_IRQ 65
++#define ASIC3_LED2_IRQ 66
++#define ASIC3_SPI_IRQ 67
++#define ASIC3_SMBUS_IRQ 68
++#define ASIC3_OWM_IRQ 69
++
++#define ASIC3_NR_GPIO_IRQS 64 /* 16 bits each GPIO A...D banks */
++#define ASIC3_NR_IRQS (ASIC3_OWM_IRQ + 1)
++
++extern int asic3_irq_base(struct device *dev);
++
++extern void asic3_write_register(struct device *dev, unsigned int reg,
++ u32 value);
++extern u32 asic3_read_register(struct device *dev, unsigned int reg);
++
++/* old clock api */
++extern void asic3_set_clock_sel(struct device *dev, u32 bits, u32 val);
++extern u32 asic3_get_clock_cdex(struct device *dev);
++extern void asic3_set_clock_cdex(struct device *dev, u32 bits, u32 val);
++
++extern void asic3_set_extcf_select(struct device *dev, u32 bits, u32 val);
++extern void asic3_set_extcf_reset(struct device *dev, u32 bits, u32 val);
++extern void asic3_set_sdhwctrl(struct device *dev, u32 bits, u32 val);
++
++extern void asic3_set_led(struct device *dev, int led_num, int duty_time,
++ int cycle_time, int timebase);
++
++extern int asic3_register_mmc(struct device *dev);
++extern int asic3_unregister_mmc(struct device *dev);
++
++/* Accessors for GPIO banks */
++HDR_IPAQ_ASIC3_FN(a, A)
++HDR_IPAQ_ASIC3_FN(b, B)
++HDR_IPAQ_ASIC3_FN(c, C)
++HDR_IPAQ_ASIC3_FN(d, D)
++
++#define _IPAQ_ASIC3_GPIO_BANK_A 0
++#define _IPAQ_ASIC3_GPIO_BANK_B 1
++#define _IPAQ_ASIC3_GPIO_BANK_C 2
++#define _IPAQ_ASIC3_GPIO_BANK_D 3
++
++#define ASIC3_GPIO_bit(gpio) (1 << (gpio & 0xf))
++
++extern int asic3_get_gpio_bit(struct device *dev, int gpio);
++extern void asic3_set_gpio_bit(struct device *dev, int gpio, int val);
++extern int asic3_gpio_get_value(struct device *dev, unsigned gpio);
++extern void asic3_gpio_set_value(struct device *dev, unsigned gpio, int val);
++
++
++struct tmio_mmc_hwconfig;
++
++struct asic3_platform_data
++{
++ // Must be first member
++ struct gpiodev_ops gpiodev_ops;
++
++ struct {
++ u32 dir;
++ u32 init;
++ u32 sleep_mask;
++ u32 sleep_out;
++ u32 batt_fault_out;
++ u32 sleep_conf;
++ u32 alt_function;
++ } gpio_a, gpio_b, gpio_c, gpio_d;
++
++ int irq_base;
++ unsigned int bus_shift;
++
++ struct platform_device **child_platform_devs;
++ int num_child_platform_devs;
++
++ struct tmio_mmc_hwconfig *tmio_mmc_hwconfig;
++};
+Index: linux-2.6.26-rc4/include/linux/soc/tmio_mmc.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/linux/soc/tmio_mmc.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,17 @@
++#include <linux/platform_device.h>
++
++#define MMC_CLOCK_DISABLED 0
++#define MMC_CLOCK_ENABLED 1
++
++#define TMIO_WP_ALWAYS_RW ((void*)-1)
++
++struct tmio_mmc_hwconfig {
++ void (*hwinit)(struct platform_device *sdev);
++ void (*set_mmc_clock)(struct platform_device *sdev, int state);
++
++ /* NULL - use ASIC3 signal,
++ TMIO_WP_ALWAYS_RW - assume always R/W (e.g. miniSD)
++ otherwise - machine-specific handler */
++ int (*mmc_get_ro)(struct platform_device *pdev);
++ short address_shift;
++};
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa-regs.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/pxa-regs.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa-regs.h 2008-06-01 18:49:45.000000000 +0100
+@@ -1117,6 +1117,8 @@
+ #define PWM_PWDUTY1 __REG(0x40C00004) /* PWM 1 Duty Cycle Register */
+ #define PWM_PERVAL1 __REG(0x40C00008) /* PWM 1 Period Control Register */
+
++#define LCCR4_13M_PCD_EN (1<<25) /* 13M PCD enable */
++#define LCCR4_PCDDIV (1<<31) /* PCD selection */
+
+ /*
+ * Interrupt Controller
+Index: linux-2.6.26-rc4/drivers/mmc/host/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/mmc/host/Kconfig 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/mmc/host/Kconfig 2008-06-01 18:49:45.000000000 +0100
+@@ -130,3 +130,9 @@
+
+ If unsure, or if your system has no SPI master driver, say N.
+
++config MMC_ASIC3
++ tristate "HTC ASIC3 SD/MMC support"
++ depends on MMC && HTC_ASIC3
++ help
++ This provides support for the ASIC3 SD/MMC controller, used
++ in the iPAQ hx4700 and others.
+Index: linux-2.6.26-rc4/drivers/mmc/host/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/mmc/host/Makefile 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/mmc/host/Makefile 2008-06-01 18:49:45.000000000 +0100
+@@ -13,6 +13,7 @@
+ obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o
+ obj-$(CONFIG_MMC_WBSD) += wbsd.o
+ obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
++obj-$(CONFIG_MMC_ASIC3) += asic3_mmc.o
+ obj-$(CONFIG_MMC_OMAP) += omap.o
+ obj-$(CONFIG_MMC_AT91) += at91_mci.o
+ obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
+Index: linux-2.6.26-rc4/drivers/mmc/host/asic3_mmc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mmc/host/asic3_mmc.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,900 @@
++/* Note that this driver can likely be merged into the tmio driver, so
++ * consider this code temporary. It works, though.
++ */
++/*
++ * linux/drivers/mmc/asic3_mmc.c
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * based on tmio_mmc.c
++ * Copyright (C) 2004 Ian Molton
++ *
++ * Refactored to support all ASIC3 devices, 2006 Paul Sokolovsky
++ *
++ * 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 the SD / SDIO cell found in:
++ *
++ * TC6393XB
++ *
++ * This driver draws mainly on scattered spec sheets, Reverse engineering
++ * of the toshiba e800 SD driver and some parts of the 2.4 ASIC3 driver (4 bit
++ * support).
++ *
++ * Supports MMC 1 bit transfers and SD 1 and 4 bit modes.
++ *
++ * TODO:
++ * Eliminate FIXMEs
++ * SDIO support
++ * Power management
++ * Handle MMC errors (at all)
++ *
++ */
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/blkdev.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++#include <linux/mmc/mmc.h>
++#include <linux/mmc/host.h>
++#include <linux/mmc/card.h>
++//#include <linux/mmc/protocol.h>
++#include <linux/mmc/sd.h>
++#include <linux/scatterlist.h>
++//#include <linux/soc-old.h>
++#include <linux/soc/asic3_base.h>
++#include <linux/soc/tmio_mmc.h>
++
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/mach/irq.h>
++#include <linux/clk.h>
++#include <asm/mach-types.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include "asic3_mmc.h"
++
++struct asic3_mmc_host {
++ void *ctl_base;
++ struct device *asic3_dev; /* asic3 device */
++ struct tmio_mmc_hwconfig *hwconfig; /* HW config data/handlers, guaranteed != NULL */
++ unsigned long bus_shift;
++ struct mmc_command *cmd;
++ struct mmc_request *mrq;
++ struct mmc_data *data;
++ struct mmc_host *mmc;
++ int irq;
++ unsigned short clock_for_sd;
++
++ /* I/O related stuff */
++ struct scatterlist *sg_ptr;
++ unsigned int sg_len;
++ unsigned int sg_off;
++};
++
++static void
++mmc_finish_request(struct asic3_mmc_host *host)
++{
++ struct mmc_request *mrq = host->mrq;
++
++ /* Write something to end the command */
++ host->mrq = NULL;
++ host->cmd = NULL;
++ host->data = NULL;
++
++ mmc_request_done(host->mmc, mrq);
++}
++
++
++#define ASIC3_MMC_REG(host, block, reg) (*((volatile u16 *) ((host->ctl_base) + ((_IPAQ_ASIC3_## block ## _Base + _IPAQ_ASIC3_ ## block ## _ ## reg) >> (2 - host->bus_shift))) ))
++
++static void
++mmc_start_command(struct asic3_mmc_host *host, struct mmc_command *cmd)
++{
++ struct mmc_data *data = host->data;
++ int c = cmd->opcode;
++
++ DBG("Opcode: %d, base: %p\n", cmd->opcode, host->ctl_base);
++
++ if(cmd->opcode == MMC_STOP_TRANSMISSION) {
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = SD_CTRL_STOP_INTERNAL_ISSSUE_CMD12;
++ cmd->resp[0] = cmd->opcode;
++ cmd->resp[1] = 0;
++ cmd->resp[2] = 0;
++ cmd->resp[3] = 0;
++ cmd->resp[4] = 0;
++ return;
++ }
++
++ switch(cmd->flags & 0x1f) {
++ case MMC_RSP_NONE: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_NORMAL; break;
++ case MMC_RSP_R1: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1; break;
++ case MMC_RSP_R1B: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1B; break;
++ case MMC_RSP_R2: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R2; break;
++ case MMC_RSP_R3: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R3; break;
++ default:
++ DBG("Unknown response type %d\n", cmd->flags & 0x1f);
++ break;
++ }
++
++ host->cmd = cmd;
++
++ if(cmd->opcode == MMC_APP_CMD) {
++ c |= APP_CMD;
++ }
++ if (cmd->opcode == MMC_GO_IDLE_STATE) {
++ c |= (3 << 8); /* This was removed from ipaq-asic3.h for some reason */
++ }
++ if(data) {
++ c |= SD_CTRL_COMMAND_DATA_PRESENT;
++ if(data->blocks > 1) {
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = SD_CTRL_STOP_INTERNAL_AUTO_ISSUE_CMD12;
++ c |= SD_CTRL_COMMAND_MULTI_BLOCK;
++ }
++ if(data->flags & MMC_DATA_READ) {
++ c |= SD_CTRL_COMMAND_TRANSFER_READ;
++ }
++ /* MMC_DATA_WRITE does not require a bit to be set */
++ }
++
++ /* Enable the command and data interrupts */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0
++#if 0
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_3
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_3
++#endif
++ );
++
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) = ~(
++ SD_CTRL_INTMASKBUFFER_UNK7
++ | SD_CTRL_INTMASKBUFFER_CMD_BUSY
++#if 0
++ | SD_CTRL_INTMASKBUFFER_CMD_INDEX_ERROR
++ | SD_CTRL_INTMASKBUFFER_CRC_ERROR
++ | SD_CTRL_INTMASKBUFFER_STOP_BIT_END_ERROR
++ | SD_CTRL_INTMASKBUFFER_DATA_TIMEOUT
++ | SD_CTRL_INTMASKBUFFER_BUFFER_OVERFLOW
++ | SD_CTRL_INTMASKBUFFER_BUFFER_UNDERFLOW
++ | SD_CTRL_INTMASKBUFFER_CMD_TIMEOUT
++ | SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE
++ | SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE
++ | SD_CTRL_INTMASKBUFFER_ILLEGAL_ACCESS
++#endif
++ );
++
++ /* Send the command */
++ ASIC3_MMC_REG(host, SD_CTRL, Arg1) = cmd->arg >> 16;
++ ASIC3_MMC_REG(host, SD_CTRL, Arg0) = cmd->arg & 0xffff;
++ ASIC3_MMC_REG(host, SD_CTRL, Cmd) = c;
++}
++
++/* This chip always returns (at least?) as much data as you ask for. I'm
++ * unsure what happens if you ask for less than a block. This should be looked
++ * into to ensure that a funny length read doesnt mess up the controller data
++ * state machine.
++ *
++ * Aric: Statement above may not apply to ASIC3.
++ *
++ * FIXME - this chip cannot do 1 and 2 byte data requests in 4 bit mode
++ *
++ * Aric: Statement above may not apply to ASIC3.
++ */
++
++static struct tasklet_struct mmc_data_read_tasklet;
++
++static void
++mmc_data_transfer(unsigned long h)
++{
++ struct asic3_mmc_host *host = (struct asic3_mmc_host *)h;
++ struct mmc_data *data = host->data;
++ unsigned short *buf;
++ int count;
++ /* unsigned long flags; */
++
++ if(!data){
++ printk(KERN_WARNING DRIVER_NAME ": Spurious Data IRQ\n");
++ return;
++ }
++
++ /* local_irq_save(flags); */
++ /* buf = kmap_atomic(host->sg_ptr->page, KM_BIO_SRC_IRQ); */
++ buf = kmap(host->sg_ptr->page);
++ buf += host->sg_ptr->offset/2 + host->sg_off/2;
++
++ /*
++ * Ensure we dont read more than one block. The chip will interrupt us
++ * When the next block is available.
++ */
++ count = host->sg_ptr->length - host->sg_off;
++ if(count > data->blksz) {
++ count = data->blksz;
++ }
++
++ DBG("count: %08x, page: %p, offset: %08x flags %08x\n",
++ count, host->sg_ptr->page, host->sg_off, data->flags);
++
++ host->sg_off += count;
++
++ /* Transfer the data */
++ if(data->flags & MMC_DATA_READ) {
++ while(count > 0) {
++ /* Read two bytes from SD/MMC controller. */
++ *buf = ASIC3_MMC_REG(host, SD_CTRL, DataPort);
++ buf++;
++ count -= 2;
++ }
++ //flush_dcache_page(host->sg_ptr->page);
++ } else {
++ while(count > 0) {
++ /* Write two bytes to SD/MMC controller. */
++ ASIC3_MMC_REG(host, SD_CTRL, DataPort) = *buf;
++ buf++;
++ count -= 2;
++ }
++ }
++
++ /* kunmap_atomic(host->sg_ptr->page, KM_BIO_SRC_IRQ); */
++ kunmap(host->sg_ptr->page);
++ /* local_irq_restore(flags); */
++ if(host->sg_off == host->sg_ptr->length) {
++ host->sg_ptr++;
++ host->sg_off = 0;
++ --host->sg_len;
++ }
++
++ return;
++}
++
++static void
++mmc_data_end_irq(struct asic3_mmc_host *host)
++{
++ struct mmc_data *data = host->data;
++
++ host->data = NULL;
++
++ if(!data){
++ printk(KERN_WARNING DRIVER_NAME ": Spurious data end IRQ\n");
++ return;
++ }
++
++ if (data->error == MMC_ERR_NONE) {
++ data->bytes_xfered = data->blocks * data->blksz;
++ } else {
++ data->bytes_xfered = 0;
++ }
++
++ DBG("Completed data request\n");
++
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = 0;
++
++ /* Make sure read enable interrupt and write enable interrupt are disabled */
++ if(data->flags & MMC_DATA_READ) {
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) |= SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE;
++ } else {
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) |= SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE;
++ }
++
++ mmc_finish_request(host);
++}
++
++static void
++mmc_cmd_irq(struct asic3_mmc_host *host, unsigned int buffer_stat)
++{
++ struct mmc_command *cmd = host->cmd;
++ u8 *buf = (u8 *)cmd->resp;
++ u16 data;
++
++ if(!host->cmd) {
++ printk(KERN_WARNING DRIVER_NAME ": Spurious CMD irq\n");
++ return;
++ }
++
++ host->cmd = NULL;
++ if(cmd->flags & MMC_RSP_PRESENT && cmd->flags & MMC_RSP_136) {
++ /* R2 */
++ buf[12] = 0xff;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response0);
++ buf[13] = data & 0xff;
++ buf[14] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response1);
++ buf[15] = data & 0xff;
++ buf[8] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response2);
++ buf[9] = data & 0xff;
++ buf[10] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response3);
++ buf[11] = data & 0xff;
++ buf[4] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response4);
++ buf[5] = data & 0xff;
++ buf[6] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response5);
++ buf[7] = data & 0xff;
++ buf[0] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response6);
++ buf[1] = data & 0xff;
++ buf[2] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response7);
++ buf[3] = data & 0xff;
++ } else if(cmd->flags & MMC_RSP_PRESENT) {
++ /* R1, R1B, R3 */
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response0);
++ buf[0] = data & 0xff;
++ buf[1] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response1);
++ buf[2] = data & 0xff;
++ buf[3] = data >> 8;
++ }
++ DBG("Response: %08x %08x %08x %08x\n", cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]);
++
++ if(buffer_stat & SD_CTRL_BUFFERSTATUS_CMD_TIMEOUT) {
++ cmd->error = MMC_ERR_TIMEOUT;
++ } else if((buffer_stat & SD_CTRL_BUFFERSTATUS_CRC_ERROR) && (cmd->flags & MMC_RSP_CRC)) {
++ cmd->error = MMC_ERR_BADCRC;
++ } else if(buffer_stat &
++ (
++ SD_CTRL_BUFFERSTATUS_ILLEGAL_ACCESS
++ | SD_CTRL_BUFFERSTATUS_CMD_INDEX_ERROR
++ | SD_CTRL_BUFFERSTATUS_STOP_BIT_END_ERROR
++ | SD_CTRL_BUFFERSTATUS_BUFFER_OVERFLOW
++ | SD_CTRL_BUFFERSTATUS_BUFFER_UNDERFLOW
++ | SD_CTRL_BUFFERSTATUS_DATA_TIMEOUT
++ )
++ ) {
++ DBG("Buffer status ERROR 0x%04x - inside check buffer\n", buffer_stat);
++ DBG("detail0 error status 0x%04x\n", ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus0));
++ DBG("detail1 error status 0x%04x\n", ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus1));
++ cmd->error = MMC_ERR_FAILED;
++ }
++
++ if(cmd->error == MMC_ERR_NONE) {
++ switch (cmd->opcode) {
++ case SD_APP_SET_BUS_WIDTH:
++ if(cmd->arg == SD_BUS_WIDTH_4) {
++ host->clock_for_sd = SD_CTRL_CARDCLOCKCONTROL_FOR_SD_CARD;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_4;
++ } else {
++ host->clock_for_sd = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1;
++ }
++ break;
++ case MMC_SELECT_CARD:
++ if((cmd->arg >> 16) == 0) {
++ /* We have been deselected. */
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1;
++ }
++ }
++ }
++
++ /*
++ * If there is data to handle we enable data IRQs here, and we will
++ * ultimatley finish the request in the mmc_data_end_irq handler.
++ */
++ if(host->data && (cmd->error == MMC_ERR_NONE)){
++ if(host->data->flags & MMC_DATA_READ) {
++ /* Enable the read enable interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &=
++ ~SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE;
++ } else {
++ /* Enable the write enable interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &=
++ ~SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE;
++ }
++ } else {
++ /* There's no data, or we encountered an error, so finish now. */
++ mmc_finish_request(host);
++ }
++
++ return;
++}
++
++static void hwinit2_irqsafe(struct asic3_mmc_host *host);
++
++static irqreturn_t
++mmc_irq(int irq, void *irq_desc)
++{
++ struct asic3_mmc_host *host;
++ unsigned int breg, bmask, bstatus, creg, cmask, cstatus;
++
++ host = irq_desc;
++
++ /* asic3 bstatus has errors */
++ bstatus = ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl);
++ bmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer);
++ cstatus = ASIC3_MMC_REG(host, SD_CTRL, CardStatus);
++ cmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard);
++ breg = bstatus & ~bmask & ~DONT_CARE_BUFFER_BITS;
++ creg = cstatus & ~cmask & ~DONT_CARE_CARD_BITS;
++
++ if (!breg && !creg) {
++ /* This occurs sometimes for no known reason. It doesn't hurt
++ * anything, so I don't print it. */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &= ~breg;
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) &= ~creg;
++ goto out;
++ }
++
++ while (breg || creg) {
++
++ /* XXX TODO: Need to handle errors in breg here. */
++
++ /*
++ * Card insert/remove. The mmc controlling code is stateless. That
++ * is, it doesn't care if it was an insert or a remove. It treats
++ * both the same.
++ */
++ /* XXX Asic3 has _3 versions of these status bits, too, for a second slot, perhaps? */
++ if (creg & (SD_CTRL_CARDSTATUS_CARD_INSERTED_0 | SD_CTRL_CARDSTATUS_CARD_REMOVED_0)) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &=
++ ~(SD_CTRL_CARDSTATUS_CARD_REMOVED_0 | SD_CTRL_CARDSTATUS_CARD_INSERTED_0);
++ if(creg & SD_CTRL_CARDSTATUS_CARD_INSERTED_0) {
++ hwinit2_irqsafe(host);
++ }
++ mmc_detect_change(host->mmc,1);
++ }
++
++ /* Command completion */
++ if (creg & SD_CTRL_CARDSTATUS_RESPONSE_END) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &=
++ ~(SD_CTRL_CARDSTATUS_RESPONSE_END);
++ mmc_cmd_irq(host, bstatus);
++ }
++
++ /* Data transfer */
++ if (breg & (SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE | SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE)) {
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) &=
++ ~(SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE | SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE);
++ tasklet_schedule(&mmc_data_read_tasklet);
++ }
++
++ /* Data transfer completion */
++ if (creg & SD_CTRL_CARDSTATUS_RW_END) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &= ~(SD_CTRL_CARDSTATUS_RW_END);
++ mmc_data_end_irq(host);
++ }
++
++ /* Check status - keep going until we've handled it all */
++ bstatus = ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl);
++ bmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer);
++ cstatus = ASIC3_MMC_REG(host, SD_CTRL, CardStatus);
++ cmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard);
++ breg = bstatus & ~bmask & ~DONT_CARE_BUFFER_BITS;
++ creg = cstatus & ~cmask & ~DONT_CARE_CARD_BITS;
++ }
++
++out:
++ /* Ensure all interrupt sources are cleared */
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) = 0;
++ return IRQ_HANDLED;
++}
++
++static void
++mmc_start_data(struct asic3_mmc_host *host, struct mmc_data *data)
++{
++ DBG("setup data transfer: blocksize %08x nr_blocks %d, page: %08x, offset: %08x\n", data->blksz,
++ data->blocks, (int)data->sg->page, data->sg->offset);
++
++ host->sg_len = data->sg_len;
++ host->sg_ptr = data->sg;
++ host->sg_off = 0;
++ host->data = data;
++
++ /* Set transfer length and blocksize */
++ ASIC3_MMC_REG(host, SD_CTRL, TransferSectorCount) = data->blocks;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardXferDataLen) = data->blksz;
++}
++
++/* Process requests from the MMC layer */
++static void
++mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ WARN_ON(host->mrq != NULL);
++
++ host->mrq = mrq;
++
++ /* If we're performing a data request we need to setup some
++ extra information */
++ if(mrq->data) {
++ mmc_start_data(host, mrq->data);
++ }
++
++ mmc_start_command(host, mrq->cmd);
++}
++
++/* Set MMC clock / power.
++ * Note: This controller uses a simple divider scheme therefore it cannot run
++ * a MMC card at full speed (20MHz). The max clock is 24MHz on SD, but as MMC
++ * wont run that fast, it has to be clocked at 12MHz which is the next slowest
++ * setting. This is likely not an issue because we are doing single 16-bit
++ * writes for data I/O.
++ */
++static void
++mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ u32 clk = 0;
++
++ DBG("clock %uHz busmode %u powermode %u Vdd %u\n",
++ ios->clock, ios->bus_mode, ios->power_mode, ios->vdd);
++
++ if (ios->clock) {
++ clk = 0x80; /* slowest by default */
++ if(ios->clock >= 24000000 / 256) clk >>= 1;
++ if(ios->clock >= 24000000 / 128) clk >>= 1;
++ if(ios->clock >= 24000000 / 64) clk >>= 1;
++ if(ios->clock >= 24000000 / 32) clk >>= 1;
++ if(ios->clock >= 24000000 / 16) clk >>= 1;
++ if(ios->clock >= 24000000 / 8) clk >>= 1;
++ if(ios->clock >= 24000000 / 4) clk >>= 1;
++ if(ios->clock >= 24000000 / 2) clk >>= 1;
++ if(ios->clock >= 24000000 / 1) clk >>= 1;
++ if(clk == 0) { /* For fastest speed we disable the divider. */
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 0;
++ } else {
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 1;
++ }
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) =
++ host->clock_for_sd
++ | SD_CTRL_CARDCLOCKCONTROL_ENABLE_CLOCK
++ | clk;
++ msleep(10);
++ } else {
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ }
++
++ switch (ios->power_mode) {
++ case MMC_POWER_OFF:
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = 0;
++ msleep(1);
++ break;
++ case MMC_POWER_UP:
++ break;
++ case MMC_POWER_ON:
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = SD_CONFIG_POWER1_PC_33V;
++ msleep(20);
++ break;
++ }
++}
++
++static int
++mmc_get_ro(struct mmc_host *mmc)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ /* Call custom handler for RO status */
++ if(host->hwconfig->mmc_get_ro) {
++ /* Special case for cards w/o WP lock (like miniSD) */
++ if (host->hwconfig->mmc_get_ro == (void*)-1) {
++ return 0;
++ } else {
++ struct platform_device *pdev = to_platform_device(mmc_dev(mmc));
++ return host->hwconfig->mmc_get_ro(pdev);
++ }
++ }
++
++ /* WRITE_PROTECT is active low */
++ return (ASIC3_MMC_REG(host, SD_CTRL, CardStatus) & SD_CTRL_CARDSTATUS_WRITE_PROTECT)?0:1;
++}
++
++static struct mmc_host_ops mmc_ops = {
++ .request = mmc_request,
++ .set_ios = mmc_set_ios,
++ .get_ro = mmc_get_ro,
++};
++
++static void
++hwinit2_irqsafe(struct asic3_mmc_host *host)
++{
++ ASIC3_MMC_REG(host, SD_CONFIG, Addr1) = 0x0000;
++ ASIC3_MMC_REG(host, SD_CONFIG, Addr0) = 0x0800;
++
++ ASIC3_MMC_REG(host, SD_CONFIG, ClkStop) = SD_CONFIG_CLKSTOP_ENABLE_ALL;
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_CardDetect) = 2;
++ ASIC3_MMC_REG(host, SD_CONFIG, Command) = SD_CONFIG_COMMAND_MAE;
++
++ ASIC3_MMC_REG(host, SD_CTRL, SoftwareReset) = 0; /* reset on */
++ mdelay(2);
++
++ ASIC3_MMC_REG(host, SD_CTRL, SoftwareReset) = 1; /* reset off */
++ mdelay(2);
++
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1
++ ;
++ host->clock_for_sd = 0;
++
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus0) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus1) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = 0;
++
++ ASIC3_MMC_REG(host, SDIO_CTRL, ClocknWaitCtrl) = 0x100;
++ /* *((unsigned short *)(((char *)host->ctl_base) + 0x938)) = 0x100; */
++
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++
++ mdelay(1);
++
++
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0
++#if 0
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_3
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_3
++#endif
++ )
++ ; /* check */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) = 0xffff; /* IRQs off */
++
++ /*
++ * ASIC3_MMC_REG(host, SD_CTRL, TransactionCtrl) = SD_CTRL_TRANSACTIONCONTROL_SET;
++ * Wince has 0x1000
++ */
++ /* ASIC3_MMC_REG(host, SD_CTRL, TransactionCtrl) = 0x1000; */
++
++
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SDPWR, ASIC3_SDHWCTRL_SDPWR); /* turn on power at controller(?) */
++
++}
++
++static void
++hwinit(struct asic3_mmc_host *host, struct platform_device *pdev)
++{
++ /* Call custom handler for enabling clock (if needed) */
++ if(host->hwconfig->set_mmc_clock)
++ host->hwconfig->set_mmc_clock(pdev, MMC_CLOCK_ENABLED);
++
++ /* Not sure if it must be done bit by bit, but leaving as-is */
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_LEVCD, ASIC3_SDHWCTRL_LEVCD);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_LEVWP, ASIC3_SDHWCTRL_LEVWP);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, 0);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_PCLR, 0);
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_EX1 | CLOCK_CDEX_EX0, CLOCK_CDEX_EX1 | CLOCK_CDEX_EX0);
++ msleep(1);
++
++ asic3_set_clock_sel (host->asic3_dev,
++ CLOCK_SEL_SD_HCLK_SEL | CLOCK_SEL_SD_BCLK_SEL,
++ CLOCK_SEL_SD_HCLK_SEL | 0); /* ? */
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS);
++ msleep(1);
++
++ asic3_set_extcf_select(host->asic3_dev, ASIC3_EXTCF_SD_MEM_ENABLE, ASIC3_EXTCF_SD_MEM_ENABLE);
++
++ /* Long Delay */
++ if( !machine_is_h4700())
++ msleep(500);
++
++ hwinit2_irqsafe(host);
++}
++
++#ifdef CONFIG_PM
++static int
++mmc_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ int ret;
++
++ ret = mmc_suspend_host(mmc, state);
++
++ if (ret) {
++ printk(KERN_ERR DRIVER_NAME ": Could not suspend MMC host, hardware not suspended");
++ return ret;
++ }
++
++ /* disable the card insert / remove interrupt while sleeping */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END);
++
++ /* disable clock */
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CONFIG, ClkStop) = 0;
++
++ /* power down */
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = 0;
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS, 0);
++
++ /* disable core clock */
++ if(host->hwconfig->set_mmc_clock)
++ host->hwconfig->set_mmc_clock(pdev, MMC_CLOCK_DISABLED);
++
++ /* Put in suspend mode */
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, ASIC3_SDHWCTRL_SUSPEND);
++ return 0;
++}
++
++static int
++mmc_resume(struct platform_device *pdev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ printk(KERN_INFO "%s: starting resume\n", DRIVER_NAME);
++
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, 0);
++ hwinit(host, pdev);
++
++ /* re-enable card remove / insert interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0 );
++
++ mmc_resume_host(mmc);
++
++ printk(KERN_INFO "%s: finished resume\n", DRIVER_NAME);
++ return 0;
++}
++#endif
++
++static int
++mmc_probe(struct platform_device *pdev)
++{
++ struct mmc_host *mmc;
++ struct asic3_mmc_host *host = NULL;
++ int retval = 0;
++ struct tmio_mmc_hwconfig *mmc_config = (struct tmio_mmc_hwconfig *)pdev->dev.platform_data;
++
++ /* bus_shift is mandatory */
++ if (!mmc_config) {
++ printk(KERN_ERR DRIVER_NAME ": Invalid configuration\n");
++ return -EINVAL;
++ }
++
++ mmc = mmc_alloc_host(sizeof(struct asic3_mmc_host) + 128, &pdev->dev);
++ if (!mmc) {
++ retval = -ENOMEM;
++ goto exceptional_return;
++ }
++
++ host = mmc_priv(mmc);
++ host->mmc = mmc;
++ platform_set_drvdata(pdev, mmc);
++
++ host->ctl_base = 0;
++ host->hwconfig = mmc_config;
++ host->bus_shift = mmc_config->address_shift;
++ host->asic3_dev = pdev->dev.parent;
++ host->clock_for_sd = 0;
++
++ tasklet_init(&mmc_data_read_tasklet, mmc_data_transfer, (unsigned long)host);
++
++ host->ctl_base = ioremap_nocache ((unsigned long)pdev->resource[0].start, pdev->resource[0].end - pdev->resource[0].start);
++ if(!host->ctl_base){
++ printk(KERN_ERR DRIVER_NAME ": Could not map ASIC3 SD controller\n");
++ retval = -ENODEV;
++ goto exceptional_return;
++ }
++
++ printk(DRIVER_NAME ": ASIC3 MMC/SD Driver, controller at 0x%lx\n", (unsigned long)pdev->resource[0].start);
++
++ mmc->ops = &mmc_ops;
++ mmc->caps = MMC_CAP_4_BIT_DATA;
++ mmc->f_min = 46875; /* ARIC: not sure what these should be */
++ mmc->f_max = 24000000; /* ARIC: not sure what these should be */
++ mmc->ocr_avail = MMC_VDD_32_33;
++
++ hwinit(host, pdev);
++
++
++ host->irq = pdev->resource[1].start;
++
++ retval = request_irq(host->irq, mmc_irq, 0, DRIVER_NAME, host);
++ if(retval) {
++ printk(KERN_ERR DRIVER_NAME ": Unable to get interrupt\n");
++ retval = -ENODEV;
++ goto exceptional_return;
++ }
++ set_irq_type(host->irq, IRQT_FALLING);
++
++ mmc_add_host(mmc);
++
++#ifdef CONFIG_PM
++ // resume_timer.function = resume_timer_callback;
++ // resume_timer.data = 0;
++ // init_timer(&resume_timer);
++#endif
++
++ return 0;
++
++exceptional_return:
++ if (mmc) {
++ mmc_free_host(mmc);
++ }
++ if(host && host->ctl_base) iounmap(host->ctl_base);
++ return retval;
++}
++
++static int
++mmc_remove(struct platform_device *pdev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++
++ platform_set_drvdata(pdev, NULL);
++
++ if (mmc) {
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ mmc_remove_host(mmc);
++ free_irq(host->irq, host);
++ /* FIXME - we might want to consider stopping the chip here... */
++ iounmap(host->ctl_base);
++ mmc_free_host(mmc); /* FIXME - why does this call hang? */
++ }
++ return 0;
++}
++
++/* ------------------- device registration ----------------------- */
++
++static struct platform_driver mmc_asic3_driver = {
++ .driver = {
++ .name = DRIVER_NAME,
++ },
++ .probe = mmc_probe,
++ .remove = mmc_remove,
++#ifdef CONFIG_PM
++ .suspend = mmc_suspend,
++ .resume = mmc_resume,
++#endif
++};
++
++static int __init mmc_init(void)
++{
++ return platform_driver_register(&mmc_asic3_driver);
++}
++
++static void __exit mmc_exit(void)
++{
++ platform_driver_unregister(&mmc_asic3_driver);
++}
++
++late_initcall(mmc_init);
++module_exit(mmc_exit);
++
++MODULE_DESCRIPTION("HTC ASIC3 SD/MMC driver");
++MODULE_AUTHOR("Aric Blumer, SDG Systems, LLC");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.26-rc4/drivers/mmc/host/asic3_mmc.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mmc/host/asic3_mmc.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,25 @@
++#ifndef __ASIC3_MMC_H
++#define __ASIC3_MMC_H
++
++#define DRIVER_NAME "asic3_mmc"
++
++#ifdef CONFIG_MMC_DEBUG
++#define DBG(x...) printk(DRIVER_NAME ": " x)
++#else
++#define DBG(x...) do { } while (0)
++#endif
++
++/* Response types */
++#define APP_CMD 0x0040
++
++#define SD_CONFIG_CLKSTOP_ENABLE_ALL 0x1f
++
++#define DONT_CARE_CARD_BITS ( \
++ SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_3 \
++ | SD_CTRL_INTMASKCARD_WRITE_PROTECT \
++ | SD_CTRL_INTMASKCARD_UNK6 \
++ | SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_0 \
++ )
++#define DONT_CARE_BUFFER_BITS ( SD_CTRL_INTMASKBUFFER_UNK7 | SD_CTRL_INTMASKBUFFER_CMD_BUSY )
++
++#endif // __ASIC3_MMC_H
+Index: linux-2.6.26-rc4/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/input/keyboard/Makefile 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/input/keyboard/Makefile 2008-06-01 18:52:37.000000000 +0100
+@@ -15,6 +15,7 @@
+ obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
+ obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
+ obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
++obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
+ obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+Index: linux-2.6.26-rc4/drivers/input/keyboard/asic3_keys.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/input/keyboard/asic3_keys.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,131 @@
++/*
++ * Generic buttons driver for ASIC3 SoC.
++ *
++ * 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.
++ *
++ * Copyright (C) 2003 Joshua Wise
++ * Copyright (C) 2005 Pawel Kolodziejski
++ * Copyright (C) 2006 Paul Sokolovsky
++ *
++ */
++
++#include <linux/input.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++#include <asm/arch/irqs.h>
++#include <asm/hardware.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/hardware/asic3_keys.h>
++
++static irqreturn_t asic3_keys_asic_handle(int irq, void *data)
++{
++ struct asic3_keys_platform_data *pdata = data;
++ int i, base_irq;
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++ for (i = 0; i < pdata->nbuttons; i++) {
++ struct asic3_keys_button *b = &pdata->buttons[i];
++ if ((base_irq + b->gpio) == irq) {
++ int state = !!asic3_gpio_get_value(pdata->asic3_dev, b->gpio);
++
++ if (pdata->buttons[i].type == EV_SW)
++ input_report_switch(pdata->input, pdata->buttons[i].keycode, state ^ b->active_low);
++ else
++ input_report_key(pdata->input, b->keycode, state ^ b->active_low);
++ input_sync(pdata->input);
++ }
++ }
++
++ return IRQ_HANDLED;
++}
++
++static int __devinit asic3_keys_probe(struct platform_device *pdev)
++{
++ struct asic3_keys_platform_data *pdata = pdev->dev.platform_data;
++ int i, base_irq;
++ int j, ret;
++
++ pdata->input = input_allocate_device();
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++
++ for (i = 0; i < pdata->nbuttons; i++) {
++ struct asic3_keys_button *b = &pdata->buttons[i];
++ set_bit(b->keycode, pdata->input->keybit);
++ ret=request_irq(base_irq + b->gpio, asic3_keys_asic_handle, SA_SAMPLE_RANDOM, b->desc, pdata);
++ if (ret)
++ {
++ printk(KERN_NOTICE "Failed to allocate asic3_keys irq=%d.\n",b->gpio);
++
++ for(j=0; j<i ; j++)
++ free_irq(base_irq + pdata->buttons[i].gpio, NULL);
++
++ input_unregister_device (pdata->input);
++
++ return -ENODEV;
++ }
++
++ set_irq_type(base_irq + b->gpio, IRQT_BOTHEDGE);
++ if (pdata->buttons[i].type == EV_SW) {
++ pdata->input->evbit[0] |= BIT(EV_SW);
++ set_bit(b->keycode, pdata->input->swbit);
++ } else {
++ pdata->input->evbit[0] |= BIT(EV_KEY);
++ set_bit(b->keycode, pdata->input->keybit);
++ }
++ }
++
++ pdata->input->name = pdev->name;
++ input_register_device(pdata->input);
++
++ return 0;
++}
++
++static int __devexit asic3_keys_remove(struct platform_device *pdev)
++{
++ struct asic3_keys_platform_data *pdata = pdev->dev.platform_data;
++ int i, base_irq;
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++ for (i = 0; i < pdata->nbuttons; i++) {
++ free_irq(base_irq + pdata->buttons[i].gpio, NULL);
++ }
++
++ input_unregister_device(pdata->input);
++
++ return 0;
++}
++
++
++static struct platform_driver asic3_keys_driver = {
++ .probe = asic3_keys_probe,
++ .remove = __devexit_p(asic3_keys_remove),
++ .driver = {
++ .name = "asic3-keys",
++ },
++};
++
++static int __init asic3_keys_init(void)
++{
++ return platform_driver_register(&asic3_keys_driver);
++}
++
++static void __exit asic3_keys_exit(void)
++{
++ platform_driver_unregister(&asic3_keys_driver);
++}
++
++module_init(asic3_keys_init);
++module_exit(asic3_keys_exit);
++
++MODULE_AUTHOR("Joshua Wise, Pawel Kolodziejski, Paul Sokolovsky");
++MODULE_DESCRIPTION("Buttons driver for HTC ASIC3 SoC");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/irqs.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/irqs.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/irqs.h 2008-06-01 18:49:45.000000000 +0100
+@@ -184,6 +184,8 @@
+ defined(CONFIG_MACH_PCM027) || \
+ defined(CONFIG_MACH_MAGICIAN)
+ #define NR_IRQS (IRQ_BOARD_END)
++#elif defined(CONFIG_MACH_HTCUNIVERSAL)
++#define NR_IRQS (IRQ_BOARD_START + 96)
+ #else
+ #define NR_IRQS (IRQ_BOARD_START)
+ #endif
+Index: linux-2.6.26-rc4/include/linux/ioport.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/linux/ioport.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/linux/ioport.h 2008-06-01 18:49:45.000000000 +0100
+@@ -59,6 +59,7 @@
+ #define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
+ #define IORESOURCE_IRQ_LOWLEVEL (1<<3)
+ #define IORESOURCE_IRQ_SHAREABLE (1<<4)
++#define IORESOURCE_IRQ_SOC_SUBDEVICE (1<<5)
+
+ /* ISA PnP DMA specific bits (IORESOURCE_BITS) */
+ #define IORESOURCE_DMA_TYPE_MASK (3<<0)
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/serial.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/serial.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,78 @@
++/*
++ * linux/include/asm-arm/arch-pxa/serial.h
++ *
++ * Author: Nicolas Pitre
++ * Copyright: (C) 2001 MontaVista Software Inc.
++ *
++ * 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 <asm/arch/pxa-regs.h>
++
++#define BAUD_BASE 921600
++
++/* Standard COM flags */
++#define STD_COM_FLAGS (ASYNC_SKIP_TEST)
++
++#define STD_SERIAL_PORT_DEFNS \
++ { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &FFUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_FFUART, \
++ flags: STD_COM_FLAGS, \
++ }, { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &STUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_STUART, \
++ flags: STD_COM_FLAGS, \
++ }, { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &BTUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_BTUART, \
++ flags: STD_COM_FLAGS, \
++ }
++
++#define EXTRA_SERIAL_PORT_DEFNS
++
++struct platform_pxa_serial_funcs {
++
++ /* Initialize whatever is connected to this serial port. */
++ void (*configure)(int state);
++#define PXA_UART_CFG_PRE_STARTUP 0
++#define PXA_UART_CFG_POST_STARTUP 1
++#define PXA_UART_CFG_PRE_SHUTDOWN 2
++#define PXA_UART_CFG_POST_SHUTDOWN 3
++
++ /* Enable or disable the individual transmitter/receiver submodules.
++ * On transceivers without echo cancellation (e.g. SIR)
++ * transmitter always has priority; e.g. if both bits are set,
++ * only the transmitter is enabled. */
++ void (*set_txrx)(int txrx);
++#define PXA_SERIAL_TX 1
++#define PXA_SERIAL_RX 2
++
++ /* Get the current state of tx/rx. */
++ int (*get_txrx)(void);
++
++ int (*suspend)(struct platform_device *dev, pm_message_t state);
++ int (*resume)(struct platform_device *dev);
++};
++
++void pxa_set_ffuart_info(struct platform_pxa_serial_funcs *ffuart_funcs);
++void pxa_set_btuart_info(struct platform_pxa_serial_funcs *btuart_funcs);
++void pxa_set_stuart_info(struct platform_pxa_serial_funcs *stuart_funcs);
++void pxa_set_hwuart_info(struct platform_pxa_serial_funcs *hwuart_funcs);
+Index: linux-2.6.26-rc4/drivers/serial/pxa.c
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/serial/pxa.c 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/serial/pxa.c 2008-06-01 18:49:45.000000000 +0100
+@@ -47,6 +47,7 @@
+ #include <asm/io.h>
+ #include <asm/hardware.h>
+ #include <asm/irq.h>
++#include <asm/arch/serial.h>
+ #include <asm/arch/pxa-regs.h>
+
+
+@@ -60,6 +61,14 @@
+ char *name;
+ };
+
++
++#define IS_METHOD(dev, method) (dev && (dev)->platform_data && ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method)
++#define METHOD_CALL(dev, method) \
++ ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method()
++#define SAFE_METHOD_CALL(dev, method, args...) \
++ if (IS_METHOD(dev, method)) \
++ ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method(args)
++
+ static inline unsigned int serial_in(struct uart_pxa_port *up, int offset)
+ {
+ offset <<= 2;
+@@ -347,6 +356,9 @@
+ unsigned long flags;
+ int retval;
+
++ /* Perform platform-specific port initialization, if needed. */
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_PRE_STARTUP);
++
+ if (port->line == 3) /* HWUART */
+ up->mcr |= UART_MCR_AFE;
+ else
+@@ -404,6 +416,12 @@
+ (void) serial_in(up, UART_IIR);
+ (void) serial_in(up, UART_MSR);
+
++ /*
++ * Perform platform-specific port initialization if needed
++ */
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_POST_STARTUP);
++ SAFE_METHOD_CALL(port->dev, set_txrx, PXA_SERIAL_RX);
++
+ return 0;
+ }
+
+@@ -412,6 +430,8 @@
+ struct uart_pxa_port *up = (struct uart_pxa_port *)port;
+ unsigned long flags;
+
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_PRE_SHUTDOWN);
++
+ free_irq(up->port.irq, up);
+
+ /*
+@@ -433,6 +453,8 @@
+ UART_FCR_CLEAR_RCVR |
+ UART_FCR_CLEAR_XMIT);
+ serial_out(up, UART_FCR, 0);
++
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_POST_SHUTDOWN);
+ }
+
+ static void
+Index: linux-2.6.26-rc4/drivers/leds/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/leds/Makefile 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/leds/Makefile 2008-06-01 18:49:45.000000000 +0100
+@@ -14,6 +14,7 @@
+ obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o
+ obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
+ obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
++obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o
+ obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o
+ obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o
+ obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
+Index: linux-2.6.26-rc4/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/input/keyboard/Kconfig 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/input/keyboard/Kconfig 2008-06-01 18:52:13.000000000 +0100
+@@ -132,6 +132,13 @@
+ To compile this driver as a module, choose M here: the
+ module will be called stowaway.
+
++config KEYBOARD_ASIC3
++ tristate "Buttons on ASIC3 SoC GPIOs (iPaqs, etc.)"
++ depends on HTC_ASIC3
++ help
++ This enables support for the buttons attached to GPIOs of
++ HTC ASIC3 peripheral controller.
++
+ config KEYBOARD_CORGI
+ tristate "Corgi keyboard"
+ depends on PXA_SHARPSL
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/pxa-serial-hack.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/pxa-serial-hack.patch
new file mode 100644
index 0000000000..bf20f46a05
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/pxa-serial-hack.patch
@@ -0,0 +1,90 @@
+---
+ drivers/serial/8250.c | 5 +++++
+ drivers/serial/serial_core.c | 1 +
+ drivers/serial/serial_cs.c | 12 +++++++++---
+ include/linux/serial_core.h | 1 +
+ 4 files changed, 16 insertions(+), 3 deletions(-)
+
+Index: linux-2.6.20/drivers/serial/8250.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/8250.c 2007-04-27 13:37:26.000000000 +0100
++++ linux-2.6.20/drivers/serial/8250.c 2007-04-27 13:38:16.000000000 +0100
+@@ -2429,7 +2429,12 @@
+ .driver_name = "serial",
+ .dev_name = "ttyS",
+ .major = TTY_MAJOR,
++#ifdef CONFIG_SERIAL_PXA
++ .minor = 64 + 4,
++ .name_base = 4,
++#else
+ .minor = 64,
++#endif
+ .nr = UART_NR,
+ .cons = SERIAL8250_CONSOLE,
+ };
+Index: linux-2.6.20/drivers/serial/serial_core.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/serial_core.c 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/drivers/serial/serial_core.c 2007-04-27 13:39:39.000000000 +0100
+@@ -2068,7 +2068,8 @@
+ printk(KERN_INFO "%s%s%s%d at %s (irq = %d) is a %s\n",
+ port->dev ? port->dev->bus_id : "",
+ port->dev ? ": " : "",
+- drv->dev_name, port->line, address, port->irq, uart_type(port));
++ drv->dev_name, port->line + drv->name_base, address, port->irq,
++ uart_type(port));
+ }
+
+ static void
+@@ -2183,6 +2184,7 @@
+ normal->owner = drv->owner;
+ normal->driver_name = drv->driver_name;
+ normal->name = drv->dev_name;
++ normal->name_base = drv->name_base;
+ normal->major = drv->major;
+ normal->minor_start = drv->minor;
+ normal->type = TTY_DRIVER_TYPE_SERIAL;
+Index: linux-2.6.20/include/linux/serial_core.h
+===================================================================
+--- linux-2.6.20.orig/include/linux/serial_core.h 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/include/linux/serial_core.h 2007-04-27 13:37:27.000000000 +0100
+@@ -341,6 +341,7 @@
+ struct module *owner;
+ const char *driver_name;
+ const char *dev_name;
++ int name_base;
+ int major;
+ int minor;
+ int nr;
+Index: linux-2.6.20/drivers/serial/serial_cs.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/serial_cs.c 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/drivers/serial/serial_cs.c 2007-04-27 13:40:34.000000000 +0100
+@@ -390,7 +390,7 @@
+ kio_addr_t iobase, int irq)
+ {
+ struct uart_port port;
+- int line;
++ int line, linestart;
+
+ memset(&port, 0, sizeof (struct uart_port));
+ port.iobase = iobase;
+@@ -411,10 +411,16 @@
+ return -EINVAL;
+ }
+
++#if CONFIG_SERIAL_PXA
++ linestart = 4;
++#else
++ linestart = 0;
++#endif
++
+ info->line[info->ndev] = line;
+- sprintf(info->node[info->ndev].dev_name, "ttyS%d", line);
++ sprintf(info->node[info->ndev].dev_name, "ttyS%d", line+linestart);
+ info->node[info->ndev].major = TTY_MAJOR;
+- info->node[info->ndev].minor = 0x40 + line;
++ info->node[info->ndev].minor = 0x40 + line + linestart;
+ if (info->ndev > 0)
+ info->node[info->ndev - 1].next = &info->node[info->ndev];
+ info->ndev++;
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/pxa_fb_overlay.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/pxa_fb_overlay.patch
new file mode 100644
index 0000000000..49c59b3275
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/pxa_fb_overlay.patch
@@ -0,0 +1,26 @@
+---
+ drivers/video/pxafb.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: linux-2.6.22/drivers/video/pxafb.h
+===================================================================
+--- linux-2.6.22.orig/drivers/video/pxafb.h 2007-09-25 15:44:42.000000000 +0200
++++ linux-2.6.22/drivers/video/pxafb.h 2007-09-25 15:45:07.000000000 +0200
+@@ -36,7 +36,7 @@
+ struct fb_bitfield transp;
+ };
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ /* PXA Overlay Framebuffer Support */
+ struct overlayfb_info
+ {
+@@ -142,7 +142,7 @@
+ wait_queue_head_t ctrlr_wait;
+ struct work_struct task;
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ /* PXA Overlay Framebuffer Support */
+ struct overlayfb_info *overlay1fb;
+ struct overlayfb_info *overlay2fb;
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch
new file mode 100644
index 0000000000..b513ba1466
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch
@@ -0,0 +1,155 @@
+
+From: Petr Vandrovec <vandrove@vc.cvut.cz>
+
+Patch below adds support for using different prescaler than 16 for 16c950
+chips. This is needed for using Fujitsu-Siemens Connect2Air compact-flash
+card, which comes (apparently) with 806kHz clocks, and so you have to
+program prescaler for division by 7, and DLAB to 1, to get 115200Bd.
+
+To get card properly running you also have to add lines below to
+/etc/pcmcia/serial.opts so kernel knows that base speed is not 115200 but
+50400 (50400 * 16 = 806400; 806400 / 7 = 115200). As I've found no code
+specifying baud_rate in serial_cs, I assume that specifying it in
+serial.opts is right way to do this type of things.
+
+Patch also fixes problem that for UPF_MAGIC_MULTIPLIER maximum possible
+baud rate passed to uart code was uartclk / 16 while correct value for
+these devices (and for 16c950) is uartclk / 4.
+
+Patch also fixes problem that for UPF_MAGIC_MULTIPLIER devices with
+baud_rate 19200 or 9600 spd_cust did not work correctly. Not that such
+devices exist, but we should not ignore spd_cust, user probably knows why
+he asked for spd_cust.
+
+serial.opts:
+
+case "$MANFID-$FUNCID-$PRODID_1-$PRODID_2-$PRODID_3-$PRODID_4" in
+'0279,950b-2-GPRS Modem---')
+ SERIAL_OPTS="baud_base 50400"
+ ;;
+esac
+
+Cc: David Woodhouse <dwmw2@infradead.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+---
+
+ drivers/serial/8250.c | 82 +++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 64 insertions(+), 18 deletions(-)
+
+Index: linux-2.6.21/drivers/serial/8250.c
+===================================================================
+--- linux-2.6.21.orig/drivers/serial/8250.c 2007-07-01 16:59:52.000000000 +0100
++++ linux-2.6.21/drivers/serial/8250.c 2007-07-01 17:01:21.000000000 +0100
+@@ -1964,24 +1964,58 @@ static void serial8250_shutdown(struct u
+ serial_unlink_irq_chain(up);
+ }
+
+-static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int baud)
++static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int baud,
++ unsigned int *prescaler)
+ {
+- unsigned int quot;
+-
+- /*
+- * Handle magic divisors for baud rates above baud_base on
+- * SMSC SuperIO chips.
++ /*
++ * Use special handling only if user did not supply its own divider.
++ * spd_cust is defined in terms of baud_base, so always use default
++ * prescaler when spd_cust is requested.
+ */
+- if ((port->flags & UPF_MAGIC_MULTIPLIER) &&
+- baud == (port->uartclk/4))
+- quot = 0x8001;
+- else if ((port->flags & UPF_MAGIC_MULTIPLIER) &&
+- baud == (port->uartclk/8))
+- quot = 0x8002;
+- else
+- quot = uart_get_divisor(port, baud);
+
+- return quot;
++ *prescaler = 16;
++ if (baud != 38400 || (port->flags & UPF_SPD_MASK) != UPF_SPD_CUST) {
++ unsigned int quot = port->uartclk / baud;
++
++ /*
++ * Handle magic divisors for baud rates above baud_base on
++ * SMSC SuperIO chips.
++ */
++ if (port->flags & UPF_MAGIC_MULTIPLIER) {
++ if (quot == 4) {
++ return 0x8001;
++ } else if (quot == 8) {
++ return 0x8002;
++ }
++ }
++ if (port->type == PORT_16C950) {
++ /*
++ * This computes TCR value (4 to 16), not CPR value (which can
++ * be between 1.000 and 31.875) - chip I have uses XTAL of
++ * 806400Hz, and so a division by 7 is required to get 115200Bd.
++ * I'm leaving CPR disabled for now, until someone will
++ * hit even more exotic XTAL (it is needed to get 500kbps
++ * or 1000kbps from 18.432MHz XTAL, but I have no device
++ * which would benefit from doing that).
++ *
++ * If we can use divide by 16, use it. Otherwise look for
++ * better prescaler, from 15 to 4. If quotient cannot
++ * be divided by any integer value between 4 and 15, use 4.
++ */
++ if (quot & 0x0F) {
++ unsigned int div;
++
++ for (div = 15; div > 4; div--) {
++ if (quot % div == 0) {
++ break;
++ }
++ }
++ *prescaler = div;
++ return quot / div;
++ }
++ }
++ }
++ return uart_get_divisor(port, baud);
+ }
+
+ static void
+@@ -1991,7 +2025,7 @@ serial8250_set_termios(struct uart_port
+ struct uart_8250_port *up = (struct uart_8250_port *)port;
+ unsigned char cval, fcr = 0;
+ unsigned long flags;
+- unsigned int baud, quot;
++ unsigned int baud, quot, prescaler;
+
+ switch (termios->c_cflag & CSIZE) {
+ case CS5:
+@@ -2023,8 +2057,13 @@ serial8250_set_termios(struct uart_port
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+- baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
+- quot = serial8250_get_divisor(port, baud);
++ if (port->type == PORT_16C950 || (port->flags & UPF_MAGIC_MULTIPLIER)) {
++ baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/4);
++ } else {
++ baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
++ }
++ quot = serial8250_get_divisor(port, baud, &prescaler);
++
+
+ /*
+ * Oxford Semi 952 rev B workaround
+@@ -2139,6 +2178,13 @@ serial8250_set_termios(struct uart_port
+ serial_dl_write(up, quot);
+
+ /*
++ * Program prescaler for 16C950 chips.
++ */
++ if (up->port.type == PORT_16C950) {
++ serial_icr_write(up, UART_TCR, prescaler == 16 ? 0 : prescaler);
++ }
++
++ /*
+ * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR
+ * is written without DLAB set, this mode will be disabled.
+ */
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/sharpsl-rc-r1.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/sharpsl-rc-r1.patch
new file mode 100644
index 0000000000..93fac307aa
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/sharpsl-rc-r1.patch
@@ -0,0 +1,555 @@
+This patch adds support for Sharp CE-RH2 on Spitz.
+
+It is not clean enough to be upstreamed:
+- It is a bit syslog-noisy.
+- Does not support other Zaurus models.
+- Maybe split to more parts:
+ * MAX1111 driver
+ * linear input device
+ * virtual keyboard on top of linear input device
+
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/spitz.c
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/spitz.c 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/spitz.c 2008-06-02 00:20:05.000000000 +0100
+@@ -261,6 +261,13 @@
+ .id = -1,
+ };
+
++/*
++ * Spitz Remote Control Device
++ */
++static struct platform_device sharpsl_rc_device = {
++ .name = "sharpsl-remote-control",
++ .id = -1,
++};
+
+ /*
+ * Spitz LEDs
+@@ -522,6 +529,7 @@
+ &spitzscoop_device,
+ &spitzssp_device,
+ &spitzkbd_device,
++ &sharpsl_rc_device,
+ &spitzts_device,
+ &spitzbl_device,
+ &spitzled_device,
+Index: linux-2.6.26-rc4/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/input/keyboard/Kconfig 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/drivers/input/keyboard/Kconfig 2008-06-02 09:46:10.000000000 +0100
+@@ -175,6 +175,17 @@
+
+ Say Y only if you know, what you are doing!
+
++config SHARPSL_RC
++ tristate "Sharp SL-Cxx00 Remote Control"
++ depends on PXA_SHARPSL
++ default y
++ help
++ Say Y here to enable the remote on the Sharp Zaurus SL-Cxx00,
++ SL-C1000, SL-C3000 and Sl-C3100 series of PDAs.
++
++ To compile this driver as a module, choose M here: the
++ module will be called sharpsl_rc.
++
+ config KEYBOARD_AMIGA
+ tristate "Amiga keyboard"
+ depends on AMIGA
+Index: linux-2.6.26-rc4/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/input/keyboard/Makefile 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/drivers/input/keyboard/Makefile 2008-06-02 09:46:10.000000000 +0100
+@@ -26,4 +26,5 @@
+ obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
+ obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
+ obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
++obj-$(CONFIG_SHARPSL_RC) += sharpsl_rc.o
+ obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o
+Index: linux-2.6.26-rc4/drivers/input/keyboard/sharpsl_rc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/input/keyboard/sharpsl_rc.c 2008-06-02 09:47:39.000000000 +0100
+@@ -0,0 +1,319 @@
++/*
++ * Keyboard driver for Sharp Clamshell Models (SL-Cxx00)
++ *
++ * Copyright (c) 2004-2005 Richard Purdie
++ *
++ * Based on corgikbd.c and Sharp's RC driver
++ *
++ * 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 1
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/init.h>
++#include <linux/input.h>
++#include <linux/interrupt.h>
++#include <linux/jiffies.h>
++#include <linux/module.h>
++#include <linux/slab.h>
++
++#include <asm/mach-types.h>
++#include <asm/arch/spitz.h>
++#include <asm/arch/akita.h>
++#include <asm/arch/corgi.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa2xx-gpio.h>
++#include <asm/hardware/scoop.h>
++#include <asm/arch/sharpsl.h>
++#include <asm/hardware/sharpsl_pm.h>
++
++#define DPRINTK(fmt, args...) dev_dbg(data->dev, fmt "\n", ##args)
++
++struct remote_control_key {
++ unsigned char min;
++ unsigned char max;
++ unsigned char key;
++};
++
++static struct remote_control_key remote_keys_spitz[] = {
++ /* CE-RH2 values */
++ { 25, 35, KEY_STOPCD},
++ { 55, 65, KEY_PLAYPAUSE},
++ { 85, 95, KEY_NEXTSONG},
++ { 115, 125, KEY_VOLUMEUP},
++ { 145, 155, KEY_PREVIOUSSONG},
++ { 180, 190, KEY_MUTE},
++ { 215, 225, KEY_VOLUMEDOWN},
++};
++static struct remote_control_key remote_keys_corgi[] = {
++ /* CE-RH1 values */
++ { 27, 35, KEY_STOPCD},
++ { 7, 13, KEY_PLAYPAUSE},
++ { 77, 93, KEY_NEXTSONG},
++ { 115, 132, KEY_VOLUMEUP},
++ { 46, 58, KEY_PREVIOUSSONG},
++ { 170, 186, KEY_VOLUMEDOWN},
++};
++
++#define RELEASE_HI 230
++#define MAX_EARPHONE 6
++#define RC_POLL_MS 10
++#define RC_FINISH_MS 500
++#define WAIT_STATE 3
++#define NOISE_THRESHOLD 100
++
++struct sharpsl_rc {
++ struct input_dev *input;
++ struct device *dev;
++
++ spinlock_t lock;
++ struct timer_list rctimer;
++ struct timer_list rctimer_finish;
++
++ unsigned int handling_press;
++ unsigned int noise;
++ unsigned int state;
++ unsigned int last_key;
++};
++
++static int get_remocon_raw(void)
++{
++ int i, val;
++ struct remote_control_key *remote_keys;
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ remote_keys = remote_keys_spitz;
++ else
++ remote_keys = remote_keys_corgi;
++
++ val = sharpsl_pm_pxa_read_max1111(MAX1111_REMCOM);
++ for (i = 0; i < (machine_is_borzoi() || machine_is_spitz() || machine_is_akita() ?
++ ARRAY_SIZE(remote_keys_spitz) : ARRAY_SIZE(remote_keys_corgi));
++ ++i) {
++ if (val >= remote_keys[i].min
++ && val <= remote_keys[i].max) {
++ printk("get_remocon_raw: VAL=%i, KEY=%i\n", val, remote_keys[i].key);
++ return remote_keys[i].key;
++ }
++ }
++ return 0;
++}
++
++static irqreturn_t sharpsl_rc_interrupt(int irq, void *dev_id)
++{
++ struct sharpsl_rc *data = dev_id;
++ DPRINTK("sharpsl_rc_interrupt %d\n", irq);
++ if (!data->handling_press) {
++ DPRINTK("handling interrupt");
++ data->handling_press = 1;
++ data->noise = 0;
++ data->state = 0;
++ data->last_key = 0;
++
++ if (machine_is_borzoi() || machine_is_spitz())
++ reset_scoop_gpio(platform_scoop_config->devs[1].dev, SPITZ_SCP2_AKIN_PULLUP);
++ else if (machine_is_akita())
++ akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_AKIN_PULLUP);
++ else
++ reset_scoop_gpio(platform_scoop_config->devs[0].dev, CORGI_SCP_AKIN_PULLUP);
++ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++ }
++ return IRQ_HANDLED;
++}
++
++static void sharpsl_rc_timer_callback(unsigned long dataPtr)
++{
++ struct sharpsl_rc *data = (struct sharpsl_rc *) dataPtr;
++ int timer = 1;
++ int key = get_remocon_raw();
++ DPRINTK("timer callback, key: %d", key);
++
++ //wait for value to stabilize
++ if (data->state < WAIT_STATE) {
++ if (data->last_key != key) {
++ ++data->noise;
++ if (data->noise > NOISE_THRESHOLD) {
++ DPRINTK("too much noise, bailing");
++ timer = 0;
++ }
++ data->state = 0;
++ } else {
++ ++data->state;
++ }
++ data->last_key = key;
++
++ //stable value, send event
++ } else if (data->state == WAIT_STATE) {
++ data->noise = 0;
++ //non-key returned, skip the rest of the states and bail now
++ if (data->last_key == 0) {
++ DPRINTK("non-key detected %d, noise: %d", data->last_key, data->noise);
++ timer = 0;
++ //send button press
++ } else {
++ DPRINTK("key press detected %d, noise %d", data->last_key, data->noise);
++ input_report_key(data->input, data->last_key, 1);
++ }
++ ++data->state;
++
++ //wait until key is released
++ } else if (data->state < WAIT_STATE * 2) {
++ if (key == data->last_key
++ && data->noise < NOISE_THRESHOLD) {
++ data->state = WAIT_STATE + 1;
++ ++data->noise;
++ } else {
++ ++data->state;
++ }
++ //key is released, send event
++ } else {
++ //send button release
++ DPRINTK("release key %d", data->last_key);
++ input_report_key(data->input, data->last_key, 0);
++ timer = 0;
++ }
++ if (timer) {
++ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++ } else {
++ if (machine_is_borzoi() || machine_is_spitz())
++ set_scoop_gpio(platform_scoop_config->devs[1].dev, SPITZ_SCP2_AKIN_PULLUP);
++ else if (machine_is_akita())
++ akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_AKIN_PULLUP);
++ else
++ set_scoop_gpio(platform_scoop_config->devs[0].dev, CORGI_SCP_AKIN_PULLUP);
++ data->handling_press = 0;
++ }
++}
++
++static int __init sharpsl_rc_probe(struct platform_device *pdev)
++{
++ struct sharpsl_rc *sharpsl_rc;
++ struct input_dev *input_dev;
++ int i, ret;
++ struct remote_control_key *remote_keys;
++
++ dev_dbg(&pdev->dev, "sharpsl_rc_probe\n");
++
++ sharpsl_rc = kzalloc(sizeof(struct sharpsl_rc), GFP_KERNEL);
++ input_dev = input_allocate_device();
++ if (!sharpsl_rc || !input_dev) {
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(pdev, sharpsl_rc);
++
++ sharpsl_rc->dev = &pdev->dev;
++ sharpsl_rc->input = input_dev;
++ spin_lock_init(&sharpsl_rc->lock);
++
++ /* Init Remote Control Timer */
++ init_timer(&sharpsl_rc->rctimer);
++ sharpsl_rc->rctimer.function = sharpsl_rc_timer_callback;
++ sharpsl_rc->rctimer.data = (unsigned long) sharpsl_rc;
++
++ input_dev->name = "Sharp Remote Control CE-RHX";
++ input_dev->phys = "sharpsl_rc/input0";
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->id.vendor = 0x0001;
++ input_dev->id.product = 0x0001;
++ input_dev->id.version = 0x0100;
++ input_dev->dev.parent = &pdev->dev;
++
++ input_dev->evbit[0] = BIT(EV_KEY);
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ remote_keys = remote_keys_spitz;
++ else
++ remote_keys = remote_keys_corgi;
++ for (i = 0; i < (machine_is_borzoi() || machine_is_spitz() || machine_is_akita() ?
++ ARRAY_SIZE(remote_keys_spitz) : ARRAY_SIZE(remote_keys_corgi));
++ ++i)
++ set_bit(remote_keys[i].key, input_dev->keybit);
++
++ ret = input_register_device(sharpsl_rc->input);
++ if (ret) {
++ dev_dbg(&pdev->dev, "Failed to register Sharp Remote input device\n");
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return ret;
++ }
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita()) {
++ pxa_gpio_mode(SPITZ_GPIO_AK_INT | GPIO_IN);
++ ret = request_irq(SPITZ_IRQ_GPIO_AK_INT,
++ sharpsl_rc_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "sharpsl_rc",
++ sharpsl_rc);
++ } else {
++ pxa_gpio_mode(CORGI_GPIO_AK_INT | GPIO_IN);
++ ret = request_irq(CORGI_IRQ_GPIO_AK_INT,
++ sharpsl_rc_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "sharpsl_rc",
++ sharpsl_rc);
++ }
++ if (ret < 0) {
++ dev_dbg(&pdev->dev, "Can't get IRQ: %d!\n", i);
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return ret;
++ }
++
++ return 0;
++}
++
++static int sharpsl_rc_remove(struct platform_device *pdev)
++{
++ struct sharpsl_rc *sharpsl_rc = platform_get_drvdata(pdev);
++
++ dev_dbg(&pdev->dev, "sharpsl_rc_remove\n");
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ free_irq(SPITZ_IRQ_GPIO_AK_INT, sharpsl_rc);
++ else
++ free_irq(CORGI_IRQ_GPIO_AK_INT, sharpsl_rc);
++ del_timer_sync(&sharpsl_rc->rctimer);
++ input_unregister_device(sharpsl_rc->input);
++ kfree(sharpsl_rc);
++
++ return 0;
++}
++
++static struct platform_driver sharpsl_rc_driver = {
++ .probe = sharpsl_rc_probe,
++ .remove = sharpsl_rc_remove,
++ .suspend = NULL,
++ .resume = NULL,
++ .driver = {
++ .name = "sharpsl-remote-control",
++ },
++};
++
++static int __devinit sharpsl_rc_init(void)
++{
++ printk("sharpsl_rc_init\n");
++ return platform_driver_register(&sharpsl_rc_driver);
++}
++
++static void __exit sharpsl_rc_exit(void)
++{
++ printk("sharpsl_rc_exit\n");
++ platform_driver_unregister(&sharpsl_rc_driver);
++}
++
++module_init(sharpsl_rc_init);
++module_exit(sharpsl_rc_exit);
++
++MODULE_AUTHOR("Justin Patrin <papercrane@reversefold.com>");
++MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
++MODULE_DESCRIPTION("SharpSL Remote Control Driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/drivers/input/keyboard/spitzkbd.c
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/input/keyboard/spitzkbd.c 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/drivers/input/keyboard/spitzkbd.c 2008-06-02 00:20:05.000000000 +0100
+@@ -19,6 +19,7 @@
+ #include <linux/jiffies.h>
+ #include <linux/module.h>
+ #include <linux/slab.h>
++#include <linux/kmod.h>
+
+ #include <asm/arch/spitz.h>
+ #include <asm/arch/hardware.h>
+@@ -280,13 +281,21 @@
+ static int sharpsl_hinge_state;
+ static int hinge_count;
+
++void spitzkbd_handle_sharpsl_rc(void *arg) {
++ request_module("sharpsl_rc");
++}
++
++DECLARE_WORK(spitzkbd_work, spitzkbd_handle_sharpsl_rc);
++
+ static void spitzkbd_hinge_timer(unsigned long data)
+ {
+ struct spitzkbd *spitzkbd_data = (struct spitzkbd *) data;
+ unsigned long state;
+ unsigned long flags;
++ unsigned int headphone, remote;
+
+ state = GPLR(SPITZ_GPIO_SWA) & (GPIO_bit(SPITZ_GPIO_SWA)|GPIO_bit(SPITZ_GPIO_SWB));
++ state |= (GPLR(SPITZ_GPIO_HP_IN) & GPIO_bit(SPITZ_GPIO_HP_IN));
+ state |= (GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT));
+ if (state != sharpsl_hinge_state) {
+ hinge_count = 0;
+@@ -300,9 +309,18 @@
+
+ input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0));
+ input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0));
+- input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0));
++
++ headphone = ((GPLR(SPITZ_GPIO_HP_IN) & GPIO_bit(SPITZ_GPIO_HP_IN)) != 0);
++ input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, headphone);
++
++ remote = headphone && ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) == 0);
++ input_report_switch(spitzkbd_data->input, SW_REMOTE_INSERT, remote);
+ input_sync(spitzkbd_data->input);
+
++ if (remote) {
++ schedule_work(&spitzkbd_work);
++ }
++
+ spin_unlock_irqrestore(&spitzkbd_data->lock, flags);
+ } else {
+ mod_timer(&spitzkbd_data->htimer, jiffies + msecs_to_jiffies(HINGE_SCAN_INTERVAL));
+@@ -396,6 +414,7 @@
+ set_bit(SW_LID, input_dev->swbit);
+ set_bit(SW_TABLET_MODE, input_dev->swbit);
+ set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
++ set_bit(SW_REMOTE_INSERT, input_dev->swbit);
+
+ err = input_register_device(input_dev);
+ if (err)
+@@ -433,9 +452,12 @@
+ request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr,
+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "Spitzkbd SWB", spitzkbd);
+- request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
++ request_irq(SPITZ_IRQ_GPIO_HP_IN, spitzkbd_hinge_isr,
+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "Spitzkbd HP", spitzkbd);
++ request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "Spitzkbd HP Type", spitzkbd);
+
+ return 0;
+
+@@ -456,6 +478,7 @@
+ free_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd);
++ free_irq(SPITZ_IRQ_GPIO_HP_IN, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd);
+
+ del_timer_sync(&spitzkbd->htimer);
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/sharpsl.h
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/sharpsl.h 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/sharpsl.h 2008-06-02 00:20:05.000000000 +0100
+@@ -37,15 +37,10 @@
+ */
+ #define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
+
+-/* MAX1111 Channel Definitions */
+-#define MAX1111_BATT_VOLT 4u
+-#define MAX1111_BATT_TEMP 2u
+-#define MAX1111_ACIN_VOLT 6u
+-
+ extern struct battery_thresh spitz_battery_levels_acin[];
+ extern struct battery_thresh spitz_battery_levels_noac[];
+ void sharpsl_pm_pxa_init(void);
+ void sharpsl_pm_pxa_remove(void);
+-int sharpsl_pm_pxa_read_max1111(int channel);
++
+
+
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/sharpsl_pm.c
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/sharpsl_pm.c 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/sharpsl_pm.c 2008-06-02 00:20:05.000000000 +0100
+@@ -136,6 +136,8 @@
+ | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
+ }
+
++EXPORT_SYMBOL(sharpsl_pm_pxa_read_max1111);
++
+ void sharpsl_pm_pxa_init(void)
+ {
+ pxa_gpio_mode(sharpsl_pm.machinfo->gpio_acin | GPIO_IN);
+Index: linux-2.6.26-rc4/include/asm-arm/hardware/sharpsl_pm.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/hardware/sharpsl_pm.h 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/hardware/sharpsl_pm.h 2008-06-02 00:20:05.000000000 +0100
+@@ -104,3 +104,10 @@
+ irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id);
+ irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id);
+
++/* MAX1111 Channel Definitions */
++#define MAX1111_REMCOM 0u
++#define MAX1111_BATT_VOLT 4u
++#define MAX1111_BATT_TEMP 2u
++#define MAX1111_ACIN_VOLT 6u
++
++int sharpsl_pm_pxa_read_max1111(int channel);
+Index: linux-2.6.26-rc4/include/linux/input.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/linux/input.h 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/include/linux/input.h 2008-06-02 00:20:05.000000000 +0100
+@@ -638,6 +638,7 @@
+ #define SW_TABLET_MODE 0x01 /* set = tablet mode */
+ #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
+ #define SW_RADIO 0x03 /* set = radio enabled */
++#define SW_REMOTE_INSERT 0x04 /* set = remote */
+ #define SW_MAX 0x0f
+ #define SW_CNT (SW_MAX+1)
+
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/spitz_pm.c
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/spitz_pm.c 2008-06-02 00:20:03.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/spitz_pm.c 2008-06-02 09:46:10.000000000 +0100
+@@ -160,6 +160,13 @@
+ if (resume_on_alarm && (PEDR & PWER_RTC))
+ is_resume |= PWER_RTC;
+
++ printk("wakeup: PEDR: %x, PKSR: %x, HP_IN: %x, AK_INT: %x\n", PEDR, PKSR, GPIO_bit(SPITZ_GPIO_HP_IN), GPIO_bit(SPITZ_GPIO_AK_INT));
++
++ //remote/headphone interrupt, wakeup
++ if (PEDR == 0 && (PKSR & 0xc0d01) != 0) {
++ is_resume |= PWER_RTC;
++ }
++
+ dev_dbg(sharpsl_pm.dev, "is_resume: %x\n",is_resume);
+ return is_resume;
+ }
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/spitz_h_rewrite.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/spitz_h_rewrite.patch
new file mode 100644
index 0000000000..3dcf4ed8af
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/spitz_h_rewrite.patch
@@ -0,0 +1,497 @@
+http://www.uwsg.indiana.edu/hypermail/linux/kernel/0802.1/3541.html
+
+Here is a rewrite of spitz.h, which includes comments documenting
+function of particular GPIO pins.
+
+spitz_h_rewrite.patch provides:
+- no changes in compiled code
+- partial spitz.h rewrite:
+ * organized by function
+ * describes complete GPIO pinout
+ * comments added
+ * removed defines cloning pxa-regs.h
+- prefer generic pxa-regs.h GPIO if available
+- use GPIO names instead of numbers
+
+Thanks to Trisoft for providing needed information.
+
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/spitz_pm.c
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/spitz_pm.c 2008-06-02 00:13:53.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/spitz_pm.c 2008-06-02 00:13:53.000000000 +0100
+@@ -111,9 +111,9 @@
+ pxa_gpio_mode(GPIO18_RDY|GPIO_OUT | GPIO_DFLT_HIGH);
+
+ PRER = GPIO_bit(SPITZ_GPIO_KEY_INT);
+- PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
+- PWER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET) | PWER_RTC;
+- PKWR = GPIO_bit(SPITZ_GPIO_SYNC) | GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
++ PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST);
++ PWER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST) | PWER_RTC;
++ PKWR = GPIO_bit(SPITZ_GPIO_SYNC) | GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST);
+ PKSR = 0xffffffff; // clear
+
+ /* nRESET_OUT Disable */
+@@ -126,7 +126,7 @@
+ static void spitz_postsuspend(void)
+ {
+ pxa_gpio_mode(GPIO18_RDY_MD);
+- pxa_gpio_mode(10 | GPIO_IN);
++ pxa_gpio_mode(SPITZ_GPIO_NC_10 | GPIO_IN);
+ }
+
+ static int spitz_should_wakeup(unsigned int resume_on_alarm)
+Index: linux-2.6.26-rc4/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/video/pxafb.c 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/video/pxafb.c 2008-06-02 00:15:22.000000000 +0100
+@@ -966,7 +966,7 @@
+ return;
+ }
+
+- for (gpio = 58; ldd_bits; gpio++, ldd_bits--)
++ for (gpio = GPIO58_LDD_0; ldd_bits; gpio++, ldd_bits--)
+ pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT);
+ pxa_gpio_mode(GPIO74_LCD_FCLK_MD);
+ pxa_gpio_mode(GPIO75_LCD_LCLK_MD);
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/akita.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/akita.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/akita.h 2008-06-02 00:13:53.000000000 +0100
+@@ -12,11 +12,11 @@
+ /* Akita IO Expander GPIOs */
+
+ #define AKITA_IOEXP_RESERVED_7 (1 << 7)
+-#define AKITA_IOEXP_IR_ON (1 << 6)
+-#define AKITA_IOEXP_AKIN_PULLUP (1 << 5)
+-#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4)
+-#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3)
+-#define AKITA_IOEXP_MIC_BIAS (1 << 2)
++#define AKITA_IOEXP_IR_ON (1 << 6) /* IrDA On */
++#define AKITA_IOEXP_AKIN_PULLUP (1 << 5) /* Pull-Up for Remote */
++#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4) /* Backlight Control */
++#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3) /* Backlight On */
++#define AKITA_IOEXP_MIC_BIAS (1 << 2) /* Mic Bias On */
+ #define AKITA_IOEXP_RESERVED_1 (1 << 1)
+ #define AKITA_IOEXP_RESERVED_0 (1 << 0)
+
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/spitz.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/spitz.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/spitz.h 2008-06-02 00:13:53.000000000 +0100
+@@ -1,8 +1,9 @@
+ /*
+- * Hardware specific definitions for SL-Cx000 series of PDAs
++ * Hardware specific definitions for SL-Cxx00 series of PDAs
+ *
+ * Copyright (c) 2005 Alexander Wykes
+ * Copyright (c) 2005 Richard Purdie
++ * Copyright (c) 2008 Stanislav Brabec
+ *
+ * Based on Sharp's 2.4 kernel patches
+ *
+@@ -13,140 +14,257 @@
+ */
+ #ifndef __ASM_ARCH_SPITZ_H
+ #define __ASM_ARCH_SPITZ_H 1
+-#endif
+
+-#include <linux/fb.h>
++#include <asm-arm/arch-pxa/irqs.h>
++#include <linux/platform_device.h>
+
+ /* Spitz/Akita GPIOs */
+
+-#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */
+-#define SPITZ_GPIO_RESET (1)
+-#define SPITZ_GPIO_nSD_DETECT (9)
+-#define SPITZ_GPIO_TP_INT (11) /* Touch Panel interrupt */
+-#define SPITZ_GPIO_AK_INT (13) /* Remote Control */
+-#define SPITZ_GPIO_ADS7846_CS (14)
+-#define SPITZ_GPIO_SYNC (16)
+-#define SPITZ_GPIO_MAX1111_CS (20)
+-#define SPITZ_GPIO_FATAL_BAT (21)
+-#define SPITZ_GPIO_HSYNC (22)
+-#define SPITZ_GPIO_nSD_CLK (32)
+-#define SPITZ_GPIO_USB_DEVICE (35)
+-#define SPITZ_GPIO_USB_HOST (37)
+-#define SPITZ_GPIO_USB_CONNECT (41)
+-#define SPITZ_GPIO_LCDCON_CS (53)
+-#define SPITZ_GPIO_nPCE (54)
+-#define SPITZ_GPIO_nSD_WP (81)
+-#define SPITZ_GPIO_ON_RESET (89)
+-#define SPITZ_GPIO_BAT_COVER (90)
+-#define SPITZ_GPIO_CF_CD (94)
+-#define SPITZ_GPIO_ON_KEY (95)
+-#define SPITZ_GPIO_SWA (97)
+-#define SPITZ_GPIO_SWB (96)
+-#define SPITZ_GPIO_CHRG_FULL (101)
+-#define SPITZ_GPIO_CO (101)
+-#define SPITZ_GPIO_CF_IRQ (105)
+-#define SPITZ_GPIO_AC_IN (115)
+-#define SPITZ_GPIO_HP_IN (116)
++/* This list refers to all GPIO pins either in defines or in comments.
++ *
++ * GPIO pins not listed:
++ * GPIO2 SYS_EN: System Power Enable
++ * GPIO5-GPIO8 PWR_CAP0-PWR_CAP3: sleep DC-DC converter power capacitors
++ * GPIO40 not connected
++ */
+
+-/* Spitz Only GPIOs */
+
+-#define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */
+-#define SPITZ_GPIO_CF2_CD (93)
++/* Spitz/Akita System GPIO */
++
++#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */
++#define SPITZ_GPIO_SYNC (16) /* IOPORT Wake Up (input) */
++#define SPITZ_GPIO_NAND_CS (79) /* NAND Flash Chip Select */
++#define SPITZ_GPIO_NC_10 (10) /* Not Connected (but used in kernel) */
++/* This GPIO pin is connected:
++ * GPIO1_RST
++ */
+
+
++/* Compact Flash Interface */
++
++/* Spitz/Akita Compact Flash Interface */
++#define SPITZ_GPIO_CF_CD (94) /* CF IRQ */
++#define SPITZ_GPIO_CF_IRQ (105) /* CF Ready */
++/* These GPIO pins are connected:
++ * GPIO48_nPOE
++ * GPIO49_nPWE
++ * GPIO50_nPIOR
++ * GPIO51_nPIOW
++ * GPIO54_nPCE_2
++ * GPIO55_nPREG
++ * GPIO56_nPWAIT
++ * GPIO57_nIOIS16
++ * GPIO80_nCS_4
++ * GPIO85_nPCE_1
++ * GPIO104_pSKTSEL
++ */
++
++/* Spitz only Compact Flash Interface */
++#define SPITZ_GPIO_CF2_CD (93) /* CF slot1 IRQ */
++#define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */
++/* This GPIO pin is connected:
++ * GPIO78_nCS_2
++ */
++
++
++/* Spitz/Akita Battery, Power and Service Connector */
++
++#define SPITZ_GPIO_FATAL_BAT (21) /* Fatal Battery */
++#define SPITZ_GPIO_BAT_COVER (90) /* Battery Cover switch */
++#define SPITZ_GPIO_BAT_COVER2 (15) /* Battery Cover switch, parallel pin */
++#define SPITZ_GPIO_CHRG_FULL (101) /* Battery Full */
++#define SPITZ_GPIO_AC_IN (115) /* External Power Supply is active */
++#define SPITZ_GPIO_ON_RESET (89) /* Software Reset */
++#define SPITZ_GPIO_SERVICE0 (83) /* Service Connector */
++#define SPITZ_GPIO_SERVICE1 (84) /* Service Connector */
++/* This GPIO pin is connected:
++ * GPIO18_RDY
++ */
++
++
++/* Spitz/Akita Display Controller */
++
++#define SPITZ_GPIO_HSYNC (22) /* Line Sync Feedback */
++/* These GPIO pins are connected:
++ * GPIO58_LDD_0-GPIO58_LDD_15
++ * GPIO74_LCD_FCLK
++ * GPIO75_LCD_LCLK
++ * GPIO76_LCD_PCLK
++ * GPIO77_LCD_ACBIAS
++ */
++
++
++/* Spitz/Akita SSP/SPI Bus and Devices */
++
++#define SPITZ_GPIO_SSP_CLK (19) /* SSP bus Clock */
++#define SPITZ_GPIO_SSP_RXD (86) /* SSP bus RxD */
++#define SPITZ_GPIO_SSP_TXD (87) /* SSP bus TxD */
++#define SPITZ_GPIO_TP_INT (11) /* Touch Panel IRQ */
++#define SPITZ_GPIO_ADS7846_CS (14) /* Touch Panel Controller Chip Select */
++#define SPITZ_GPIO_MAX1111_CS (20) /* Multi Channel ADC Chip Select */
++#define SPITZ_GPIO_LCDCON_CS (53) /* LCD Controller Chip Select */
++
++
++/* Spitz/Akita Supplementary USB OTG Pins */
++
++#define SPITZ_GPIO_USB_DEVICE (35) /* USB Client power is present */
++#define SPITZ_GPIO_USB_HOST (37) /* USB OTG 5V Host power supply control */
++#define SPITZ_GPIO_USB_CONNECT (41) /* USB Host Cable is connected */
++
++
++/* Spitz/Akita Audio */
++
++#define SPITZ_GPIO_HP_IN (116) /* CPU Headphone detect */
++#define SPITZ_GPIO_AK_INT (13) /* Remote Control detect */
++/* These GPIO AC97 pins are connected:
++ * GPIO28_BITCLK
++ * GPIO29_SDATA_IN
++ * GPIO30_SDATA_OUT
++ * GPIO31_SYNC
++ * GPIO113_AC97_RESET_N
++ */
++
++
++/* Spitz/Akita SD Slot */
++
++#define SPITZ_GPIO_nSD_DETECT (9) /* SD Card Presence */
++#define SPITZ_GPIO_nSD_WP (81) /* SD Write Protection */
++/* These GPIO pins are connected:
++ * GPIO32_MMCCLK
++ * GPIO92_MMCDAT0
++ * GPIO109_MMCDAT1
++ * GPIO110_MMCDAT2
++ * GPIO111_MMCDAT3
++ * GPIO112_MMCCMD
++ */
++
++/* Spitz/Akita I2C bus */
++#define SPITZ_GPIO_SCL (117) /* I2C SCL */
++#define SPITZ_GPIO_SDA (118) /* I2C SDA */
++#define SPITZ_GPIO_PWR_SCL (3) /* I2C SCL power */
++#define SPITZ_GPIO_PWR_SDA (4) /* I2C SDA power */
++
++/* audio codec pins */
++
++
++/* Spitz/Akita UART ports */
++
++/* Fully Featured UART - connected to IOPORT connector */
++#define SPITZ_GPIO_FFRXD (102) /* IOPORT has nRXD inverted levels */
++#define SPITZ_GPIO_FFTXD (99) /* IOPORT has nTXD inverted levels */
++#define SPITZ_GPIO_FFRTS (98)
++#define SPITZ_GPIO_FFCTS (100)
++#define SPITZ_GPIO_FFDTR (82)
++#define SPITZ_GPIO_FFDSR (33)
++
++/* These UART GPIO pins are connected to Bluetooth
++ * (only on Akita version with Bluetooth)
++ * GPIO42_BTRXD
++ * GPIO43_BTTXD
++ * GPIO44_BTCTS
++ * GPIO45_BTRTS
++ */
++
++/* These UART GPIO pins are connected to IrDA:
++ * GPIO46_STRXD
++ * GPIO47_STTXD
++ */
++
+ /* Spitz/Akita Keyboard Definitions */
+
+-#define SPITZ_KEY_STROBE_NUM (11)
+-#define SPITZ_KEY_SENSE_NUM (7)
+-#define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000
+-#define SPITZ_GPIO_G1_STROBE_BIT 0x00100000
+-#define SPITZ_GPIO_G2_STROBE_BIT 0x01000000
+-#define SPITZ_GPIO_G3_STROBE_BIT 0x00041880
+-#define SPITZ_GPIO_G0_SENSE_BIT 0x00021000
+-#define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4
+-#define SPITZ_GPIO_G2_SENSE_BIT 0x08000000
+-#define SPITZ_GPIO_G3_SENSE_BIT 0x00000000
+-
+-#define SPITZ_GPIO_KEY_STROBE0 88
+-#define SPITZ_GPIO_KEY_STROBE1 23
+-#define SPITZ_GPIO_KEY_STROBE2 24
+-#define SPITZ_GPIO_KEY_STROBE3 25
+-#define SPITZ_GPIO_KEY_STROBE4 26
+-#define SPITZ_GPIO_KEY_STROBE5 27
+-#define SPITZ_GPIO_KEY_STROBE6 52
+-#define SPITZ_GPIO_KEY_STROBE7 103
+-#define SPITZ_GPIO_KEY_STROBE8 107
+-#define SPITZ_GPIO_KEY_STROBE9 108
+-#define SPITZ_GPIO_KEY_STROBE10 114
+-
+-#define SPITZ_GPIO_KEY_SENSE0 12
+-#define SPITZ_GPIO_KEY_SENSE1 17
+-#define SPITZ_GPIO_KEY_SENSE2 91
+-#define SPITZ_GPIO_KEY_SENSE3 34
+-#define SPITZ_GPIO_KEY_SENSE4 36
+-#define SPITZ_GPIO_KEY_SENSE5 38
+-#define SPITZ_GPIO_KEY_SENSE6 39
++#define SPITZ_KEY_STROBE_NUM (11)
++#define SPITZ_KEY_SENSE_NUM (7)
++#define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000
++#define SPITZ_GPIO_G1_STROBE_BIT 0x00100000
++#define SPITZ_GPIO_G2_STROBE_BIT 0x01000000
++#define SPITZ_GPIO_G3_STROBE_BIT 0x00041880
++#define SPITZ_GPIO_G0_SENSE_BIT 0x00021000
++#define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4
++#define SPITZ_GPIO_G2_SENSE_BIT 0x08000000
++#define SPITZ_GPIO_G3_SENSE_BIT 0x00000000
++#define SPITZ_GPIO_KEY_STROBE0 (88)
++#define SPITZ_GPIO_KEY_STROBE1 (23)
++#define SPITZ_GPIO_KEY_STROBE2 (24)
++#define SPITZ_GPIO_KEY_STROBE3 (25)
++#define SPITZ_GPIO_KEY_STROBE4 (26)
++#define SPITZ_GPIO_KEY_STROBE5 (27)
++#define SPITZ_GPIO_KEY_STROBE6 (52)
++#define SPITZ_GPIO_KEY_STROBE7 (103)
++#define SPITZ_GPIO_KEY_STROBE8 (107)
++#define SPITZ_GPIO_KEY_STROBE9 (108)
++#define SPITZ_GPIO_KEY_STROBE10 (114)
++#define SPITZ_GPIO_KEY_SENSE0 (12)
++#define SPITZ_GPIO_KEY_SENSE1 (17)
++#define SPITZ_GPIO_KEY_SENSE2 (91)
++#define SPITZ_GPIO_KEY_SENSE3 (34)
++#define SPITZ_GPIO_KEY_SENSE4 (36)
++#define SPITZ_GPIO_KEY_SENSE5 (38)
++#define SPITZ_GPIO_KEY_SENSE6 (39)
++
++#define SPITZ_GPIO_SWA (97) /* Keyboard Interrupt A */
++#define SPITZ_GPIO_SWB (96) /* Keyboard Interrupt B */
++#define SPITZ_GPIO_ON_KEY (95) /* Power On Key */
+
+
+-/* Spitz Scoop Device (No. 1) GPIOs */
++/* Spitz/Akita Scoop Device (No. 1) GPIOs */
+ /* Suspend States in comments */
+-#define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Keep */
+-#define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Keep */
+-#define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Keep */
+-#define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Low */
+-#define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Low */
+-#define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* Keep */
+-#define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Keep */
+-#define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Low */
+-#define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Low */
++#define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Green LED, Keep */
++#define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Fast Charge On, Keep */
++#define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Charge On, Keep */
++#define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Extra Mute Left, Low */
++#define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Extra Mute Right, Low */
++#define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* CF+SD Power Circuit, Keep */
++#define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Orange LED, Keep */
++#define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Dummy Load, Low */
++#define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Battery Sensor On, Low */
+
+ #define SPITZ_SCP_IO_DIR (SPITZ_SCP_LED_GREEN | SPITZ_SCP_JK_B | SPITZ_SCP_CHRG_ON | \
+- SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \
+- SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
++ SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \
++ SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
+ #define SPITZ_SCP_IO_OUT (SPITZ_SCP_CHRG_ON | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R)
+ #define SPITZ_SCP_SUS_CLR (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
+ #define SPITZ_SCP_SUS_SET 0
+
+ /* Spitz Scoop Device (No. 2) GPIOs */
+-/* Suspend States in comments */
+-#define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* High */
+-#define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Keep */
+-#define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */
+-#define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */
+-#define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */
+-#define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */
+-#define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Low */
+-#define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Low */
+-#define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Low */
++/* Suspend States in comments
++ * Spitz only, Akita uses corresponding AKITA_IOEXP_ */
++#define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* IrDA On, High */
++#define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Pull-Up for Remote, Keep */
++#define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */
++#define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */
++#define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */
++#define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */
++#define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Backlight Control, Low */
++#define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Backlight On, Low */
++#define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Mic Bias On, Low */
+
+ #define SPITZ_SCP2_IO_DIR (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1 | \
+- SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
+- SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
++ SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
++ SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
+
+ #define SPITZ_SCP2_IO_OUT (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1)
+ #define SPITZ_SCP2_SUS_CLR (SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
+- SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
++ SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
+ #define SPITZ_SCP2_SUS_SET (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1)
+
+
+-/* Spitz IRQ Definitions */
++/* Spitz/Akita IRQ Definitions */
+
+-#define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT)
+-#define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN)
+-#define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT)
+-#define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN)
+-#define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT)
+-#define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC)
+-#define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY)
+-#define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA)
+-#define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB)
++#define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT)
++#define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN)
++#define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT)
++#define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN)
++#define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT)
++#define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC)
++#define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY)
++#define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA)
++#define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB)
+ #define SPITZ_IRQ_GPIO_BAT_COVER IRQ_GPIO(SPITZ_GPIO_BAT_COVER)
+ #define SPITZ_IRQ_GPIO_FATAL_BAT IRQ_GPIO(SPITZ_GPIO_FATAL_BAT)
+-#define SPITZ_IRQ_GPIO_CO IRQ_GPIO(SPITZ_GPIO_CO)
+-#define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ)
+-#define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD)
+-#define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ)
+-#define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT)
++#define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ)
++#define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD)
++#define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ)
++#define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT)
+ #define SPITZ_IRQ_GPIO_nSD_DETECT IRQ_GPIO(SPITZ_GPIO_nSD_DETECT)
+
+ /*
+@@ -156,3 +274,5 @@
+ extern struct platform_device spitzscoop2_device;
+ extern struct platform_device spitzssp_device;
+ extern struct sharpsl_charger_machinfo spitz_pm_machinfo;
++
++#endif
+Index: linux-2.6.26-rc4/sound/arm/pxa2xx-ac97.c
+===================================================================
+--- linux-2.6.26-rc4.orig/sound/arm/pxa2xx-ac97.c 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/sound/arm/pxa2xx-ac97.c 2008-06-02 00:19:38.000000000 +0100
+@@ -156,10 +156,10 @@
+ #ifdef CONFIG_PXA27x
+ /* warm reset broken on Bulverde,
+ so manually keep AC97 reset high */
+- pxa_gpio_mode(113 | GPIO_OUT | GPIO_DFLT_HIGH);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N | GPIO_OUT | GPIO_DFLT_HIGH);
+ udelay(10);
+ GCR |= GCR_WARM_RST;
+- pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N_MD);
+ udelay(500);
+ #elif defined(CONFIG_PXA3xx)
+ timeout = 100;
+@@ -364,7 +364,7 @@
+ pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
+ #ifdef CONFIG_PXA27x
+ /* Use GPIO 113 as AC97 Reset on Bulverde */
+- pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N_MD | GPIO_ALT_FN_2_OUT);
+ ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK");
+ if (IS_ERR(ac97conf_clk)) {
+ ret = PTR_ERR(ac97conf_clk);
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa2xx-gpio.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/pxa2xx-gpio.h 2008-06-02 00:18:07.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa2xx-gpio.h 2008-06-02 00:18:28.000000000 +0100
+@@ -138,6 +138,7 @@
+ #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */
+ #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */
+ #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */
++#define GPIO104_pSKTSEL 104 /* PCMCIA Socket Select (PXA27x) */
+ #define GPIO105_CIF_DD_1 105 /* Camera data pin 1 */
+ #define GPIO106_CIF_DD_9 106 /* Camera data pin 9 */
+ #define GPIO107_CIF_DD_8 107 /* Camera data pin 8 */
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/versatile-armv6.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/versatile-armv6.patch
new file mode 100644
index 0000000000..6f2ca26a9a
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/versatile-armv6.patch
@@ -0,0 +1,17 @@
+---
+ arch/arm/mm/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: linux-2.6.26-rc4/arch/arm/mm/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mm/Kconfig 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mm/Kconfig 2008-06-01 18:40:07.000000000 +0100
+@@ -387,7 +387,7 @@
+ # ARMv6
+ config CPU_V6
+ bool "Support ARM V6 processor"
+- depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM7X00A || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176
++ depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM7X00A || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || ARCH_VERSATILE_PB
+ default y if ARCH_MX3
+ default y if ARCH_MSM7X00A
+ select CPU_32v6
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite-boot.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite-boot.patch
new file mode 100644
index 0000000000..f41928eca5
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite-boot.patch
@@ -0,0 +1,45 @@
+From 04c42f566c68b757fdadf54e0e0f9dfe9f3f9b06 Mon Sep 17 00:00:00 2001
+From: eric miao <eric.miao@marvell.com>
+Date: Tue, 19 Jun 2007 16:42:53 +0800
+Subject: [PATCH] [PATCH] make zylonite boot
+
+1. reuse head-xscale.S for XSC3
+
+2. add a workaround for machine ID assignment, which should be done
+ by boot loader
+---
+ arch/arm/boot/compressed/Makefile | 4 ++++
+ arch/arm/boot/compressed/head-xscale.S | 5 +++++
+ 2 files changed, 9 insertions(+)
+
+Index: linux-2.6-pxa3/arch/arm/boot/compressed/Makefile
+===================================================================
+--- linux-2.6-pxa3.orig/arch/arm/boot/compressed/Makefile 2007-09-24 11:25:57.000000000 +0200
++++ linux-2.6-pxa3/arch/arm/boot/compressed/Makefile 2007-09-24 12:26:53.000000000 +0200
+@@ -40,6 +40,10 @@
+ OBJS += head-xscale.o
+ endif
+
++ifeq ($(CONFIG_CPU_XSC3),y)
++OBJS += head-xscale.o
++endif
++
+ ifeq ($(CONFIG_PXA_SHARPSL),y)
+ OBJS += head-sharpsl.o
+ endif
+Index: linux-2.6-pxa3/arch/arm/boot/compressed/head-xscale.S
+===================================================================
+--- linux-2.6-pxa3.orig/arch/arm/boot/compressed/head-xscale.S 2007-09-24 11:42:27.000000000 +0200
++++ linux-2.6-pxa3/arch/arm/boot/compressed/head-xscale.S 2007-09-24 12:26:02.000000000 +0200
+@@ -33,6 +33,11 @@
+ bic r0, r0, #0x1000 @ clear Icache
+ mcr p15, 0, r0, c1, c0, 0
+
++#ifdef CONFIG_MACH_ZYLONITE
++ mov r7, #(MACH_TYPE_ZYLONITE & 0xff)
++ orr r7, r7, #(MACH_TYPE_ZYLONITE & 0xff00)
++#endif
++
+ #ifdef CONFIG_ARCH_COTULLA_IDP
+ mov r7, #MACH_TYPE_COTULLA_IDP
+ #endif
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_keypad-r0.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_keypad-r0.patch
new file mode 100644
index 0000000000..1889b3884e
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_keypad-r0.patch
@@ -0,0 +1,1187 @@
+Eric Miao's pxa keypad patchset backport.
+---
+ arch/arm/mach-pxa/devices.h | 1
+ arch/arm/mach-pxa/generic.c | 31 +
+ arch/arm/mach-pxa/pxa27x.c | 2
+ arch/arm/mach-pxa/pxa300.c | 6
+ arch/arm/mach-pxa/pxa3xx.c | 1
+ arch/arm/mach-pxa/zylonite.c | 68 +++
+ drivers/input/keyboard/Kconfig | 8
+ drivers/input/keyboard/Makefile | 2
+ drivers/input/keyboard/pxa27x_keyboard.c | 273 -------------
+ drivers/input/keyboard/pxa27x_keypad.c | 575 +++++++++++++++++++++++++++++
+ include/asm-arm/arch-pxa/irqs.h | 2
+ include/asm-arm/arch-pxa/pxa27x_keyboard.h | 13
+ include/asm-arm/arch-pxa/pxa27x_keypad.h | 58 ++
+ 13 files changed, 745 insertions(+), 295 deletions(-)
+
+Index: linux-2.6.23-z-input/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/Kconfig 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/drivers/input/keyboard/Kconfig 2008-02-18 01:43:28.000000000 +0100
+@@ -218,13 +218,13 @@
+ module will be called omap-keypad.
+
+ config KEYBOARD_PXA27x
+- tristate "PXA27x keyboard support"
+- depends on PXA27x
++ tristate "PXA27x/PXA3xx keypad support"
++ depends on PXA27x || PXA3xx
+ help
+- Enable support for PXA27x matrix keyboard controller
++ Enable support for PXA27x/PXA3xx keypad controller
+
+ To compile this driver as a module, choose M here: the
+- module will be called pxa27x_keyboard.
++ module will be called pxa27x_keypad.
+
+ config KEYBOARD_AAED2000
+ tristate "AAED-2000 keyboard"
+Index: linux-2.6.23-z-input/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/Makefile 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/drivers/input/keyboard/Makefile 2008-02-18 01:43:28.000000000 +0100
+@@ -18,7 +18,7 @@
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+ obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
+-obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keyboard.o
++obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o
+ obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o
+ obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o
+ obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
+Index: linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keypad.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keypad.c 2008-02-19 01:40:04.000000000 +0100
+@@ -0,0 +1,575 @@
++/*
++ * linux/drivers/input/keyboard/pxa27x_keypad.c
++ *
++ * Driver for the pxa27x matrix keyboard controller.
++ *
++ * Created: Feb 22, 2007
++ * Author: Rodolfo Giometti <giometti@linux.it>
++ *
++ * Based on a previous implementations by Kevin O'Connor
++ * <kevin_at_koconnor.net> and Alex Osborne <bobofdoom@gmail.com> and
++ * on some suggestions by Nicolas Pitre <nico@cam.org>.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/input.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/mfp.h>
++#include <asm/arch/pxa27x_keypad.h>
++
++#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
++
++/*
++ * Keypad Controller registers
++ */
++#define KPC 0x0000 /* Keypad Control register */
++#define KPDK 0x0008 /* Keypad Direct Key register */
++#define KPREC 0x0010 /* Keypad Rotary Encoder register */
++#define KPMK 0x0018 /* Keypad Matrix Key register */
++#define KPAS 0x0020 /* Keypad Automatic Scan register */
++
++/* Keypad Automatic Scan Multiple Key Presser register 0-3 */
++#define KPASMKP0 0x0028
++#define KPASMKP1 0x0030
++#define KPASMKP2 0x0038
++#define KPASMKP3 0x0040
++#define KPKDI 0x0048
++
++/* bit definitions */
++#define KPC_MKRN(n) ((((n) - 1) & 0x7) << 26) /* matrix key row number */
++#define KPC_MKCN(n) ((((n) - 1) & 0x7) << 23) /* matrix key column number */
++#define KPC_DKN(n) ((((n) - 1) & 0x7) << 6) /* direct key number */
++
++#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_MS(n) (0x1 << (13 + (n))) /* Matrix scan line 'n' */
++#define KPC_MS_ALL (0xff << 13)
++
++#define KPC_ME (0x1 << 12) /* Matrix Keypad Enable */
++#define KPC_MIE (0x1 << 11) /* Matrix Interrupt Enable */
++#define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Keypad Debounce Select */
++#define KPC_DI (0x1 << 5) /* Direct key interrupt bit */
++#define KPC_RE_ZERO_DEB (0x1 << 4) /* Rotary Encoder Zero Debounce */
++#define KPC_REE1 (0x1 << 3) /* Rotary Encoder1 Enable */
++#define KPC_REE0 (0x1 << 2) /* Rotary Encoder0 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_DK(n) ((n) & 0xff)
++
++#define KPREC_OF1 (0x1 << 31)
++#define kPREC_UF1 (0x1 << 30)
++#define KPREC_OF0 (0x1 << 15)
++#define KPREC_UF0 (0x1 << 14)
++
++#define KPREC_RECOUNT0(n) ((n) & 0xff)
++#define KPREC_RECOUNT1(n) (((n) >> 16) & 0xff)
++
++#define KPMK_MKP (0x1 << 31)
++#define KPAS_SO (0x1 << 31)
++#define KPASMKPx_SO (0x1 << 31)
++
++#define KPAS_MUKP(n) (((n) >> 26) & 0x1f)
++#define KPAS_RP(n) (((n) >> 4) & 0xf)
++#define KPAS_CP(n) ((n) & 0xf)
++
++#define KPASMKP_MKC_MASK (0xff)
++
++#define keypad_readl(off) __raw_readl(keypad->mmio_base + (off))
++#define keypad_writel(off, v) __raw_writel((v), keypad->mmio_base + (off))
++
++#define MAX_MATRIX_KEY_NUM (8 * 8)
++
++struct pxa27x_keypad {
++ struct pxa27x_keypad_platform_data *pdata;
++
++ struct clk *clk;
++ struct input_dev *input_dev;
++ void __iomem *mmio_base;
++
++ /* matrix key code map */
++ unsigned int matrix_keycodes[MAX_MATRIX_KEY_NUM];
++
++ /* state row bits of each column scan */
++ uint32_t matrix_key_state[MAX_MATRIX_KEY_COLS];
++ uint32_t direct_key_state;
++
++ unsigned int direct_key_mask;
++
++ int rotary_rel_code[2];
++ int rotary_up_key[2];
++ int rotary_down_key[2];
++};
++
++static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ struct input_dev *input_dev = keypad->input_dev;
++ unsigned int *key;
++ int i;
++
++ key = &pdata->matrix_key_map[0];
++ for (i = 0; i < pdata->matrix_key_map_size; i++, key++) {
++ int row = ((*key) >> 28) & 0xf;
++ int col = ((*key) >> 24) & 0xf;
++ int code = (*key) & 0xffffff;
++
++ keypad->matrix_keycodes[(row << 3) + col] = code;
++ set_bit(code, input_dev->keybit);
++ }
++
++ keypad->rotary_up_key[0] = pdata->rotary0_up_key;
++ keypad->rotary_up_key[1] = pdata->rotary1_up_key;
++ keypad->rotary_down_key[0] = pdata->rotary0_down_key;
++ keypad->rotary_down_key[1] = pdata->rotary1_down_key;
++ keypad->rotary_rel_code[0] = pdata->rotary0_rel_code;
++ keypad->rotary_rel_code[1] = pdata->rotary1_rel_code;
++
++ if (pdata->rotary0_up_key && pdata->rotary0_down_key) {
++ set_bit(pdata->rotary0_up_key, input_dev->keybit);
++ set_bit(pdata->rotary0_down_key, input_dev->keybit);
++ } else
++ set_bit(pdata->rotary0_rel_code, input_dev->relbit);
++
++ if (pdata->rotary1_up_key && pdata->rotary1_down_key) {
++ set_bit(pdata->rotary1_up_key, input_dev->keybit);
++ set_bit(pdata->rotary1_down_key, input_dev->keybit);
++ } else
++ set_bit(pdata->rotary1_rel_code, input_dev->relbit);
++}
++
++static inline unsigned int lookup_matrix_keycode(
++ struct pxa27x_keypad *keypad, int row, int col)
++{
++ return keypad->matrix_keycodes[(row << 3) + col];
++}
++
++static void pxa27x_keypad_scan_matrix(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ int row, col, num_keys_pressed = 0;
++ uint32_t new_state[MAX_MATRIX_KEY_COLS];
++ uint32_t kpas = keypad_readl(KPAS);
++
++ num_keys_pressed = KPAS_MUKP(kpas);
++
++ memset(new_state, 0, sizeof(new_state));
++
++ if (num_keys_pressed == 0)
++ goto scan;
++
++ if (num_keys_pressed == 1) {
++ col = KPAS_CP(kpas);
++ row = KPAS_RP(kpas);
++
++ /* if invalid row/col, treat as no key pressed */
++ if (col >= pdata->matrix_key_cols ||
++ row >= pdata->matrix_key_rows)
++ goto scan;
++
++ new_state[col] = (1 << row);
++ goto scan;
++ }
++
++ if (num_keys_pressed > 1) {
++ uint32_t kpasmkp0 = keypad_readl(KPASMKP0);
++ uint32_t kpasmkp1 = keypad_readl(KPASMKP1);
++ uint32_t kpasmkp2 = keypad_readl(KPASMKP2);
++ uint32_t kpasmkp3 = keypad_readl(KPASMKP3);
++
++ new_state[0] = kpasmkp0 & KPASMKP_MKC_MASK;
++ new_state[1] = (kpasmkp0 >> 16) & KPASMKP_MKC_MASK;
++ new_state[2] = kpasmkp1 & KPASMKP_MKC_MASK;
++ new_state[3] = (kpasmkp1 >> 16) & KPASMKP_MKC_MASK;
++ new_state[4] = kpasmkp2 & KPASMKP_MKC_MASK;
++ new_state[5] = (kpasmkp2 >> 16) & KPASMKP_MKC_MASK;
++ new_state[6] = kpasmkp3 & KPASMKP_MKC_MASK;
++ new_state[7] = (kpasmkp3 >> 16) & KPASMKP_MKC_MASK;
++ }
++scan:
++ for (col = 0; col < pdata->matrix_key_cols; col++) {
++ uint32_t bits_changed;
++
++ bits_changed = keypad->matrix_key_state[col] ^ new_state[col];
++ if (bits_changed == 0)
++ continue;
++
++ for (row = 0; row < pdata->matrix_key_rows; row++) {
++ if ((bits_changed & (1 << row)) == 0)
++ continue;
++
++ input_report_key(keypad->input_dev,
++ lookup_matrix_keycode(keypad, row, col),
++ new_state[col] & (1 << row));
++ }
++ }
++ input_sync(keypad->input_dev);
++ memcpy(keypad->matrix_key_state, new_state, sizeof(new_state));
++}
++
++#define DEFAULT_KPREC (0x007f007f)
++
++static inline int rotary_delta(uint32_t kprec)
++{
++ if (kprec & KPREC_OF0)
++ return (kprec & 0xff) + 0x7f;
++ else if (kprec & KPREC_UF0)
++ return (kprec & 0xff) - 0x7f - 0xff;
++ else
++ return (kprec & 0xff) - 0x7f;
++}
++
++static void report_rotary_event(struct pxa27x_keypad *keypad, int r, int delta)
++{
++ struct input_dev *dev = keypad->input_dev;
++
++ if (delta == 0)
++ return;
++
++ if (keypad->rotary_up_key[r] && keypad->rotary_down_key[r]) {
++ int keycode = (delta > 0) ? keypad->rotary_up_key[r] :
++ keypad->rotary_down_key[r];
++
++ /* simulate a press-n-release */
++ input_report_key(dev, keycode, 1);
++ input_sync(dev);
++ input_report_key(dev, keycode, 0);
++ input_sync(dev);
++ } else {
++ input_report_rel(dev, keypad->rotary_rel_code[r], delta);
++ input_sync(dev);
++ }
++}
++
++static void pxa27x_keypad_scan_rotary(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ uint32_t kprec;
++
++ /* read and reset to default count value */
++ kprec = keypad_readl(KPREC);
++ keypad_writel(KPREC, DEFAULT_KPREC);
++
++ if (pdata->enable_rotary0)
++ report_rotary_event(keypad, 0, rotary_delta(kprec));
++
++ if (pdata->enable_rotary1)
++ report_rotary_event(keypad, 1, rotary_delta(kprec >> 16));
++}
++
++static void pxa27x_keypad_scan_direct(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ unsigned int new_state;
++ uint32_t kpdk, bits_changed;
++ int i;
++
++ kpdk = keypad_readl(KPDK);
++
++ if (pdata->enable_rotary0 || pdata->enable_rotary1)
++ pxa27x_keypad_scan_rotary(keypad);
++
++ if (pdata->direct_key_map == NULL)
++ return;
++
++ new_state = KPDK_DK(kpdk) & keypad->direct_key_mask;
++ bits_changed = keypad->direct_key_state ^ new_state;
++
++ if (bits_changed == 0)
++ return;
++
++ for (i = 0; i < pdata->direct_key_num; i++) {
++ if (bits_changed & (1 << i))
++ input_report_key(keypad->input_dev,
++ pdata->direct_key_map[i],
++ (new_state & (1 << i)));
++ }
++ input_sync(keypad->input_dev);
++ keypad->direct_key_state = new_state;
++}
++
++static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id)
++{
++ struct pxa27x_keypad *keypad = dev_id;
++ unsigned long kpc = keypad_readl(KPC);
++
++ if (kpc & KPC_DI)
++ pxa27x_keypad_scan_direct(keypad);
++
++ if (kpc & KPC_MI)
++ pxa27x_keypad_scan_matrix(keypad);
++
++ return IRQ_HANDLED;
++}
++
++static void pxa27x_keypad_config(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ unsigned int mask = 0, direct_key_num = 0;
++ unsigned long kpc = 0;
++
++ /* enable matrix keys with automatic scan */
++ if (pdata->matrix_key_rows && pdata->matrix_key_cols) {
++ kpc |= KPC_ASACT | KPC_MIE | KPC_ME | KPC_MS_ALL;
++ kpc |= KPC_MKRN(pdata->matrix_key_rows) |
++ KPC_MKCN(pdata->matrix_key_cols);
++ }
++
++ /* enable rotary key, debounce interval same as direct keys */
++ if (pdata->enable_rotary0) {
++ mask |= 0x03;
++ direct_key_num = 2;
++ kpc |= KPC_REE0;
++ }
++
++ if (pdata->enable_rotary1) {
++ mask |= 0x0c;
++ direct_key_num = 4;
++ kpc |= KPC_REE1;
++ }
++
++ if (pdata->direct_key_num > direct_key_num)
++ direct_key_num = pdata->direct_key_num;
++
++ keypad->direct_key_mask = ((2 << direct_key_num) - 1) & ~mask;
++
++ /* enable direct key */
++ if (direct_key_num)
++ kpc |= KPC_DE | KPC_DIE | KPC_DKN(direct_key_num);
++
++ keypad_writel(KPC, kpc | KPC_RE_ZERO_DEB);
++ keypad_writel(KPREC, DEFAULT_KPREC);
++ keypad_writel(KPKDI, pdata->debounce_interval);
++}
++
++static int pxa27x_keypad_open(struct input_dev *dev)
++{
++ struct pxa27x_keypad *keypad = input_get_drvdata(dev);
++
++ /* Enable unit clock */
++ clk_enable(keypad->clk);
++ pxa27x_keypad_config(keypad);
++
++ return 0;
++}
++
++static void pxa27x_keypad_close(struct input_dev *dev)
++{
++ struct pxa27x_keypad *keypad = input_get_drvdata(dev);
++
++ /* Disable clock unit */
++ clk_disable(keypad->clk);
++}
++
++#ifdef CONFIG_PM
++static int pxa27x_keypad_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++
++ clk_disable(keypad->clk);
++ return 0;
++}
++
++static int pxa27x_keypad_resume(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++ struct input_dev *input_dev = keypad->input_dev;
++
++ mutex_lock(&input_dev->mutex);
++
++ if (input_dev->users) {
++ /* Enable unit clock */
++ clk_enable(keypad->clk);
++ pxa27x_keypad_config(keypad);
++ }
++
++ mutex_unlock(&input_dev->mutex);
++
++ return 0;
++}
++#else
++#define pxa27x_keypad_suspend NULL
++#define pxa27x_keypad_resume NULL
++#endif
++
++#define res_size(res) ((res)->end - (res)->start + 1)
++
++static int __devinit pxa27x_keypad_probe(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad;
++ struct input_dev *input_dev;
++ struct resource *res;
++ int irq, error;
++
++ keypad = kzalloc(sizeof(struct pxa27x_keypad), GFP_KERNEL);
++ if (keypad == NULL) {
++ dev_err(&pdev->dev, "failed to allocate driver data\n");
++ return -ENOMEM;
++ }
++
++ keypad->pdata = pdev->dev.platform_data;
++ if (keypad->pdata == NULL) {
++ dev_err(&pdev->dev, "no platform data defined\n");
++ error = -EINVAL;
++ goto failed_free;
++ }
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq < 0) {
++ dev_err(&pdev->dev, "failed to get keypad irq\n");
++ error = -ENXIO;
++ goto failed_free;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (res == NULL) {
++ dev_err(&pdev->dev, "failed to get I/O memory\n");
++ error = -ENXIO;
++ goto failed_free;
++ }
++
++ res = request_mem_region(res->start, res_size(res), pdev->name);
++ if (res == NULL) {
++ dev_err(&pdev->dev, "failed to request I/O memory\n");
++ error = -EBUSY;
++ goto failed_free;
++ }
++
++ keypad->mmio_base = ioremap(res->start, res_size(res));
++ if (keypad->mmio_base == NULL) {
++ dev_err(&pdev->dev, "failed to remap I/O memory\n");
++ error = -ENXIO;
++ goto failed_free_mem;
++ }
++
++ keypad->clk = clk_get(&pdev->dev, "KBDCLK");
++ if (IS_ERR(keypad->clk)) {
++ dev_err(&pdev->dev, "failed to get keypad clock\n");
++ error = PTR_ERR(keypad->clk);
++ goto failed_free_io;
++ }
++
++ /* Create and register the input driver. */
++ input_dev = input_allocate_device();
++ if (!input_dev) {
++ dev_err(&pdev->dev, "failed to allocate input device\n");
++ error = -ENOMEM;
++ goto failed_put_clk;
++ }
++
++ input_dev->name = pdev->name;
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->open = pxa27x_keypad_open;
++ input_dev->close = pxa27x_keypad_close;
++ input_dev->dev.parent = &pdev->dev;
++
++ keypad->input_dev = input_dev;
++ input_set_drvdata(input_dev, keypad);
++
++ input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) |
++ BIT_MASK(EV_REL);
++
++ pxa27x_keypad_build_keycode(keypad);
++ platform_set_drvdata(pdev, keypad);
++
++ error = request_irq(irq, pxa27x_keypad_irq_handler, IRQF_DISABLED,
++ pdev->name, keypad);
++ if (error) {
++ dev_err(&pdev->dev, "failed to request IRQ\n");
++ goto failed_free_dev;
++ }
++
++ /* Register the input device */
++ error = input_register_device(input_dev);
++ if (error) {
++ dev_err(&pdev->dev, "failed to register input device\n");
++ goto failed_free_irq;
++ }
++
++ return 0;
++
++failed_free_irq:
++ free_irq(irq, pdev);
++ platform_set_drvdata(pdev, NULL);
++failed_free_dev:
++ input_free_device(input_dev);
++failed_put_clk:
++ clk_put(keypad->clk);
++failed_free_io:
++ iounmap(keypad->mmio_base);
++failed_free_mem:
++ release_mem_region(res->start, res_size(res));
++failed_free:
++ kfree(keypad);
++ return error;
++}
++
++static int __devexit pxa27x_keypad_remove(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++ struct resource *res;
++
++ free_irq(platform_get_irq(pdev, 0), pdev);
++
++ clk_disable(keypad->clk);
++ clk_put(keypad->clk);
++
++ input_unregister_device(keypad->input_dev);
++ input_free_device(keypad->input_dev);
++
++ iounmap(keypad->mmio_base);
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ release_mem_region(res->start, res_size(res));
++
++ platform_set_drvdata(pdev, NULL);
++ kfree(keypad);
++ return 0;
++}
++
++static struct platform_driver pxa27x_keypad_driver = {
++ .probe = pxa27x_keypad_probe,
++ .remove = __devexit_p(pxa27x_keypad_remove),
++ .suspend = pxa27x_keypad_suspend,
++ .resume = pxa27x_keypad_resume,
++ .driver = {
++ .name = "pxa27x-keypad",
++ },
++};
++
++static int __init pxa27x_keypad_init(void)
++{
++ return platform_driver_register(&pxa27x_keypad_driver);
++}
++
++static void __exit pxa27x_keypad_exit(void)
++{
++ platform_driver_unregister(&pxa27x_keypad_driver);
++}
++
++module_init(pxa27x_keypad_init);
++module_exit(pxa27x_keypad_exit);
++
++MODULE_DESCRIPTION("PXA27x Keypad Controller Driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keyboard.h
+===================================================================
+--- linux-2.6.23-z-input.orig/include/asm-arm/arch-pxa/pxa27x_keyboard.h 2007-10-09 22:31:38.000000000 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,13 +0,0 @@
+-#define PXAKBD_MAXROW 8
+-#define PXAKBD_MAXCOL 8
+-
+-struct pxa27x_keyboard_platform_data {
+- int nr_rows, nr_cols;
+- int keycodes[PXAKBD_MAXROW][PXAKBD_MAXCOL];
+- int gpio_modes[PXAKBD_MAXROW + PXAKBD_MAXCOL];
+-
+-#ifdef CONFIG_PM
+- u32 reg_kpc;
+- u32 reg_kprec;
+-#endif
+-};
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keypad.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keypad.h 2008-02-18 01:43:28.000000000 +0100
+@@ -0,0 +1,58 @@
++#ifndef __ASM_ARCH_PXA27x_KEYPAD_H
++#define __ASM_ARCH_PXA27x_KEYPAD_H
++
++#include <linux/input.h>
++
++#define MAX_MATRIX_KEY_ROWS (8)
++#define MAX_MATRIX_KEY_COLS (8)
++
++/* pxa3xx keypad platform specific parameters
++ *
++ * NOTE:
++ * 1. direct_key_num indicates the number of keys in the direct keypad
++ * _plus_ the number of rotary-encoder sensor inputs, this can be
++ * left as 0 if only rotary encoders are enabled, the driver will
++ * automatically calculate this
++ *
++ * 2. direct_key_map is the key code map for the direct keys, if rotary
++ * encoder(s) are enabled, direct key 0/1(2/3) will be ignored
++ *
++ * 3. rotary can be either interpreted as a relative input event (e.g.
++ * REL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT)
++ *
++ * 4. matrix key and direct key will use the same debounce_interval by
++ * default, which should be sufficient in most cases
++ */
++struct pxa27x_keypad_platform_data {
++
++ /* code map for the matrix keys */
++ unsigned int matrix_key_rows;
++ unsigned int matrix_key_cols;
++ unsigned int *matrix_key_map;
++ int matrix_key_map_size;
++
++ /* direct keys */
++ int direct_key_num;
++ unsigned int direct_key_map[8];
++
++ /* rotary encoders 0 */
++ int enable_rotary0;
++ int rotary0_rel_code;
++ int rotary0_up_key;
++ int rotary0_down_key;
++
++ /* rotary encoders 1 */
++ int enable_rotary1;
++ int rotary1_rel_code;
++ int rotary1_up_key;
++ int rotary1_down_key;
++
++ /* key debounce interval */
++ unsigned int debounce_interval;
++};
++
++#define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val))
++
++extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
++
++#endif /* __ASM_ARCH_PXA27x_KEYPAD_H */
+Index: linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keyboard.c
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/pxa27x_keyboard.c 2008-02-18 01:43:28.000000000 +0100
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,273 +0,0 @@
+-/*
+- * linux/drivers/input/keyboard/pxa27x_keyboard.c
+- *
+- * Driver for the pxa27x matrix keyboard controller.
+- *
+- * Created: Feb 22, 2007
+- * Author: Rodolfo Giometti <giometti@linux.it>
+- *
+- * Based on a previous implementations by Kevin O'Connor
+- * <kevin_at_koconnor.net> and Alex Osborne <bobofdoom@gmail.com> and
+- * on some suggestions by Nicolas Pitre <nico@cam.org>.
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+- */
+-
+-
+-#include <linux/kernel.h>
+-#include <linux/module.h>
+-#include <linux/init.h>
+-#include <linux/interrupt.h>
+-#include <linux/input.h>
+-#include <linux/device.h>
+-#include <linux/platform_device.h>
+-#include <linux/clk.h>
+-#include <linux/err.h>
+-
+-#include <asm/mach-types.h>
+-#include <asm/mach/arch.h>
+-#include <asm/mach/map.h>
+-
+-#include <asm/arch/hardware.h>
+-#include <asm/arch/pxa-regs.h>
+-#include <asm/arch/irqs.h>
+-#include <asm/arch/pxa27x_keyboard.h>
+-
+-#define DRIVER_NAME "pxa27x-keyboard"
+-
+-#define KPASMKP(col) (col/2 == 0 ? KPASMKP0 : \
+- col/2 == 1 ? KPASMKP1 : \
+- col/2 == 2 ? KPASMKP2 : KPASMKP3)
+-#define KPASMKPx_MKC(row, col) (1 << (row + 16 * (col % 2)))
+-
+-static struct clk *pxakbd_clk;
+-
+-static irqreturn_t pxakbd_irq_handler(int irq, void *dev_id)
+-{
+- struct platform_device *pdev = dev_id;
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+- unsigned long kpc = KPC;
+- int p, row, col, rel;
+-
+- if (kpc & KPC_DI) {
+- unsigned long kpdk = KPDK;
+-
+- if (!(kpdk & KPDK_DKP)) {
+- /* better luck next time */
+- } else if (kpc & KPC_REE0) {
+- unsigned long kprec = KPREC;
+- KPREC = 0x7f;
+-
+- if (kprec & KPREC_OF0)
+- rel = (kprec & 0xff) + 0x7f;
+- else if (kprec & KPREC_UF0)
+- rel = (kprec & 0xff) - 0x7f - 0xff;
+- else
+- rel = (kprec & 0xff) - 0x7f;
+-
+- if (rel) {
+- input_report_rel(input_dev, REL_WHEEL, rel);
+- input_sync(input_dev);
+- }
+- }
+- }
+-
+- if (kpc & KPC_MI) {
+- /* report the status of every button */
+- for (row = 0; row < pdata->nr_rows; row++) {
+- for (col = 0; col < pdata->nr_cols; col++) {
+- p = KPASMKP(col) & KPASMKPx_MKC(row, col) ?
+- 1 : 0;
+- pr_debug("keycode %x - pressed %x\n",
+- pdata->keycodes[row][col], p);
+- input_report_key(input_dev,
+- pdata->keycodes[row][col], p);
+- }
+- }
+- input_sync(input_dev);
+- }
+-
+- return IRQ_HANDLED;
+-}
+-
+-static int pxakbd_open(struct input_dev *dev)
+-{
+- /* Set keypad control register */
+- KPC |= (KPC_ASACT |
+- KPC_MS_ALL |
+- (2 << 6) | KPC_REE0 | KPC_DK_DEB_SEL |
+- KPC_ME | KPC_MIE | KPC_DE | KPC_DIE);
+-
+- KPC &= ~KPC_AS; /* disable automatic scan */
+- KPC &= ~KPC_IMKP; /* do not ignore multiple keypresses */
+-
+- /* Set rotary count to mid-point value */
+- KPREC = 0x7F;
+-
+- /* Enable unit clock */
+- clk_enable(pxakbd_clk);
+-
+- return 0;
+-}
+-
+-static void pxakbd_close(struct input_dev *dev)
+-{
+- /* Disable clock unit */
+- clk_disable(pxakbd_clk);
+-}
+-
+-#ifdef CONFIG_PM
+-static int pxakbd_suspend(struct platform_device *pdev, pm_message_t state)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+-
+- /* Save controller status */
+- pdata->reg_kpc = KPC;
+- pdata->reg_kprec = KPREC;
+-
+- return 0;
+-}
+-
+-static int pxakbd_resume(struct platform_device *pdev)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+-
+- mutex_lock(&input_dev->mutex);
+-
+- if (input_dev->users) {
+- /* Restore controller status */
+- KPC = pdata->reg_kpc;
+- KPREC = pdata->reg_kprec;
+-
+- /* Enable unit clock */
+- clk_disable(pxakbd_clk);
+- clk_enable(pxakbd_clk);
+- }
+-
+- mutex_unlock(&input_dev->mutex);
+-
+- return 0;
+-}
+-#else
+-#define pxakbd_suspend NULL
+-#define pxakbd_resume NULL
+-#endif
+-
+-static int __devinit pxakbd_probe(struct platform_device *pdev)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev;
+- int i, row, col, error;
+-
+- pxakbd_clk = clk_get(&pdev->dev, "KBDCLK");
+- if (IS_ERR(pxakbd_clk)) {
+- error = PTR_ERR(pxakbd_clk);
+- goto err_clk;
+- }
+-
+- /* Create and register the input driver. */
+- input_dev = input_allocate_device();
+- if (!input_dev) {
+- printk(KERN_ERR "Cannot request keypad device\n");
+- error = -ENOMEM;
+- goto err_alloc;
+- }
+-
+- input_dev->name = DRIVER_NAME;
+- input_dev->id.bustype = BUS_HOST;
+- input_dev->open = pxakbd_open;
+- input_dev->close = pxakbd_close;
+- input_dev->dev.parent = &pdev->dev;
+-
+- input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL);
+- input_dev->relbit[LONG(REL_WHEEL)] = BIT(REL_WHEEL);
+- for (row = 0; row < pdata->nr_rows; row++) {
+- for (col = 0; col < pdata->nr_cols; col++) {
+- int code = pdata->keycodes[row][col];
+- if (code > 0)
+- set_bit(code, input_dev->keybit);
+- }
+- }
+-
+- error = request_irq(IRQ_KEYPAD, pxakbd_irq_handler, IRQF_DISABLED,
+- DRIVER_NAME, pdev);
+- if (error) {
+- printk(KERN_ERR "Cannot request keypad IRQ\n");
+- goto err_free_dev;
+- }
+-
+- platform_set_drvdata(pdev, input_dev);
+-
+- /* Register the input device */
+- error = input_register_device(input_dev);
+- if (error)
+- goto err_free_irq;
+-
+- /* Setup GPIOs. */
+- for (i = 0; i < pdata->nr_rows + pdata->nr_cols; i++)
+- pxa_gpio_mode(pdata->gpio_modes[i]);
+-
+- /*
+- * Store rows/cols info into keyboard registers.
+- */
+-
+- KPC |= (pdata->nr_rows - 1) << 26;
+- KPC |= (pdata->nr_cols - 1) << 23;
+-
+- for (col = 0; col < pdata->nr_cols; col++)
+- KPC |= KPC_MS0 << col;
+-
+- return 0;
+-
+- err_free_irq:
+- platform_set_drvdata(pdev, NULL);
+- free_irq(IRQ_KEYPAD, pdev);
+- err_free_dev:
+- input_free_device(input_dev);
+- err_alloc:
+- clk_put(pxakbd_clk);
+- err_clk:
+- return error;
+-}
+-
+-static int __devexit pxakbd_remove(struct platform_device *pdev)
+-{
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+-
+- input_unregister_device(input_dev);
+- free_irq(IRQ_KEYPAD, pdev);
+- clk_put(pxakbd_clk);
+- platform_set_drvdata(pdev, NULL);
+-
+- return 0;
+-}
+-
+-static struct platform_driver pxakbd_driver = {
+- .probe = pxakbd_probe,
+- .remove = __devexit_p(pxakbd_remove),
+- .suspend = pxakbd_suspend,
+- .resume = pxakbd_resume,
+- .driver = {
+- .name = DRIVER_NAME,
+- },
+-};
+-
+-static int __init pxakbd_init(void)
+-{
+- return platform_driver_register(&pxakbd_driver);
+-}
+-
+-static void __exit pxakbd_exit(void)
+-{
+- platform_driver_unregister(&pxakbd_driver);
+-}
+-
+-module_init(pxakbd_init);
+-module_exit(pxakbd_exit);
+-
+-MODULE_DESCRIPTION("PXA27x Matrix Keyboard Driver");
+-MODULE_LICENSE("GPL");
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/zylonite.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/zylonite.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/zylonite.c 2008-02-19 01:31:33.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include <asm/arch/gpio.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/zylonite.h>
++#include <asm/arch/pxa27x_keypad.h>
+
+ #include "generic.h"
+
+@@ -173,6 +174,72 @@
+ static inline void zylonite_init_lcd(void) {}
+ #endif
+
++#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
++static unsigned int zylonite_matrix_key_map[] = {
++ /* KEY(row, col, key_code) */
++ KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D),
++ KEY(1, 0, KEY_E), KEY(1, 1, KEY_F), KEY(1, 2, KEY_G), KEY(1, 5, KEY_H),
++ KEY(2, 0, KEY_I), KEY(2, 1, KEY_J), KEY(2, 2, KEY_K), KEY(2, 5, KEY_L),
++ KEY(3, 0, KEY_M), KEY(3, 1, KEY_N), KEY(3, 2, KEY_O), KEY(3, 5, KEY_P),
++ KEY(5, 0, KEY_Q), KEY(5, 1, KEY_R), KEY(5, 2, KEY_S), KEY(5, 5, KEY_T),
++ KEY(6, 0, KEY_U), KEY(6, 1, KEY_V), KEY(6, 2, KEY_W), KEY(6, 5, KEY_X),
++ KEY(7, 1, KEY_Y), KEY(7, 2, KEY_Z),
++
++ KEY(4, 4, KEY_0), KEY(1, 3, KEY_1), KEY(4, 1, KEY_2), KEY(1, 4, KEY_3),
++ KEY(2, 3, KEY_4), KEY(4, 2, KEY_5), KEY(2, 4, KEY_6), KEY(3, 3, KEY_7),
++ KEY(4, 3, KEY_8), KEY(3, 4, KEY_9),
++
++ KEY(4, 5, KEY_SPACE),
++ KEY(5, 3, KEY_KPASTERISK), /* * */
++ KEY(5, 4, KEY_KPDOT), /* #" */
++
++ KEY(0, 7, KEY_UP),
++ KEY(1, 7, KEY_DOWN),
++ KEY(2, 7, KEY_LEFT),
++ KEY(3, 7, KEY_RIGHT),
++ KEY(2, 6, KEY_HOME),
++ KEY(3, 6, KEY_END),
++ KEY(6, 4, KEY_DELETE),
++ KEY(6, 6, KEY_BACK),
++ KEY(6, 3, KEY_CAPSLOCK), /* KEY_LEFTSHIFT), */
++
++ KEY(4, 6, KEY_ENTER), /* scroll push */
++ KEY(5, 7, KEY_ENTER), /* keypad action */
++
++ KEY(0, 4, KEY_EMAIL),
++ KEY(5, 6, KEY_SEND),
++ KEY(4, 0, KEY_CALENDAR),
++ KEY(7, 6, KEY_RECORD),
++ KEY(6, 7, KEY_VOLUMEUP),
++ KEY(7, 7, KEY_VOLUMEDOWN),
++
++ KEY(0, 6, KEY_F22), /* soft1 */
++ KEY(1, 6, KEY_F23), /* soft2 */
++ KEY(0, 3, KEY_AUX), /* contact */
++};
++
++static struct pxa27x_keypad_platform_data zylonite_keypad_info = {
++ .matrix_key_rows = 8,
++ .matrix_key_cols = 8,
++ .matrix_key_map = zylonite_matrix_key_map,
++ .matrix_key_map_size = ARRAY_SIZE(zylonite_matrix_key_map),
++
++ .enable_rotary0 = 1,
++ .rotary0_up_key = KEY_UP,
++ .rotary0_down_key = KEY_DOWN,
++
++ .debounce_interval = 30,
++};
++
++static void __init zylonite_init_keypad(void)
++{
++ pxa_set_keypad_info(&zylonite_keypad_info);
++}
++#else
++static inline void zylonite_init_keypad(void) {}
++#endif
++
++
+ static void __init zylonite_init(void)
+ {
+ /* board-processor specific initialization */
+@@ -190,6 +257,7 @@
+ platform_device_register(&touch_device);
+
+ zylonite_init_lcd();
++ zylonite_init_keypad();
+ }
+
+ MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/devices.h
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/devices.h 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/devices.h 2008-02-18 01:43:28.000000000 +0100
+@@ -12,3 +12,4 @@
+
+ extern struct platform_device pxa27x_device_i2c_power;
+ extern struct platform_device pxa27x_device_ohci;
++extern struct platform_device pxa27x_device_keypad;
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/generic.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/generic.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/generic.c 2008-02-18 01:43:28.000000000 +0100
+@@ -450,3 +450,34 @@
+ .name = "sa1100-rtc",
+ .id = -1,
+ };
++
++static struct resource pxa27x_resource_keypad[] = {
++ [0] = {
++ .start = 0x41500000,
++ .end = 0x4150004c,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_KEYPAD,
++ .end = IRQ_KEYPAD,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device pxa27x_device_keypad = {
++ .name = "pxa27x-keypad",
++ .id = -1,
++ .resource = pxa27x_resource_keypad,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_keypad),
++};
++
++void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
++{
++ int ret;
++
++ pxa27x_device_keypad.dev.platform_data = info;
++
++ ret = platform_device_register(&pxa27x_device_keypad);
++ if (ret)
++ dev_err(&pxa27x_device_keypad.dev, "unable to register device: %d\n", ret);
++}
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa27x.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa27x.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa27x.c 2008-02-18 01:43:28.000000000 +0100
+@@ -148,7 +148,7 @@
+
+ INIT_CKEN("USBCLK", USB, 48000000, 0, &pxa27x_device_ohci.dev),
+ INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
+- INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
++ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
+
+ /*
+ INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa3xx.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa3xx.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa3xx.c 2008-02-19 01:32:40.000000000 +0100
+@@ -159,6 +159,7 @@
+ static struct clk pxa3xx_clks[] = {
+ INIT_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
+ INIT_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
++ INIT_CK("KBDCLK", KEYPAD, &clk_pxa3xx_hsio_ops, &pxa27x_device_keypad.dev),
+
+ INIT_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
+ INIT_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/irqs.h
+===================================================================
+--- linux-2.6.23-z-input.orig/include/asm-arm/arch-pxa/irqs.h 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/include/asm-arm/arch-pxa/irqs.h 2008-02-18 01:43:28.000000000 +0100
+@@ -13,7 +13,7 @@
+
+ #define PXA_IRQ(x) (x)
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */
+ #define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */
+ #define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa300.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa300.c 2008-02-19 01:33:58.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa300.c 2008-02-19 01:34:35.000000000 +0100
+@@ -23,8 +23,10 @@
+
+ MFP_ADDR_X(GPIO0, GPIO2, 0x00b4),
+ MFP_ADDR_X(GPIO3, GPIO26, 0x027c),
+- MFP_ADDR_X(GPIO27, GPIO127, 0x0400),
+- MFP_ADDR_X(GPIO0_2, GPIO6_2, 0x02ec),
++ MFP_ADDR_X(GPIO27, GPIO98, 0x0400),
++ MFP_ADDR_X(GPIO99, GPIO127, 0x0600),
++ MFP_ADDR_X(GPIO0_2, GPIO1_2, 0x0674),
++ MFP_ADDR_X(GPIO2_2, GPIO6_2, 0x02dc),
+
+ MFP_ADDR(nBE0, 0x0204),
+ MFP_ADDR(nBE1, 0x0208),
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_mtd-r0.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_mtd-r0.patch
new file mode 100644
index 0000000000..cb5a9c5f72
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_mtd-r0.patch
@@ -0,0 +1,4093 @@
+Gross hacks to make the Zylonite boot from flash in VGA.
+
+Flash driver forward ported to 2.6.14
+
+Index: linux-2.6.23/drivers/mtd/nand/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/mtd/nand/Kconfig 2007-10-09 21:31:38.000000000 +0100
++++ linux-2.6.23/drivers/mtd/nand/Kconfig 2008-02-13 00:59:45.000000000 +0000
+@@ -223,6 +223,10 @@
+ tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
+ depends on ARCH_PXA
+
++config MTD_NAND_ZYLONITE
++ tristate "Support for NAND Flash on Zylonite"
++ depends on ARCH_PXA
++
+ config MTD_NAND_BASLER_EXCITE
+ tristate "Support for NAND Flash on Basler eXcite"
+ depends on BASLER_EXCITE
+Index: linux-2.6.23/drivers/mtd/nand/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/mtd/nand/Makefile 2007-10-09 21:31:38.000000000 +0100
++++ linux-2.6.23/drivers/mtd/nand/Makefile 2008-02-13 00:59:45.000000000 +0000
+@@ -19,6 +19,7 @@
+ obj-$(CONFIG_MTD_NAND_H1900) += h1910.o
+ obj-$(CONFIG_MTD_NAND_RTC_FROM4) += rtc_from4.o
+ obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o
++obj-$(CONFIG_MTD_NAND_ZYLONITE) += mhn_nand.o
+ obj-$(CONFIG_MTD_NAND_TS7250) += ts7250.o
+ obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
+ obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
+Index: linux-2.6.23/drivers/mtd/nand/mhn_nand.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/mtd/nand/mhn_nand.c 2008-02-13 00:59:45.000000000 +0000
+@@ -0,0 +1,3869 @@
++/*
++ * drivers/mtd/nand/mhn_nand.c
++ *
++ * Copyright (C) 2005 Intel Coporation (chao.xie@intel.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.
++ *
++ * Overview:
++ * This is a device driver for the NAND flash device on zylonite board
++ * which utilizes the Samsung K9K1216Q0C parts. This is a 64Mibit NAND
++ * flash device.
++
++ *(C) Copyright 2006 Marvell International Ltd.
++ * All Rights Reserved
++ */
++
++#include <linux/slab.h>
++#include <linux/module.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/nand.h>
++#include <linux/mtd/partitions.h>
++#include <linux/interrupt.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/dma-mapping.h>
++#include <asm/hardware.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/delay.h>
++#include <asm/dma.h>
++#include <asm/arch/mfp.h>
++//#include <asm/arch/cpu-freq-voltage-mhn.h>
++
++//#define NDCR 0xf0000000
++//#define NDCR (*((volatile u32 *)0xf0000000))
++//#define NDCR __REG_2(0x43100000) /* Data Flash Control register */
++#define NDCR_SPARE_EN (0x1<<31)
++#define NDCR_ECC_EN (0x1<<30)
++#define NDCR_DMA_EN (0x1<<29)
++#define NDCR_ND_RUN (0x1<<28)
++#define NDCR_DWIDTH_C (0x1<<27)
++#define NDCR_DWIDTH_M (0x1<<26)
++#define NDCR_PAGE_SZ (0x1<<24)
++#define NDCR_NCSX (0x1<<23)
++#define NDCR_ND_MODE (0x3<<21)
++#define NDCR_NAND_MODE 0x0
++#define NDCR_CLR_PG_CNT (0x1<<20)
++#define NDCR_CLR_ECC ( 0x1<<19)
++#define NDCR_RD_ID_CNT_MASK (0x7<<16)
++#define NDCR_RD_ID_CNT(x) (((x) << 16) & NDCR_RD_ID_CNT_MASK)
++#define NDCR_RA_START (0x1<<15)
++#define NDCR_PG_PER_BLK (0x1<<14)
++#define NDCR_ND_ARB_EN (0x1<<12)
++
++//#define NDSR (*((volatile u32 *)0xf0000014))
++//#define NDSR __REG_2(0x43100014) /* Data Controller Status Register */
++#define NDSR_RDY (0x1<<11)
++#define NDSR_CS0_PAGED (0x1<<10)
++#define NDSR_CS1_PAGED (0x1<<9)
++#define NDSR_CS0_CMDD (0x1<<8)
++#define NDSR_CS1_CMDD (0x1<<7)
++#define NDSR_CS0_BBD (0x1<<6)
++#define NDSR_CS1_BBD (0x1<<5)
++#define NDSR_DBERR (0x1<<4)
++#define NDSR_SBERR (0x1<<3)
++#define NDSR_WRDREQ (0x1<<2)
++#define NDSR_RDDREQ (0x1<<1)
++#define NDSR_WRCMDREQ (0x1)
++
++#define OSCR __REG(0x40A00010) /* OS Timer Counter Register */
++//#define NDCB0 __REG_2(0x43100048) /* Data Controller Command Buffer0 */
++//#define NDCB1 __REG_2(0x4310004C) /* Data Controller Command Buffer1 */
++//#define NDCB2 __REG_2(0x43100050) /* Data Controller Command Buffer2 */
++#define NDCB0_AUTO_RS (0x1<<25)
++#define NDCB0_CSEL (0x1<<24)
++#define NDCB0_CMD_TYPE_MASK (0x7<<21)
++#define NDCB0_CMD_TYPE(x) (((x) << 21) & NDCB0_CMD_TYPE_MASK)
++#define NDCB0_NC (0x1<<20)
++#define NDCB0_DBC (0x1<<19)
++#define NDCB0_ADDR_CYC_MASK (0x7<<16)
++#define NDCB0_ADDR_CYC(x) (((x) << 16) & NDCB0_ADDR_CYC_MASK)
++#define NDCB0_CMD2_MASK (0xff<<8)
++#define NDCB0_CMD1_MASK (0xff)
++#define NDCB0_ADDR_CYC_SHIFT (16)
++#define DCMD0 __REG(0x4000020c) /* DMA Command Address Register Channel 0 */
++#define DCMD1 __REG(0x4000021c) /* DMA Command Address Register Channel 1 */
++#define DCMD2 __REG(0x4000022c) /* DMA Command Address Register Channel 2 */
++#define DCMD3 __REG(0x4000023c) /* DMA Command Address Register Channel 3 */
++#define DCMD4 __REG(0x4000024c) /* DMA Command Address Register Channel 4 */
++#define DCMD5 __REG(0x4000025c) /* DMA Command Address Register Channel 5 */
++#define DCMD6 __REG(0x4000026c) /* DMA Command Address Register Channel 6 */
++#define DCMD7 __REG(0x4000027c) /* DMA Command Address Register Channel 7 */
++#define DCMD8 __REG(0x4000028c) /* DMA Command Address Register Channel 8 */
++#define DCMD9 __REG(0x4000029c) /* DMA Command Address Register Channel 9 */
++#define DCMD10 __REG(0x400002ac) /* DMA Command Address Register Channel 10 */
++#define DCMD11 __REG(0x400002bc) /* DMA Command Address Register Channel 11 */
++#define DCMD12 __REG(0x400002cc) /* DMA Command Address Register Channel 12 */
++#define DCMD13 __REG(0x400002dc) /* DMA Command Address Register Channel 13 */
++#define DCMD14 __REG(0x400002ec) /* DMA Command Address Register Channel 14 */
++#define DCMD15 __REG(0x400002fc) /* DMA Command Address Register Channel 15 */
++#define DCMD(x) __REG2(0x4000020c, (x) << 4)
++#define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */
++#define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */
++#define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */
++#define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */
++#define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */
++#define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */
++#define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */
++#define DCMD_BURST8 (1 << 16) /* 8 byte burst */
++#define DCMD_BURST16 (2 << 16) /* 16 byte burst */
++#define DCMD_BURST32 (3 << 16) /* 32 byte burst */
++#define DCMD_WIDTH1 (1 << 14) /* 1 byte width */
++#define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */
++#define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */
++#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
++#define DCMD_RXPCDR (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
++#define DCMD_RXMCDR (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
++#define DCMD_TXPCDR (DCMD_INCSRCADDR|DCMD_FLOWTRG|DCMD_BURST32|DCMD_WIDTH4)
++#define DRCMR(n) __REG2(0x40000100, (n)<<2)
++#define DRCMR97 __REG(0x40001184) /* Request to Channel Map Register for NAND interface data transmit & receive Request */
++#define DRCMR98 __REG(0x40001188) /* Reserved */
++#define DRCMR99 __REG(0x4000118C) /* Request to Channel Map Register for NAND interface command transmit Request */
++#define DRCMRRXSADR DRCMR2
++#define DRCMRTXSADR DRCMR3
++#define DRCMRRXBTRBR DRCMR4
++#define DRCMRTXBTTHR DRCMR5
++#define DRCMRRXFFRBR DRCMR6
++#define DRCMRTXFFTHR DRCMR7
++#define DRCMRRXMCDR DRCMR8
++#define DRCMRRXMODR DRCMR9
++#define DRCMRTXMODR DRCMR10
++#define DRCMRRXPCDR DRCMR11
++#define DRCMRTXPCDR DRCMR12
++#define DRCMRRXSSDR DRCMR13
++#define DRCMRTXSSDR DRCMR14
++#define DRCMRRXICDR DRCMR17
++#define DRCMRTXICDR DRCMR18
++#define DRCMRRXSTRBR DRCMR19
++#define DRCMRTXSTTHR DRCMR20
++#define DRCMRRXMMC DRCMR21
++#define DRCMRTXMMC DRCMR22
++#define DRCMRRXMMC2 DRCMR93
++#define DRCMRTXMMC2 DRCMR94
++#define DRCMRRXMMC3 DRCMR100
++#define DRCMRTXMMC3 DRCMR101
++#define DRCMRUDC(x) DRCMR((x) + 24)
++#define DRCMR_MAPVLD (1 << 7) /* Map Valid (read / write) */
++#define DRCMR_CHLNUM 0x1f /* mask for Channel Number (read / write) */
++#define DCSR0 __REG(0x40000000) /* DMA Control / Status Register for Channel 0 */
++#define DCSR1 __REG(0x40000004) /* DMA Control / Status Register for Channel 1 */
++#define DCSR2 __REG(0x40000008) /* DMA Control / Status Register for Channel 2 */
++#define DCSR3 __REG(0x4000000c) /* DMA Control / Status Register for Channel 3 */
++#define DCSR4 __REG(0x40000010) /* DMA Control / Status Register for Channel 4 */
++#define DCSR5 __REG(0x40000014) /* DMA Control / Status Register for Channel 5 */
++#define DCSR6 __REG(0x40000018) /* DMA Control / Status Register for Channel 6 */
++#define DCSR7 __REG(0x4000001c) /* DMA Control / Status Register for Channel 7 */
++#define DCSR8 __REG(0x40000020) /* DMA Control / Status Register for Channel 8 */
++#define DCSR9 __REG(0x40000024) /* DMA Control / Status Register for Channel 9 */
++#define DCSR10 __REG(0x40000028) /* DMA Control / Status Register for Channel 10 */
++#define DCSR11 __REG(0x4000002c) /* DMA Control / Status Register for Channel 11 */
++#define DCSR12 __REG(0x40000030) /* DMA Control / Status Register for Channel 12 */
++#define DCSR13 __REG(0x40000034) /* DMA Control / Status Register for Channel 13 */
++#define DCSR14 __REG(0x40000038) /* DMA Control / Status Register for Channel 14 */
++#define DCSR15 __REG(0x4000003c) /* DMA Control / Status Register for Channel 15 */
++#define DCSR16 __REG(0x40000040) /* DMA Control / Status Register for Channel 16 */
++#define DCSR17 __REG(0x40000044) /* DMA Control / Status Register for Channel 17 */
++#define DCSR18 __REG(0x40000048) /* DMA Control / Status Register for Channel 18 */
++#define DCSR19 __REG(0x4000004c) /* DMA Control / Status Register for Channel 19 */
++#define DCSR20 __REG(0x40000050) /* DMA Control / Status Register for Channel 20 */
++#define DCSR21 __REG(0x40000054) /* DMA Control / Status Register for Channel 21 */
++#define DCSR22 __REG(0x40000058) /* DMA Control / Status Register for Channel 22 */
++#define DCSR23 __REG(0x4000005c) /* DMA Control / Status Register for Channel 23 */
++#define DCSR24 __REG(0x40000060) /* DMA Control / Status Register for Channel 24 */
++#define DCSR25 __REG(0x40000064) /* DMA Control / Status Register for Channel 25 */
++#define DCSR26 __REG(0x40000068) /* DMA Control / Status Register for Channel 26 */
++#define DCSR27 __REG(0x4000006c) /* DMA Control / Status Register for Channel 27 */
++#define DCSR28 __REG(0x40000070) /* DMA Control / Status Register for Channel 28 */
++#define DCSR29 __REG(0x40000074) /* DMA Control / Status Register for Channel 29 */
++#define DCSR30 __REG(0x40000078) /* DMA Control / Status Register for Channel 30 */
++#define DCSR31 __REG(0x4000007c) /* DMA Control / Status Register for Channel 31 */
++#define DCSR(x) __REG2(0x40000000, (x) << 2)
++#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) */
++#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_EORINTR (1 << 9) /* The end of Receive */
++#define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */
++#define DCSR_RASINTR (1 << 4) /* Request After Channel Stopped */
++#define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */
++#define DCSR_ENDINTR (1 << 2) /* End Interrupt (read / write) */
++#define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */
++#define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */
++#define DDADR(x) __REG2(0x40000200, (x) << 4)
++//#define __REG_2(x) (*((volatile u32 *)io_p2v_2(x)))
++#define IRQ_NAND PXA_IRQ(45)
++#define CKEN_NAND 4 ///< NAND Flash Controller Clock Enable
++
++/* #define CONFIG_MTD_NAND_MONAHANS_DEBUG */
++#ifdef CONFIG_MTD_NAND_MONAHANS_DEBUG
++#define D1(x) do { \
++ printk(KERN_DEBUG "%s: ", __FUNCTION__); \
++ x; \
++ }while(0)
++
++#define DPRINTK(fmt,args...) printk(KERN_DEBUG fmt, ##args )
++#define PRINT_BUF(buf, num) print_buf(buf, num)
++#else
++#define D1(x)
++#define DPRINTK(fmt,args...)
++#define PRINT_BUF(buf, num)
++#endif
++
++/* DFC timing 0 register */
++#define DFC_TIMING_tRP 0
++#define DFC_TIMING_tRH 3
++#define DFC_TIMING_tWP 8
++#define DFC_TIMING_tWH 11
++#define DFC_TIMING_tCS 16
++#define DFC_TIMING_tCH 19
++
++/* DFC timing 1 register */
++#define DFC_TIMING_tAR 0
++#define DFC_TIMING_tWHR 4
++#define DFC_TIMING_tR 16
++
++/* max value for each timing setting in DFC */
++#define DFC_TIMING_MAX_tCH 7
++#define DFC_TIMING_MAX_tCS 7
++#define DFC_TIMING_MAX_tWH 7
++#define DFC_TIMING_MAX_tWP 7
++#define DFC_TIMING_MAX_tRH 7
++#define DFC_TIMING_MAX_tRP 7
++#define DFC_TIMING_MAX_tR 65535
++#define DFC_TIMING_MAX_tWHR 15
++#define DFC_TIMING_MAX_tAR 15
++
++/*
++ * The Data Flash Controller Flash timing structure
++ * For NAND flash used on Zylonite board(Samsung K9K1216Q0C),
++ * user should use value at end of each row of following member
++ * bracketed.
++ */
++struct dfc_flash_timing {
++ uint32_t tCH; /* Enable signal hold time */
++ uint32_t tCS; /* Enable signal setup time */
++ uint32_t tWH; /* ND_nWE high duration */
++ uint32_t tWP; /* ND_nWE pulse time */
++ uint32_t tRH; /* ND_nRE high duration */
++ uint32_t tRP; /* ND_nRE pulse width */
++ uint32_t tR; /* ND_nWE high to ND_nRE low for read */
++ uint32_t tWHR;/* ND_nWE high to ND_nRE low delay for status read */
++ uint32_t tAR; /* ND_ALE low to ND_nRE low delay */
++};
++
++/* DFC command type */
++enum {
++ DFC_CMD_READ = 0x00000000,
++ DFC_CMD_PROGRAM = 0x00200000,
++ DFC_CMD_ERASE = 0x00400000,
++ DFC_CMD_READ_ID = 0x00600000,
++ DFC_CMD_STATUS_READ = 0x00800000,
++ DFC_CMD_RESET = 0x00a00000
++};
++
++/*
++ * The Data Flash Controller Flash specification structure
++ * For NAND flash used on Zylonite board(Samsung K9K1216Q0C),
++ * user should use value at end of each row of following member
++ * bracketed.
++ */
++struct dfc_flash_info {
++ struct dfc_flash_timing timing; /* NAND Flash timing */
++
++ int enable_arbiter;/* Data flash bus arbiter enable (ND_ARB_EN) */
++ uint32_t page_per_block;/* Pages per block (PG_PER_BLK) */
++ uint32_t row_addr_start;/* Row address start position (RA_START) */
++ uint32_t read_id_bytes; /* returned ID bytes(RD_ID_CNT) */
++ uint32_t dfc_mode; /* NAND, CARBONDALE, PIXLEY... (ND_MODE) */
++ uint32_t ncsx; /* Chip select don't care bit (NCSX) */
++ uint32_t page_size; /* Page size in bytes (PAGE_SZ) */
++ uint32_t oob_size; /* OOB size */
++ uint32_t flash_width; /* Width of Flash memory (DWIDTH_M) */
++ uint32_t dfc_width; /* Width of flash controller(DWIDTH_C) */
++ uint32_t num_blocks; /* Number of physical blocks in Flash */
++ uint32_t chip_id;
++
++ /* command codes */
++ uint32_t read1; /* Read */
++ uint32_t read2; /* unused, DFC don't support yet */
++ uint32_t program; /* two cycle command */
++ uint32_t read_status;
++ uint32_t read_id;
++ uint32_t erase; /* two cycle command */
++ uint32_t reset;
++ uint32_t lock; /* lock whole flash */
++ uint32_t unlock; /* two cycle command, supporting partial unlock */
++ uint32_t lock_status; /* read block lock status */
++
++ /* addr2ndcb1 - encode address cycles into register NDCB1 */
++ /* ndbbr2addr - convert register NDBBR to bad block address */
++ int (*addr2ndcb1)(uint16_t cmd, uint32_t addr, uint32_t *p);
++ int (*ndbbr2addr)(uint16_t cmd, uint32_t ndbbr,uint32_t *p);
++};
++
++enum {
++ DFC_FLASH_NULL = 0 ,
++ DFC_FLASH_Samsung_512Mb_X_16 = 1,
++ DFC_FLASH_Micron_1Gb_X_8 = 2,
++ DFC_FLASH_Micron_1Gb_X_16 = 3,
++ DFC_FLASH_STM_1Gb_X_16 = 4,
++ DFC_FLASH_STM_2Gb_X_16 = 5,
++ DFC_FLASH_END,
++};
++
++static int dfc_get_flash_info(int type, struct dfc_flash_info **flash_info);
++
++#define DFC_NDCR 0
++#define DFC_NDTR0CS0 1
++#define DFC_NDTR1CS0 3
++#define DFC_NDSR 5
++#define DFC_NDPCR 6
++#define DFC_NDBDR0 7
++#define DFC_NDBDR1 8
++#define DFC_NDDB 16
++#define DFC_NDCB0 18
++#define DFC_NDCB1 19
++#define DFC_NDCB2 20
++
++/* The Data Flash Controller Mode structure */
++struct dfc_mode {
++ int enable_dma; /* DMA, or nonDMA mode */
++ int enable_ecc; /* ECC on/off */
++ int enable_spare; /* Spare enable */
++ int chip_select; /* CS0 or CS1 */
++};
++
++/* The Data Flash Controller Context structure */
++struct dfc_context {
++ unsigned char __iomem *membase; /* DFC register base */
++ struct dfc_mode *dfc_mode; /* DFC mode */
++ int data_dma_ch; /* Data DMA channel number */
++ int cmd_dma_ch; /* CMD DMA channel number */
++ struct dfc_flash_info *flash_info; /* Flash Spec */
++ struct mtd_info *mtd;
++};
++
++#define NDCB0_DMA_ADDR 0x43100048
++#define NDDB_DMA_ADDR 0x43100040
++
++#define NDSR_MASK 0xFFF
++
++/* The following data is a rough evaluation */
++
++/* microsecond, for readID/readStatus/reset */
++#define NAND_OTHER_TIMEOUT 10
++/* microsecond, for readID/readStatus/reset */
++#define NAND_CMD_TIMEOUT 10
++
++#define BBT_BLOCK_BAD 0x03
++#define BBT_BLOCK_GOOD 0x00
++#define BBT_BLOCK_REV1 0x01
++#define BBT_BLOCK_REV2 0x02
++
++#define BUFLEN (2048 + 64)
++
++/*
++ * DFC data size enumeration transfered from/to controller,
++ * including padding (zero)to be a multiple of 32.
++ */
++enum {
++ DFC_DATA_SIZE_STATUS = 8, /* ReadStatus/ReadBlockLockStatus */
++ DFC_DATA_SIZE_ID = 7, /* ReadID */
++
++ DFC_DATA_SIZE_32 = 32,
++ DFC_DATA_SIZE_512 = 512, /* R/W disabling spare area */
++ DFC_DATA_SIZE_520 = 520, /* Spare=1, ECC=1 */
++ DFC_DATA_SIZE_528 = 528, /* Spare=1, ECC=0 */
++ DFC_DATA_SIZE_544 = 544, /* R/W enabling spare area.(DMA mode)*/
++
++ DFC_DATA_SIZE_64 = 64,
++ DFC_DATA_SIZE_2048 = 2048, /* R/W disabling spare area */
++ DFC_DATA_SIZE_2088 = 2088, /* R/W enabling spare area with ecc */
++ DFC_DATA_SIZE_2112 = 2112, /* R/W enabling spare area without ecc*/
++ DFC_DATA_SIZE_2096 = 2096, /* R/W enabling spare area */
++ DFC_DATA_SIZE_UNUSED = 0xFFFF
++};
++
++/* DFC padding size enumeration transfered from/to controller */
++enum {
++ /*
++ * ReadStatus/ReadBlockLockStatus/ReadID/
++ * Read/Program disabling spare area(Both 512 and 2048)
++ * Read/Program enabling spare area, disabling ECC
++ */
++ DFC_PADDING_SIZE_0 = 0,
++
++ /* Read/program with SPARE_EN=1, ECC_EN=0, pgSize=512 */
++ DFC_PADDING_SIZE_16 = 16,
++ /* for read/program with SPARE_EN=1, ECC_EN=1, pgSize=512 and 2048 */
++ DFC_PADDING_SIZE_24 = 24,
++ DFC_PADDING_SIZE_UNUSED = 0xFFFF
++};
++
++static unsigned int flash_config = DFC_FLASH_NULL;
++
++void dfc_set_timing(struct dfc_context *context, struct dfc_flash_timing *t);
++void dfc_set_dma(struct dfc_context *context);
++void dfc_set_ecc(struct dfc_context *context);
++void dfc_set_spare(struct dfc_context *context);
++
++int dfc_get_pattern(struct dfc_context *context, uint16_t cmd,
++ int *data_size, int *padding);
++
++static int dfc_wait_event(struct dfc_context *context, uint32_t event,
++ uint32_t *event_out, uint32_t timeout, int enable_int);
++
++int dfc_send_cmd(struct dfc_context *context, uint16_t cmd,
++ uint32_t addr, int num_pages);
++
++void dfc_stop(struct dfc_context *context);
++void dfc_read_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size);
++void dfc_write_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size);
++
++void dfc_read_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes);
++void dfc_write_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes);
++
++void dfc_read_badblock_addr(struct dfc_context *context, uint32_t *bbaddr);
++
++void dfc_clear_int(struct dfc_context *context, uint32_t int_mask);
++void dfc_enable_int(struct dfc_context *context, uint32_t int_mask);
++void dfc_disable_int(struct dfc_context *context, uint32_t int_mask);
++
++/* high level primitives */
++int dfc_init(struct dfc_context *context, int type);
++int dfc_init_no_gpio(struct dfc_context *context, int type);
++
++int dfc_reset_flash(struct dfc_context *context);
++
++int dfc_setup_cmd_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t addr, int num_pages,
++ uint32_t *buf, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc);
++
++int dfc_setup_data_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc);
++
++void dfc_start_cmd_dma(struct dfc_context *context,
++ struct pxa_dma_desc *dma_desc);
++void dfc_start_data_dma(struct dfc_context *context,
++ struct pxa_dma_desc *dma_desc);
++static int monahans_df_dev_ready(struct mtd_info *mtd);
++
++#ifdef CONFIG_DVFM
++static int mhn_nand_dvfm_notifier(unsigned cmd, void *client_data, void *info);
++static struct mhn_fv_notifier dvfm_notifier = {
++ .name = "monahans-nand-flash",
++ .priority = 0,
++ .notifier_call = mhn_nand_dvfm_notifier,
++};
++#endif
++
++static unsigned short search_rel_block(int block, struct mtd_info *mtd);
++
++/*****************************************************************************
++ * The DFC registers read/write routines
++ *****************************************************************************/
++static inline void dfc_write(struct dfc_context *context, int offset,
++ unsigned long value)
++{
++ offset <<= 2;
++ writel(value, context->membase + offset);
++}
++
++static inline unsigned int dfc_read(struct dfc_context *context, int offset)
++{
++ offset <<= 2;
++ return __raw_readl(context->membase + offset);
++}
++
++/****************************************************************************
++ * Flash Information
++ ***************************************************************************/
++
++static int Samsung512MbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Samsung512MbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info samsung512MbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 0, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 40, /* tWP, ND_nWE pulse time */
++ .tRH = 30, /* tRH, ND_nRE high duration */
++ .tRP = 40, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 11123,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 110,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 32, /* Pages per block */
++ .row_addr_start = 0, /* Second cycle start, Row address start position */
++ .read_id_bytes = 2, /* 2 bytes, returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 512, /* Page size in bytes */
++ .oob_size = 16, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 4096, /* Number of physical blocks in Flash */
++ .chip_id = 0x46ec,
++
++ /* command codes */
++ .read1 = 0x0000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Samsung512MbX16Addr2NDCB1,
++ .ndbbr2addr = Samsung512MbX16NDBBR2Addr,
++};
++
++static int Samsung512MbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++
++ if (addr >= 0x4000000) return -EINVAL;
++
++ if (cmd == samsung512MbX16.read1 || cmd == samsung512MbX16.program) {
++ ndcb1 = (addr & 0xFF) | ((addr >> 1) & 0x01FFFF00);
++ } else if (cmd == samsung512MbX16.erase) {
++ ndcb1 = ((addr >> 9) & 0x00FFFFFF);
++ }
++
++ *p = ndcb1;
++ return 0;
++
++}
++
++static int Samsung512MbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ *p = ndbbr << 9;
++ return 0;
++}
++
++static int Micron1GbX8Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Micron1GbX8NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info micron1GbX8 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 25, /* tCS, Enable signal setup time */
++ .tWH = 15, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 15, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 8, /* Width of Flash memory */
++ .dfc_width = 8, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xa12c,
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Micron1GbX8Addr2NDCB1,
++ .ndbbr2addr = Micron1GbX8NDBBR2Addr,
++};
++
++static int Micron1GbX8Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / micron1GbX8.page_size;
++ addr = (page / micron1GbX8.page_per_block) << 18 |
++ (page % micron1GbX8.page_per_block) << 12;
++
++ if (cmd == micron1GbX8.read1 || cmd == micron1GbX8.program) {
++ ndcb1 = (addr & 0xFFF) | ((addr << 4) & 0xFFFF0000);
++ }
++ else if (cmd == micron1GbX8.erase) {
++ ndcb1 = ((addr >> 18) << 6) & 0xFFFF;
++ }
++
++ *p = ndcb1;
++ return 0;
++}
++
++static int Micron1GbX8NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == micron1GbX8.read1 || cmd == micron1GbX8.program) {
++ *p = ((ndbbr & 0xF) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == micron1GbX8.erase) {
++ *p = (ndbbr >> 6) << 18;
++ }
++
++
++ return 0;
++}
++
++
++static int Micron1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Micron1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info micron1GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 25, /* tCS, Enable signal setup time */
++ .tWH = 15, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 15, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xb12c,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Micron1GbX16Addr2NDCB1,
++ .ndbbr2addr = Micron1GbX16NDBBR2Addr,
++};
++
++static int Micron1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / micron1GbX16.page_size;
++ addr = (page / micron1GbX16.page_per_block) << 17 |
++ (page % micron1GbX16.page_per_block) << 11;
++
++ if (cmd == micron1GbX16.read1 || cmd == micron1GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == micron1GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int Micron1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == micron1GbX16.read1 || cmd == micron1GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == micron1GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static int STM1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int STM1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info stm1GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 10, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 20, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xb120,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = STM1GbX16Addr2NDCB1,
++ .ndbbr2addr = STM1GbX16NDBBR2Addr,
++};
++
++static int STM1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / stm1GbX16.page_size;
++ addr = (page / stm1GbX16.page_per_block) << 17 |
++ (page % stm1GbX16.page_per_block) << 11;
++
++ if (cmd == stm1GbX16.read1 || cmd == stm1GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == stm1GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int STM1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == stm1GbX16.read1 || cmd == stm1GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == stm1GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static int STM2GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int STM2GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info stm2GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 10, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 20, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 2048, /* Number of physical blocks in Flash */
++ .chip_id = 0xca20,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = STM2GbX16Addr2NDCB1,
++ .ndbbr2addr = STM2GbX16NDBBR2Addr,
++};
++
++static int STM2GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / stm2GbX16.page_size;
++ addr = (page / stm2GbX16.page_per_block) << 17 |
++ (page % stm2GbX16.page_per_block) << 11;
++
++ if (cmd == stm2GbX16.read1 || cmd == stm2GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == stm2GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int STM2GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == stm2GbX16.read1 || cmd == stm2GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == stm2GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static struct {
++ int type;
++ struct dfc_flash_info *flash_info;
++} type_info[] = {
++ { DFC_FLASH_Samsung_512Mb_X_16, &samsung512MbX16},
++ { DFC_FLASH_Micron_1Gb_X_8, &micron1GbX8},
++ { DFC_FLASH_Micron_1Gb_X_16, &micron1GbX16},
++ { DFC_FLASH_STM_1Gb_X_16, &stm1GbX16},
++ { DFC_FLASH_STM_2Gb_X_16, &stm2GbX16},
++ { DFC_FLASH_NULL, NULL},
++};
++
++int dfc_get_flash_info(int type, struct dfc_flash_info **flash_info)
++{
++ uint32_t i = 0;
++
++ while(type_info[i].type != DFC_FLASH_NULL) {
++ if (type_info[i].type == type) {
++ *flash_info = type_info[i].flash_info;
++ return 0;
++ }
++ i++;
++ }
++ *flash_info = NULL;
++ return -EINVAL;
++}
++
++/******************************************************************************
++ dfc_set_timing
++
++ Description:
++ This function sets flash timing property in DFC timing register
++ according to input timing value embodied in context structure.
++ It is called once during the hardware initialization.
++ Input Parameters:
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++//#if defined(CONFIG_CPU_MONAHANS_L) || defined(CONFIG_CPU_MONAHANS_LV)
++#define DFC_CLOCK 208
++//#else
++//#define DFC_CLOCK 104
++//#endif
++#define CLOCK_NS DFC_CLOCK/1000
++
++void dfc_set_timing(struct dfc_context *context, struct dfc_flash_timing *t)
++{
++ struct dfc_flash_timing timing = *t;
++
++ uint32_t r0 = 0;
++ uint32_t r1 = 0;
++
++ /*
++ * num of clock cycles = time (ns) / one clock sycle (ns) + 1
++ * - integer division will truncate the result, so add a 1 in all cases
++ * - subtract the extra 1 cycle added to all register timing values
++ */
++ timing.tCH = min(((int) (timing.tCH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tCH);
++ timing.tCS = min(((int) (timing.tCS * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tCS);
++ timing.tWH = min(((int) (timing.tWH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWH);
++ timing.tWP = min(((int) (timing.tWP * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWP);
++ timing.tRH = min(((int) (timing.tRH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tRH);
++ timing.tRP = min(((int) (timing.tRP * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tRP);
++
++ r0 = (timing.tCH << DFC_TIMING_tCH) |
++ (timing.tCS << DFC_TIMING_tCS) |
++ (timing.tWH << DFC_TIMING_tWH) |
++ (timing.tWP << DFC_TIMING_tWP) |
++ (timing.tRH << DFC_TIMING_tRH) |
++ (timing.tRP << DFC_TIMING_tRP);
++
++ dfc_write(context, DFC_NDTR0CS0, r0);
++
++ timing.tR = min(((int) (timing.tR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tR);
++ timing.tWHR = min(((int) (timing.tWHR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWHR);
++ timing.tAR = min(((int) (timing.tAR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tAR);
++
++ r1 = (timing.tR << DFC_TIMING_tR) |
++ (timing.tWHR << DFC_TIMING_tWHR) |
++ (timing.tAR << DFC_TIMING_tAR);
++
++ dfc_write(context, DFC_NDTR1CS0, r1);
++ return;
++}
++
++/******************************************************************************
++ dfc_set_dma
++
++ Description:
++ Enables or Disables DMA in line with setting in DFC mode of context
++ structure. DMA mode of DFC. Performs a read-modify-write operation that
++ only changes the driven DMA_EN bit field In DMA mode, all commands and
++ data are transferred by DMA. DMA can be enable/disable on the fly.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_dma(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_dma)
++ ndcr |= NDCR_DMA_EN;
++ else
++ ndcr &= ~NDCR_DMA_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++
++/******************************************************************************
++ dfc_set_ecc
++
++ Description:
++ This function enables or disables hardware ECC capability of DFC in line
++ with setting in DFC mode of context structure.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_ecc(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_ecc)
++ ndcr |= NDCR_ECC_EN;
++ else
++ ndcr &= ~NDCR_ECC_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_set_spare
++
++ Description:
++ This function enables or disables accesses to spare area of NAND Flash
++ through DFC in line with setting in DFC mode of context structure.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_spare(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_spare)
++ ndcr |= NDCR_SPARE_EN;
++ else
++ ndcr &= ~NDCR_SPARE_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++static unsigned int get_delta (unsigned int start)
++{
++ unsigned int stop = OSCR;
++ return (stop - start);
++}
++
++static int dfc_wait_event(struct dfc_context *context, uint32_t event,
++ uint32_t *event_out, uint32_t timeout, int enable_int)
++{
++ uint32_t ndsr;
++ uint32_t to = 3 * timeout; /* 3 ticks ~ 1us */
++ int status;
++ int start = OSCR;
++
++ if (enable_int)
++ dfc_enable_int(context, event);
++
++ while (1) {
++ ndsr = dfc_read(context, DFC_NDSR);
++ ndsr &= NDSR_MASK;
++ if (ndsr & event) {
++ /* event happened */
++ *event_out = ndsr & event;
++ dfc_clear_int(context, *event_out);
++ status = 0;
++ break;
++ } else if (get_delta(start) > to) {
++ status = -ETIME;
++ break;
++ }
++ }
++
++ if (enable_int)
++ dfc_disable_int(context, event);
++ return status;
++}
++
++/******************************************************************************
++ dfc_get_pattern
++
++ Description:
++ This function is used to retrieve buffer size setting for a transaction
++ based on cmd.
++ Input Parameters:
++ context - Pointer to DFC context structure
++ cmd
++ Specifies type of command to be sent to NAND flash .The LSB of this
++ parameter defines the first command code for 2-cycles command. The
++ MSB defines the second command code for 2-cycles command. If MSB is
++ set to zero, this indicates that one cycle command
++ Output Parameters:
++ data_size
++ It is used to retrieve length of data transferred to/from DFC,
++ which includes padding bytes
++ padding
++ It is used to retrieve how many padding bytes there should be
++ in buffer of data_size.
++ Returns:
++ 0
++ If size setting is returned successfully
++ -EINVAL
++ If page size specified in flash spec of context structure is not 512 or
++ 2048;If specified command index is not read1/program/erase/reset/readID/
++ readStatus.
++*******************************************************************************/
++int dfc_get_pattern(struct dfc_context *context, uint16_t cmd,
++ int *data_size, int *padding)
++{
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++ struct dfc_flash_info * flash_info = context->flash_info;
++ uint32_t page_size = context->flash_info->page_size; /* 512 or 2048 */
++
++ if (cmd == flash_info->read1 ||
++ cmd == flash_info->program) {
++ if (512 == page_size) {
++ /* add for DMA */
++ if (dfc_mode->enable_dma) {
++ *data_size = DFC_DATA_SIZE_544;
++ if (dfc_mode->enable_ecc)
++ *padding = DFC_PADDING_SIZE_24;
++ else
++ *padding = DFC_PADDING_SIZE_16;
++ } else if (!dfc_mode->enable_spare) {
++ *data_size = DFC_DATA_SIZE_512;
++ *padding = DFC_PADDING_SIZE_0;
++ } else {
++
++ if (dfc_mode->enable_ecc)
++ *data_size = DFC_DATA_SIZE_520;
++ else
++ *data_size = DFC_DATA_SIZE_528;
++
++ *padding = DFC_PADDING_SIZE_0;
++ }
++ } else if (2048 == page_size) {
++ /* add for DMA */
++ if (dfc_mode->enable_dma) {
++ *data_size = DFC_DATA_SIZE_2112;
++ if (dfc_mode->enable_ecc)
++ *padding = DFC_PADDING_SIZE_24;
++ else
++ *padding = DFC_PADDING_SIZE_0;
++ } else if (!dfc_mode->enable_spare) {
++ *data_size = DFC_DATA_SIZE_2048;
++ *padding = DFC_PADDING_SIZE_0;
++ } else {
++
++ if (dfc_mode->enable_ecc)
++ *data_size = DFC_DATA_SIZE_2088;
++ else
++ *data_size = DFC_DATA_SIZE_2112;
++
++ *padding = DFC_PADDING_SIZE_0;
++ }
++ } else /* if the page_size is neither 512 or 2048 */
++ return -EINVAL;
++ } else if (cmd == flash_info->read_id) {
++ *data_size = DFC_DATA_SIZE_ID;
++ *padding = DFC_PADDING_SIZE_0;
++ } else if(cmd == flash_info->read_status) {
++ *data_size = DFC_DATA_SIZE_STATUS;
++ *padding = DFC_PADDING_SIZE_0;
++ } else if (cmd == flash_info->erase || cmd == flash_info->reset) {
++ *data_size = DFC_DATA_SIZE_UNUSED;
++ *padding = DFC_PADDING_SIZE_UNUSED;
++ } else
++ return -EINVAL;
++ return 0;
++}
++
++
++/******************************************************************************
++ dfc_send_cmd
++
++ Description:
++ This function configures DFC to send command through DFC to NAND flash
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ cmd
++ Specifies type of command to be sent to NAND flash .The LSB of this
++ parameter defines the first command code for 2-cycles command. The
++ MSB defines the second command code for 2-cycles command. If MSB is
++ set to zero, this indicates that one cycle command
++ addr
++ Address sent out to the flash device withthis command. For page read/
++ program commands , 4-cycles address is sent. For erase command only
++ 3-cycles address is sent. If it is equal to 0xFFFFFFFF, the address
++ should not be used.
++ num_pages
++ It specifies the number of pages of data to be transferred for
++ a program or read commands. Unused for any other commands than
++ read/program.
++
++ Output Parameters:
++ None
++ Returns:
++ 0
++ If size setting is returned successfully
++ -EINVAL
++ If specified command index is not read1/program/erase/reset/readID/
++ readStatus.
++*******************************************************************************/
++int dfc_send_cmd(struct dfc_context *context, uint16_t cmd,
++ uint32_t addr, int num_pages)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ struct dfc_mode *dfc_mode = context->dfc_mode;
++ uint8_t cmd2;
++ uint32_t event_out;
++ uint32_t ndcb0=0, ndcb1=0, ndcb2=0, ndcr;
++ int status;
++
++ /* It is a must to set ND_RUN firstly, then write command buffer
++ * If conversely,it does not work
++ */
++ dfc_write(context, DFC_NDSR, NDSR_MASK);
++
++ /* Set ND_RUN */
++ ndcr = dfc_read(context, DFC_NDCR);
++ dfc_write(context, DFC_NDCR, (ndcr | NDCR_ND_RUN));
++
++ // Wait for write command request
++ status = dfc_wait_event(context, NDSR_WRCMDREQ,
++ &event_out, NAND_CMD_TIMEOUT, 0);
++
++ if (status) /* Timeout */
++ return status;
++
++ cmd2 = (cmd>>8) & 0xFF;
++ ndcb0 = cmd | (dfc_mode->chip_select<<24) | ((cmd2?1:0)<<19);
++
++ if (cmd == flash_info->read1) {
++ if (0xFFFFFFFF != addr) {
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages - 1) << 8;
++ }
++ } else if (cmd == flash_info->program) {
++ ndcb0 |= NDCB0_CMD_TYPE(1) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ } else if (cmd == flash_info->erase) {
++ ndcb0 |= NDCB0_CMD_TYPE(2) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(3);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ } else if (cmd == flash_info->read_id) {
++ ndcb0 |= NDCB0_CMD_TYPE(3);
++ } else if(cmd == flash_info->read_status) {
++ ndcb0 |= NDCB0_CMD_TYPE(4);
++ } else if(cmd == flash_info->reset) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else if (cmd == flash_info->lock) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else
++ return -EINVAL;
++
++ /* Write to DFC command register */
++ dfc_write(context, DFC_NDCB0, ndcb0);
++ dfc_write(context, DFC_NDCB0, ndcb1);
++ dfc_write(context, DFC_NDCB0, ndcb2);
++
++ return 0;
++}
++
++/******************************************************************************
++ dfc_stop
++
++ Description:
++ This function clears ND_RUN bit of NDCR.
++ Input Parameters:
++ context--Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_stop(struct dfc_context *context)
++{
++ unsigned int ndcr;
++ ndcr = dfc_read(context, DFC_NDCR);
++ dfc_write(context, DFC_NDCR, (ndcr & ~NDCR_ND_RUN));
++ ndcr = dfc_read(context, DFC_NDCR);
++
++ return;
++}
++
++int dfc_setup_cmd_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t addr, int num_pages,
++ uint32_t *buf, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ struct dfc_mode *dfc_mode = context->dfc_mode;
++ uint8_t cmd2;
++ uint32_t event_out;
++ uint32_t ndcb0=0, ndcb1=0, ndcb2=0, ndcr;
++ int status;
++
++ /*
++ * It is a must to set ND_RUN firstly, then write command buffer
++ * If conversely,it does not work
++ */
++ dfc_write(context, DFC_NDSR, NDSR_MASK);
++
++ /* Set ND_RUN */
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_ND_RUN;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Wait for write command request */
++ status = dfc_wait_event(context, NDSR_WRCMDREQ,
++ &event_out, NAND_CMD_TIMEOUT, 0);
++
++ if (status)
++ return status; /* Timeout */
++
++ cmd2 = (cmd>>8) & 0xFF;
++ ndcb0 = cmd | (dfc_mode->chip_select<<24) | ((cmd2?1:0)<<19);
++
++ if (cmd == flash_info->read1) {
++ if (0xFFFFFFFF != addr) {
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ }
++ } else if (cmd == flash_info->program) {
++ ndcb0 |= NDCB0_CMD_TYPE(1) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ } else if (cmd == flash_info->erase) {
++ ndcb0 |= NDCB0_CMD_TYPE(2) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(3);
++
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ } else if (cmd == flash_info->read_id) {
++ ndcb0 |= NDCB0_CMD_TYPE(3);
++ } else if (cmd == flash_info->read_status) {
++ ndcb0 |= NDCB0_CMD_TYPE(4);
++ } else if (cmd == flash_info->reset) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else if (cmd == flash_info->lock) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else
++ return -EINVAL;
++
++ *((uint32_t *)buf) = ndcb0;
++ *((uint32_t *)buf + 1) = ndcb1;
++ *((uint32_t *)buf + 2) = ndcb2;
++
++ dma_int_en &= (DCMD_STARTIRQEN | DCMD_ENDIRQEN);
++
++ dma_desc->ddadr = next_desc_phys;
++ dma_desc->dsadr = buf_phys;
++ dma_desc->dtadr = NDCB0_DMA_ADDR;
++ dma_desc->dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST16 | 12;
++ return 0;
++}
++
++int dfc_setup_data_dma(struct dfc_context* context,
++ uint16_t cmd, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc* dma_desc)
++{
++ struct dfc_flash_info * flash_info = context->flash_info;
++ int data_size, padding;
++
++ dfc_get_pattern(context, cmd, &data_size, &padding);
++
++ dma_desc->ddadr = next_desc_phys;
++ dma_int_en &= (DCMD_STARTIRQEN | DCMD_ENDIRQEN);
++
++ if (cmd == flash_info->program) {
++
++ dma_desc->dsadr = buf_phys;
++ dma_desc->dtadr = NDDB_DMA_ADDR;
++ dma_desc->dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST32 | data_size;
++
++ } else if (cmd == flash_info->read1 || cmd == flash_info->read_id ||
++ cmd == flash_info->read_status) {
++
++ dma_desc->dsadr = NDDB_DMA_ADDR;
++ dma_desc->dtadr = buf_phys;
++ dma_desc->dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST32 | data_size;
++ }
++ else
++ return -EINVAL;
++ return 0;
++}
++
++void dfc_start_cmd_dma(struct dfc_context* context, struct pxa_dma_desc* dma_desc)
++{
++ DRCMR99 = DRCMR_MAPVLD | context->cmd_dma_ch; /* NAND CMD DRCMR */
++ DDADR(context->cmd_dma_ch) = (uint32_t)dma_desc;
++ DCSR(context->cmd_dma_ch) |= DCSR_RUN;
++}
++
++void dfc_start_data_dma(struct dfc_context* context, struct pxa_dma_desc* dma_desc)
++{
++ DRCMR97 = DRCMR_MAPVLD | context->data_dma_ch;
++ DDADR(context->data_dma_ch) = (uint32_t)dma_desc;
++ DCSR(context->data_dma_ch) |= DCSR_RUN;
++}
++
++/******************************************************************************
++ dfc_read_fifo_partial
++
++ Description:
++ This function reads data from data buffer of DFC.Bytes can be any less than
++ or equal to data_size, the left is ignored by ReadFIFO though they will be
++ read from NDDB to clear data buffer.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ Output Parameters:
++ pBuffer
++ Pointer to the data buffer where data should be placed.
++ Returns:
++ None
++*******************************************************************************/
++void dfc_read_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size)
++{
++ uint32_t data = 0;
++ uint32_t i = 0;
++ uint32_t bytes_multi;
++ uint32_t bytes_remain;
++
++
++ if (1 == data_size) {
++ data = dfc_read(context, DFC_NDDB) & 0xFF;
++ *buffer++ = (uint8_t)data;
++ } else if (2 == data_size) {
++ data = dfc_read(context, DFC_NDDB) & 0xFFFF;
++ *buffer++ = data & 0xFF;
++ *buffer++ = (data >> 8) & 0xFF;
++ } else {
++ bytes_multi = (nbytes & 0xFFFFFFFC);
++ bytes_remain = nbytes & 0x03;
++
++ i = 0;
++ /* Read the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ data = dfc_read(context, DFC_NDDB);
++ /* FIXME: we don't know whether the buffer
++ * align to 4 bytes or not. Cast the buffer
++ * to int is not safe here. Especially under
++ * gcc 4.x. Used memcpy here. But the memcpy
++ * may be not correct on BE architecture.
++ * --by Yin, Fengwei
++ */
++ memcpy(buffer, &data, sizeof(data));
++ i += sizeof(data);
++ buffer += sizeof(data);
++ }
++
++ /* Read the left bytes_remain bytes data */
++ if (bytes_remain) {
++ data = dfc_read(context, DFC_NDDB);
++ for (i = 0; i < bytes_remain; i++)
++ *buffer++ = (uint8_t)((data >> (8*i)) & 0xFF);
++ }
++
++ /* When read the remain bytes, we always read 4 bytes data
++ * to DFC. So the data_size should subtract following number.
++ */
++ data_size -= bytes_multi + (bytes_remain ? sizeof(data) : 0);
++
++ /* We need Read data_size bytes data totally */
++ while (data_size > 0) {
++ data = dfc_read(context, DFC_NDDB);
++ data_size -= sizeof(data);
++ }
++
++/*
++ while(i < ((uint32_t)data_size) ) {
++ if (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ *temp = dfc_reg->nddb;
++ } else if (i == bytes_multi && bytes_remain){
++ uint32_t j = 0;
++ data = dfc_reg->nddb;
++ while (j++ < bytes_remain) {
++ *buffer++ = (uint8_t) \
++ ((data>>(8*j)) & 0xFF);
++ }
++ } else {
++ data = dfc_reg->nddb;
++ }
++ i += 4;
++ buffer += 4;
++ }
++*/
++ }
++ return;
++}
++
++/******************************************************************************
++ dfc_write_fifo_partial
++
++ Description:
++ Write to data buffer of DFC from a buffer. Bytes can be same as
++ data_size, also can be data_size-padding, but can¡¯t be random value,
++ the left will be automatically padded by WriteFIFO.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ bytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ buffer
++ Pointer to the data buffer where data will be taken from to be written
++ to DFC data buffer
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_write_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size)
++{
++ uint32_t i = 0;
++
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t temp;
++ /*
++ * caller guarantee buffer contains appropriate data thereby
++ * it is impossible for nbytes not to be a multiple of 4 byte
++ */
++
++ /* Write the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = buffer[0] | buffer[1] << 8 |
++ buffer[2] << 16 | buffer[3] << 24;
++ dfc_write(context, DFC_NDDB, temp);
++ buffer += 4;
++ i += 4;
++ }
++
++ /* Write the left bytes_remain bytes data */
++ if (bytes_remain) {
++ temp = 0xFFFFFFFF;
++ for (i = 0; i < bytes_remain; i++)
++ temp &= *buffer++ << i*8;
++
++ dfc_write(context, DFC_NDDB, temp);
++ }
++
++ /* When write the remain bytes, we always write 4 bytes data
++ * to DFC. So the data_size should subtract following number.
++ */
++ data_size -= bytes_multi + (bytes_remain ? sizeof(temp) : 0);
++
++ while (data_size > 0) {
++ dfc_write(context, DFC_NDDB, 0xFFFFFFFF);
++ data_size -= 4;
++ }
++
++/*
++ while (i < ((uint32_t)data_size)) {
++ if (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ dfc_reg->nddb = *temp;
++ }
++ else if (i == bytes_multi && bytes_remain) {
++ uint32_t j = 0, data = 0xFFFFFFFF;
++ while (j < bytes_remain) {
++ data &= (uint8_t)(*buffer) << j;
++ buffer++;
++ j++;
++ }
++ dfc_reg->nddb = data;
++ }
++ else {
++ dfc_reg->nddb = 0xFFFFFFFF;
++ }
++ i += 4;
++ buffer += 4;
++ }
++*/
++
++ return;
++}
++
++/******************************************************************************
++ dfc_read_fifo
++ Description:
++ This function reads data from data buffer of DFC.Bytes can be any less
++ than or equal to data_size, the left is ignored by ReadFIFO though they
++ will be read from NDDB to clear data buffer.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ Output Parameters:
++ buffer
++ Pointer to the data buffer where data should be placed.
++ Returns:
++ None
++*******************************************************************************/
++
++void dfc_read_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes)
++{
++ uint32_t i = 0;
++
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t temp;
++
++ /* Read the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = dfc_read(context, DFC_NDDB);
++ /* FIXME: we don't know whether the buffer
++ * align to 4 bytes or not. Cast the buffer
++ * to int is not safe here. Especially under
++ * gcc 4.x. Used memcpy here. But the memcpy
++ * may be not correct on BE architecture.
++ * --by Yin, Fengwei
++ */
++ memcpy(buffer, &temp, sizeof(temp));
++ i += sizeof(temp);
++ buffer += sizeof(temp);
++ }
++
++ /* Read the left bytes_remain bytes data */
++ temp = dfc_read(context, DFC_NDDB);
++ for (i = 0; i < bytes_remain; i++) {
++ *buffer++ = (uint8_t)((temp >> (8*i)) & 0xFF);
++ }
++
++/*
++ while (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ *temp = dfc_reg->nddb;
++ i += 4;
++ buffer += 4;
++ }
++
++ if (bytes_remain) {
++ data = dfc_reg->nddb;
++ for (i = 0; i < bytes_remain; i++) {
++ *buffer++ = (uint8_t)((data>>(8*i)) & 0xFF);
++ }
++ }
++*/
++
++ return;
++}
++
++/******************************************************************************
++ dfc_write_fifo
++ Description:
++ Write to data buffer of DFC from a buffer.Bytes can be same as data_size,
++ also can be data_size-padding, but can¡¯t be random value, the left will
++ be automatically padded by WriteFIFO.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ buffer
++ Pointer to the data buffer where data will be taken from to be written to
++ DFC data buffer
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_write_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes)
++{
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t i=0;
++ uint32_t temp;
++
++ /* Write the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = buffer[0] | buffer[1] << 8 |
++ buffer[2] << 16 | buffer[3] << 24;
++ dfc_write(context, DFC_NDDB, temp);
++ buffer += 4;
++ i += 4;
++ }
++
++ /* Write the left bytes_remain bytes data */
++ temp = 0xFFFFFFFF;
++ for (i = 0; i < bytes_remain; i++)
++ temp &= *buffer++ << i*8;
++ dfc_write(context, DFC_NDDB, temp);
++
++/*
++ while (i < nbytes) {
++ temp = (uint32_t *)buffer;
++ dfc_reg->nddb = *temp;
++ i += 4;
++ buffer += 4;
++ }
++*/
++}
++
++/******************************************************************************
++ dfc_read_badblock_addr
++
++ Description:
++ This function reads bad block address in units of block starting from 0
++ if bad block is detected. It takes into the account if the operation is
++ for CS0 or CS1 depending on settings of chip_select parameter of DFC
++ Mode structure.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ pBadBlockAddr
++ Used to retrieve bad block address back to caller if bad block is
++ detected
++ Returns:
++ None
++*******************************************************************************/
++void dfc_read_badblock_addr(struct dfc_context *context, uint32_t *bbaddr)
++{
++ uint32_t ndbdr;
++ if (0 == context->dfc_mode->chip_select)
++ ndbdr = dfc_read(context, DFC_NDBDR0);
++ else
++ ndbdr = dfc_read(context, DFC_NDBDR1);
++
++ if (512 == context->flash_info->page_size) {
++ ndbdr = (ndbdr >> 5) & 0xFFF;
++ *bbaddr = ndbdr;
++ } else if (2048 == context->flash_info->page_size) {
++ /* 16 bits LB */
++ ndbdr = (ndbdr >> 8);
++ *bbaddr = ndbdr;
++ }
++ return;
++}
++
++/******************************************************************************
++ dfc_enable_int
++
++ Description:
++ This function is used to enable DFC interrupts. The bits in int_mask
++ will be used to unmask NDCR register to enable corresponding interrupts.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to enable
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_enable_int(struct dfc_context *context, uint32_t int_mask)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~int_mask;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_disable_int
++
++ Description:
++ This function is used to disable DFC interrupts.
++ The bits inint_mask will be used to mask NDCR register to disable
++ corresponding interrupts.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to disable
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_disable_int(struct dfc_context *context, uint32_t int_mask)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= int_mask;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_clear_int
++
++ Description:
++ This function is used to disable DFC interrupts.
++ The bits in int_mask will be used to clear corresponding interrupts
++ in NDCR register
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to clear
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_clear_int(struct dfc_context *context, uint32_t int_mask)
++{
++ dfc_write(context, DFC_NDSR, int_mask);
++
++ dfc_read(context, DFC_NDSR);
++ return;
++}
++
++/*
++ * high level primitives
++ */
++
++/******************************************************************************
++ dfc_init
++
++ Description:
++ This function does entire DFC initialization according to the NAND
++ flash type currently used with platform, including setting MFP, set
++ flash timing, set DFC mode, configuring specified flash parameters
++ in DFC, clear ECC logic and page count register.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ if MFPRs are set correctly
++ -EINVAL
++ if specified flash is not support by check bytes per page and pages per
++ block
++******************************************************************************/
++
++static mfp_cfg_t pxa300_nand_cfg[] = {
++ /* NAND */
++ MFP_CFG_X(DF_INT_RnB, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nRE_nOE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nWE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_CLE_nOE, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nADV1_ALE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS0, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS1, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_IO0, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO1, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO2, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO3, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO4, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO5, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO6, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO7, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO8, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO9, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO10, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO11, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO12, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO13, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO14, AF1, DS08X, PULL_LOW),
++};
++
++#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
++
++int dfc_init(struct dfc_context* context, int type)
++{
++ int status;
++ struct dfc_flash_info * flash_info;
++ uint32_t ndcr = 0x00000FFF; /* disable all interrupts */
++
++ status = dfc_get_flash_info(type, &flash_info);
++ if (status)
++ return status;
++ context->flash_info = flash_info;
++
++ pxa3xx_mfp_config(ARRAY_AND_SIZE(pxa300_nand_cfg));
++ //enable_dfc_pins();
++
++ dfc_set_timing(context, &context->flash_info->timing);
++
++ if (flash_info->enable_arbiter)
++ ndcr |= NDCR_ND_ARB_EN;
++
++ if (64 == flash_info->page_per_block)
++ ndcr |= NDCR_PG_PER_BLK;
++ else if (32 != flash_info->page_per_block)
++ return -EINVAL;
++
++ if (flash_info->row_addr_start)
++ ndcr |= NDCR_RA_START;
++
++ ndcr |= (flash_info->read_id_bytes)<<16;
++
++ ndcr |= (flash_info->dfc_mode) << 21;
++
++ if (flash_info->ncsx)
++ ndcr |= NDCR_NCSX;
++
++ if (2048 == flash_info->page_size)
++ ndcr |= NDCR_PAGE_SZ;
++ else if (512 != flash_info->page_size)
++ return -EINVAL;
++
++ if (16 == flash_info->flash_width)
++ ndcr |= NDCR_DWIDTH_M;
++ else if (8 != flash_info->flash_width)
++ return -EINVAL;
++
++ if (16 == flash_info->dfc_width)
++ ndcr |= NDCR_DWIDTH_C;
++ else if (8 != flash_info->dfc_width)
++ return -EINVAL;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ dfc_set_dma(context);
++ dfc_set_ecc(context);
++ dfc_set_spare(context);
++
++ return 0;
++}
++
++/******************************************************************************
++ dfc_init_no_gpio
++
++ Description:
++ This function does entire DFC initialization according to the NAND
++ flash type currently used with platform, including set flash timing,
++ set DFC mode, configuring specified flash parameters in DFC, clear
++ ECC logic and page count register. The only difference with dfc_init
++ is that it does not set MFP&GPIO, very useful in OS loader
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ if MFPRs are set correctly
++ -EINVAL
++ if specified flash is not support by check bytes per page and pages
++ per block
++******************************************************************************/
++int dfc_init_no_gpio(struct dfc_context* context, int type)
++{
++ struct dfc_flash_info * flash_info;
++ uint32_t ndcr = 0x00000FFF; /* disable all interrupts */
++ int status;
++
++ status = dfc_get_flash_info(type, &flash_info);
++ if (status)
++ return status;
++ context->flash_info = flash_info;
++
++ dfc_set_timing(context, &context->flash_info->timing);
++
++ if (flash_info->enable_arbiter)
++ ndcr |= NDCR_ND_ARB_EN;
++
++ if (64 == flash_info->page_per_block)
++ ndcr |= NDCR_PG_PER_BLK;
++ else if (32 != flash_info->page_per_block)
++ return -EINVAL;
++
++ if (flash_info->row_addr_start)
++ ndcr |= NDCR_RA_START;
++
++ ndcr |= (flash_info->read_id_bytes)<<16;
++
++ ndcr |= (flash_info->dfc_mode) << 21;
++
++ if (flash_info->ncsx)
++ ndcr |= NDCR_NCSX;
++
++ if (2048 == flash_info->page_size)
++ ndcr |= NDCR_PAGE_SZ;
++ else if (512 != flash_info->page_size)
++ return -EINVAL;
++
++ if (16 == flash_info->flash_width)
++ ndcr |= NDCR_DWIDTH_M;
++ else if (8 != flash_info->flash_width)
++ return -EINVAL;
++
++ if (16 == flash_info->dfc_width)
++ ndcr |= NDCR_DWIDTH_C;
++ else if (8 != flash_info->dfc_width)
++ return -EINVAL;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ dfc_set_dma(context);
++ dfc_set_ecc(context);
++ dfc_set_spare(context);
++
++ return 0;
++}
++
++/*
++ * This macro will be used in following NAND operation functions.
++ * It is used to clear command buffer to ensure cmd buffer is empty
++ * in case of operation is timeout
++ */
++#define ClearCMDBuf() do { \
++ dfc_stop(context); \
++ udelay(NAND_OTHER_TIMEOUT); \
++ } while (0)
++
++/******************************************************************************
++ dfc_reset_flash
++
++ Description:
++ It reset the flash. The function can be called at any time when the
++ device is in Busy state during random read/program/erase mode and
++ reset operation will abort all these operations. After reset operation
++ the device is ready to wait for next command
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ execution succeeds
++ -ETIME
++ if timeout
++*******************************************************************************/
++int dfc_reset_flash(struct dfc_context *context)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ uint32_t event, event_out;
++ unsigned long timeo;
++ int status;
++
++ /* Send command */
++ dfc_send_cmd(context, (uint16_t)flash_info->reset, 0xFFFFFFFF, 0);
++
++ event = (context->dfc_mode->chip_select)? \
++ NDSR_CS1_CMDD : NDSR_CS0_CMDD;
++
++ /* Wait for CMDDM(command done successfully) */
++ status = dfc_wait_event(context, event, &event_out,
++ NAND_OTHER_TIMEOUT, 0);
++
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++
++
++ /* Wait until flash device is stable or timeout (10ms) */
++ timeo = jiffies + HZ;
++ do {
++ if (monahans_df_dev_ready(context->mtd))
++ break;
++ } while (time_before(jiffies, timeo));
++
++ return 0;
++}
++
++int dfc_readid(struct dfc_context *context, uint32_t *id)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ uint32_t event_out;
++ int status;
++ char tmp[DFC_DATA_SIZE_ID];
++
++ /* Send command */
++ status = dfc_send_cmd(context, (uint16_t)flash_info->read_id,
++ 0xFFFFFFFF, 0);
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++
++ /* Wait for CMDDM(command done successfully) */
++ status = dfc_wait_event(context, NDSR_RDDREQ, &event_out,
++ NAND_OTHER_TIMEOUT, 0);
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++ dfc_read_fifo_partial(context, (unsigned char *)tmp,
++ context->flash_info->read_id_bytes, DFC_DATA_SIZE_ID);
++
++ *id = tmp[0] | (tmp[1] << 8);
++ return 0;
++}
++
++#define ERR_NONE 0x0
++#define ERR_DMABUSERR (-0x01)
++#define ERR_SENDCMD (-0x02)
++#define ERR_DBERR (-0x03)
++#define ERR_BBERR (-0x04)
++#define ERR_BUSY (-0x05)
++
++#define STATE_CMD_SEND 0x1
++#define STATE_CMD_HANDLE 0x2
++#define STATE_DMA_TRANSFER 0x3
++#define STATE_DMA_DONE 0x4
++#define STATE_READY 0x5
++#define STATE_SUSPENDED 0x6
++#define STATE_DATA_TRANSFER 0x7
++
++#define NAND_RELOC_MAX 127
++#define NAND_RELOC_HEADER 0x524e
++#define MAX_CHIP 1
++#define NAND_CMD_DMA_LEN 12
++
++#define MAX_TIM_SIZE 0x1000
++#define MAX_BBT_SLOTS 24
++
++struct reloc_item {
++ unsigned short from;
++ unsigned short to;
++};
++
++struct reloc_table {
++ unsigned short header;
++ unsigned short total;
++ struct reloc_item reloc[NAND_RELOC_MAX];
++};
++
++struct monahans_dfc_info {
++ unsigned int state;
++ struct dfc_context *context;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ dma_addr_t data_buf_addr;
++ char *data_buf;
++ int data_dma;
++ struct pxa_dma_desc *data_desc;
++ dma_addr_t data_desc_addr;
++ dma_addr_t cmd_buf_addr;
++ char *cmd_buf;
++ int cmd_dma;
++ struct pxa_dma_desc *cmd_desc;
++ dma_addr_t cmd_desc_addr;
++ u64 dma_mask;
++#else
++ char *data_buf;
++#endif
++ u32 current_slot;
++ struct reloc_table table;
++ unsigned int table_init;
++ /* relate to the command */
++ unsigned int cmd;
++ unsigned int addr;
++ unsigned int column;
++ int retcode;
++ unsigned int buf_count;
++ struct completion cmd_complete;
++};
++
++static struct dfc_mode dfc_mode =
++{
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ 1, /* enable DMA */
++#else
++ 0,
++#endif
++ 1, /* enable ECC */
++ 1, /* enable SPARE */
++ 0, /* CS0 */
++};
++
++
++struct dfc_context dfc_context =
++{
++ 0, /* Initialized at function monahans_df_init() */
++ &dfc_mode,
++ 0, /* data dma channel */
++ 0, /* cmd dma channel */
++ NULL, /* &zylonite_flashinfo */
++};
++
++
++/*
++ * MTD structure for Zylonite board
++ */
++static struct mtd_info *monahans_mtd = NULL;
++
++/*
++ * BootRom and XDB will use last 127 block, and they will keep all the status
++ * of the bootloader and image, so skip the first 2M size and last 2M size
++ */
++static struct mtd_partition partition_info[] = {
++ {
++ name: "Bootloader",
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ size: 0x00060000,
++//#else
++// size: 0x00040000,
++//#endif
++ offset: 0,
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ },{
++ name: "Kernel",
++ size: 0x00200000,
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ offset: 0x00060000,
++//#else
++// offset: 0x00040000,
++//#endif
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ },{
++ name: "Filesystem",
++ size: 0x05000000,
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ offset: 0x00260000,
++//#else
++// offset: 0x00240000,
++//#endif
++ }, {
++ name: "MassStorage",
++ size: 0x0, /* It will be set at probe function */
++ offset: MTDPART_OFS_APPEND /* Append after fs section */
++ }, {
++ name: "BBT",
++ size: 0x0, /* It will be set at probe function */
++ offset: MTDPART_OFS_APPEND,/* Append after fs section */
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ }
++};
++
++#define PART_NUM ARRAY_SIZE(partition_info)
++
++/* MHN_OBM_V2 is related to BBT in MOBM V2
++ * MHN_OBM_V3 is related to BBT in MOBM V3
++ */
++enum {
++ MHN_OBM_NULL = 0,
++ MHN_OBM_V1,
++ MHN_OBM_V2,
++ MHN_OBM_V3,
++ MHN_OBM_INVAL
++} MHN_OBM_TYPE;
++
++static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
++static uint8_t scan_main_bbt_pattern[] = { 'p', 'x', 'a', '1' };
++static uint8_t scan_mirror_bbt_pattern[] = { '0', 'a', 'x', 'p' };
++
++static struct nand_bbt_descr monahans_bbt_default = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .maxblocks = 2,
++ .len = 2,
++ .offs = 0,
++ .pattern = scan_ff_pattern,
++};
++
++static struct nand_bbt_descr monahans_bbt_main = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 6,
++ .maxblocks = 2,
++ .offs = 2,
++ .len = 4,
++ .pattern = scan_main_bbt_pattern,
++};
++
++static struct nand_bbt_descr monahans_bbt_mirror = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 6,
++ .maxblocks = 2,
++ .offs = 2,
++ .len = 4,
++ .pattern = scan_mirror_bbt_pattern,
++};
++
++#if 0
++static struct nand_bbt_descr monahans_bbt_main = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 2,
++ .maxblocks = 2,
++ .offs = 0x0,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++static struct nand_bbt_descr monahans_bbt_mirror = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 2,
++ .maxblocks = 2,
++ .offs = 0x0,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++#endif
++
++static struct nand_ecclayout monahans_lb_nand_oob = {
++ .eccbytes = 24,
++ .eccpos = {
++ 40, 41, 42, 43, 44, 45, 46, 47,
++ 48, 49, 50, 51, 52, 53, 54, 55,
++ 56, 57, 58, 59, 60, 61, 62, 63},
++ .oobfree = { {2, 38} }
++};
++
++/*
++ * Monahans OOB size is only 8 bytes, and the rest 8 bytes is controlled by
++ * hardware for ECC. We construct virutal ECC buffer. Acutally, ECC is 6 bytes
++ * and the remain 2 bytes are reserved.
++ */
++static struct nand_ecclayout monahans_sb_nand_oob = {
++ .eccbytes = 6,
++ .eccpos = {8, 9, 10, 11, 12, 13 },
++ .oobfree = { {2, 6} }
++};
++
++
++static inline int is_buf_blank(u8 * buf, int size)
++{
++ int i = 0;
++ while(i < size) {
++ if (*((unsigned long *)(buf + i)) != 0xFFFFFFFF)
++ return 0;
++ i += 4;
++ }
++ if (i > size) {
++ i -= 4;
++ while( i < size) {
++ if(*(buf + i) != 0xFF)
++ return 0;
++ i++;
++ }
++ }
++ return 1;
++}
++
++static void print_buf(char *buf, int num)
++{
++ int i = 0;
++
++ while (i < num) {
++ printk(KERN_ERR "0x%08x: %02x %02x %02x %02x %02x %02x %02x"
++ " %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
++ (unsigned int) (i), buf[i], buf[i+1], buf[i+2],
++ buf[i+3], buf[i+4], buf[i+5], buf[i+6], buf[i+7],
++ buf[i+8], buf[i+9], buf[i+10],buf[i+11], buf[i+12],
++ buf[i+13], buf[i+14], buf[i+15]);
++ i += 16;
++ }
++}
++
++static int inline enable_dfc_dma(struct dfc_context *context, int enable)
++{
++ int ret = dfc_mode.enable_dma;
++ unsigned long ndcr;
++
++ if (!enable) {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~NDCR_DMA_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_dma = 0;
++ } else {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_DMA_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_dma = 1;
++ }
++ return ret;
++}
++
++
++static void inline dump_info(struct monahans_dfc_info *info)
++{
++ if (!info)
++ return;
++
++ printk(KERN_ERR "cmd:0x%x; addr:0x%x; retcode:%d; state:%d \n",
++ info->cmd, info->addr, info->retcode, info->state);
++}
++
++static void inline enable_hw_ecc(struct dfc_context* context, int enable)
++{
++ unsigned long ndcr;
++
++ if (!enable) {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~NDCR_ECC_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_ecc = 0;
++ }
++ else {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_ECC_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_ecc = 1;
++ }
++}
++
++/*
++ * Now, we are not sure that the NDSR_RDY mean the flash is ready.
++ * Need more test.
++ */
++static int monahans_df_dev_ready(struct mtd_info *mtd)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ struct dfc_context* context = info->context;
++
++ return ((dfc_read(context, DFC_NDSR) & NDSR_RDY));
++}
++
++/* each read, we can only read 4bytes from NDDB, we must buffer it */
++static u_char monahans_df_read_byte(struct mtd_info *mtd)
++{
++ char retval = 0xFF;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (info->column < info->buf_count) {
++ /* Has just send a new command? */
++ retval = info->data_buf[info->column++];
++ }
++ return retval;
++}
++
++static void monahans_df_write_byte(struct mtd_info *mtd, u8 byte)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ info->data_buf[info->column++] = byte;
++}
++
++static u16 monahans_df_read_word(struct mtd_info *mtd)
++{
++ u16 retval = 0xFFFF;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (!(info->column & 0x01) && info->column < info->buf_count) {
++ retval = *((u16 *)(info->data_buf+info->column));
++ info->column += 2;
++ }
++ return retval;
++}
++
++static void monahans_df_write_word(struct mtd_info *mtd, u16 word)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (!(info->column & 0x01) && info->column < info->buf_count) {
++ *((u16 *)(info->data_buf+info->column)) = word;
++ info->column += 2;
++ }
++}
++
++static void monahans_df_read_buf(struct mtd_info *mtd, u_char *buf, int len)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int real_len = min((unsigned int)len, info->buf_count - info->column);
++
++ memcpy(buf, info->data_buf + info->column, real_len);
++ info->column += real_len;
++}
++
++static void monahans_df_write_buf(struct mtd_info *mtd,
++ const u_char *buf, int len)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int real_len = min((unsigned int)len, info->buf_count - info->column);
++
++ memcpy(info->data_buf + info->column, buf, real_len);
++ info->column += real_len;
++}
++
++static int monahans_df_verify_buf(struct mtd_info *mtd,
++ const u_char *buf, int len)
++{
++ return 0;
++}
++
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++static void monahans_dfc_cmd_dma_irq(int channel, void *data,
++ struct pt_regs *regs)
++{
++ unsigned int dcsr;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)data;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++ unsigned int intm;
++
++ dcsr = DCSR(channel);
++ DCSR(channel) = dcsr;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ D1(printk("cmd dma interrupt, channel:%d, DCSR:0x%08x\n", \
++ channel, dcsr));
++
++ if (dcsr & DCSR_BUSERR) {
++ info->retcode = ERR_DMABUSERR;
++ complete(&info->cmd_complete);
++ } else {
++ if ((info->cmd == NAND_CMD_READ0) ||
++ (info->cmd == NAND_CMD_READOOB)|| \
++ (info->cmd == NAND_CMD_READID) || \
++ (info->cmd == NAND_CMD_STATUS)) {
++ dfc_enable_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ } else if (info->cmd == NAND_CMD_PAGEPROG)
++ dfc_enable_int(context, NDSR_WRDREQ);
++ else if (info->cmd == NAND_CMD_ERASE1)
++ dfc_enable_int(context, intm);
++ }
++
++ return;
++}
++
++
++static void monahans_dfc_data_dma_irq(int channel, void *data,
++ struct pt_regs *regs)
++{
++ unsigned int dcsr, intm;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)data;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++
++ dcsr = DCSR(channel);
++ DCSR(channel) = dcsr;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ D1(printk("data dma interrupt, channel:%d, DCSR:0x%08x\n",
++ channel, dcsr));
++ if (dcsr & DCSR_BUSERR) {
++ info->retcode = ERR_DMABUSERR;
++ complete(&info->cmd_complete);
++ }
++
++ if (info->cmd == NAND_CMD_PAGEPROG) {
++ /* DMA interrupt may be interrupted by other IRQs*/
++ info->state = STATE_DMA_DONE;
++ dfc_enable_int(context, intm);
++ } else {
++ info->state = STATE_READY;
++ complete(&info->cmd_complete);
++ }
++
++}
++#endif
++
++static irqreturn_t monahans_dfc_irq(int irq, void *devid)
++{
++ unsigned int status, event, intm, cmd;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)devid;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++ event = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ status = dfc_read(context, DFC_NDSR);
++ D1(printk("DFC irq, NDSR:0x%x\n", status));
++ if (status & (NDSR_RDDREQ | NDSR_DBERR)) {
++ if (status & NDSR_DBERR) {
++ info->retcode = ERR_DBERR;
++ }
++
++ dfc_disable_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ dfc_clear_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ if (info->cmd == NAND_CMD_READID)
++ cmd = context->flash_info->read_id;
++ else if (info->cmd == NAND_CMD_STATUS)
++ cmd = context->flash_info->read_status;
++ else if (info->cmd == NAND_CMD_READ0 ||
++ info->cmd == NAND_CMD_READOOB)
++ cmd = context->flash_info->read1;
++ else {
++ printk(KERN_ERR "No according command:0x%x happens\n",
++ info->cmd);
++ goto out;
++ }
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->state = STATE_DMA_TRANSFER;
++ dfc_start_data_dma(context,
++ (struct pxa_dma_desc*)info->data_desc_addr);
++#else
++ info->state = STATE_DATA_TRANSFER;
++ complete(&info->cmd_complete);
++#endif
++ } else if (status & NDSR_WRDREQ) {
++ dfc_disable_int(context, NDSR_WRDREQ);
++ dfc_clear_int(context, NDSR_WRDREQ);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->state = STATE_DMA_TRANSFER;
++ dfc_start_data_dma(context,
++ (struct pxa_dma_desc*)info->data_desc_addr);
++#else
++ info->state = STATE_DATA_TRANSFER;
++ complete(&info->cmd_complete);
++#endif
++ } else if (status & event) {
++ if (status & NDSR_CS0_BBD) {
++ info->retcode = ERR_BBERR;
++ }
++
++ dfc_disable_int(context, intm);
++ dfc_clear_int(context, event);
++ info->state = STATE_READY;
++ complete(&info->cmd_complete);
++ }
++out:
++ return IRQ_HANDLED;
++}
++
++static int dfc_send_command(struct mtd_info *mtd, unsigned int cmd,
++ unsigned int addr, unsigned int num_pages,
++ unsigned int event)
++{
++
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ struct dfc_context* context = info->context;
++ int status;
++ int ret;
++
++ D1(printk("ready send command, cmd:0x%x, at address:0x%x,"
++ " num_pages:%d, wait event:0x%x\n", cmd, addr, num_pages, event));
++
++ info->state = STATE_CMD_SEND;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ status = dfc_setup_cmd_dma(context, cmd, addr, num_pages,
++ (uint32_t *)info->cmd_buf, info->cmd_buf_addr,
++ DDADR_STOP, DCMD_ENDIRQEN, info->cmd_desc);
++#else
++ status = dfc_send_cmd(context, cmd, addr, num_pages);
++#endif
++ if (status) {
++ info->retcode = ERR_SENDCMD;
++ dfc_stop(context);
++ udelay(20);
++ printk(KERN_ERR "fail send command\n");
++ return info->retcode;
++ }
++ info->state = STATE_CMD_HANDLE;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_setup_data_dma(context, cmd, info->data_buf_addr,
++ DDADR_STOP, DCMD_ENDIRQEN, info->data_desc);
++ dfc_start_cmd_dma(context, (struct pxa_dma_desc*)info->cmd_desc_addr);
++#endif
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_enable_int(context, event);
++#endif
++ ret = wait_for_completion_timeout(&info->cmd_complete, 2*HZ);
++ if (!ret){
++ printk(KERN_ERR "Command time out\n");
++ dump_info(info);
++ }
++ D1(printk("command return, cmd:0x%x, retcode:%d\n",
++ info->cmd, info->retcode));
++ return 0;
++}
++
++static void monahans_df_command(struct mtd_info *mtd, unsigned command,
++ int column, int page_addr )
++{
++ struct nand_chip *this = (struct nand_chip *)(mtd->priv);
++ struct monahans_dfc_info *info =
++ (struct monahans_dfc_info *)(this->priv);
++ struct dfc_context *context = info->context;
++ struct dfc_flash_info * flash_info = context->flash_info;
++ int ret, pages_shift;
++ int status;
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ int datasize;
++ int paddingsize;
++#endif
++ unsigned int to;
++
++ D1(printk("command:0x%x at address:0x%x, column:0x%x\n",
++ command, page_addr, column));
++
++ if (info->state != STATE_READY) {
++ printk(KERN_ERR "CHIP is not ready.\n");
++ dump_info(info);
++ info->retcode = ERR_BUSY;
++ return;
++ }
++ info->retcode = ERR_NONE;
++ pages_shift = this->phys_erase_shift - this->page_shift;
++ if (info->table_init) {
++ to = search_rel_block((page_addr >> pages_shift), mtd);
++ if (to) {
++ page_addr = (to << pages_shift) | (page_addr
++ & ((1 << pages_shift) - 1));
++ }
++ }
++
++ switch ( command ) {
++ case NAND_CMD_READOOB:
++ /*
++ * DFC has mark the last 8 bytes OOB data if HARDEARE_ECC is
++ * enabled. We must first disable the HARDWARE_ECC for getting
++ * all the 16 bytes OOB
++ */
++ enable_hw_ecc(context, 0);
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ info->column = mtd->writesize + column;
++ info->cmd = command;
++ info->addr = page_addr << this->page_shift;
++ ret = dfc_send_command(mtd, flash_info->read1, info->addr,
++ 1, NDSR_RDDREQ | NDSR_DBERR);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read1, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ min(info->buf_count, datasize), datasize);
++ info->state = STATE_READY;
++#endif
++ /* We only are OOB, so if the data has error, does not matter */
++ if (info->retcode == ERR_DBERR)
++ info->retcode = ERR_NONE;
++ enable_hw_ecc(context, 1);
++ break;
++
++ case NAND_CMD_READ0:
++ enable_hw_ecc(context, 1);
++ info->column = column;
++ info->cmd = command;
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ memset(info->data_buf, 0xFF, info->buf_count);
++ info->addr = page_addr << this->page_shift;
++
++ ret = dfc_send_command(mtd, flash_info->read1, info->addr,
++ 1, NDSR_RDDREQ | NDSR_DBERR);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read1, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ min(info->buf_count, datasize), datasize);
++ info->state = STATE_READY;
++#endif
++ /* When the data buf is blank, the DFC will report DB error */
++ if (info->retcode == ERR_DBERR && is_buf_blank(info->data_buf,
++ mtd->writesize))
++ info->retcode = ERR_NONE;
++
++ if (info->retcode == ERR_DBERR) {
++ printk(KERN_ERR "DB error at address 0x%x\n",
++ info->addr);
++ print_buf(info->data_buf, info->buf_count);
++ }
++ break;
++ case NAND_CMD_SEQIN:
++ /* Write only OOB? */
++
++ info->cmd = command;
++ if (column >= mtd->writesize) {
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ enable_hw_ecc(context, 0);
++ } else {
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ enable_hw_ecc(context, 1);
++ }
++ memset(info->data_buf, 0xFF, mtd->writesize + mtd->oobsize);
++ info->column = column;
++ info->addr = page_addr << this->page_shift;
++ break;
++ case NAND_CMD_PAGEPROG:
++ /* prevois command is NAND_CMD_SEIN ?*/
++ if (info->cmd != NAND_CMD_SEQIN) {
++ info->cmd = command;
++ info->retcode = ERR_SENDCMD;
++ printk(KERN_ERR "Monahans NAND device: "
++ "No NAND_CMD_SEQIN executed before.\n");
++ enable_hw_ecc(context, 1);
++ break;
++ }
++ info->cmd = command;
++ ret = dfc_send_command(mtd, flash_info->program, info->addr,
++ 1, NDSR_WRDREQ);
++
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ if (ret != 0)
++ break;
++
++ dfc_get_pattern(info->context, flash_info->program, &datasize,
++ &paddingsize);
++ dfc_write_fifo_partial(info->context, info->data_buf, datasize,
++ datasize);
++
++ if (info->context->dfc_mode->chip_select)
++ dfc_enable_int(info->context,
++ NDSR_CS1_BBD | NDSR_CS1_CMDD);
++ else
++ dfc_enable_int(info->context,
++ NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ ret = wait_for_completion_timeout(&info->cmd_complete, 2*HZ);
++ if (!ret){
++ printk(KERN_ERR "Programm Command time out\n");
++ dump_info(info);
++ }
++
++ if (info->retcode == ERR_BBERR) {
++ mtd->block_markbad(mtd, info->addr);
++ }
++#endif
++ break;
++ case NAND_CMD_ERASE1:
++ info->cmd = command;
++ info->addr = (page_addr >> pages_shift) << this->phys_erase_shift;
++
++ if (info->context->dfc_mode->chip_select)
++ ret = dfc_send_command(mtd, flash_info->erase,
++ info->addr, 0, NDSR_CS1_BBD | NDSR_CS1_CMDD);
++ else
++ ret = dfc_send_command(mtd, flash_info->erase,
++ info->addr, 0, NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ if (info->retcode == ERR_BBERR) {
++ mtd->block_markbad(mtd, info->addr);
++ }
++ break;
++ case NAND_CMD_ERASE2:
++ break;
++ case NAND_CMD_READID:
++ info->cmd = command;
++ info->buf_count = flash_info->read_id_bytes;
++ info->column = 0;
++ info->addr = 0xFFFFFFFF;
++ ret = dfc_send_command(mtd, flash_info->read_id, info->addr,
++ 0, NDSR_RDDREQ);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read_id, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ info->buf_count, datasize);
++ info->state = STATE_READY;
++#endif
++ D1(printk("ReadID, [1]:0x%x, [2]:0x%x\n",
++ info->data_buf[0], info->data_buf[1]));
++ break;
++ case NAND_CMD_STATUS:
++ info->cmd = command;
++ info->buf_count = 1;
++ info->column = 0;
++ info->addr = 0xFFFFFFFF;
++ ret = dfc_send_command(mtd, flash_info->read_status,
++ info->addr, 0, NDSR_RDDREQ);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read_status,
++ &datasize, &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ info->buf_count, datasize);
++ info->state = STATE_READY;
++#endif
++ break;
++
++ case NAND_CMD_RESET:
++ status = dfc_reset_flash(&dfc_context);
++ if (status) {
++ printk(KERN_WARNING "Monahans NAND device:"
++ "NAND_CMD_RESET error\n");
++ }
++ break;
++ default:
++ printk(KERN_WARNING "Monahans NAND device:"
++ "Non-support the command.\n");
++ break;
++ }
++
++ if (info->retcode != ERR_NONE)
++ dfc_stop(info->context);
++}
++
++static void monahans_df_select_chip(struct mtd_info *mtd, int chip)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (chip <= MAX_CHIP)
++ info->context->dfc_mode->chip_select = chip;
++ else
++ printk(KERN_ERR "Monahans NAND device:"
++ "not select the NAND chips!\n");
++}
++
++static int monahans_df_waitfunc(struct mtd_info *mtd,
++ struct nand_chip *this)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ /* monahans_df_send_command has waited for command complete */
++ if (this->state == FL_WRITING || this->state == FL_ERASING) {
++ if (info->retcode == ERR_NONE)
++ return 0;
++ else {
++ /*
++ * any error make it return 0x01 which will tell
++ * the caller the erase and write fail
++ */
++ return 0x01;
++ }
++ }
++
++ return 0;
++}
++
++static int monahans_df_calculate_ecc(struct mtd_info *mtd,
++ const u_char *dat, u_char *ecc_code)
++{
++ return 0;
++}
++
++static int monahans_df_correct_data(struct mtd_info *mtd,
++ u_char *dat, u_char *read_ecc, u_char *calc_ecc)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ /*
++ * Any error include ERR_SEND_CMD, ERR_DBERR, ERR_BUSERR, we
++ * consider it as a ecc error which will tell the caller the
++ * read fail We have distinguish all the errors, but the
++ * nand_read_ecc only check this function return value
++ */
++ if (info->retcode != ERR_NONE)
++ return -1;
++
++ return 0;
++}
++
++static void monahans_df_enable_hwecc(struct mtd_info *mtd, int mode)
++{
++ return;
++}
++
++/*
++ * The relocation table management is different between MOBM V2 and V3.
++ *
++ * MOBM V2 is applied on chips taped out before MhnLV A0.
++ * MOBM V3 is applied on chips taped out after MhnLV A0. It's also applied
++ * on MhnLV A0.
++ */
++static int calc_obm_ver(void)
++{
++ unsigned int cpuid;
++ /* read CPU ID */
++ __asm__ (
++ "mrc p15, 0, %0, c0, c0, 0\n"
++ : "=r" (cpuid)
++ );
++ /* It's not xscale chip. */
++ if ((cpuid & 0xFFFF0000) != 0x69050000)
++ return MHN_OBM_INVAL;
++ /* It's MhnP Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006420)
++ return MHN_OBM_V2;
++ /* It's MhnP Bx */
++ if ((cpuid & 0x0000FFF0) == 0x00006820) {
++ if ((cpuid & 0x0F) <= 5)
++ return MHN_OBM_V2;
++ else
++ return MHN_OBM_V3;
++ }
++ /* It's MhnL Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006880) {
++ if ((cpuid & 0x0F) == 0)
++ return MHN_OBM_V2;
++ else
++ return MHN_OBM_V3;
++ }
++ /* It's MhnLV Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006890)
++ return MHN_OBM_V3;
++ return MHN_OBM_INVAL;
++}
++
++
++/*
++ * MOBM maintains a relocation table. It's used to replace bad blocks.
++ * If block A is bad, it will use block B instead.
++ * There're 127 relocated blocks. All of them reside in the bottom of NAND
++ * flash. So they're reserved and can't be calculated in mtd size and chip
++ * size.
++ */
++static int read_reloc_table(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct dfc_context *context = NULL;
++ struct reloc_table *table = NULL;
++ int page, maxslot;
++ int obm, valid;
++
++ obm = calc_obm_ver();
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ context = info->context;
++
++ mtd->size -= (NAND_RELOC_MAX * mtd->erasesize);
++ this->chipsize -= (NAND_RELOC_MAX << this->phys_erase_shift);
++ page = (1 << (this->phys_erase_shift - this->page_shift)) - 1;
++
++ this->select_chip(mtd, 0);
++ valid = 0;
++ if (obm == MHN_OBM_V2) {
++ /* On MOBM V2, the relocation table resides in the last page
++ * of the first block.
++ */
++ memset(info->data_buf, 0, BUFLEN);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ memcpy(((unsigned char *)&(info->table)), info->data_buf,
++ sizeof(struct reloc_table));
++ if (info->table.header == NAND_RELOC_HEADER)
++ valid = 1;
++ } else if (obm == MHN_OBM_V3) {
++ /* On MOBM V3, there're several relocation tables in the first
++ * block.
++ * When new bad blocks are found, a new relocation table will
++ * be generated and written back to the first block. But the
++ * original relocation table won't be erased. Even if the new
++ * relocation table is written wrong, system can still find an
++ * old one.
++ * One page contains one slot.
++ */
++ maxslot = 1 << (this->phys_erase_shift - this->page_shift);
++ page = maxslot - MAX_BBT_SLOTS;
++ for (; page < maxslot; page++) {
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ table = (struct reloc_table *)info->data_buf;
++ if (info->retcode == ERR_NONE) {
++ if (table->header != NAND_RELOC_HEADER) {
++ continue;
++ } else {
++ memcpy(((unsigned char *)&(info->table)),
++ table, sizeof(struct reloc_table));
++ valid = 1;
++ break;
++ }
++ }
++ }
++
++ } else {
++ printk(KERN_ERR "The version of MOBM isn't supported\n");
++ }
++ if (valid) {
++ memcpy(((unsigned char *)&(info->table)), info->data_buf,
++ sizeof(struct reloc_table));
++ printk(KERN_DEBUG "relocation table at page:%d\n", page);
++ PRINT_BUF((unsigned char *)&(info->table),
++ sizeof(struct reloc_table));
++ info->table_init = 1;
++ } else {
++ /* There should be a valid relocation table slot at least. */
++ printk(KERN_ERR "NO VALID relocation table can be \
++ recognized\n");
++ printk(KERN_ERR "CAUTION: It may cause unpredicated error\n");
++ printk(KERN_ERR "Please re-initialize the NAND flash.\n");
++ memset((unsigned char *)&(info->table), 0,
++ sizeof(struct reloc_table));
++ info->table_init = 0;
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/* add the relocation entry into the relocation table
++ * It's valid on MOBM V3.
++ * If the relocated block is bad, an new entry will be added into the
++ * bottom of the relocation table.
++ */
++static int update_rel_table(struct mtd_info *mtd, int block)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct reloc_table *table = NULL;
++ int obm, reloc_block;
++
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ obm = calc_obm_ver();
++ if (obm == MHN_OBM_V3) {
++ table = &info->table;
++ if (info->table_init == 0) {
++ printk(KERN_ERR "Error: the initial relocation \
++ table can't be read\n");
++ memset(table, 0, sizeof(struct reloc_table));
++ table->header = NAND_RELOC_HEADER;
++ info->table_init = 1;
++ }
++ if (table->total == 0) {
++ /* Point to the first relocated block.
++ * It resides in the last block of flash.
++ * the relocation entry has calculated in
++ * chipsize
++ */
++ reloc_block = (this->chipsize
++ >> this->phys_erase_shift)
++ + NAND_RELOC_MAX - 1;
++ } else if (table->total < NAND_RELOC_MAX) {
++ reloc_block = table->reloc[table->total - 1].to - 1;
++ } else {
++ printk(KERN_ERR "Relocation table exceed max number, \
++ cannot mark block 0x%x as bad block\n", block);
++ return -ENOSPC;
++ }
++ /* Make sure that reloc_block is pointing to a valid block */
++ for (; ; reloc_block--) {
++ /* The relocate table is full */
++ if (reloc_block < (this->chipsize
++ >> this->phys_erase_shift))
++ return -ENOSPC;
++ this->cmdfunc(mtd, NAND_CMD_ERASE1, 0, reloc_block
++ << (this->phys_erase_shift
++ - this->page_shift));
++ if (info->retcode == ERR_NONE)
++ break;
++ }
++ /* Create the relocated block information in the table */
++ table->reloc[table->total].from = block;
++ table->reloc[table->total].to = reloc_block;
++ table->total++;
++ }
++ return 0;
++}
++
++/* Write the relocation table back to device, if there's room. */
++static int sync_rel_table(struct mtd_info *mtd, int *idx)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ int obm, start_page, len;
++
++ if (*idx >= MAX_BBT_SLOTS) {
++ printk(KERN_ERR "Can't write relocation table to device \
++ any more.\n");
++ return -1;
++ }
++ if (*idx < 0) {
++ printk(KERN_ERR "Wrong Slot is specified.\n");
++ return -1;
++ }
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ len = 4;
++ len += info->table.total << 2;
++ obm = calc_obm_ver();
++ if (obm == MHN_OBM_V3) {
++ /* write to device */
++ start_page = 1 << (this->phys_erase_shift - this->page_shift);
++ start_page = start_page - 1 - *idx;
++ memset(&(info->data_buf), 0xFF, BUFLEN);
++ memcpy(&(info->data_buf), &(info->table), len);
++
++ printk(KERN_DEBUG "DUMP relocation table before write. \
++ page:0x%x\n", start_page);
++ monahans_df_command(mtd, NAND_CMD_SEQIN, 0, start_page);
++ monahans_df_command(mtd, NAND_CMD_PAGEPROG, 0, start_page);
++ /* write to idx */
++ (*idx)++;
++ /* dump it */
++ memset(&(info->data_buf), 0, BUFLEN);
++ monahans_df_command(mtd, NAND_CMD_READOOB, 0, start_page);
++ PRINT_BUF(info->data_buf, len);
++ }
++ return 0;
++}
++
++
++/* Find the relocated block of the bad one.
++ * If it's a good block, return 0. Otherwise, return a relocated one.
++ * idx points to the next relocation entry
++ * If the relocated block is bad, an new entry will be added into the
++ * bottom of the relocation table.
++ */
++static unsigned short search_rel_block(int block, struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct reloc_table *table = NULL;
++ int i, max, reloc_block = 0;
++
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ table = &(info->table);
++ if ((block <= 0) || (block > this->chipsize)
++ || (info->table_init == 0) || (table->total == 0))
++ return 0;
++ if (table->total > NAND_RELOC_MAX)
++ table->total = NAND_RELOC_MAX;
++ max = table->total;
++ for (i = 0; i < max; i++) {
++ if (block == table->reloc[i].from)
++ reloc_block = table->reloc[i].to;
++ }
++ return reloc_block;
++}
++
++/*
++ * Check whether the block is a bad one.
++ * At first, it will search the relocation table.
++ * If necessary, it will search the BBT. Because relocation table can only
++ * maintain limited record. If there're more bad blocks, they can't be
++ * recorded in relocation table. They can only be recorded in BBT.
++ */
++static int monahans_df_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
++{
++ struct nand_chip *this = NULL;
++ int page, block, reloc_block, chipnr, res = 0;
++ u16 bad;
++
++ /* At here, we only support one flash chip */
++ this = (struct nand_chip *)mtd->priv;
++ block = (int)(ofs >> this->phys_erase_shift);
++ /* search the block in the relocation table */
++ reloc_block = search_rel_block(block, mtd);
++ if (reloc_block) {
++ ofs = ((reloc_block << this->phys_erase_shift) |
++ (ofs & ((1 << this->phys_erase_shift) - 1)));
++ }
++
++ /* search BBT
++ * Maybe the relocation table is full, but some bad blocks aren't
++ * recordered in it.
++ * The below code are copied from nand_block_bad().
++ */
++ if (getchip) {
++ page = (int)(ofs >> this->page_shift);
++ chipnr = (int)(ofs >> this->chip_shift);
++
++ /* Select the NAND chips */
++ this->select_chip(mtd, chipnr);
++ } else
++ page = (int)ofs;
++
++ if (this->options & NAND_BUSWIDTH_16) {
++ this->cmdfunc(mtd, NAND_CMD_READOOB, this->badblockpos & 0xFE,
++ page & this->pagemask);
++ bad = cpu_to_le16(this->read_word(mtd));
++ if (this->badblockpos & 0x1)
++ bad >>= 1;
++ if ((bad & 0xFF) != 0xFF)
++ res = 1;
++ } else {
++ this->cmdfunc(mtd, NAND_CMD_READOOB, this->badblockpos,
++ page & this->pagemask);
++ if (this->read_byte(mtd) != 0xFF)
++ res = 1;
++ }
++
++ return res;
++}
++
++static int monahans_df_block_markbad(struct mtd_info *mtd, loff_t ofs)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ unsigned char buf[2] = {0, 0};
++ int block, reloc_block, page, ret;
++
++ this = (struct nand_chip *)mtd->priv;
++ info = (struct monahans_dfc_info *)(this->priv);
++ /* Get block number */
++ block = ((int)ofs) >> this->bbt_erase_shift;
++ ret = update_rel_table(mtd, block);
++ if (!ret) {
++ sync_rel_table(mtd, &(info->current_slot));
++ return 0;
++ } else {
++ reloc_block = search_rel_block(block, mtd);
++ if (reloc_block)
++ block = reloc_block;
++ if (this->bbt)
++ this->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);
++ }
++
++ /* Do we have a flash based bad block table ? */
++ if (this->options & NAND_USE_FLASH_BBT)
++ return nand_update_bbt(mtd, ofs);
++
++ /* mark the bad block flag at the first two pages */
++ page = block << (this->phys_erase_shift - this->page_shift);
++ ofs = mtd->writesize + this->badblockpos;
++ this->cmdfunc(mtd, NAND_CMD_SEQIN, ofs, page);
++ this->write_buf(mtd, buf, 2);
++ this->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
++ page++;
++ this->cmdfunc(mtd, NAND_CMD_SEQIN, ofs, page);
++ this->write_buf(mtd, buf, 2);
++ this->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
++ return 0;
++}
++
++static int dump_bbt_flash(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ int block, page, totlen;
++
++ this = (struct nand_chip *)mtd->priv;
++ info = (struct monahans_dfc_info *)this->priv;
++ block = (this->chipsize >> this->phys_erase_shift) - 1;
++ totlen = (this->chipsize >> this->phys_erase_shift) >> 2;
++ printk(KERN_ERR "totlen:0x%x\n", totlen);
++ this->select_chip(mtd, 0);
++ if (this->bbt_td) {
++ printk(KERN_ERR "BBT page:0x%x\n", this->bbt_td->pages[0]);
++ page = this->bbt_td->pages[0];
++ if (this->bbt_td->pages[0] <= 0) {
++ page = block << (this->phys_erase_shift
++ - this->page_shift);
++ }
++ while (totlen > 0) {
++ printk(KERN_ERR "page:0x%x\n", page);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ printk(KERN_ERR "read result:0x%x\n", info->retcode);
++ PRINT_BUF(info->data_buf, BUFLEN);
++ totlen -= (1 << this->page_shift);
++ page++;
++ }
++ }
++ if (this->bbt_md) {
++ printk(KERN_ERR "BBT page:0x%x\n", this->bbt_md->pages[0]);
++ page = this->bbt_md->pages[0];
++ if (this->bbt_td->pages[0] <= 0) {
++ page = block << (this->phys_erase_shift
++ - this->page_shift);
++ }
++ while (totlen > 0) {
++ printk(KERN_ERR "page:0x%x\n", page);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ printk(KERN_ERR "read result:0x%x\n", info->retcode);
++ PRINT_BUF(info->data_buf, BUFLEN);
++ totlen -= (1 << this->page_shift);
++ page++;
++ }
++
++ }
++ return 0;
++}
++
++static int dump_bbt_mem(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++
++ this = (struct nand_chip *)mtd->priv;
++ PRINT_BUF(this->bbt, 225);
++ return 0;
++}
++
++static int monahans_df_scan_bbt(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ int ret;
++
++ this = (struct nand_chip *)mtd->priv;
++ ret = read_reloc_table(mtd);
++ if (ret) {
++ printk(KERN_ERR "Failed to get relocation table\n");
++ printk(KERN_ERR "Try to build a new BBT. It may result \
++ unpredicated error.\n");
++ /* Create new memory based and flash based BBT */
++ }
++ nand_scan_bbt(mtd, &monahans_bbt_default);
++ //dump_bbt_flash(mtd);
++ dump_bbt_mem(mtd);
++ return 0;
++#if 0
++ /* Read flashed based BBT from device */
++ return (nand_scan_bbt(mtd, &monahans_bbt_main));
++#endif
++}
++
++
++static int monahans_df_probe(struct platform_device *pdev)
++{
++ struct nand_chip *this;
++ struct monahans_dfc_info *info;
++ int status = -1;
++ unsigned int data_buf_len;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ unsigned int buf_len;
++#endif
++ int i, ret = 0;
++
++ printk(KERN_ERR "Nand driver probe\n");
++
++ dfc_context.membase = ioremap_nocache(0x43100000, 0x100000);
++ if (!dfc_context.membase)
++ printk(KERN_ERR "Couldn't ioremap\n");
++
++ pxa_set_cken(CKEN_NAND, 1);
++
++ for (i = DFC_FLASH_NULL + 1; i < DFC_FLASH_END; i++)
++ {
++ uint32_t id;
++
++ status = dfc_init(&dfc_context, i);
++ if (status)
++ continue;
++ status = dfc_readid(&dfc_context, &id);
++ if (status)
++ continue;
++ printk(KERN_DEBUG "id:0x%x, chipid:0x%x\n",
++ id, dfc_context.flash_info->chip_id);
++ if (id == dfc_context.flash_info->chip_id)
++ break;
++ }
++
++ if(i == DFC_FLASH_END) {
++ printk(KERN_ALERT "Monahans NAND device:"
++ "Nand Flash initialize failure!\n");
++ ret = -ENXIO;
++ goto out;
++ }
++ flash_config = i;
++
++ monahans_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip) +
++ sizeof(struct monahans_dfc_info) , GFP_KERNEL);
++ if (!monahans_mtd) {
++ printk (KERN_ERR "Monahans NAND device:"
++ "Unable to allocate NAND MTD device structure.\n");
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ /* Get pointer to private data */
++ this = (struct nand_chip *)((void *)monahans_mtd + sizeof(struct mtd_info));
++ info = (struct monahans_dfc_info *)((void *)this + sizeof(struct nand_chip));
++ dfc_context.mtd = monahans_mtd;
++
++ monahans_mtd->priv = this;
++ this->priv = info;
++ data_buf_len = dfc_context.flash_info->page_size +
++ dfc_context.flash_info->oob_size;
++ info->state = STATE_READY;
++ init_completion(&info->cmd_complete);
++ info->table_init = 0;
++ memset(&info->table, 0x0, sizeof(struct reloc_table));
++ printk(KERN_DEBUG "%s: this->controller: 0x%x, &this->controller: 0x%x\n",__func__, (unsigned int)this->controller, (unsigned int)&(this->controller));
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->dma_mask = 0xffffffffUL;
++
++ dev->dma_mask = &info->dma_mask;
++ dev->coherent_dma_mask = 0xffffffffUL;
++
++ /* alloc dma data buffer for data
++ * buffer + 2*descriptor + command buffer
++ */
++ buf_len = ALIGN(2*sizeof(struct pxa_dma_desc), 32) +
++ ALIGN(data_buf_len, 32) + ALIGN(NAND_CMD_DMA_LEN, 32);
++
++ printk(KERN_INFO "Try to allocate dma buffer(len:%d)"
++ "for data buffer + 2*descriptor + command buffer\n", buf_len);
++ info->data_desc = (struct pxa_dma_desc*)dma_alloc_writecombine(dev,
++ buf_len, &info->data_desc_addr, GFP_KERNEL);
++ if (!info->data_desc) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma buffer\n");
++ ret = -ENOMEM;
++ goto free_mtd;
++ }
++
++ info->cmd_desc = (struct pxa_dma_desc*)((char *)info->data_desc +
++ sizeof(struct pxa_dma_desc));
++ info->cmd_desc_addr = (dma_addr_t)((char *)info->data_desc_addr +
++ sizeof(struct pxa_dma_desc));
++ info->data_buf = (char *)info->data_desc +
++ ALIGN(2*sizeof(struct pxa_dma_desc), 32);
++ info->data_buf_addr = (dma_addr_t)((char *)info->data_desc_addr +
++ ALIGN(2*sizeof(struct pxa_dma_desc), 32));
++ info->cmd_buf = (char *)info->data_buf + ALIGN(data_buf_len, 32);
++ info->cmd_buf_addr = (dma_addr_t)((char *)info->data_buf_addr +
++ ALIGN(data_buf_len, 32));
++
++ D1(printk("Get dma buffer for data dma descriptor, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->data_desc, info->data_desc_addr));
++ D1(printk("Get dma buffer for command dma descriptors, virt:0x%x,"
++ "phys0x:%x\n", (unsigned int)info->cmd_desc, info->cmd_desc_addr));
++ D1(printk("Get dma buffer for data, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->data_buf, info->data_buf_addr));
++ D1(printk("Get dma buffer for command, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->cmd_buf, info->cmd_buf_addr));
++
++ D1(printk("Try to allocate dma channel for data\n"));
++
++ info->data_dma = pxa_request_dma("NAND DATA", DMA_PRIO_LOW,
++ monahans_dfc_data_dma_irq, info);
++ if (info->data_dma < 0) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma channel for data\n");
++ ret = info->data_dma;
++ goto free_buf;
++ }
++ D1(printk("Get dma channel:%d for data\n", info->data_dma));
++
++ D1(printk("Try to allocate dma channel for command\n"));
++ info->cmd_dma = pxa_request_dma("NAND CMD", DMA_PRIO_LOW,
++ monahans_dfc_cmd_dma_irq, info);
++ if (info->cmd_dma < 0) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma channel for command\n");
++ ret = info->cmd_dma;
++ goto free_data_dma;
++ }
++ D1(printk("Get dma channel:%d for command\n", info->cmd_dma));
++
++ dfc_context.cmd_dma_ch = info->cmd_dma;
++ dfc_context.data_dma_ch = info->data_dma;
++#else
++ printk(KERN_DEBUG "Try to allocate data buffer(len:%d)\n", data_buf_len);
++ info->data_buf = kmalloc(data_buf_len, GFP_KERNEL);
++ if (!info->data_buf) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc data buffer\n");
++ ret = -ENOMEM;
++ goto free_mtd;
++ }
++#endif
++
++ D1(printk("Try to request irq:%d\n", IRQ_NAND));
++ ret = request_irq(IRQ_NAND, monahans_dfc_irq, 0, pdev->name, info);
++ if (ret < 0) {
++ printk(KERN_ERR "Monahans NAND device: Unable to request irq\n");
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ goto free_cmd_dma;
++#else
++ goto free_buf;
++#endif
++ }
++
++ D1(printk("Success request irq\n"));
++
++ /* set address of NAND IO lines */
++ this->options = (dfc_context.flash_info->flash_width == 16)? \
++ NAND_BUSWIDTH_16: 0 | NAND_USE_FLASH_BBT;
++
++ /* this->IO_ADDR_R = this->IO_ADDR_W = NDDB */
++ this->waitfunc = monahans_df_waitfunc;
++ this->select_chip = monahans_df_select_chip;
++ this->dev_ready = monahans_df_dev_ready;
++ this->cmdfunc = monahans_df_command;
++ this->read_word= monahans_df_read_word;
++ /*this->write_word= monahans_df_write_word;*/
++ this->read_byte = monahans_df_read_byte;
++ this->read_buf = monahans_df_read_buf;
++ this->write_buf = monahans_df_write_buf;
++ this->verify_buf = monahans_df_verify_buf;
++ this->ecc.hwctl = monahans_df_enable_hwecc;
++ this->ecc.calculate = monahans_df_calculate_ecc;
++ this->ecc.correct = monahans_df_correct_data;
++ this->block_bad = monahans_df_block_bad;
++ this->block_markbad = monahans_df_block_markbad;
++ this->scan_bbt = monahans_df_scan_bbt;
++ this->chip_delay= 25;
++ this->bbt_td = &monahans_bbt_main;
++ this->bbt_md = &monahans_bbt_mirror;
++
++ /* If the NAND flash is small block flash, only 512-byte pagesize
++ * is supported.
++ * Adjust parameters of BBT what is depended on large block nand
++ * flash or small block nand flash.
++ */
++ if (dfc_context.flash_info->oob_size > 16) {
++ this->ecc.layout = &monahans_lb_nand_oob;
++ this->ecc.mode = NAND_ECC_HW;
++ this->ecc.size = 2048;
++ this->ecc.bytes = 24;
++ this->bbt_td->offs = 2;
++ this->bbt_td->veroffs = 6;
++ this->bbt_md->offs = 2;
++ this->bbt_md->veroffs = 6;
++ this->badblockpos = NAND_LARGE_BADBLOCK_POS;
++ monahans_bbt_default.offs = NAND_LARGE_BADBLOCK_POS;
++ monahans_bbt_default.len = 2;
++ /* when scan_bbt() is executed, bbt version can get */
++ monahans_bbt_default.veroffs = 2;
++ } else {
++ this->ecc.layout = &monahans_sb_nand_oob;
++ this->ecc.mode = NAND_ECC_HW;
++ this->ecc.size = 512;
++ this->ecc.bytes = 6;
++ this->bbt_td->offs = 8;
++ this->bbt_td->veroffs = 12;
++ this->bbt_md->offs = 8;
++ this->bbt_md->veroffs = 12;
++ this->badblockpos = NAND_SMALL_BADBLOCK_POS;
++ monahans_bbt_default.offs = NAND_SMALL_BADBLOCK_POS;
++ monahans_bbt_default.len = 1;
++ monahans_bbt_default.veroffs = 8;
++ }
++
++ info->context = &dfc_context;
++ /* TODO: allocate dma buffer and channel */
++
++ platform_set_drvdata(pdev, monahans_mtd);
++
++ if (nand_scan(monahans_mtd, 1)) {
++ printk(KERN_ERR "Nand scan failed\n");
++ ret = -ENXIO;
++ goto free_irq;
++ }
++
++ /* There is a potential limitation that no more partition can be
++ * added between MassStorage and BBT(last block).
++ *
++ * The last 127 blocks is reserved for relocation table, they aren't
++ * statistical data of mtd size and chip size.
++ *
++ * BBT partitions contains 4 blocks. Two blocks are used to store
++ * main descriptor, the other two are used to store mirror descriptor.
++ */
++ partition_info[PART_NUM - 1].size = (monahans_bbt_main.maxblocks
++ + monahans_bbt_mirror.maxblocks)
++ << this->phys_erase_shift;
++ partition_info[PART_NUM - 1].offset = this->chipsize
++ - partition_info[PART_NUM - 1].size;
++ partition_info[PART_NUM - 2].offset = partition_info[PART_NUM - 3].offset
++ + partition_info[PART_NUM - 3].size;
++ partition_info[PART_NUM - 2].size = this->chipsize
++ - partition_info[PART_NUM - 2].offset
++ - partition_info[PART_NUM - 1].size;
++ add_mtd_partitions(monahans_mtd, partition_info, PART_NUM);
++
++#ifdef CONFIG_DVFM
++ dvfm_notifier.client_data = info;
++ mhn_fv_register_notifier(&dvfm_notifier);
++#endif
++
++ return 0;
++
++free_irq:
++ free_irq(IRQ_NAND, info);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++free_cmd_dma:
++ pxa_free_dma(info->cmd_dma);
++free_data_dma:
++ pxa_free_dma(info->data_dma);
++free_buf:
++ dma_free_writecombine(dev, buf_len, info->data_desc, info->data_desc_addr);
++#else
++free_buf:
++ kfree(info->data_buf);
++#endif
++free_mtd:
++ kfree(monahans_mtd);
++out:
++ return ret;
++
++}
++
++static int __devexit monahans_df_remove(struct platform_device *dev)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ unsigned int data_buf_len = dfc_context.flash_info->page_size +
++ dfc_context.flash_info->oob_size;
++ unsigned int buf_len = ALIGN(2*sizeof(struct pxa_dma_desc), 32) +
++ ALIGN(data_buf_len, 32) + ALIGN(NAND_CMD_DMA_LEN, 32);
++#endif
++
++#ifdef CONFIG_DVFM
++ mhn_fv_unregister_notifier(&dvfm_notifier);
++#endif
++
++ platform_set_drvdata(dev, NULL);
++
++ del_mtd_device(mtd);
++ del_mtd_partitions(mtd);
++ free_irq(IRQ_NAND, info);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ pxa_free_dma(info->cmd_dma);
++ pxa_free_dma(info->data_dma);
++ dma_free_writecombine(dev, buf_len, info->data_desc,
++ info->data_desc_addr);
++#else
++ kfree(info->data_buf);
++#endif
++ kfree(mtd);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int monahans_df_suspend(struct platform_device *dev, pm_message_t state, u32 level)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if( SUSPEND_DISABLE == level){ /*SUSPEND_NOTIFY*/
++ if (info->state != STATE_READY) {
++ printk(KERN_ERR "current state is %d\n", info->state);
++ return -EAGAIN;
++ }
++ info->state = STATE_SUSPENDED;
++ /*
++ * The PM code need read the mobm from NAND.
++ * So the NAND clock can't be stop here.
++ * The PM code will cover this.
++ */
++ /* pxa_set_cken(CKEN_NAND, 0); */
++ }
++ return 0;
++}
++
++static int monahans_df_resume(struct platform_device *dev, u32 level)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int status;
++
++ if(RESUME_ENABLE == level){
++ if (info->state != STATE_SUSPENDED)
++ printk(KERN_WARNING "Error State after resume back\n");
++
++ info->state = STATE_READY;
++
++ pxa_set_cken(CKEN_NAND, 1);
++
++ status = dfc_init(&dfc_context, flash_config);
++ if (status) {
++ printk(KERN_ALERT "Monahans NAND device:"
++ "Nand Flash initialize failure!\n");
++ return -ENXIO;
++ }
++ }
++ return 0;
++}
++#endif
++
++#ifdef CONFIG_DVFM
++static int mhn_nand_dvfm_notifier(unsigned cmd, void *client_data, void *info)
++{
++ struct monahans_dfc_info *dfc_info =
++ (struct monahans_dfc_info *)client_data;
++
++ switch (cmd) {
++ case FV_NOTIFIER_QUERY_SET :
++ if (dfc_info->state != STATE_READY)
++ return -1;
++ break;
++
++ case FV_NOTIFIER_PRE_SET :
++ break;
++
++ case FV_NOTIFIER_POST_SET :
++ break;
++ }
++
++ return 0;
++}
++#endif
++
++static struct platform_driver monahans_df_driver = {
++ .probe = monahans_df_probe,
++ .remove = __devexit_p(monahans_df_remove),
++#ifdef CONFIG_PM
++ .suspend = monahans_df_suspend,
++ .resume = monahans_df_resume,
++#endif
++ .driver = {
++ .name = "monahans-nand-flash",
++ }
++};
++
++static void __exit monahans_df_cleanup(void)
++{
++ printk(KERN_ERR "Nand driver registered\n");
++ platform_driver_unregister(&monahans_df_driver);
++}
++
++static int __init monahans_df_init(void)
++{
++ return platform_driver_register(&monahans_df_driver);
++}
++
++module_init(monahans_df_init);
++module_exit(monahans_df_cleanup);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jingqing.xu (jingqing.xu@intel.com)");
++MODULE_DESCRIPTION("Glue logic layer for NAND flash on monahans DFC");
++
++
+Index: linux-2.6.23/arch/arm/mach-pxa/zylonite.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/zylonite.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/arch/arm/mach-pxa/zylonite.c 2008-02-13 09:11:02.000000000 +0000
+@@ -29,6 +29,8 @@
+ #include "generic.h"
+
+ int gpio_backlight;
++int gpio_vsync;
++int gpio_vsync1;
+ int gpio_eth_irq;
+
+ int lcd_id;
+@@ -54,6 +56,16 @@
+ .resource = smc91x_resources,
+ };
+
++static struct platform_device nand_device = {
++ .name = "monahans-nand-flash",
++ .id = -1,
++};
++
++static struct platform_device touch_device = {
++ .name = "pxa2xx-touch",
++ .id = -1,
++};
++
+ #if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULES)
+ static void zylonite_backlight_power(int on)
+ {
+@@ -96,7 +108,7 @@
+ };
+
+ static struct pxafb_mode_info sharp_ls037_modes[] = {
+- [0] = {
++ [1] = {
+ .pixclock = 158000,
+ .xres = 240,
+ .yres = 320,
+@@ -109,8 +121,8 @@
+ .lower_margin = 3,
+ .sync = 0,
+ },
+- [1] = {
+- .pixclock = 39700,
++ [0] = {
++ .pixclock = 45000,
+ .xres = 480,
+ .yres = 640,
+ .bpp = 16,
+@@ -137,6 +149,11 @@
+ /* backlight GPIO: output, default on */
+ gpio_direction_output(gpio_backlight, 1);
+
++ gpio_direction_output(gpio_vsync, 0);
++ gpio_direction_output(gpio_vsync1, 0);
++
++ printk(KERN_ERR "LCD ID is %x\n", lcd_id);
++
+ if (lcd_id & 0x20) {
+ set_pxa_fb_info(&zylonite_sharp_lcd_info);
+ return;
+@@ -169,6 +186,8 @@
+ smc91x_resources[1].start = gpio_to_irq(gpio_eth_irq);
+ smc91x_resources[1].end = gpio_to_irq(gpio_eth_irq);
+ platform_device_register(&smc91x_device);
++ platform_device_register(&nand_device);
++ platform_device_register(&touch_device);
+
+ zylonite_init_lcd();
+ }
+Index: linux-2.6.23/arch/arm/mach-pxa/zylonite_pxa300.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/zylonite_pxa300.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/arch/arm/mach-pxa/zylonite_pxa300.c 2008-02-13 14:01:13.000000000 +0000
+@@ -62,12 +62,12 @@
+ GPIO110_UART3_RXD,
+
+ /* AC97 */
+- GPIO23_AC97_nACRESET,
++ /*GPIO23_AC97_nACRESET,
+ GPIO24_AC97_SYSCLK,
+ GPIO29_AC97_BITCLK,
+ GPIO25_AC97_SDATA_IN_0,
+ GPIO27_AC97_SDATA_OUT,
+- GPIO28_AC97_SYNC,
++ GPIO28_AC97_SYNC,*/
+
+ /* Keypad */
+ GPIO107_KP_DKIN_0,
+@@ -104,6 +104,41 @@
+ /* Ethernet */
+ GPIO2_nCS3,
+ GPIO99_GPIO,
++
++ /* NAND */
++ MFP_CFG_X(DF_INT_RnB, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nRE_nOE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nWE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_CLE_nOE, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nADV1_ALE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS0, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS1, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_IO0, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO1, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO2, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO3, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO4, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO5, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO6, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO7, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO8, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO9, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO10, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO11, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO12, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO13, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO14, AF1, DS08X, PULL_LOW),
++
++ /* AC97 */
++ MFP_CFG_X(GPIO23, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO27, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO28, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO29, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO25, AF1, DS03X, PULL_LOW),
++
++ MFP_CFG_X(GPIO26, AF0, DS01X, PULL_LOW), /* Interrupt */
++ MFP_CFG_X(GPIO24, AF0, DS03X, PULL_LOW), /*SYSCLK external */
++ MFP_CFG_X(GPIO11, AF0, DS01X, PULL_LOW),
+ };
+
+ static mfp_cfg_t pxa310_mfp_cfg[] __initdata = {
+@@ -163,6 +198,9 @@
+ pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]);
+ }
+
++extern int gpio_vsync;
++extern int gpio_vsync1;
++
+ void __init zylonite_pxa300_init(void)
+ {
+ if (cpu_is_pxa300() || cpu_is_pxa310()) {
+@@ -174,6 +212,8 @@
+
+ /* GPIO pin assignment */
+ gpio_backlight = mfp_to_gpio(MFP_PIN_GPIO20);
++ gpio_vsync = mfp_to_gpio(GPIO76_LCD_VSYNC);
++ gpio_vsync1 = mfp_to_gpio(GPIO71_LCD_LDD_17);
+ }
+
+ if (cpu_is_pxa300()) {
+Index: linux-2.6.23/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.23.orig/drivers/video/pxafb.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/drivers/video/pxafb.c 2008-02-13 00:59:45.000000000 +0000
+@@ -1543,9 +1543,9 @@
+ if (inf->lccr0 & LCCR0_INVALID_CONFIG_MASK)
+ dev_warn(&dev->dev, "machine LCCR0 setting contains illegal bits: %08x\n",
+ inf->lccr0 & LCCR0_INVALID_CONFIG_MASK);
+- if (inf->lccr3 & LCCR3_INVALID_CONFIG_MASK)
+- dev_warn(&dev->dev, "machine LCCR3 setting contains illegal bits: %08x\n",
+- inf->lccr3 & LCCR3_INVALID_CONFIG_MASK);
++ //if (inf->lccr3 & LCCR3_INVALID_CONFIG_MASK)
++ // dev_warn(&dev->dev, "machine LCCR3 setting contains illegal bits: %08x\n",
++ // inf->lccr3 & LCCR3_INVALID_CONFIG_MASK);
+ if (inf->lccr0 & LCCR0_DPD &&
+ ((inf->lccr0 & LCCR0_PAS) != LCCR0_Pas ||
+ (inf->lccr0 & LCCR0_SDS) != LCCR0_Sngl ||
+Index: linux-2.6.23/include/asm-arm/arch-pxa/mfp-pxa300.h
+===================================================================
+--- linux-2.6.23.orig/include/asm-arm/arch-pxa/mfp-pxa300.h 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/include/asm-arm/arch-pxa/mfp-pxa300.h 2008-02-13 00:59:45.000000000 +0000
+@@ -175,13 +175,13 @@
+ #define GPIO68_LCD_LDD_14 MFP_CFG_DRV(GPIO68, AF1, DS01X)
+ #define GPIO69_LCD_LDD_15 MFP_CFG_DRV(GPIO69, AF1, DS01X)
+ #define GPIO70_LCD_LDD_16 MFP_CFG_DRV(GPIO70, AF1, DS01X)
+-#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF1, DS01X)
++#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF0, DS01X)
+ #define GPIO62_LCD_CS_N MFP_CFG_DRV(GPIO62, AF2, DS01X)
+ #define GPIO72_LCD_FCLK MFP_CFG_DRV(GPIO72, AF1, DS01X)
+ #define GPIO73_LCD_LCLK MFP_CFG_DRV(GPIO73, AF1, DS01X)
+ #define GPIO74_LCD_PCLK MFP_CFG_DRV(GPIO74, AF1, DS01X)
+ #define GPIO75_LCD_BIAS MFP_CFG_DRV(GPIO75, AF1, DS01X)
+-#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF2, DS01X)
++#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF0, DS01X)
+
+ #define GPIO15_LCD_CS_N MFP_CFG_DRV(GPIO15, AF2, DS01X)
+ #define GPIO127_LCD_CS_N MFP_CFG_DRV(GPIO127, AF1, DS01X)
diff --git a/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_touch-r0.patch b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_touch-r0.patch
new file mode 100644
index 0000000000..1c00696051
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.25+2.6.26-rc4/zylonite_touch-r0.patch
@@ -0,0 +1,1548 @@
+Index: linux-2.6.23/drivers/input/touchscreen/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/input/touchscreen/Kconfig 2008-02-13 01:12:29.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/Kconfig 2008-02-13 01:13:20.000000000 +0000
+@@ -54,6 +54,12 @@
+ To compile this driver as a module, choose M here: the
+ module will be called corgi_ts.
+
++config TOUCHSCREEN_ZYLONITE
++ tristate "Zylonite touchscreen driver"
++ default y
++ help
++ Say Y here for the Zylonite touchscreen driver
++
+ config TOUCHSCREEN_FUJITSU
+ tristate "Fujitsu serial touchscreen"
+ select SERIO
+Index: linux-2.6.23/drivers/input/touchscreen/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/input/touchscreen/Makefile 2008-02-13 01:12:29.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/Makefile 2008-02-13 01:13:38.000000000 +0000
+@@ -19,3 +19,4 @@
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_TSC2101) += tsc2101_ts.o
++obj-$(CONFIG_TOUCHSCREEN_ZYLONITE) += zylonite-ts.o
+Index: linux-2.6.23/drivers/input/touchscreen/zylonite-ts.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/zylonite-ts.c 2008-02-13 16:19:15.000000000 +0000
+@@ -0,0 +1,1517 @@
++/*
++ * drivers/input/touchscreen/mhn_audio_touch.c.
++ *
++ * Author: bridge.wu@marvell.com
++ * Created: Nov 17, 2006
++ * Copyright: Marvell Corporation.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/delay.h>
++
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/initval.h>
++
++#include <asm/semaphore.h>
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/gpio.h>
++#include <asm/arch/mfp.h>
++//#include <asm/arch/ipmc.h>
++#include <linux/suspend.h>
++#include <linux/spinlock.h>
++
++//#include <asm/arch/codec/acodec.h>
++//#include <asm/arch/mhn_audio_plat.h>
++
++#define OSCC __REG(0x41350000) /* Oscillator Configuration Register */
++#define AC97_DIV __REG(0x41340014)
++
++#define ALSA_ZY_CARD_DEBUG
++#undef ALSA_ZY_CARD_DEBUG
++
++#define WM_9713_ID 0x4C13 /* this should be the 7E register value */
++
++#ifdef ALSA_ZY_CARD_DEBUG
++#define dbg(format, arg...) printk(KERN_DEBUG format, ##arg)
++#else
++#define dbg(format, arg...)
++#endif
++
++#define DEBUG
++#undef DEBUG
++#ifdef DEBUG
++unsigned int start_time;
++unsigned int end_time;
++unsigned int time;
++#define PRINT_TIME() do {\
++ time = ((end_time > start_time))?\
++ (end_time - start_time)*100/325:\
++ (0xffffffff - start_time + end_time)*100/325;\
++ printk("\n%s:%dus\n", __FUNCTION__, time);\
++} while(0)
++#endif
++
++
++
++
++/* 9713 specific
++ * Register Name Index
++ */
++#define RESET 0X00
++#define SPEAKER_VOLUME 0X02
++#define HEADPHONE_VOLUME 0X04
++#define OUT3_OUT4_VOLUME 0X06
++#define MONOVOL_MONOINPGA_ROUTE 0X08
++#define LINE_IN_PGA_VOL_ROUTE 0X0A
++#define DAC_PGA_VOL_ROUTE 0X0C
++#define MIC_PGA_VOLUME 0X0E
++#define MIC_ROUTING 0X10
++#define REC_PGA_VOL 0X12
++#define REC_ROUTE_MUX_SEL 0X14
++#define PCBEEP_VOL_ROUTE 0X16
++#define VXDAC_VOLUME_ROUTE 0X18
++#define AUX_DAC_VOL_ROUTE 0X1A
++#define OUTPUT_PGA_MUX 0X1C
++#define DAC_3D_CTRL_INV_MUX_SEL 0X1E
++#define DAC_TONE_CTRL 0X20
++#define MIC_BIAS 0X22
++#define OUTPUT_VOL_MAPPING_JACK 0X24
++#define POWERDOWN_CTRL_STAT 0X26
++#define EXTENDED_AUD_ID 0X28
++#define EXTENDED_AUD_STAT_CTRL 0X2A
++#define AUDIO_DAC_RATE 0X2C
++#define AUX_DAC_RATE 0X2E
++#define AUDIO_ADC_RATE 0X32
++#define PCM_CODEC_CTRL 0X36
++#define SPDIF_CTRL 0X3A
++#define POWER_DOWN_1 0X3C
++#define POWER_DOWN_2 0X3E
++#define GENERAL_PURPOSE_WM_13 0X40
++#define FAST_POWERUP_CTRL 0X42
++#define MCLK_PLL_CTRL_1 0X44
++#define MCLK_PLL_CTRL_2 0X46
++#define GPIO_PIN_CFG 0X4C
++#define GPIO_PIN_POL_TYPE 0X4E
++#define GPIO_PIN_STICKY 0X50
++#define GPIO_PIN_WAKEUP 0X52
++#define GPIO_PIN_STATUS 0X54
++#define GPIO_PIN_SHARING 0X56
++#define GPIO_PULL_UP_DOWN_CTRL 0X58
++#define ADD_FUNC_1 0X5A
++#define ADD_FUNC_2 0X5C
++#define ALC_CTRL 0X60
++#define ALC_NOISE_GATE_CTRL 0X62
++#define AUX_DAC_INPUT_CTRL 0X64
++#define TEST_REG_1 0X68
++#define TEST_REG_2 0X6A
++#define TEST_REG_3 0X6C
++#define TEST_REG_4 0X6E
++#define DIGITIZER_1_WM13 0x74
++#define DIGITIZER_2_WM13 0x76
++#define DIGITIZER_3_WM13 0x78
++#define DIGITIZER_READ_BACK 0x7a
++#define VENDOR_ID1 0x7c
++#define VENDOR_ID2 0x7e
++
++#define ZY_TOUCH_SAMPLE_X 1
++#define ZY_TOUCH_SAMPLE_Y 2
++
++#define ZY_EVENT_TYPE_NONE 0
++#define ZY_EVENT_TYPE_PDN 1
++
++
++typedef enum _zy_acodec_error_t {
++ ZY_ACODEC_SUCCESS = 0, /* successful completion of a function */
++ ZY_ACODEC_GENERAL_SW_ERR, /* null pointer to registers or other software error */
++ ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT, /* time-out for waiting for respponse */
++ ZY_ACODEC_SAMPLERATE_NOT_SUPPORTED, /* the sample rate is not supported either in controller or codec */
++ ZY_ACODEC_FEATURE_NO_SUPPORTED, /* this codec feature is not supported */
++ ZY_ACODEC_GENERAL_HW_ERR ,/* other hardware error besides time out */
++ ZY_ACODEC_ROUTE_NO_SUPPORTED, /* the codec can not set the route required */
++ ZY_ACODEC_SLEEP /* the codec is sleep */
++} zy_acodec_error_t;
++
++typedef unsigned int zy_acodec_device_id_t;
++
++typedef enum _codec_state {
++ ZY_CODEC_SLEEP = 0,
++ ZY_CODEC_WAKEUP = 1
++} acodec_state_t;
++
++typedef enum {
++ ZY_FM = 0,
++ ZY_MIC1 = 1,
++ ZY_MIC2 = 2,
++ ZY_SPEAKER =3,
++ ZY_HEADSET =4,
++ ZY_HANDSET =5,
++} vol_port_type_t;
++
++typedef struct _context_t {
++ int use_count; /* probe/remove and suspend/resume usage count, sync among multiple devices */
++ zy_acodec_device_id_t acodec_id;/* - an ID that uniquely identifies the codec to be used */
++ unsigned long init_number; /* used by driver to track whether it is inited or not */
++
++ void *p_voice_reg; /* pointer to Monahans registers that has PCM interface to codec */
++ void *p_hifi_reg; /* pointer to Monahans registers that has hifi interface to codec */
++ void *p_ctrl_reg; /* pointer to Monahans registers that has control interface to codec */
++ int *p_ost_regs; /* needed for time out */
++ void *p_save_memory; /* pointer to a memory region to save context while suspend */
++ void *p_zy_scenario; /* pointer to the scenario data structure */
++ long u_max_read_write_time_out_ms;/* input the max time to wait in milliseconds before giving up on a read or write operation */
++ long u_max_setup_time_out_ms; /* input the maximum time in milliseconds to wait during initial setup of the ACODEC controller and codec */
++
++ /* member functions these pointers must be set by */
++ zy_acodec_error_t (* g_pfn_codec_specific_init) (struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_codec_specific_dinit) (struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_acodec_read) (struct _context_t *p_dev_context, unsigned short reg_addr, unsigned short *p_reg_value);
++ zy_acodec_error_t (* g_pfn_acodec_write) (struct _context_t *p_dev_context, unsigned short reg_addr, unsigned short reg_value);
++
++ /* add for route */
++ zy_acodec_error_t (* g_pfn_set_route) (struct _context_t *p_device_context, unsigned short * rout_map ,unsigned short* current_map);
++ /* add for sleep the codec */
++ zy_acodec_error_t (* g_pfn_sleep_codec) (struct _context_t *p_device_context);
++ /* add for Wake up the codec */
++ zy_acodec_error_t (* g_pfn_wake_codec) (struct _context_t *p_device_context);
++ /* add for get codec state */
++ zy_acodec_error_t (* g_pfn_get_state) (struct _context_t *p_device_context, acodec_state_t *p_state);
++ /* add for volume */
++ zy_acodec_error_t (* g_pfn_get_vol)(struct _context_t *p_device_context, vol_port_type_t port, unsigned short *gain_in_db);
++ zy_acodec_error_t (* g_pfn_set_vol)(struct _context_t *p_device_context, vol_port_type_t port, unsigned short gain_in_db);
++
++ void (* g_pfn_get_event)(struct _context_t *p_device_context, unsigned char * event_type);
++ void (* g_pfn_event_ack)(struct _context_t *p_device_context, unsigned char event_type);
++ zy_acodec_error_t (* g_pfn_enable_touch)(struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_disable_touch)(struct _context_t *p_device_context);
++} zy_acocec_context_t, *p_zy_acocec_context_t;
++
++
++
++
++
++static p_zy_acocec_context_t p_zy_codec_ctxt = NULL;
++
++#include <linux/input.h>
++//#include <asm/arch/codec/wm9713.h>
++
++#define PEN_DOWN 1
++#define PEN_UP 0
++#define TS_SAMPLE_INTERVAL 1
++
++typedef struct {
++ struct input_dev *idev;
++ struct timer_list *timer;
++ int use_count;
++} codec_zy_ts_t;
++
++codec_zy_ts_t codec_zy_ts;
++
++static struct input_dev *codec_zy_ts_input;
++
++#ifdef CONFIG_PM
++static volatile int touch_suspend = 0 ;
++#endif
++
++#define ZY_AC97_CODEC_REGS_NUM 0x40
++
++typedef struct
++{ // Register symbol // Usage
++ volatile unsigned long pocr; // PCM Out Control Register
++ volatile unsigned long picr; // PCM In Control Register
++ volatile unsigned long mccr; // Mic In Control Register
++ volatile unsigned long gcr; // Global Control Register
++ volatile unsigned long posr; // PCM Out Status Register
++ volatile unsigned long pisr; // PCM In Status Register
++ volatile unsigned long mcsr; // Mic In Status Register
++ volatile unsigned long gsr; // Global Status Register
++ volatile unsigned long car; // CODEC Access Register
++ volatile unsigned long pcscr; // PCM Surround Out Control
++ volatile unsigned long pcssr; // PCM Surround Out Status
++ volatile unsigned long pcsdr; // PCM Surround Out Data
++ volatile unsigned long pcclcr; // PCM Center/LFE Out Control
++ volatile unsigned long pcclsr; // PCM Center/LFE Out Status
++ volatile unsigned long pccldr; // PCM Center/LFE Out Data
++ volatile unsigned long reserved1; //
++ volatile unsigned long pcdr; // PCM FIFO Data Register
++ volatile unsigned long reserved2 [0x7]; // 0x4050-0044 through 0x4050-005C
++ volatile unsigned long mcdr; // Mic-in FIFO Data Register
++ volatile unsigned long reserved3 [0x27]; // 0x4050-0064 through 0x4050-00FC
++ volatile unsigned long mocr; // MODEM Out Control Register
++ volatile unsigned long reserved4;
++ volatile unsigned long micr; // MODEM In Control Register
++ volatile unsigned long reserved5;
++ volatile unsigned long mosr; // MODEM Out Status Register
++ volatile unsigned long reserved6;
++ volatile unsigned long misr; // MODEM In Status Register
++ volatile unsigned long reserved7 [0x9]; // 0x4050-011C through 0x4050-013C
++ volatile unsigned long modr; // MODEM FIFO Data Register
++ volatile unsigned long reserved8 [0x2F]; // 0x4050-0144 through 0x4050-01FC
++ // Primary Audio CODEC registers access
++ volatile unsigned long codec_regs_primary_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 01 Audio CODEC registers access
++ volatile unsigned long codec_regs_secondary_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Primary MODEM CODEC registers access
++ volatile unsigned long codec_regs_primary_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 01 MODEM CODEC registers access
++ volatile unsigned long codec_regs_secondary_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 10 MODEM CODEC registers access
++ volatile unsigned long codec_regs_third_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 11 MODEM CODEC registers access
++ volatile unsigned long codec_regs_fouth_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 10 Audio CODEC registers access
++ volatile unsigned long codec_regs_third_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 11 Audio CODEC registers access
++ volatile unsigned long codec_regs_fouth_aud [ZY_AC97_CODEC_REGS_NUM];
++} zy_ac97_acodec_t, *p_zy_ac97acodec_t ;
++
++
++/* Constants for the Global Control Register and Global Status Register */
++
++// AC97 Global Control Register bit mask constants
++
++#define ZY_AC97_GCR_GIE_MSK (1u << 0 )
++#define ZY_AC97_GCR_COLD_RESET_MSK (1u << 1 )
++#define ZY_AC97_GCR_WARM_RESET_MSK (1u << 2 )
++#define ZY_AC97_GCR_LINK_OFF_MSK (1u << 3 )
++#define ZY_AC97_GCR_PCRSM_IEN_MSK (1u << 4 )
++#define ZY_AC97_GCR_SCRSM_IEN_MSK (1u << 5 )
++#define ZY_AC97_GCR_PCRDY_IEN_MSK (1u << 8 )
++#define ZY_AC97_GCR_SCRDY_IEN_MSK (1u << 9 )
++#define ZY_AC97_GCR_SDONE_IE_MSK (1u << 18)
++#define ZY_AC97_GCR_CDONE_IE_MSK (1u << 19)
++#define ZY_AC97_GCR_nDMAEN_MSK (1u << 24)
++#define ZY_AC97_GCR_CLKBPB_MSK (1u << 31)
++#define ZY_AC97_GCR_FRCRST_MSK (1u << 30)
++// Global Status Register bit mask constants
++
++#define ZY_AC97_GSR_GSCI_MSK (1u << 0 )
++#define ZY_AC97_GSR_MIINT_MSK (1u << 1 )
++#define ZY_AC97_GSR_MOINT_MSK (1u << 2 )
++#define ZY_AC97_GSR_ACOFFD_MSK (1u << 3 )
++#define ZY_AC97_GSR_PIINT_MSK (1u << 5 )
++#define ZY_AC97_GSR_POINT_MSK (1u << 6 )
++#define ZY_AC97_GSR_MINT_MSK (1u << 7 )
++#define ZY_AC97_GSR_PCRDY_MSK (1u << 8 )
++#define ZY_AC97_GSR_SCRDY_MSK (1u << 9 )
++#define ZY_AC97_GSR_PCRSM_MSK (1u << 10)
++#define ZY_AC97_GSR_SCRSM_MSK (1u << 11)
++#define ZY_AC97_GSR_SLT12_BITS_MSK (7u << 12)
++#define ZY_AC97_GSR_RCS_ERR_MSK (1u << 15)
++#define ZY_AC97_GSR_SDONE_MSK (1u << 18)
++#define ZY_AC97_GSR_CDONE_MSK (1u << 19)
++
++
++// Bit mask and values for CAIP bit in car register.
++#define ZY_AC97_CAR_CAIP_MSK (0x1<<0)
++#define ZY_AC97_CAR_CAIP_LOCKED (0x1<<0)
++#define ZY_AC97_CAR_CAIP_CLEAR (0<<0)
++
++/* Constants for FIFO status reporting and control */
++
++// One bit location is used to report FIFO error conditions and clear
++// interrupts on those conditions in the various non-global status registers.
++
++// ZY_AC97_FIFOSTAT_FIFOE is used in:
++ // posr
++ // pisr
++ // mcsr
++ // mosr
++ // misr
++
++#define ZY_AC97_FIFOSTAT_FIFOE (1u << 4)
++#define ZY_AC97_FIFOSTAT_EOC (1u << 3)
++#define ZY_AC97_FIFOSTAT_FSR (1u << 2)
++
++// A different bit location is used to enable or disable interrupts based on
++// FIFO error conditions in the various non-global control registers.
++
++// ZY_AC97_FIFOCTRL_FEIE is used in:
++ // pocr
++ // picr
++ // mccr
++ // mocr
++ // micr
++
++#define ZY_AC97_FIFOCTRL_FEIE (1u << 3)
++#define ZY_AC97_FIFOCTRL_FSRIE (1u << 1)
++
++/*
++*******************************************************************************
++ AC'97 Codec Registers Location and Bit Definition
++*******************************************************************************
++*/
++
++/* */
++
++ // Includes symbolic values for certain proprietary register asssignments
++ // in AC'97 devices that might be used with ZY_AC97.
++
++ // Valid for subset of R 2.1 specification.
++ // Leading "e" in comment means it is an "expanded" register definition as
++ // found in one or more of the Appendices A-D of the R 2.1 specification.
++ // Appendix identifier will immediately follow the "e", such as "eA"
++ // R/O indicates read-only
++ // Registers not supported by the assumed controller will be commented out.
++
++#define ZY_AC97_CR_RESET_ID 0x00 // RESET CODEC TO DEFAULT, get ID info
++#define ZY_AC97_CR_MASTER_VOLUME 0x02 // LINE OUT VOLUME
++#define ZY_AC97_CR_HEADPHONE_VOLUME 0x04 //
++#define ZY_AC97_CR_MASTER_VOLUME_MONO 0x06 //
++#define ZY_AC97_CR_MASTER_TONE_R_L 0x08 //
++#define ZY_AC97_CR_PC_BEEP_VOLUME 0x0A //
++#define ZY_AC97_CR_PHONE_VOLUME 0x0C //
++#define ZY_AC97_CR_MIC_VOLUME 0x0E // micrOPHONE VOLUME/ AGC
++#define ZY_AC97_CR_LINE_IN_VOLUME 0x10 // LINE IN VOLUME
++#define ZY_AC97_CR_CD_VOLUME 0x12 //
++#define ZY_AC97_CR_VIDEO_VOLUME 0x14 //
++#define ZY_AC97_CR_AUX_VOLUME 0x16 //
++#define ZY_AC97_CR_PCM_OUT_VOLUME 0x18 //
++#define ZY_AC97_CR_RECORD_SELECT 0x1A // SELECT LINE IN OR micrOPHONE
++#define ZY_AC97_CR_RECORD_GAIN 0x1C //
++#define ZY_AC97_CR_RECORD_GAIN_MIC 0x1E //
++#define ZY_AC97_CR_GENERAL_PURPOSE 0x20 //
++#define ZY_AC97_CR_CONTROL_3D 0x22 //
++#define ZY_AC97_CR_POWERDOWN_CTRL_STAT 0x26 // POWER MANAGEMENT
++#define ZY_AC97_CR_E_AUDIO_ID 0x28 // eA Extended audio sprt info, R/O
++#define ZY_AC97_CR_E_AUDIO_CTRL_STAT 0x2A // eA Extended audio stat + control
++
++//
++// Audio Sample Rate Control Registers, 0x2C - 0x34
++//
++ // eA PCM Front DAC rate control
++#define ZY_AC97_CR_E_ASR_PCM_FRNT_DAC_RT 0x2C // (output slots 3, 4, 6)
++#define ZY_AC97_CR_E_ASR_PCM_LR_ADC_RT 0x32 // eA PCM L+R ADC rate control (3+4)
++#define ZY_AC97_CR_E_ASR_MIC_ADC_RT 0x34 // eA PCM Mic ADC rate control (5)
++
++
++#define ZY_AC97_CR_E_MDM_GPIO_PIN_STAT 0x54
++//
++// 5Ah-7Ah: Vendor Reserved
++//
++//
++// 7Ch-7Eh: Vendor ID registers. Optional but standardized for Plug'n'Play
++//
++#define ZY_AC97_CR_VENDOR_ID1 0x7C
++#define ZY_AC97_CR_VENDOR_ID2 0x7E
++
++#define ZY_AC97_CR_MAX ZY_AC97_CR_VENDOR_ID2
++
++#define ZY_AC97_CR_END_OF_LIST (ZY_AC97_CR_MAX + 2)
++
++
++
++/* Other Constants */
++
++// For accessing the Codec mixer registers, each increment of one 32-bit word
++// in processor space increments the addressed mixer register by two.
++// This does not cause any ambiguities because only even mixer register
++// addresses are currently supported (AC '97 spec, R 2.2)
++#define ZY_AC97_CODEC_REGS_PER_WORD 2
++
++/* Default timeout and holdtime settings */
++
++// timeout in reading and writing codec registers through AC link
++#define ZY_AC97_RW_TIMEOUT_DEF 200 //unit is us
++
++// timeout in waiting for codec's ready signal during setup process
++#define ZY_AC97_SETUP_TIMEOUT_DEF 500 //unit is us
++
++// timeout in waiting for locking the link successfully
++#define ZY_AC97_LOCK_TIMEOUT_DEF 300 //unit is us
++
++// timeout in shutting down the link
++#define ZY_AC97_LINKOFF_TIMEOUT_DEF 500 //unit is us
++
++// holdtime for keeping nReset signal active(low) in AC link
++#define ZY_AC97_COLD_HOLDTIME 100 //unit is us
++
++/*
++*******************************************************************************
++ ZY AC97 data structure used in function interface
++*******************************************************************************
++*/
++
++typedef struct
++{
++ unsigned long pocr; // PCM Out Control Register
++ unsigned long picr; // PCM In Control Register
++ unsigned long mccr; // Mic In Control Register
++ unsigned long gcr; // Global Control Register
++ unsigned long pcscr; // PCM Surround Out Control
++ unsigned long pcclcr; // PCM Center/LFE Out Control
++ unsigned long mocr; // MODEM Out Control Register
++ unsigned long micr; // MODEM In Control Register
++}zy_ac97_save_context_t;
++
++
++#define AC97_SAVE_CONTEXT_SIZE (sizeof(zy_ac97_save_context_t))
++
++static int zy_ac97_acodec_link_lock(p_zy_ac97acodec_t p_ac97_reg)
++{
++ int status = 1;
++ volatile unsigned long car_tmp;
++
++ car_tmp = p_ac97_reg->car;
++ if (car_tmp & ZY_AC97_CAR_CAIP_MSK) /* "1" in CAIP bit means lock failed. */
++ {
++ status = 0;
++ }
++ return (status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_write (zy_acocec_context_t *p_dev_context, unsigned short offset, unsigned short data)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ int got_link;
++ unsigned long time_remaining;
++ volatile unsigned long * p_codec_reg;
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_dev_context->p_ctrl_reg);
++ unsigned long max_rw_time_out_us = (p_dev_context->u_max_read_write_time_out_ms) * 1000;
++
++
++ if(offset == ZY_AC97_CR_E_MDM_GPIO_PIN_STAT)
++ {/* it is a special register and sent out on slot 12 */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_mdm[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++ /* The data will be sent out on slot 12. */
++ *p_codec_reg = (unsigned long)data;
++ goto done;
++ }
++
++ /* Point to specified register within area mapped to target codec regs */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_aud[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++
++
++ /* Lock the ACLINK */
++ time_remaining = ZY_AC97_LOCK_TIMEOUT_DEF;
++ do
++ {
++ got_link = zy_ac97_acodec_link_lock(p_ac97_reg);
++ if (0 == got_link) /* 1 usec is a long time. Skip delay if possible. */
++ {
++ udelay(1);
++ }
++ } /* Wait while time remaining and ACLINK not available */
++ while (time_remaining-- && (0 == got_link));
++
++ if (0 == got_link) /* Didn't get the ACLINK */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ printk(KERN_ERR "AC97 Write Link Timeout\n");
++ }
++ else /* We got the link. Perform the write operation and don't wait. */
++ {
++ /* First, clear old write status indication CDONE by writing a ONE to that bit. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_CDONE_MSK;
++
++ *p_codec_reg = (unsigned long)data; /* Now the write! */
++
++ /* Wait until write cycle is complete. There should be a way
++ * to do this speculatively at the beginning of the procedure.
++ * Need to discover it. Too inefficient to always wait.
++ */
++
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and command I/O still incomplete. */
++ while ( (time_remaining--) && !(p_ac97_reg->gsr & ZY_AC97_GSR_CDONE_MSK));
++ if (!(p_ac97_reg->gsr & ZY_AC97_GSR_CDONE_MSK))
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ p_ac97_reg->car = ZY_AC97_CAR_CAIP_CLEAR;
++ }
++ } /* Got AC link */
++
++done:
++ return(status);
++} /* Ac97CtrlCodecWrite() */
++
++#define CKENA __REG(0x4134000C) /* A Clock Enable Register */
++#define CKENB __REG(0x41340010)
++
++zy_acodec_error_t zy_ac97_acodec_read (zy_acocec_context_t *p_dev_context, unsigned short offset, unsigned short *pdata)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ int got_link;
++ unsigned long time_remaining;
++ volatile unsigned long * p_codec_reg;
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_dev_context->p_ctrl_reg);
++ unsigned long max_rw_time_out_us = (p_dev_context->u_max_read_write_time_out_ms) * 1000;
++
++ /* Point to specified register within area mapped to target codec regs */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_aud[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++
++ /* Lock the ACLINK */
++ time_remaining = ZY_AC97_LOCK_TIMEOUT_DEF;
++ do
++ {
++ got_link = zy_ac97_acodec_link_lock(p_ac97_reg);
++ if (0 == got_link) /* 1 usec is a long time. Skip delay if possible. */
++ {
++ udelay(1);
++ }
++ } /* Wait while time remaining and ACLINK not available */
++ while (time_remaining-- && (0 == got_link));
++
++ if (0 == got_link) /* Didn't get the ACLINK */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ printk(KERN_ERR "AC97 Read Link Timeout\n");
++ }
++ else /* We got the link. Perform the write operation and don't wait. */
++ {
++ /* First, clear old read status indications. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_SDONE_MSK | ZY_AC97_GSR_RCS_ERR_MSK;
++
++ *pdata = (unsigned short)(*p_codec_reg); /* This is THE DUMMY READ. */
++
++ /* Wait for read I/O with codec to complete before doing real read. */
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and read I/O still incomplete */
++ while( (time_remaining--) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK)) );
++
++ if ((p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_RCS_ERR_MSK)) )
++ {
++ if (p_ac97_reg->gsr & ZY_AC97_GSR_RCS_ERR_MSK)
++ {/* timeout indicated by RCS bit */
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++ /* succeed in reading. clear status bits first. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_SDONE_MSK | ZY_AC97_GSR_RCS_ERR_MSK;
++ *pdata = (unsigned short)(*p_codec_reg); /* THE REAL READ. */
++ if (*pdata == 0xffff)
++ {/* timeout indicated by returned value */
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++ /* check later: is second waiting really needed? */
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and read I/O still incomplete */
++ while( (time_remaining--) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK)) );
++ //printk(KERN_ERR "AC97 Read Result %d\n", (p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK) );
++ }
++ else /* failed */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ p_ac97_reg->car = ZY_AC97_CAR_CAIP_CLEAR;
++ //printk(KERN_ERR "AC97 Read Link Timeout2 %x %x %x\n", CKENA, OSCC, CKENB);
++ } /* else (OK to do real read) */
++
++ } /* else (We got the link. Perform the read operations.) */
++
++ return (status);
++}
++
++
++
++zy_acodec_error_t zy_acodec_get_adc_sample(zy_acocec_context_t *p_device_context, unsigned short *p_sample_data, unsigned short adc_type, int *p_pen_down)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++ unsigned long wait;
++
++ if (adc_type == ZY_TOUCH_SAMPLE_X)
++ {
++ value = 0x202;
++ }
++ else
++ {/* Y sample */
++ value = 0x204;
++ }
++
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_1_WM13, value);
++
++ wait = 0;
++ do
++ {
++ status = zy_ac97_acodec_read(p_device_context, DIGITIZER_1_WM13, &value);
++ if ( !(value & 0x200 ) )
++ {
++ break;
++ }
++ }while ( 100 > wait++ );
++
++ status = zy_ac97_acodec_read(p_device_context, DIGITIZER_READ_BACK, &value);
++ if (value & 0x8000)
++ {/* means pen down */
++ *p_pen_down = 1;
++ }
++ else
++ {
++ *p_pen_down = 0;
++ }
++ *p_sample_data = value & 0xfff;
++
++ return status;
++}
++
++
++
++/*
++ * add a touch event
++ */
++static int codec_zy_ts_evt_add(codec_zy_ts_t* ts, u16 pressure, u16 x, u16 y)
++{
++ /* add event and remove adc src bits */
++ static u16 pre_press = 0;
++
++ input_report_abs(ts->idev, ABS_X, x & 0xfff);
++ input_report_abs(ts->idev, ABS_Y, y & 0xfff);
++ if (pressure == pre_press){
++ pressure--;
++ }
++ pre_press = pressure;
++ input_report_abs(ts->idev, ABS_PRESSURE, pressure & 0xfff);
++ input_sync(ts->idev);
++#ifdef CONFIG_IPM
++ ipm_event_notify(IPM_EVENT_UI, IPM_EVENT_DEVICE_TSI, NULL, 0);
++#endif
++ return 0;
++}
++
++/*
++ * add a pen up event
++ */
++static void codec_zy_ts_evt_release(codec_zy_ts_t* ts)
++{
++ input_report_abs(ts->idev, ABS_PRESSURE, 0);
++ input_sync(ts->idev);
++
++#ifdef CONFIG_IPM
++ ipm_event_notify(IPM_EVENT_UI, IPM_EVENT_DEVICE_TSI, NULL, 0);
++#endif
++ p_zy_codec_ctxt->g_pfn_event_ack(p_zy_codec_ctxt,ZY_EVENT_TYPE_PDN);
++}
++
++/*
++ * Kill the touchscreen thread and stop
++ * the touch digitiser.
++ */
++static void codec_zy_ts_input_close(struct input_dev *idev)
++{
++ codec_zy_ts_t *ts = (codec_zy_ts_t *) &codec_zy_ts;
++
++#ifdef CONFIG_PM
++ if(touch_suspend){
++ pr_info("touch is suspended!\n");
++ return -1;
++ }
++#endif
++ dbg("close ts input!\n");
++ if (--ts->use_count == 0) {
++ del_timer(ts->timer);
++ if (ts->timer != NULL)
++ kfree(ts->timer);
++ p_zy_codec_ctxt->g_pfn_disable_touch(p_zy_codec_ctxt);
++ }
++}
++
++/*
++ * Sample the touchscreen
++ */
++int ac97_poll_touch(codec_zy_ts_t *ts)
++{
++ unsigned short x=0, y=0;
++ int if_down= 0;
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++
++#ifdef DEBUG
++ start_time = OSCR;
++#endif
++
++ /* get x value */
++ status = zy_acodec_get_adc_sample(p_zy_codec_ctxt, &x, ZY_TOUCH_SAMPLE_X, &if_down);
++ if (ZY_ACODEC_SUCCESS != status ){
++ return -EIO;
++ }
++ dbg("x:0x%x\n", x);
++
++ /* the pen is up */
++ if (1 != if_down){
++ return PEN_UP;
++ }
++
++ /* get y vaule */
++ status = zy_acodec_get_adc_sample(p_zy_codec_ctxt, &y, ZY_TOUCH_SAMPLE_Y, &if_down);
++ if (ZY_ACODEC_SUCCESS != status ){
++ return -EIO;
++ }
++ dbg("y:0x%x\n",y);
++
++ /* the pen is up */
++ if (1 != if_down){
++ return PEN_UP;
++ }
++
++ /* the pen is down, can not get the pressure value,
++ * so if pen is down, give the max pressure value
++ */
++ codec_zy_ts_evt_add(ts,0xfff, x, y);
++
++#ifdef DEBUG
++ end_time = OSCR;
++ PRINT_TIME();
++#endif
++
++ return PEN_DOWN;
++}
++
++static void touch_timer_handler(unsigned long unused)
++{
++ int event;
++ codec_zy_ts_t *ts = &codec_zy_ts;
++
++ event = ac97_poll_touch(ts);
++
++ if (event == PEN_DOWN) {
++ dbg("pen down!\n");
++ ts->timer->expires = jiffies + TS_SAMPLE_INTERVAL;
++ add_timer(ts->timer);
++ } else if(event == PEN_UP) {
++ dbg("pen up!\n");
++ codec_zy_ts_evt_release(ts);
++ } else if(event == -EIO) {
++ printk(KERN_ERR "Access touch interface error!\n");
++ }
++ return;
++}
++
++static zy_acodec_error_t zy_ac97_acodec_cold_reset(zy_acocec_context_t * p_ac97_ctxt)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ p_zy_ac97acodec_t p_ac97 = (p_zy_ac97acodec_t)(p_ac97_ctxt->p_ctrl_reg);
++ int pri_codec_ready;
++ unsigned long time_remaining;
++
++ p_ac97->gcr = 0;
++ p_ac97->gcr |= ZY_AC97_GCR_CLKBPB_MSK;
++ /* Hold reset active for a minimum time */
++ udelay(ZY_AC97_COLD_HOLDTIME);
++ p_ac97->gcr &= ~ZY_AC97_GCR_CLKBPB_MSK;
++
++ /* Deactivate cold reset condition */
++ p_ac97->gcr |= (ZY_AC97_GCR_COLD_RESET_MSK | ZY_AC97_GCR_WARM_RESET_MSK);
++
++
++ pri_codec_ready = 0;
++ time_remaining = (p_ac97_ctxt->u_max_setup_time_out_ms) * 10;
++ do
++ {
++ udelay(1);
++ if (p_ac97->gsr & ZY_AC97_GSR_PCRDY_MSK)
++ pri_codec_ready = 1;
++ }
++ while (time_remaining-- && (pri_codec_ready == 0));
++
++ /* Timeout status if some of the devices weren't ready. */
++ if (pri_codec_ready == 0)
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++
++ return (status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_init(zy_acocec_context_t *p_ac97_ctxt)
++{
++ zy_acodec_error_t status ;
++
++ status = zy_ac97_acodec_cold_reset(p_ac97_ctxt);
++
++ return (status);
++}
++
++
++/*
++ * Start the touchscreen thread and
++ * the touch digitiser.
++ */
++static int codec_zy_ts_input_open(struct input_dev *idev)
++{
++ codec_zy_ts_t *ts = (codec_zy_ts_t *) &codec_zy_ts;
++
++#ifdef CONFIG_PM
++ if(touch_suspend){
++ pr_info("touch is suspended!\n");
++ return -1;
++ }
++#endif
++
++ if (ts->use_count++ > 0)
++ return 0;
++
++ dbg("Touch is opened. Use count: %d\n", ts->use_count);
++ ts->idev = idev;
++ ts->timer = kmalloc(sizeof(struct timer_list), GFP_KERNEL);
++ if (!ts->timer) {
++ printk(KERN_ERR "Alloc memory error for timer!\n");
++ return -ENOMEM;
++ }
++
++ init_timer(ts->timer);
++ ts->timer->function = touch_timer_handler;
++ ts->timer->data = 0;
++ p_zy_codec_ctxt->g_pfn_enable_touch(p_zy_codec_ctxt);
++
++ return 0;
++}
++
++/*
++ * initilze the pxa touch screen
++ */
++static int alsa_ts_init( void )
++{
++ codec_zy_ts_t* ts = &codec_zy_ts;
++
++ memset(ts, 0, sizeof(codec_zy_ts_t));
++
++ codec_zy_ts_input = input_allocate_device();
++ if (!codec_zy_ts_input)
++ return -ENOMEM;
++
++
++ /* tell input system what we events we accept and register */
++ codec_zy_ts_input->name = "codec zy touchscreen";
++ codec_zy_ts_input->open = codec_zy_ts_input_open;
++ codec_zy_ts_input->close = codec_zy_ts_input_close;
++ __set_bit(EV_ABS, codec_zy_ts_input->evbit);
++ __set_bit(ABS_X, codec_zy_ts_input->absbit);
++ __set_bit(ABS_Y, codec_zy_ts_input->absbit);
++ __set_bit(ABS_PRESSURE, codec_zy_ts_input->absbit);
++ input_register_device(codec_zy_ts_input);
++
++ return 0;
++}
++
++static irqreturn_t pxa_touch_irq(int irq, void *dev)
++{
++ unsigned char event_type;
++
++ //printk(KERN_ERR "%s: enter codec event handler\n", __FUNCTION__);
++
++ dbg("%s: enter codec event handler\n", __FUNCTION__);
++ p_zy_codec_ctxt->g_pfn_get_event(p_zy_codec_ctxt, &event_type);
++ switch (event_type) {
++ case ZY_EVENT_TYPE_PDN:
++ {
++ codec_zy_ts_t *ts = &codec_zy_ts;
++ /*if the touch is not open need not acknowledge the event*/
++ if (ts->use_count <= 0)
++ break;
++ ts->timer->expires = jiffies + TS_SAMPLE_INTERVAL;
++ add_timer(ts->timer);
++ break;
++ }
++ default:
++ printk("unsupported codec event:0x%x\n", event_type);
++ }
++
++ return IRQ_HANDLED;
++}
++
++
++
++
++
++
++
++
++
++static mfp_cfg_t extra_cfg[] = {
++ MFP_CFG_X(GPIO17, AF3, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO25, AF0, DS01X, PULL_LOW),
++};
++
++#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
++
++extern void dump_mfp(void);
++
++zy_acodec_error_t zy_ac97_acodec_mfp_init(zy_acocec_context_t *p_device_context)
++{
++ unsigned short codec_id;
++
++ //mhn_mfp_set_afds(MFP_RSVD_AC97_SDATA_IN_0, MFP_AF0, MFP_DS03X);
++ //enable_ac97_pins();
++ zy_ac97_acodec_init(p_device_context);
++ if (zy_ac97_acodec_read(p_device_context, 0x0, &codec_id)){
++
++ /*
++ * there is a bug on MonahansL/MonhansPL PC card: AC97_SDATA_IN is not connected to CODEC
++ * ECO 72: Connect PWM_0(MFP_RSVD_AC97_SDATA_IN_0) to CODEC as AC97_SDATA_IN
++ */
++
++ //mhn_mfp_set_afds(MFP_RSVD_AC97_SDATA_IN_0, MFP_RSVD_AC97_SDATA_IN_0_AF, MFP_DS03X);
++ //mhn_mfp_set_afds(MFP_AC97_SDATA_IN_0, MFP_AF0, MFP_DS01X);
++
++ gpio_direction_output(mfp_to_gpio(MFP_PIN_GPIO17), 0);
++ pxa3xx_mfp_config(ARRAY_AND_SIZE(extra_cfg));
++ gpio_direction_input(mfp_to_gpio(MFP_PIN_GPIO25));
++ }
++
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++#define ZY_AC97_WM9713_GPIO_PIN_PDN ( 0x1 << 13 ) /* Pen down */
++
++/*power enable bit in 3ch and 3eh */
++/*3ch */
++#define ZY_AC97_9713_PWR_PADCPD ( 0x1 << 15 )
++#define ZY_AC97_9713_PWR_VMID ( 0x1 << 14 )
++#define ZY_AC97_9713_PWR_TSHUT ( 0x1 << 13 )
++#define ZY_AC97_9713_PWR_VXDAC ( 0x1 << 12 )
++#define ZY_AC97_9713_PWR_AUXDAC ( 0x1 << 11 )
++#define ZY_AC97_9713_PWR_MBIAS ( 0x1 << 10 )
++#define ZY_AC97_9713_PWR_PLL ( 0x1 << 9 )
++#define ZY_AC97_9713_PWR_DACL ( 0x1 << 7 )
++#define ZY_AC97_9713_PWR_DACR ( 0x1 << 6 )
++#define ZY_AC97_9713_PWR_ADCL ( 0x1 << 5 )
++#define ZY_AC97_9713_PWR_ADCR ( 0x1 << 4 )
++#define ZY_AC97_9713_PWR_HPLX ( 0x1 << 3 )
++#define ZY_AC97_9713_PWR_HPRX ( 0x1 << 2 )
++#define ZY_AC97_9713_PWR_SPKX ( 0x1 << 1 )
++#define ZY_AC97_9713_PWR_MX ( 0x1 << 0 )
++
++/*3EH */
++#define ZY_AC97_9713_PWR_MCD ( 0x1 << 15 )
++#define ZY_AC97_9713_PWR_MICBIAS ( 0x1 << 14 )
++#define ZY_AC97_9713_PWR_MONO ( 0x1 << 13 )
++#define ZY_AC97_9713_PWR_OUT4 ( 0x1 << 12 )
++#define ZY_AC97_9713_PWR_OUT3 ( 0x1 << 11 )
++#define ZY_AC97_9713_PWR_HPL ( 0x1 << 10 )
++#define ZY_AC97_9713_PWR_HPR ( 0x1 << 9 )
++#define ZY_AC97_9713_PWR_SPKL ( 0x1 << 8 )
++#define ZY_AC97_9713_PWR_SPKR ( 0x1 << 7 )
++#define ZY_AC97_9713_PWR_LL ( 0x1 << 6 )
++#define ZY_AC97_9713_PWR_LR ( 0x1 << 5 )
++#define ZY_AC97_9713_PWR_MOIN ( 0x1 << 4 )
++#define ZY_AC97_9713_PWR_MA ( 0x1 << 3 )
++#define ZY_AC97_9713_PWR_MB ( 0x1 << 2 )
++#define ZY_AC97_9713_PWR_MPA ( 0x1 << 1 )
++#define ZY_AC97_9713_PWR_MPB ( 0x1 << 0 )
++
++
++void zy_wm9713_get_event(zy_acocec_context_t *p_device_context, unsigned char * event_type)
++{
++ unsigned short event_state = 0;
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ if(event_state & ZY_AC97_WM9713_GPIO_PIN_PDN){
++ *event_type = ZY_EVENT_TYPE_PDN;
++ return;
++ }
++ return;
++}
++
++void zy_wm9713_event_ack(zy_acocec_context_t *p_device_context, unsigned char event_type)
++{
++ unsigned short event_state = 0;
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ if( event_type == ZY_EVENT_TYPE_PDN){
++ zy_ac97_acodec_write(p_device_context,
++ GPIO_PIN_STATUS,
++ (event_state & (~ZY_AC97_WM9713_GPIO_PIN_PDN)));
++ }
++
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ return;
++}
++
++static void * p_saved_memory = NULL;
++static void * p_zy_scenario = NULL;
++static p_zy_acocec_context_t p_zy_ctxt = NULL;
++
++#define WM9713_SAVE_REGISTER_NO (64-11)
++typedef struct {
++ unsigned short wm9713RegisterContext [WM9713_SAVE_REGISTER_NO + 1]; /* Fixed (data misalignment error) */
++}ZY_9713_CONTEXT_SAVE_T;
++
++
++/**
++ * alsa_prepare_for_zy - create and initialize the p_zy_acocec_context_t
++ * open the clock of data link
++ * @p_p_zy_ctxt: return the data structure p_zy_acocec_context_t
++ * return: 0 success ; -ENOMEM
++ **/
++int alsa_prepare_for_zy(p_zy_acocec_context_t * p_p_zy_ctxt)
++{
++ if (p_zy_ctxt) {
++ p_zy_ctxt->use_count++;
++ *p_p_zy_ctxt = p_zy_ctxt;
++ return 0;
++ }
++
++ p_zy_ctxt = kzalloc(sizeof(zy_acocec_context_t), GFP_KERNEL);
++ if (!p_zy_ctxt)
++ return -ENOMEM;
++
++ /* enable CLK_POUT as CODEC clock input */
++ OSCC |= 0x800;
++
++ p_saved_memory = kzalloc(sizeof(ZY_9713_CONTEXT_SAVE_T) +
++ sizeof(zy_ac97_save_context_t), GFP_KERNEL);
++ if (NULL == p_saved_memory) {
++ if (p_zy_ctxt)
++ kfree(p_zy_ctxt);
++ return -ENOMEM;
++ }
++
++ p_zy_ctxt->acodec_id = (zy_acodec_device_id_t) (WM_9713_ID);
++ p_zy_ctxt->use_count++;
++ /*
++ p_zy_ctxt->pMfpRegBase = (unsigned long) (MFP_BASE);
++ p_zy_ctxt->pMfpRmDb = ZY_MFP_RM_DATABASE;
++ p_zy_ctxt->p_ost_regs = OST_BASE;
++ */
++ p_zy_ctxt->p_voice_reg = NULL;
++ p_zy_ctxt->p_hifi_reg = (void *) (&POCR);
++ p_zy_ctxt->p_ctrl_reg = (void *) (&POCR);
++ p_zy_ctxt->u_max_read_write_time_out_ms = ZY_AC97_RW_TIMEOUT_DEF;
++ p_zy_ctxt->u_max_setup_time_out_ms = ZY_AC97_SETUP_TIMEOUT_DEF;
++ p_zy_ctxt->p_save_memory = p_saved_memory;
++ p_zy_ctxt->p_zy_scenario = p_zy_scenario;
++// pxa_set_cken(24, 1);
++ CKENA |= (1 << 24);
++ AC97_DIV = 1625<<12 | 128;
++#ifdef DEBUG_ALSA_ZY
++ debug_pac97ctxt = p_zy_ctxt;
++ misc_register(&audio_dev);
++#endif
++
++ (*p_p_zy_ctxt) = p_zy_ctxt;
++
++ return 0;
++}
++
++
++/* this is platform specific */
++/* do later: not to enable recording route and playback route in this function,
++ * leave it to driver to call other function
++ */
++zy_acodec_error_t zy_wm9713_specific_init (zy_acocec_context_t *p_device_context)
++{
++
++ unsigned short value;
++
++ /* this assumes that the aclink is initialized wait some time and then
++ * do a warm reset to enabled the ACLINK, required for wm9713
++ * (not wm9712 or ucb1400)
++ */
++
++ /* pay attention: whether the workaround is still needed? */
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_device_context->p_ctrl_reg);
++
++ p_ac97_reg->gcr |= ZY_AC97_GCR_WARM_RESET_MSK;
++
++ mdelay(5);
++
++ /* power on all the necessary unit */
++ zy_ac97_acodec_write(p_device_context,POWERDOWN_CTRL_STAT, 0x000); /*26*/
++ /* open left headphone mixer */
++ /* open right headphone mixer */
++ /* open right/left dac */
++ /* open right/left adc */
++ /* open temperature sensor */
++ /* enable reference generator */
++ zy_ac97_acodec_write(p_device_context,POWER_DOWN_1, 0xda00); /*3c */
++ /* open microphone bias */
++ /* open HPL output PGA */
++ /* open HPR output PGA */
++ /* open mic PGA MA */
++ /* open mic pre-amp MPA */
++ /* if here we enable SPKL and SPKR PGA, then Touch screen will doesn't work */
++ zy_ac97_acodec_write(p_device_context,POWER_DOWN_2,0xb9f5); /*3e */
++
++ /* recording route and microphone input */
++ /* microphone selection, now fixed to MIC1 input and mic bias output */
++ /* MIC1 only, MICBIAS enable */
++ zy_ac97_acodec_write (p_device_context, MIC_BIAS, 0xC440); /*0x22h*/
++
++ /* mic pga setting to mixer (side tone) */
++ /* comment the below code to make MICA/B play back volume gain + 0db */
++ /* zy_ac97_acodec_write (p_device_context, MIC_PGA_VOLUME, 0x0000); */ /*0x0eh*/
++
++ /* recording side tone and ADC boost, now fixed to default (14h) */
++ /* recording volume 0dB */
++ zy_ac97_acodec_write(p_device_context, REC_PGA_VOL, 0x0); /*12*/
++
++ /* hifi playback route and output mixer */
++ /* by default, fixed to enable headphone only */
++
++ /* comment the below code to make SPEAKER default MUTE */
++ zy_ac97_acodec_write (p_device_context, SPEAKER_VOLUME, 0x0); /*02*/
++
++ /* comment the below code to make OUT3_OUT4 default MUTE */
++ /* zy_ac97_acodec_write (p_device_context, OUT3_OUT4_VOLUME, 0x8000); */ /*06*/
++
++ /* remove all the mute bit volume gain + 0db */
++ zy_ac97_acodec_write(p_device_context, HEADPHONE_VOLUME, 0x0); /*04*/
++
++ /* DAC route */
++ /* open DAC to headphone mixer path */
++ /* left DAC gain +0db */
++ /* right DAC gain +0db */
++ zy_ac97_acodec_write(p_device_context, DAC_PGA_VOL_ROUTE,0x0808); /*0c*/
++
++ /* out3 configure, invert to HPMIXR */
++ /* zy_ac97_acodec_write(p_device_context,DAC_3D_CTRL_INV_MUX_SEL, 0x8000); */ /*1e*/
++
++ /* output control */
++ /* select HPMIXR HPMIXL out */
++ /* other out are all VIM */
++ zy_ac97_acodec_write(p_device_context,OUTPUT_PGA_MUX, 0x9BA8); /*1c*/
++
++ /* set sample rates */
++ /* enable variable rate conversion */
++ zy_ac97_acodec_write(p_device_context, EXTENDED_AUD_STAT_CTRL , 0x1); /*2a*/
++ /* DAC 44kHZ */
++ zy_ac97_acodec_write(p_device_context,AUDIO_DAC_RATE,0xac44); /*2c*/
++ /* ADC 16KHZ */
++ zy_ac97_acodec_write(p_device_context,AUDIO_ADC_RATE,0x3E80); /*32*/
++
++ /* clock scheme, use external clock, it is 24MHZ from MCLK_A */
++
++
++ zy_ac97_acodec_read(p_device_context, MCLK_PLL_CTRL_1, &value);
++ zy_ac97_acodec_write(p_device_context, MCLK_PLL_CTRL_1, value | 0x2);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_wm9713_specific_deinit (zy_acocec_context_t *p_device_context)
++{/* do later: shut down all power */
++ unsigned short value = 0;
++
++ /* close the power of all units */
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, 0xffff);
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_2, 0xffff);
++ zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value &= ~(ZY_AC97_9713_PWR_MBIAS);
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_acodec_set_pen_down_interrupt(zy_acocec_context_t *p_device_context, int enable)
++{/* disable/enable pen down interrupt in the codec. This function is not implemented for Wm9713 */
++ /* because the pen down detection could not be disabled in codec */
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_wm9713_enable_touch(zy_acocec_context_t *p_device_context)
++{/* enable touch functionality in the codec */
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++
++ /* power setting */
++ status = zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value &= ~(ZY_AC97_9713_PWR_PADCPD);
++ status = zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ /* basic touch setting */
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_3_WM13, 0xc008);
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_2_WM13, 0x6);
++
++
++ /* 9713 powerdown virtual gpio setting (polarity, sticky, wakeup) */
++ /* 9713 gpio 2(pin45) route to IRQ */
++ /* Notes: Can use defaults for IRQ polarity, PENDOWN polarity in IRQ, */
++ /* sticky for PENDOWN in IRQ and wakeup for PENDOWN. */
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_CFG, &value);
++ value &= ~(0x4);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_CFG, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_SHARING, &value);
++ value &= ~(0x4);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_SHARING, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_WAKEUP, &value);
++ value |= (0x2000);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_WAKEUP, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_STICKY, &value);
++ value |= (0x2000);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_STICKY, value);
++
++ return status;
++}
++
++zy_acodec_error_t zy_wm9713_disable_touch(zy_acocec_context_t *p_device_context)
++{/* disable touch functionality in the codec */
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++
++ /* power setting */
++ status = zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value |= (ZY_AC97_9713_PWR_PADCPD);
++ status = zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ return status;
++}
++zy_acodec_error_t zy_ac97_acodec_mfp_deinit(zy_acocec_context_t *p_device_context)
++{/* do later: free all MFP resources. */
++ return ZY_ACODEC_SUCCESS;
++}
++
++static zy_acodec_error_t zy_ac97_acodec_shut_down_aclink(p_zy_ac97acodec_t p_ac97_reg, int * p_ost_regs)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned long time_remaining = ZY_AC97_LINKOFF_TIMEOUT_DEF;
++
++ p_ac97_reg->gcr |= ZY_AC97_GCR_LINK_OFF_MSK;
++ p_ac97_reg->gcr |= ZY_AC97_GCR_CLKBPB_MSK;
++
++ while (!(p_ac97_reg->gsr & ZY_AC97_GSR_ACOFFD_MSK))
++ {
++ time_remaining --;
++ if (0 == time_remaining)
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ break;
++ }
++ udelay(1);
++ }
++ p_ac97_reg->gcr |= ZY_AC97_GCR_FRCRST_MSK;
++ /* check later: any delay needed */
++ p_ac97_reg->gcr &= ~ZY_AC97_GCR_FRCRST_MSK;
++ p_ac97_reg->gcr &= ~ZY_AC97_GCR_CLKBPB_MSK;
++
++ return(status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_deinit(zy_acocec_context_t * p_ac97_ctxt)
++{
++ zy_acodec_error_t status ;
++
++ status = zy_ac97_acodec_shut_down_aclink((p_zy_ac97acodec_t)(p_ac97_ctxt->p_ctrl_reg), p_ac97_ctxt->p_ost_regs);
++
++ return (status);
++}
++
++zy_acodec_error_t zy_acodec_deinit(zy_acocec_context_t *p_device_context)
++{
++ /* power down codec by codec specific power down function */
++ if (p_device_context->g_pfn_codec_specific_dinit)
++ {
++ p_device_context->g_pfn_codec_specific_dinit(p_device_context);
++ }
++ /* call bus deinit function */
++ zy_ac97_acodec_deinit(p_device_context);
++ /* restore MFP, set GPIO to suitable value */
++ zy_ac97_acodec_mfp_deinit(p_device_context);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++void alsa_zy_codec_put(p_zy_acocec_context_t p_acodectxt)
++{
++
++ zy_acodec_deinit(p_acodectxt);
++ //pxa_set_cken(24, 0);
++ CKENA &= ~(1 << 24);
++
++ if(p_acodectxt->p_save_memory){
++ kfree(p_saved_memory);
++ }
++ if(p_acodectxt->p_zy_scenario){
++ kfree(p_zy_scenario);
++ }
++}
++
++
++zy_acodec_error_t zy_acodec_init(zy_acocec_context_t *p_device_context, int hw_init)
++{
++ /* set codec specific functions
++ * set mfp for Zylonite platform
++ * call bus init function (AC97, I2S, I2C, SSP)
++ * call specific init of codec
++ */
++ zy_acodec_error_t retval = ZY_ACODEC_SUCCESS;
++
++ if (p_device_context->acodec_id != WM_9713_ID)
++ {/* on Zylonite, it is Wolfson 9713 codec only */
++ return ZY_ACODEC_GENERAL_SW_ERR;
++ }
++
++ if (1 == hw_init)
++ {
++ zy_ac97_acodec_mfp_init(p_device_context);
++ zy_ac97_acodec_init(p_device_context); /* codec init common to ac97 */
++ }
++
++ /* wm9713-specific functions */
++ (p_device_context->g_pfn_codec_specific_init) = zy_wm9713_specific_init;
++ (p_device_context->g_pfn_codec_specific_dinit) = zy_wm9713_specific_deinit;
++ (p_device_context->g_pfn_acodec_read) = zy_ac97_acodec_read;
++ (p_device_context->g_pfn_acodec_write) = zy_ac97_acodec_write;
++
++ (p_device_context->g_pfn_event_ack) = zy_wm9713_event_ack;
++ (p_device_context->g_pfn_get_event) = zy_wm9713_get_event;
++ (p_device_context->g_pfn_disable_touch) = zy_wm9713_disable_touch;
++ (p_device_context->g_pfn_enable_touch) = zy_wm9713_enable_touch;
++
++ if (1 == hw_init)
++ {
++ retval = p_device_context->g_pfn_codec_specific_init(p_device_context);
++ }
++
++ return retval;
++}
++
++static int __devinit touch_codec_zy_probe(struct platform_device *dev)
++{
++ int ret = 0;
++ struct snd_card *card = NULL;
++ zy_acodec_error_t status;
++
++ /* will increase codec context use count */
++ ret = alsa_prepare_for_zy(&p_zy_codec_ctxt);
++ if (ret)
++ goto err;
++
++ /* codec specific initialization, audio will do it either */
++ if (1 == p_zy_codec_ctxt->use_count) {
++ status = zy_acodec_init(p_zy_codec_ctxt, 1);
++ if (ZY_ACODEC_SUCCESS != status) {
++ printk(KERN_ERR "initialize codec error\n");
++ ret = -EIO;
++ goto err;
++ }
++
++ /* power down the units of the acodec, sleep the acodec, zy_acodec_init()
++ * will open all the units' power of the codec while ALSA need all the codec
++ * units power down and the codec should sleep if it can.
++ * So on the zylonite platform we call below function to power down and sleep
++ * wm9713 codec.
++ */
++ p_zy_codec_ctxt->g_pfn_codec_specific_dinit(p_zy_codec_ctxt);
++
++ }
++
++ alsa_ts_init();
++
++ //mhn_mfp_set_afds(MFP_AC97_INT_N_GPIO,0,0);
++ //mhn_gpio_set_direction(MFP_AC97_INT_N_GPIO, GPIO_DIR_IN);
++ //mhn_gpio_clear_edge_detect_status(MFP_AC97_INT_N_GPIO);
++ gpio_direction_input(mfp_to_gpio(MFP_PIN_GPIO26));
++ ret = request_irq(IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO26)),
++ pxa_touch_irq, IRQF_TRIGGER_RISING,
++ "wm9713 touch event interrupt", NULL);
++ if (ret) {
++ printk(KERN_ERR "Request IRQ for touch failed (%d).\n", ret);
++ goto err;
++ }
++
++ return 0;
++err:
++ if (p_zy_codec_ctxt && (!--p_zy_codec_ctxt->use_count)) {
++ zy_acodec_deinit(p_zy_codec_ctxt);
++ //pxa_set_cken(24, 0);
++ CKENA &= ~(1 << 24);
++ kfree(p_zy_codec_ctxt);
++ p_zy_codec_ctxt = NULL;
++ }
++
++ if (card)
++ snd_card_free(card);
++
++ return ret;
++}
++
++static int __devexit touch_codec_zy_remove(struct platform_device *dev)
++{
++ struct snd_card *card = platform_get_drvdata(dev);
++
++ input_unregister_device(codec_zy_ts_input);
++
++ if (p_zy_codec_ctxt && (!--p_zy_codec_ctxt->use_count)) {
++ alsa_zy_codec_put(p_zy_codec_ctxt);
++ kfree(p_zy_codec_ctxt);
++ p_zy_codec_ctxt = NULL;
++ }
++
++ if (card) {
++ snd_card_free(card);
++ platform_set_drvdata(dev, NULL);
++ }
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int touch_codec_zy_suspend(struct platform_device *_dev, pm_message_t state, u32 level)
++{
++ int ret=0;
++
++ if (level == SUSPEND_DISABLE) {
++ ret = audio_codec_zy_do_suspend(NULL, SNDRV_CTL_POWER_D3cold, p_zy_codec_ctxt);
++ touch_suspend = 1;
++ }
++ return ret;
++}
++
++static int touch_codec_zy_resume(struct platform_device *_dev, u32 level)
++{
++ int ret = 0;
++
++ if (level == RESUME_ENABLE) {
++ ret = audio_codec_zy_do_resume(NULL, SNDRV_CTL_POWER_D0, p_zy_codec_ctxt);
++ touch_suspend = 0;
++ }
++ return ret;
++}
++#else
++#define touch_codec_zy_suspend NULL
++#define touch_codec_zy_resume NULL
++#endif
++
++static struct platform_driver touch_codec_zy_driver = {
++ .probe = touch_codec_zy_probe,
++ .remove = __devexit_p(touch_codec_zy_remove),
++ .suspend= touch_codec_zy_suspend,
++ .resume = touch_codec_zy_resume,
++ .driver = {
++ .name = "pxa2xx-touch",
++ },
++};
++
++static int __init touch_codec_zy_init(void)
++{
++ return platform_driver_register(&touch_codec_zy_driver);
++}
++
++static void __exit touch_code_zy_exit(void)
++{
++ platform_driver_unregister(&touch_codec_zy_driver);
++}
++module_init(touch_codec_zy_init);
++module_exit(touch_code_zy_exit);
++
++EXPORT_SYMBOL(p_zy_codec_ctxt);
++
++MODULE_AUTHOR("bridge.wu@marvell.com");
++MODULE_DESCRIPTION("zylonite audio touch codec driver on ALSA");
++MODULE_LICENSE("GPL");
++
diff --git a/packages/linux/linux-rp.inc b/packages/linux/linux-rp.inc
index 43747f358d..2309235139 100644
--- a/packages/linux/linux-rp.inc
+++ b/packages/linux/linux-rp.inc
@@ -4,8 +4,6 @@ LICENSE = "GPL"
inherit kernel
-
-INITRAMFS_IMAGE=initramfs-kexec-image
DEPENDS_append_collie = " bc-native"
RPROVIDES_kernel-base += "hostap-modules"
@@ -17,13 +15,14 @@ CHSRC = "http://oz.drigon.com/patches"
TKSRC = "http://www.informatik.hu-berlin.de/~tkunze/zaurus/patches"
COMPATIBLE_HOST = "(arm|i.86).*-linux"
-COMPATIBLE_MACHINE = '(collie|poodle|c7x0|akita|spitz|tosa|hx2000|qemuarm|qemux86|bootcdx86|htcuniversal)'
+COMPATIBLE_MACHINE = '(collie|poodle|c7x0|akita|spitz|tosa|hx2000|qemuarm|qemux86|bootcdx86|htcuniversal|zylonite)'
KERNEL_DEFCONFIG ?= "defconfig-${MACHINE}"
CMDLINE_CON = "console=ttyS0,115200n8 console=tty1 noinitrd"
CMDLINE_CON_collie = "console=ttySA0,115200n8 console=tty1 noinitrd"
CMDLINE_CON_qemuarm = "console=ttyAMA0,115200n8 console=tty1 noinitrd"
+CMDLINE_CON_zylonite = "console=ttyS0,38400"
CMDLINE_ROOT ?= "root=/dev/mtdblock2 rootfstype=jffs2"
CMDLINE_ROOT_spitz ?= "root=/dev/hda1 rootfstype=ext3 rootdelay=1 rw"
#CMDLINE_ROOT_spitz = "root=/dev/mmcblk0p2 rootfstype=ext2 rootdelay=3 rw"
@@ -37,6 +36,7 @@ export mem = '${@bb.data.getVar("COLLIE_MEMORY_SIZE",d,1) or "64"}'
export rd = '${@bb.data.getVar("COLLIE_RAMDISK_SIZE",d,1) or "0"}'
CMDLINE_MEM_collie = "mem=${mem}M"
+CMDLINE_MEM_zylonite = "mem=64M"
CMDLINE_ROTATE_spitz = "fbcon=rotate:1"
CMDLINE_ROTATE_akita = "fbcon=rotate:1"
CMDLINE_ROTATE_collie = "fbcon=rotate:1"
@@ -55,7 +55,6 @@ module_autoload_snd-soc-corgi_c7x0 = "snd-soc-corgi"
module_autoload_snd-soc-spitz_akita = "snd-soc-spitz"
module_autoload_snd-soc-spitz_spitz = "snd-soc-spitz"
module_autoload_snd-soc-poodle_poodle = "snd-soc-poodle"
-
module_autoload_locomo-spi_collie = "locomo-spi"
module_autoload_mmc_block_collie = "mmc_block"
module_autoload_mmc_spi = "mmc-spi"
diff --git a/packages/linux/linux-rp_2.6.23.bb b/packages/linux/linux-rp_2.6.23.bb
index f4967e16ae..4bb06b60b1 100644
--- a/packages/linux/linux-rp_2.6.23.bb
+++ b/packages/linux/linux-rp_2.6.23.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r27"
+PR = "r34"
# Handy URLs
# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
@@ -43,6 +43,8 @@ SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 \
${RPSRC}/poodle_pm-r4.patch;patch=1 \
${RPSRC}/poodle_lcd_hack-r0.patch;patch=1 \
${RPSRC}/poodle_asoc_fix-r1.patch;patch=1 \
+ file://wm8750-treble.patch;patch=1 \
+ file://mtd-module.patch;patch=1 \
file://squashfs3.0-2.6.15.patch;patch=1;status=external \
${RPSRC}/logo_oh-r1.patch.bz2;patch=1;status=unmergable \
${RPSRC}/pxa-linking-bug.patch;patch=1;status=unmergable \
@@ -132,14 +134,10 @@ SRC_URI_append_tosa = "\
SRC_URI_append_akita = "\
file://sharpsl-rc-r1.patch;patch=1;status=external \
- file://wm8750-treble.patch;patch=1;status=external \
- file://mtd-module.patch;patch=1 \
"
SRC_URI_append_spitz = "\
file://sharpsl-rc-r1.patch;patch=1;status=external \
- file://wm8750-treble.patch;patch=1;status=external \
- file://mtd-module.patch;patch=1 \
"
SRC_URI_append_htcuniversal ="\
@@ -150,6 +148,9 @@ SRC_URI_append_zylonite ="\
file://arm_pxa_20070923.patch;patch=1 \
file://pxa_fb_overlay.patch;patch=1 \
file://zylonite-boot.patch;patch=1 \
+ file://zylonite_mtd-r0.patch;patch=1 \
+ file://zylonite_touch-r0.patch;patch=1 \
+ file://zylonite_keypad-r0.patch;patch=1 \
"
S = "${WORKDIR}/linux-2.6.23"
diff --git a/packages/linux/linux-rp_2.6.24.bb b/packages/linux/linux-rp_2.6.24.bb
index 5f406265ce..8c5d2f8ea5 100644
--- a/packages/linux/linux-rp_2.6.24.bb
+++ b/packages/linux/linux-rp_2.6.24.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r11"
+PR = "r15"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_collie = "1"
@@ -22,6 +22,7 @@ SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
${RPSRC}/export_atags-r2.patch;patch=1;status=pending \
${RPSRC}/lzo_crypto-r2.patch;patch=1;status=pending \
${RPSRC}/corgi_rearrange_lcd-r0.patch;patch=1;status=pending \
+ file://hrw-hostapcard.patch;patch=1;status=pending \
${RPSRC}/allow_disable_deferrred-r0.patch;patch=1 \
${RPSRC}/lzo_jffs2_sysfs-r1.patch;patch=1 \
${RPSRC}/hx2750_base-r33.patch;patch=1 \
@@ -36,7 +37,7 @@ SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
${RPSRC}/pm_changes-r1.patch;patch=1 \
${RPSRC}/usb_add_epalloc-r4.patch;patch=1 \
${RPSRC}/usb_pxa27x_udc-r8.patch;patch=1 \
- ${RPSRC}/locomo_kbd_tweak-r1.patch;patch=1 \
+ ${RPSRC}/locomo_kbd_tweak-r1a.patch;patch=1 \
${RPSRC}/pxa27x_overlay-r8.patch;patch=1 \
${RPSRC}/w100_extaccel-r2.patch;patch=1 \
${RPSRC}/w100_extmem-r1.patch;patch=1 \
@@ -44,6 +45,12 @@ SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
${RPSRC}/poodle_lcd_hack-r0.patch;patch=1 \
${RPSRC}/poodle_asoc_fix-r1.patch;patch=1 \
file://pxa27x-resume.patch;patch=1;status=external \
+ file://mtd-module.patch;patch=1;status=external \
+ file://wm8750-treble.patch;patch=1;status=external \
+ file://spitz_h_rewrite.patch;patch=1;status=external \
+ file://pxa2xx_udc-clock.patch;patch=1 \
+ file://sharpsl-rc-r1.patch;patch=1 \
+ file://sharpsl-rc-r2.patch;patch=1 \
file://squashfs3.3.patch;patch=1;status=external \
${RPSRC}/logo_oh-r1.patch.bz2;patch=1;status=unmergable \
${RPSRC}/pxa-linking-bug.patch;patch=1;status=unmergable \
@@ -180,27 +187,6 @@ SRC_URI_append_tosa = "\
file://tosa/0057-Clean-up-tosa-resetting.patch;patch=1 \
"
-SRC_URI_append_akita = "\
- file://mtd-module.patch;patch=1;status=external \
- file://wm8750-treble.patch;patch=1;status=external \
- file://sharpsl-rc-r1.patch;patch=1 \
- file://sharpsl-rc-r2.patch;patch=1 \
- "
-
-SRC_URI_append_spitz = "\
- file://mtd-module.patch;patch=1;status=external \
- file://wm8750-treble.patch;patch=1;status=external \
- file://spitz_h_rewrite.patch;patch=1;status=external \
- file://sharpsl-rc-r1.patch;patch=1 \
- file://sharpsl-rc-r2.patch;patch=1 \
- "
-
-SRC_URI_append_c7x0 = "\
- file://pxa2xx_udc-clock.patch;patch=1 \
- file://sharpsl-rc-r1.patch;patch=1 \
- file://sharpsl-rc-r2.patch;patch=1 \
- "
-
SRC_URI_append_htcuniversal ="\
file://htcuni-acx.patch;patch=1;status=external \
"
diff --git a/packages/linux/linux-rp_2.6.25+2.6.26-rc4.bb b/packages/linux/linux-rp_2.6.25+2.6.26-rc4.bb
new file mode 100644
index 0000000000..15830dc5d3
--- /dev/null
+++ b/packages/linux/linux-rp_2.6.25+2.6.26-rc4.bb
@@ -0,0 +1,189 @@
+require linux-rp.inc
+
+PR = "r5"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_qemuarm = "1"
+DEFAULT_PREFERENCE_qemux86 = "1"
+DEFAULT_PREFERENCE_spitz = "1"
+
+# Handy URLs
+# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
+# ${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.18.tar.bz2
+# ${KERNELORG_MIRROR}pub/linux/kernel/v2.6/testing/linux-2.6.20-rc4.tar.bz2
+# ${KERNELORG_MIRROR}pub/linux/kernel/v2.6/testing/patch-2.6.18-rc6.bz2;patch=1
+# ${KERNELORG_MIRROR}pub/linux/kernel/v2.6/snapshots/patch-2.6.18-rc2-git1.bz2;patch=1
+# ${KERNELORG_MIRROR}pub/linux/kernel/people/alan/linux-2.6/2.6.10/patch-2.6.10-ac8.gz;patch=1
+# ${KERNELORG_MIRROR}pub/linux/kernel/people/akpm/patches/2.6/2.6.14-rc2/2.6.14-rc2-mm1/2.6.14-rc2-mm1.bz2;patch=1
+
+# Patches submitted upstream are towards top of this list
+# Hacks should clearly named and at the bottom
+SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2 \
+ ${KERNELORG_MIRROR}pub/linux/kernel/v2.6/testing/patch-2.6.26-rc4.bz2;patch=1 \
+ ${RPSRC}/lzo_jffs2_sysfs-r1.patch;patch=1 \
+ ${RPSRC}/hx2750_base-r34.patch;patch=1 \
+ ${RPSRC}/hx2750_bl-r9.patch;patch=1 \
+ ${RPSRC}/hx2750_pcmcia-r3.patch;patch=1 \
+ ${RPSRC}/pxa_keys-r9.patch;patch=1 \
+ ${RPSRC}/tsc2101-r19.patch;patch=1 \
+ ${RPSRC}/hx2750_test1-r8.patch;patch=1 \
+ ${RPSRC}/sharpsl_pm_fixes1-r0.patch;patch=1 \
+ ${RPSRC}/pm_changes-r1.patch;patch=1 \
+ ${RPSRC}/locomo_kbd_tweak-r2.patch;patch=1 \
+# ${RPSRC}/pxa27x_overlay-r8.patch;patch=1 \
+ ${RPSRC}/w100_extaccel-r2.patch;patch=1 \
+ ${RPSRC}/w100_extmem-r1.patch;patch=1 \
+ ${RPSRC}/poodle_pm-r6.patch;patch=1 \
+ ${RPSRC}/poodle_lcd_hack-r0.patch;patch=1 \
+ ${RPSRC}/poodle_asoc_fix-r1.patch;patch=1 \
+ ${RPSRC}/logo_oh-r1.patch.bz2;patch=1;status=unmergable \
+ ${RPSRC}/pxa-linking-bug.patch;patch=1;status=unmergable \
+ file://hostap-monitor-mode.patch;patch=1;status=unmergable \
+ file://serial-add-support-for-non-standard-xtals-to-16c950-driver.patch;patch=1;status=unmergable \
+ ${RPSRC}/mmcsd_large_cards-r1.patch;patch=1;status=hack \
+ ${RPSRC}/mmcsd_no_scr_check-r2.patch;patch=1;status=hack \
+ ${RPSRC}/integrator_rgb-r1.patch;patch=1;status=hack \
+ ${RPSRC}/pxa_cf_initorder_hack-r1.patch;patch=1;status=hack \
+ file://sharpsl-rc-r1.patch;patch=1 \
+ file://spitz_h_rewrite.patch;patch=1 \
+ file://pxa-serial-hack.patch;patch=1;status=hack \
+ file://connectplus-remove-ide-HACK.patch;patch=1;status=hack \
+ file://connectplus-prevent-oops-HACK.patch;patch=1;status=hack \
+ file://htcuni.patch;patch=1 \
+ file://versatile-armv6.patch;patch=1 \
+ file://defconfig-c7x0 \
+ file://defconfig-hx2000 \
+ file://defconfig-akita \
+ file://defconfig-spitz \
+ file://defconfig-qemuarm \
+ file://defconfig-qemux86 \
+ file://defconfig-bootcdx86 \
+ file://defconfig-htcuniversal \
+ file://defconfig-zylonite"
+# Disabled until the patchset is updated:
+# file://defconfig-tosa
+# file://defconfig-collie
+# file://defconfig-poodle
+
+
+# FIXMEs before made default
+# ${RPSRC}/mmcsd_no_scr_check-r1.patch;patch=1;status=hack
+
+
+# Add this to enable pm debug code (useful with a serial lead)
+# ${RPSRC}/sharpsl_pm_debug-r0.patch;patch=1
+
+# Disabled until I find the reason this gives issues with cdc_subset
+# ${RPSRC}/usb_rndis_tweaks-r0.patch;patch=1 \
+
+
+SRC_URI_append_collie = "\
+ ${TKSRC}/mtd-sharp-flash-hack-r4.patch;patch=1 \
+ ${TKSRC}/mcp-sa11x0-r0.patch;patch=1 \
+ ${TKSRC}/locomo-r1.patch;patch=1 \
+ ${TKSRC}/collie-kexec-r1.patch;patch=1 \
+ ${TKSRC}/sharpsl_pm-4.patch;patch=1 \
+ ${TKSRC}/collie_pm-3.patch;patch=1 \
+ ${TKSRC}/ucb1x00_suspend.patch;patch=1 \
+ ${TKSRC}/collie-ts.patch;patch=1 \
+ ${TKSRC}/pcmcia_suspend.patch;patch=1 \
+ ${TKSRC}/locomo_spi-6.patch;patch=1 \
+ ${TKSRC}/config.patch;patch=1 \
+ ${TKSRC}/locomokeyb-2.patch;patch=1 \
+ ${TKSRC}/mmc-spi.patch;patch=1 \
+ ${TKSRC}/linux-2.6.24-SIMpad-rtc-sa1100.patch;patch=1 \
+ ${TKSRC}/sa1100_spinlock.patch;patch=1 \
+ ${TKSRC}/sa1100-dma.patch;patch=1 \
+ ${TKSRC}/sa1100_udc_g_ether-2.patch;patch=1 \
+"
+
+SRC_URI_append_poodle = "\
+ ${RPSRC}/poodle_serial_vcc-r0.patch;patch=1 \
+ file://poodle_ts.patch;patch=1 \
+ file://pxafb.patch;patch=1 \
+"
+
+SRC_URI_append_tosa = "\
+ file://tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch;patch=1 \
+ file://tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch;patch=1 \
+ file://tosa/0003-Core-MFD-support.patch;patch=1 \
+ file://tosa/0004-Add-support-for-tc6393xb-MFD-core.patch;patch=1 \
+ file://tosa/0005-Add-support-for-tc6387xb-MFD-core.patch;patch=1 \
+ file://tosa/0006-Add-support-for-t7l66xb-MFD-core.patch;patch=1 \
+ file://tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch;patch=1 \
+ file://tosa/0008-Nand-driver-for-TMIO-devices.patch;patch=1 \
+ file://tosa/0009-FB-driver-for-TMIO-devices.patch;patch=1 \
+ file://tosa/0010-OHCI-driver-for-TMIO-devices.patch;patch=1 \
+ file://tosa/0011-MMC-driver-for-TMIO-devices.patch;patch=1 \
+ file://tosa/0012-Tosa-keyboard-support.patch;patch=1 \
+ file://tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch;patch=1 \
+ file://tosa/0014-tosa_udc_use_gpio_vbus.patch.patch;patch=1 \
+ file://tosa/0015-sharpsl-export-params.patch;patch=1 \
+ file://tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch;patch=1 \
+ file://tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch;patch=1 \
+ file://tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch;patch=1 \
+ file://tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch;patch=1 \
+ file://tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch;patch=1 \
+ file://tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch;patch=1 \
+ file://tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch;patch=1 \
+ file://tosa/0030-Core-driver-for-WM97xx-touchscreens.patch;patch=1 \
+ file://tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch;patch=1 \
+ file://tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch;patch=1 \
+ file://tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch;patch=1 \
+ file://tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch;patch=1 \
+ file://tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch;patch=1 \
+ file://tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch;patch=1 \
+ file://tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch;patch=1 \
+ file://tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch;patch=1 \
+ file://tosa/0044-fix-tmio_mmc-debug-compilation.patch;patch=1 \
+ file://tosa/0045-Update-tmio_ohci.patch;patch=1 \
+ file://tosa/0046-patch-tc6393xb-cleanup.patch;patch=1 \
+ file://tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch;patch=1 \
+ file://tosa/0048-tc6393xb-GPIO-support.patch;patch=1 \
+ file://tosa/0049-platform-support-for-TMIO-on-tosa.patch;patch=1 \
+ file://tosa/0050-tosa-update-for-tc6393xb-gpio.patch;patch=1 \
+ file://tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch;patch=1 \
+ file://tosa/0052-tosa-platform-backlight-support.patch;patch=1 \
+ file://tosa/0053-sound-soc-codecs-wm9712.c-28.patch;patch=1 \
+ file://tosa/0054-sound-soc-codecs-wm9712.c-2.patch;patch=1 \
+ file://tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch;patch=1 \
+ file://tosa/0058-Fix-tosakbd-suspend.patch;patch=1 \
+ file://tosa/0059-patch-tosa-wakeup-test.patch;patch=1 \
+ file://tosa/0060-Add-support-for-power_supply-on-tosa.patch;patch=1 \
+ file://tosa/0061-tosa-bat-unify.patch;patch=1 \
+ file://tosa/0062-tosa-bat-fix-charging.patch;patch=1 \
+ file://tosa/0063-patch-tosa-bat-jacket-detect.patch;patch=1 \
+ file://tosa/0064-Export-modes-via-sysfs.patch;patch=1 \
+ file://tosa/0065-wm97xx-core-fixes.patch;patch=1 \
+ file://tosa/0066-tmiofb_probe-should-be-__devinit.patch;patch=1 \
+ file://tosa/0067-modeswitching.patch;patch=1 \
+ file://tosa/0068-Preliminary-tosa-denoiser.patch;patch=1 \
+ file://tosa/0019-pxa-remove-periodic-mode-emulation-support.patch;patch=1 \
+ file://tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch;patch=1 \
+ file://tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch;patch=1 \
+ file://tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch;patch=1 \
+ file://tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch;patch=1 \
+ file://tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch;patch=1 \
+ file://tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch;patch=1 \
+ file://tosa/0039-Add-generic-framework-for-managing-clocks.patch;patch=1 \
+ file://tosa/0040-Clocklib-debugfs-support.patch;patch=1 \
+ file://tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch;patch=1 \
+ file://tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch;patch=1 \
+ file://tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch;patch=1 \
+ file://tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch;patch=1 \
+ file://tosa/0057-Clean-up-tosa-resetting.patch;patch=1 \
+ "
+
+SRC_URI_append_htcuniversal ="\
+ file://htcuni-acx.patch;patch=1;status=external \
+ "
+
+SRC_URI_append_zylonite ="\
+ file://pxa_fb_overlay.patch;patch=1 \
+ file://zylonite-boot.patch;patch=1 \
+ file://zylonite_mtd-r0.patch;patch=1 \
+ file://zylonite_touch-r0.patch;patch=1 \
+ file://zylonite_keypad-r0.patch;patch=1 \
+ "
+
+S = "${WORKDIR}/linux-2.6.25"
diff --git a/packages/linux/linux-rt-2.6.24/sysctl_missing_include.patch b/packages/linux/linux-rt-2.6.24/sysctl_missing_include.patch
deleted file mode 100644
index 2949374818..0000000000
--- a/packages/linux/linux-rt-2.6.24/sysctl_missing_include.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.24.3/kernel/sysctl.c
-===================================================================
---- linux-2.6.24.3.orig/kernel/sysctl.c 2008-02-29 00:52:45.000000000 +0100
-+++ linux-2.6.24.3/kernel/sysctl.c 2008-02-29 00:52:59.000000000 +0100
-@@ -47,6 +47,7 @@
- #include <linux/acpi.h>
- #include <linux/reboot.h>
- #include <linux/ftrace.h>
-+#include <linux/profile.h>
-
- #include <asm/uaccess.h>
- #include <asm/processor.h>
diff --git a/packages/linux/linux-rt-2.6.25/.mtn2git_empty b/packages/linux/linux-rt-2.6.25/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-rt-2.6.25/.mtn2git_empty
diff --git a/packages/linux/linux-rt-2.6.25/efika/.mtn2git_empty b/packages/linux/linux-rt-2.6.25/efika/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-rt-2.6.25/efika/.mtn2git_empty
diff --git a/packages/linux/linux-rt-2.6.25/efika/defconfig b/packages/linux/linux-rt-2.6.25/efika/defconfig
new file mode 100644
index 0000000000..838b49a976
--- /dev/null
+++ b/packages/linux/linux-rt-2.6.25/efika/defconfig
@@ -0,0 +1,1769 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.25.4-rt6
+# Thu Jun 12 00:22:18 2008
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+CONFIG_6xx=y
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_PPC_FPU=y
+# CONFIG_ALTIVEC is not set
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_STD_MMU_32=y
+# CONFIG_PPC_MM_SLICES is not set
+# CONFIG_SMP is not set
+CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
+CONFIG_IRQ_PER_CPU=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+CONFIG_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+CONFIG_RELAY=y
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_RADIX_TREE_CONCURRENT is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_MARKERS=y
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+CONFIG_LSF=y
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+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"
+# CONFIG_CLASSIC_RCU is not set
+
+#
+# Platform support
+#
+CONFIG_PPC_MULTIPLATFORM=y
+# CONFIG_PPC_82xx is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
+CONFIG_CLASSIC32=y
+CONFIG_PPC_CHRP=y
+# CONFIG_PPC_MPC512x is not set
+# CONFIG_PPC_MPC5121 is not set
+# CONFIG_MPC5121_ADS is not set
+CONFIG_PPC_MPC52xx=y
+# CONFIG_PPC_MPC5200_SIMPLE is not set
+CONFIG_PPC_EFIKA=y
+# CONFIG_PPC_LITE5200 is not set
+# CONFIG_PPC_MPC5200_BUGFIX is not set
+# CONFIG_PPC_PMAC is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+# CONFIG_EMBEDDED6xx is not set
+CONFIG_PPC_NATIVE=y
+CONFIG_UDBG_RTAS_CONSOLE=y
+# CONFIG_IPIC is not set
+CONFIG_MPIC=y
+# CONFIG_MPIC_WEIRD is not set
+CONFIG_PPC_I8259=y
+CONFIG_PPC_RTAS=y
+# CONFIG_RTAS_ERROR_LOGGING is not set
+CONFIG_RTAS_PROC=y
+# CONFIG_MMIO_NVRAM is not set
+CONFIG_PPC_MPC106=y
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_TAU=y
+# CONFIG_TAU_INT is not set
+CONFIG_TAU_AVERAGE=y
+# CONFIG_FSL_ULI1575 is not set
+CONFIG_PPC_BESTCOMM=y
+CONFIG_PPC_BESTCOMM_ATA=y
+CONFIG_PPC_BESTCOMM_FEC=y
+CONFIG_PPC_BESTCOMM_GEN_BD=y
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
+# CONFIG_SCHED_HRTICK is not set
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT_DESKTOP is not set
+CONFIG_PREEMPT_RT=y
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_SOFTIRQS=y
+CONFIG_PREEMPT_HARDIRQS=y
+CONFIG_PREEMPT_RCU=y
+CONFIG_PREEMPT_RCU_BOOST=y
+CONFIG_RCU_TRACE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_ASM_SEMAPHORES=y
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+# CONFIG_IOMMU_HELPER is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_HAS_WALK_MEMORY=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
+# CONFIG_KEXEC is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_PROC_DEVICETREE=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttyS0,9600 console=ttyPSC0,115200"
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+CONFIG_PM_DEBUG=y
+CONFIG_PM_VERBOSE=y
+CONFIG_CAN_PM_TRACE=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_SECCOMP is not set
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+# CONFIG_ISA is not set
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_FSL_SOC=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
+CONFIG_PCI_LEGACY=y
+# CONFIG_PCI_DEBUG is not set
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0xc0000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE 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 is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+CONFIG_INET6_TUNNEL=m
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
+# CONFIG_NF_CONNTRACK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN 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=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+# CONFIG_IEEE80211_CRYPT_CCMP is not set
+# 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_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# 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 is not set
+CONFIG_OF_DEVICE=y
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_FD is not set
+# 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=8192
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECD=y
+CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+
+#
+# PCI IDE chipsets support
+#
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_PCIBUS_ORDER=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+# CONFIG_BLK_DEV_OPTI621 is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=y
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_SAS_ATTRS=m
+CONFIG_SCSI_SAS_LIBSAS=m
+# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_HOST_SMP=y
+# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# 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_ADVANSYS 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_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_MVSAS is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SVW is not set
+# CONFIG_ATA_PIIX is not set
+# CONFIG_SATA_MV is not set
+# CONFIG_SATA_NV is not set
+# CONFIG_PDC_ADMA is not set
+# CONFIG_SATA_QSTOR is not set
+# CONFIG_SATA_PROMISE is not set
+# CONFIG_SATA_SX4 is not set
+# CONFIG_SATA_SIL is not set
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_SIS is not set
+# CONFIG_SATA_ULI is not set
+# CONFIG_SATA_VIA is not set
+# CONFIG_SATA_VITESSE is not set
+# CONFIG_SATA_INIC162X is not set
+# CONFIG_SATA_FSL is not set
+# CONFIG_PATA_ALI is not set
+# CONFIG_PATA_AMD is not set
+# CONFIG_PATA_ARTOP is not set
+# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD640_PCI is not set
+# CONFIG_PATA_CMD64X is not set
+# CONFIG_PATA_CS5520 is not set
+# CONFIG_PATA_CS5530 is not set
+# CONFIG_PATA_CYPRESS is not set
+# CONFIG_PATA_EFAR is not set
+CONFIG_ATA_GENERIC=y
+# CONFIG_PATA_HPT366 is not set
+# CONFIG_PATA_HPT37X is not set
+# CONFIG_PATA_HPT3X2N is not set
+# CONFIG_PATA_HPT3X3 is not set
+# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_IT8213 is not set
+# CONFIG_PATA_JMICRON is not set
+# CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
+CONFIG_PATA_MPC52xx=y
+# CONFIG_PATA_MPIIX is not set
+# CONFIG_PATA_OLDPIIX is not set
+# CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NINJA32 is not set
+# CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_NS87415 is not set
+# CONFIG_PATA_OPTI is not set
+# CONFIG_PATA_OPTIDMA is not set
+# CONFIG_PATA_PDC_OLD is not set
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+# CONFIG_PATA_SERVERWORKS is not set
+# CONFIG_PATA_PDC2027X is not set
+# CONFIG_PATA_SIL680 is not set
+# CONFIG_PATA_SIS is not set
+# CONFIG_PATA_VIA is not set
+# CONFIG_PATA_WINBOND is not set
+# CONFIG_PATA_PLATFORM is not set
+# CONFIG_MD is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+# CONFIG_MACINTOSH_DRIVERS 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_VETH is not set
+# CONFIG_ARCNET is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+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_ENC28J60 is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+CONFIG_FEC_MPC52xx=y
+CONFIG_FEC_MPC52xx_MDIO=y
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
+# CONFIG_USB_ALI_M5632 is not set
+# CONFIG_USB_AN2720 is not set
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+# CONFIG_USB_EPSON2888 is not set
+# CONFIG_USB_KC2190 is not set
+CONFIG_USB_NET_ZAURUS=m
+# 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_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=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_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 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 is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+CONFIG_SERIO_SERPORT=m
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_RAW=m
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_NR_UARTS=16
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_MPC52xx=y
+CONFIG_SERIAL_MPC52xx_CONSOLE=y
+CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
+# CONFIG_SERIAL_JSM is not set
+# CONFIG_SERIAL_OF_PLATFORM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_BRIQ_PANEL is not set
+CONFIG_HVC_DRIVER=y
+CONFIG_HVC_RTAS=y
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+CONFIG_NVRAM=y
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_RMEM=m
+CONFIG_ALLOC_RTSJ_MEM=m
+CONFIG_DEVPORT=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_HYDRA is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_NFORCE2 is not set
+CONFIG_I2C_OCORES=y
+CONFIG_I2C_PARPORT_LIGHT=y
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+# CONFIG_I2C_SIMTEC is not set
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_VOODOO3=m
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+# CONFIG_PCF8575 is not set
+CONFIG_SENSORS_PCF8591=m
+# CONFIG_TPS65010 is not set
+CONFIG_SENSORS_MAX6875=m
+# 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=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_SPI_MPC52xx_PSC=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SPI_TLE62X0 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=y
+CONFIG_MPC5200_WDT=y
+# CONFIG_WATCHDOG_RTAS is not set
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 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_AGP=m
+CONFIG_DRM=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+CONFIG_DRM_VIA=m
+CONFIG_DRM_SAVAGE=m
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB_DDC=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+CONFIG_FB_MACMODES=y
+CONFIG_FB_BACKLIGHT=y
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+CONFIG_FB_OF=y
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 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=y
+CONFIG_FB_RADEON_I2C=y
+CONFIG_FB_RADEON_BACKLIGHT=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_ATY128=y
+CONFIG_FB_ATY128_BACKLIGHT=y
+CONFIG_FB_ATY=y
+CONFIG_FB_ATY_CT=y
+CONFIG_FB_ATY_GENERIC_LCD=y
+CONFIG_FB_ATY_GX=y
+CONFIG_FB_ATY_BACKLIGHT=y
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+CONFIG_FB_SIS=y
+CONFIG_FB_SIS_300=y
+CONFIG_FB_SIS_315=y
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+# CONFIG_LCD_LTV350QV is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_VGACON_SOFT_SCROLLBACK=y
+CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 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_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_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_OXYGEN is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_CS5530 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_HIFIER is not set
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_ICE1724 is not set
+# CONFIG_SND_INTEL8X0 is not set
+# CONFIG_SND_INTEL8X0M is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_MAESTRO3 is not set
+# CONFIG_SND_MIXART is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_PCXHR is not set
+# CONFIG_SND_RIPTIDE is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_TRIDENT is not set
+# CONFIG_SND_VIA82XX is not set
+# CONFIG_SND_VIA82XX_MODEM is not set
+# CONFIG_SND_VIRTUOSO is not set
+# CONFIG_SND_VX222 is not set
+# CONFIG_SND_YMFPCI is not set
+
+#
+# ALSA PowerMac devices
+#
+
+#
+# ALSA PowerPC devices
+#
+
+#
+# SPI devices
+#
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_USX2Y is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=y
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# ALSA SoC audio for Freescale SOCs
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW 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=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+CONFIG_USB_DYNAMIC_MINORS=y
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+# CONFIG_USB_EHCI_FSL is not set
+CONFIG_USB_EHCI_HCD_PPC_OF=y
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PPC_SOC=y
+CONFIG_USB_OHCI_HCD_PPC_OF=y
+CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
+CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
+CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=m
+# 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_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_MON is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_EZUSB=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_AIRCABLE=m
+CONFIG_USB_SERIAL_AIRPRIME=m
+CONFIG_USB_SERIAL_ARK3116=m
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+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_IUU is not set
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+
+#
+# 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_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+CONFIG_NEW_LEDS=y
+# CONFIG_LEDS_CLASS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+
+#
+# Conflicting RTC option has been selected, check GEN_RTC and RTC
+#
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_DMADEVICES=y
+
+#
+# DMA Devices
+#
+# CONFIG_FSL_DMA is not set
+
+#
+# Userspace I/O
+#
+CONFIG_UIO=y
+CONFIG_UIO_CIF=m
+
+#
+# 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_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=y
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+# CONFIG_REISERFS_FS_XATTR is not set
+CONFIG_JFS_FS=y
+# CONFIG_JFS_POSIX_ACL is not set
+# CONFIG_JFS_SECURITY is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=y
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_SECURITY is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+# CONFIG_NTFS_RW is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+CONFIG_HFS_FS=y
+CONFIG_HFSPLUS_FS=y
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+CONFIG_ROMFS_FS=y
+# CONFIG_SYSV_FS is not set
+CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_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_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+CONFIG_AMIGA_PARTITION=y
+# CONFIG_ATARI_PARTITION is not set
+CONFIG_MAC_PARTITION=y
+CONFIG_MSDOS_PARTITION=y
+CONFIG_BSD_DISKLABEL=y
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 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=y
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+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=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+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=y
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_RWLOCK_TORTURE_TEST is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+CONFIG_STACKTRACE=y
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_TRACING=y
+CONFIG_EVENT_TRACER=y
+CONFIG_CONTEXT_SWITCH_TRACER=y
+CONFIG_FTRACE_SELFTEST=y
+CONFIG_FTRACE_STARTUP_TEST=y
+CONFIG_WAKEUP_LATENCY_HIST=y
+# CONFIG_PREEMPT_TRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUGGER is not set
+# CONFIG_VIRQ_DEBUG is not set
+# CONFIG_BDI_SWITCH is not set
+CONFIG_BOOTX_TEXT=y
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+# CONFIG_CRYPTO_SEQIV is not set
+CONFIG_CRYPTO_MANAGER=y
+# 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=y
+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=y
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# 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_SEED is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
+CONFIG_PPC_CLOCK=y
+CONFIG_PPC_LIB_RHEAP=y
diff --git a/packages/linux/linux-rt-2.6.25/mpc8315e-rdb/.mtn2git_empty b/packages/linux/linux-rt-2.6.25/mpc8315e-rdb/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-rt-2.6.25/mpc8315e-rdb/.mtn2git_empty
diff --git a/packages/linux/linux-rt-2.6.25/mpc8315e-rdb/defconfig b/packages/linux/linux-rt-2.6.25/mpc8315e-rdb/defconfig
new file mode 100644
index 0000000000..75c8fae9ce
--- /dev/null
+++ b/packages/linux/linux-rt-2.6.25/mpc8315e-rdb/defconfig
@@ -0,0 +1,1833 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.25.4-rt3
+# Wed May 28 15:38:47 2008
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+CONFIG_6xx=y
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_PPC_FPU=y
+# CONFIG_FSL_EMB_PERFMON is not set
+CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_STD_MMU_32=y
+# CONFIG_PPC_MM_SLICES is not set
+# CONFIG_SMP is not set
+CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
+CONFIG_IRQ_PER_CPU=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+CONFIG_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFAULT_UIMAGE=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
+# CONFIG_FAIR_GROUP_SCHED is not set
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+# CONFIG_RADIX_TREE_CONCURRENT is not set
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+# CONFIG_EPOLL is not set
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+# CONFIG_SHMEM is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+CONFIG_MARKERS=y
+CONFIG_OPROFILE=m
+CONFIG_HAVE_OPROFILE=y
+CONFIG_PROFILE_NMI=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_TINY_SHMEM=y
+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 is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+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"
+# CONFIG_CLASSIC_RCU is not set
+
+#
+# Platform support
+#
+# CONFIG_PPC_MULTIPLATFORM is not set
+# CONFIG_PPC_82xx is not set
+CONFIG_PPC_83xx=y
+# CONFIG_PPC_86xx is not set
+# CONFIG_PPC_MPC512x is not set
+# CONFIG_PPC_MPC5121 is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+CONFIG_MPC83xx=y
+CONFIG_MPC831x_RDB=y
+# CONFIG_MPC832x_MDS is not set
+# CONFIG_MPC832x_RDB is not set
+# CONFIG_MPC834x_MDS is not set
+# CONFIG_MPC834x_ITX is not set
+# CONFIG_MPC836x_MDS is not set
+# CONFIG_MPC837x_MDS is not set
+# CONFIG_MPC837x_RDB is not set
+# CONFIG_SBC834x is not set
+CONFIG_PPC_MPC831x=y
+CONFIG_IPIC=y
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+# CONFIG_FSL_ULI1575 is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+# CONFIG_SCHED_HRTICK is not set
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT_DESKTOP is not set
+CONFIG_PREEMPT_RT=y
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_SOFTIRQS=y
+CONFIG_PREEMPT_HARDIRQS=y
+CONFIG_PREEMPT_RCU=y
+CONFIG_PREEMPT_RCU_BOOST=y
+CONFIG_RCU_TRACE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_ASM_SEMAPHORES=y
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_IOMMU_HELPER is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_HAS_WALK_MEMORY=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+# CONFIG_SECCOMP is not set
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_FSL_SOC=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
+CONFIG_PCI_LEGACY=y
+# CONFIG_PCI_DEBUG is not set
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Advanced setup
+#
+CONFIG_ADVANCED_OPTIONS=y
+CONFIG_HIGHMEM_START=0xfe000000
+# CONFIG_LOWMEM_SIZE_BOOL is not set
+CONFIG_LOWMEM_SIZE=0x30000000
+# CONFIG_KERNEL_START_BOOL is not set
+CONFIG_KERNEL_START=0xc0000000
+# CONFIG_TASK_SIZE_BOOL is not set
+CONFIG_TASK_SIZE=0xc0000000
+# CONFIG_BOOT_LOAD_BOOL is not set
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# 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_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+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=m
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+# CONFIG_NF_CONNTRACK_EVENTS is not set
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+CONFIG_NF_CT_PROTO_UDPLITE=m
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_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_RATEEST is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
+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_OWNER is not set
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
+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_TIME is not set
+CONFIG_NETFILTER_XT_MATCH_U32=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_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=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_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_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration
+#
+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_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 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=m
+CONFIG_VLAN_8021Q=m
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+CONFIG_LLC2=m
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+CONFIG_NET_SCHED=y
+
+#
+# Queueing/Scheduling
+#
+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
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+# CONFIG_NET_CLS_FLOW is not set
+CONFIG_NET_EMATCH=y
+CONFIG_NET_EMATCH_STACK=32
+CONFIG_NET_EMATCH_CMP=m
+CONFIG_NET_EMATCH_NBYTE=m
+CONFIG_NET_EMATCH_U32=m
+CONFIG_NET_EMATCH_META=m
+CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=m
+CONFIG_NET_ACT_GACT=m
+CONFIG_GACT_PROB=y
+CONFIG_NET_ACT_MIRRED=m
+CONFIG_NET_ACT_IPT=m
+# CONFIG_NET_ACT_NAT is not set
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_ACT_SIMP=m
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_SCH_FIFO=y
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+CONFIG_FIB_RULES=y
+
+#
+# Wireless
+#
+CONFIG_CFG80211=y
+CONFIG_NL80211=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_MAC80211=m
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_SIMPLE is not set
+# CONFIG_MAC80211_RC_DEFAULT_NONE is not set
+
+#
+# Selecting 'y' for an algorithm will
+#
+
+#
+# build the algorithm into mac80211.
+#
+CONFIG_MAC80211_RC_DEFAULT="pid"
+CONFIG_MAC80211_RC_PID=y
+# CONFIG_MAC80211_RC_SIMPLE is not set
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT 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
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_OF_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT 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
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0xfe000000
+CONFIG_MTD_PHYSMAP_LEN=0x0800000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PHYSMAP_OF is not set
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 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_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_CAFE is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_NAND_FSL_ELBC is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+CONFIG_OF_DEVICE=y
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_FD is not set
+# 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=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+CONFIG_EEPROM_93CX6=m
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=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=y
+# 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=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SVW is not set
+# CONFIG_ATA_PIIX is not set
+# CONFIG_SATA_MV is not set
+# CONFIG_SATA_NV is not set
+# CONFIG_PDC_ADMA is not set
+# CONFIG_SATA_QSTOR is not set
+# CONFIG_SATA_PROMISE is not set
+# CONFIG_SATA_SX4 is not set
+# CONFIG_SATA_SIL is not set
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_SIS is not set
+# CONFIG_SATA_ULI is not set
+# CONFIG_SATA_VIA is not set
+# CONFIG_SATA_VITESSE is not set
+# CONFIG_SATA_INIC162X is not set
+CONFIG_SATA_FSL=y
+# CONFIG_PATA_ALI is not set
+# CONFIG_PATA_AMD is not set
+# CONFIG_PATA_ARTOP is not set
+# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD640_PCI is not set
+# CONFIG_PATA_CMD64X is not set
+# CONFIG_PATA_CS5520 is not set
+# CONFIG_PATA_CS5530 is not set
+# CONFIG_PATA_CYPRESS is not set
+# CONFIG_PATA_EFAR is not set
+# CONFIG_ATA_GENERIC is not set
+# CONFIG_PATA_HPT366 is not set
+# CONFIG_PATA_HPT37X is not set
+# CONFIG_PATA_HPT3X2N is not set
+# CONFIG_PATA_HPT3X3 is not set
+# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_IT8213 is not set
+# CONFIG_PATA_JMICRON is not set
+# CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
+# CONFIG_PATA_MPIIX is not set
+# CONFIG_PATA_OLDPIIX is not set
+# CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NINJA32 is not set
+# CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_NS87415 is not set
+# CONFIG_PATA_OPTI is not set
+# CONFIG_PATA_OPTIDMA is not set
+# CONFIG_PATA_PDC_OLD is not set
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+# CONFIG_PATA_SERVERWORKS is not set
+# CONFIG_PATA_PDC2027X is not set
+# CONFIG_PATA_SIL680 is not set
+# CONFIG_PATA_SIS is not set
+# CONFIG_PATA_VIA is not set
+# CONFIG_PATA_WINBOND is not set
+# CONFIG_PATA_PLATFORM is not set
+# CONFIG_MD is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_IFB 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_VETH is not set
+# CONFIG_ARCNET is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+CONFIG_CICADA_PHY=y
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+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_ENC28J60 is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+CONFIG_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_EEPRO100 is not set
+CONFIG_E100=y
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_R6040 is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_SC92031 is not set
+CONFIG_NETDEV_1000=y
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_E1000E is not set
+# CONFIG_E1000E_ENABLED is not set
+# CONFIG_IP1000 is not set
+# CONFIG_IGB 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_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_BNX2X is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_IPW2100=m
+CONFIG_IPW2100_MONITOR=y
+# CONFIG_IPW2100_DEBUG is not set
+CONFIG_IPW2200=m
+CONFIG_IPW2200_MONITOR=y
+CONFIG_IPW2200_RADIOTAP=y
+CONFIG_IPW2200_PROMISCUOUS=y
+CONFIG_IPW2200_QOS=y
+# CONFIG_IPW2200_DEBUG is not set
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+# CONFIG_LIBERTAS_SDIO is not set
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_NORTEL_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+CONFIG_PRISM54=m
+CONFIG_USB_ZD1201=m
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_RTL8180 is not set
+CONFIG_RTL8187=m
+# CONFIG_ADM8211 is not set
+# CONFIG_P54_COMMON is not set
+# CONFIG_ATH5K is not set
+# CONFIG_IWL4965 is not set
+# CONFIG_IWL3945 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_HOSTAP_PLX=m
+CONFIG_HOSTAP_PCI=m
+CONFIG_BCM43XX=m
+CONFIG_BCM43XX_DEBUG=y
+CONFIG_BCM43XX_DMA=y
+CONFIG_BCM43XX_PIO=y
+CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
+# CONFIG_BCM43XX_DMA_MODE is not set
+# CONFIG_BCM43XX_PIO_MODE is not set
+# CONFIG_B43 is not set
+# CONFIG_B43LEGACY is not set
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
+# CONFIG_RT2X00 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 is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+CONFIG_PPPOL2TP=m
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NET_FC is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+# CONFIG_SERIAL_OF_PLATFORM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_RMEM=m
+CONFIG_ALLOC_RTSJ_MEM=m
+CONFIG_DEVPORT=y
+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_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_MPC83xx=y
+
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_AT25=m
+CONFIG_SPI_SPIDEV=m
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_MATROX is not set
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS2482 is not set
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+# CONFIG_W1_SLAVE_DS2760 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID 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_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_I5K_AMB is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S 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=m
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_83xx_WDT=y
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 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_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+# CONFIG_USB_HID is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES 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_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_EHCI_FSL=y
+CONFIG_USB_EHCI_HCD_PPC_OF=y
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PPC_OF=y
+CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
+# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
+CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=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_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_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_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_NET2280=y
+# 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
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+CONFIG_MMC=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
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_WBSD is not set
+# CONFIG_MMC_TIFM_SD is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK is not set
+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
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+CONFIG_RTC_INTF_DEV_UIE_EMUL=y
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+CONFIG_RTC_DRV_DS1307=y
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_DMADEVICES=y
+
+#
+# DMA Devices
+#
+CONFIG_FSL_DMA=y
+CONFIG_FSL_DMA_SELFTEST=y
+CONFIG_DMA_ENGINE=y
+
+#
+# DMA Clients
+#
+# CONFIG_NET_DMA is not set
+
+#
+# Userspace I/O
+#
+CONFIG_UIO=m
+CONFIG_UIO_CIF=m
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS 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_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=y
+# 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_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=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_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_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# 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_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+CONFIG_LDM_PARTITION=y
+# CONFIG_LDM_DEBUG is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 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=y
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+CONFIG_NLS_ISO8859_8=y
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_CRC7=m
+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
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+CONFIG_STACKTRACE=y
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_TRACING=y
+CONFIG_CONTEXT_SWITCH_TRACER=y
+CONFIG_EVENT_TRACER=y
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_PREEMPT_TRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUGGER is not set
+CONFIG_VIRQ_DEBUG=y
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_BLKCIPHER=y
+# CONFIG_CRYPTO_SEQIV is not set
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_CCM is not set
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
+# CONFIG_PPC_CLOCK is not set
diff --git a/packages/linux/linux-rt_2.6.24.bb b/packages/linux/linux-rt_2.6.24.bb
index bddb16fdf0..83483bb0f5 100644
--- a/packages/linux/linux-rt_2.6.24.bb
+++ b/packages/linux/linux-rt_2.6.24.bb
@@ -4,18 +4,20 @@ require linux.inc
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_mpc8313e-rdb = "1"
-PR = "r3"
+PR = "r4"
-SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.3.tar.bz2 \
- ${KERNELORG_MIRROR}/pub/linux/kernel/projects/rt/patch-2.6.24.3-rt3.bz2;patch=1;p=1 \
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
+ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-2.6.24.7.bz2;patch=1;p=1 \
+ ${KERNELORG_MIRROR}/pub/linux/kernel/projects/rt/patch-2.6.24.7-rt11.bz2;patch=1;p=1 \
http://kamikaze.waninkoko.info/patches/2.6.24/kamikaze1/broken-out/squashfs-lzma-2.6.24.patch;patch=1 \
- file://sysctl_missing_include.patch;patch=1 \
file://powerpc-clockres.patch;patch=1 \
file://leds-cpu-activity.patch;patch=1 \
file://leds-cpu-activity-powerpc.patch;patch=1 \
file://defconfig"
-S = "${WORKDIR}/linux-2.6.24.3"
+# file://sysctl_missing_include.patch;patch=1 \
+
+S = "${WORKDIR}/linux-2.6.24"
SRC_URI_append_mpc8313e-rdb = "\
file://mpc8313e-rdb-leds.patch;patch=1"
diff --git a/packages/linux/linux-rt_2.6.25.bb b/packages/linux/linux-rt_2.6.25.bb
new file mode 100644
index 0000000000..6ce3edf249
--- /dev/null
+++ b/packages/linux/linux-rt_2.6.25.bb
@@ -0,0 +1,21 @@
+require linux.inc
+
+# Linux kernel using the PREEMPT RT patch
+
+# Mark archs/machines that this kernel supports
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_mpc8315e-rdb = "1"
+DEFAULT_PREFERENCE_efika = "1"
+
+PR = "r3"
+
+#KERNEL_IMAGETYPE_efika = "Image"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2 \
+ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-2.6.25.4.bz2;patch=1;p=1 \
+ ${KERNELORG_MIRROR}/pub/linux/kernel/projects/rt/patch-2.6.25.4-rt6.bz2;patch=1;p=1 \
+ file://defconfig"
+
+S = "${WORKDIR}/linux-2.6.25"
+
+
diff --git a/packages/linux/linux-xilinx-slab/.mtn2git_empty b/packages/linux/linux-xilinx-slab/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-xilinx-slab/.mtn2git_empty
diff --git a/packages/linux/linux-ml403-slab-2.6.x/xilinx-ml403_defconfig b/packages/linux/linux-xilinx-slab/xilinx-ml403_defconfig
index 3babe21954..3babe21954 100644
--- a/packages/linux/linux-ml403-slab-2.6.x/xilinx-ml403_defconfig
+++ b/packages/linux/linux-xilinx-slab/xilinx-ml403_defconfig
diff --git a/packages/linux/linux-xilinx-slab_git.bb b/packages/linux/linux-xilinx-slab_git.bb
new file mode 100644
index 0000000000..df71fee865
--- /dev/null
+++ b/packages/linux/linux-xilinx-slab_git.bb
@@ -0,0 +1,48 @@
+#Kernel for the xilinx-ml403 board using SecretLabs git tree
+# Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+SECTION = "kernel"
+DESCRIPTION = "Linux kernel for Xilinx ML403 Virtex 4 fpga board"
+LICENSE = "GPL"
+
+SRCREV = "d7ed933b578d9c4dec0e23a5a6f78c464b31c47c"
+
+PR = "r3"
+PV = "2.6.25+2.6.26+${PR}+git${SRCREV}"
+
+COMPATIBLE_MACHINE = "xilinx-ml403"
+
+#inherit kernel xilinx-bsp
+inherit kernel
+
+S = "${WORKDIR}/git"
+
+
+FILES_kernel-image = "/boot/zImage.elf"
+
+export OS = "Linux"
+ARCH = "ppc"
+KERNEL_IMAGETYPE = "zImage"
+KERNEL_OUTPUT = "arch/ppc/boot/images/zImage.elf"
+
+SRC_URI = "\
+ git://git.secretlab.ca/git/linux-2.6-virtex.git;protocol=git \
+ "
+
+do_configure() {
+
+ make ARCH=${ARCH} ml403_defconfig
+}
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
+ ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}
+}
+
+#seems like 2.6.21 kernel images have moved (or is this only for the Denx kernel ?)
+#so we need to copy the kernel image where kernel.bbclass expects it to be
+#do_install_prepend() {
+# install -m 0644 arch/${ARCH}/boot/images/${KERNEL_IMAGETYPE}.elf \
+# arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
+#}
diff --git a/packages/linux/linux.inc b/packages/linux/linux.inc
index 8dfa25c17a..a6bffe728a 100644
--- a/packages/linux/linux.inc
+++ b/packages/linux/linux.inc
@@ -20,7 +20,10 @@ CMDLINE_append = " ${CMDLINE_DEBUG} "
# Support for binary device tree generation
+FILES_kernel-devicetree = "/boot/devicetree*"
+
KERNEL_DEVICETREE_mpc8313e-rdb = "arch/${ARCH}/boot/dts/mpc8313erdb.dts"
+KERNEL_DEVICETREE_mpc8315e-rdb = "arch/${ARCH}/boot/dts/mpc8315erdb.dts"
KERNEL_DEVICETREE_mpc8323e-rdb = "arch/${ARCH}/boot/dts/mpc832x_rdb.dts"
KERNEL_DEVICETREE_kilauea = "arch/${ARCH}/boot/dts/kilauea.dts"
KERNEL_DEVICETREE_sequoia = "arch/${ARCH}/boot/dts/sequoia.dts"
@@ -34,8 +37,9 @@ python __anonymous () {
devicetree = bb.data.getVar('KERNEL_DEVICETREE', d, 1) or ''
if devicetree:
depends = bb.data.getVar("DEPENDS", d, 1)
- depends = "%s dtc-native" % depends
- bb.data.setVar("DEPENDS", depends, d)
+ bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d)
+ packages = bb.data.getVar("PACKAGES", d, 1)
+ bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d)
}
do_configure_prepend() {
@@ -127,13 +131,23 @@ do_compile_append() {
}
do_devicetree_image() {
- if test -n "${KERNEL_DEVICETREE}" ; then
- dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_DEVICETREE}
-
- cd ${DEPLOY_DIR_IMAGE}
- rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
- ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
- fi
+ if test -n "${KERNEL_DEVICETREE}" ; then
+ dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE}
+ install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION}
+ install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ fi
}
addtask devicetree_image after do_deploy before do_package
+
+pkg_postinst_kernel-devicetree () {
+ cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/devicetree devicetree devicetree-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+}
+
+pkg_postrm_kernel-devicetree () {
+ cd /${KERNEL_IMAGEDEST}; update-alternatives --remove devicetree devicetree-${KERNEL_VERSION} || true
+}
+
diff --git a/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb
index da3f9772d3..cf9ef31c95 100644
--- a/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb
+++ b/packages/linux/unslung-kernel_2.4.22.l2.3r63.bb
@@ -1,7 +1,7 @@
SECTION = "kernel"
DESCRIPTION = "Vendor-compatible Linux kernel for the Linksys NSLU2 device"
LICENSE = "GPL"
-PR = "r21"
+PR = "r22"
COMPATIBLE_HOST = 'arm.*-linux'
COMPATIBLE_MACHINE = "nslu2"
@@ -49,5 +49,5 @@ do_configure_prepend() {
rm -rf ${S}/include/asm-arm/arch ${S}/include/asm-arm/proc \
${S}/include/asm-arm/.proc ${S}/include/asm-arm/.arch
}
-KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX}-${DATETIME}.bin"
-KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX}.bin"
+KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX}-${DATETIME}"
+KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-${KERNEL_SUFFIX}"
diff --git a/packages/m4/m4-native_1.4.11.bb b/packages/m4/m4-native_1.4.11.bb
new file mode 100644
index 0000000000..8beb8748e3
--- /dev/null
+++ b/packages/m4/m4-native_1.4.11.bb
@@ -0,0 +1,19 @@
+require m4_${PV}.bb
+
+inherit native
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/m4"
+
+INHIBIT_AUTOTOOLS_DEPS = "1"
+DEPENDS += "gnu-config-native"
+
+do_configure() {
+ install -m 0644 ${STAGING_DATADIR}/gnu-config/config.sub .
+ install -m 0644 ${STAGING_DATADIR}/gnu-config/config.guess .
+ oe_runconf
+}
+
+do_stage() {
+ install -m 0755 src/m4 ${STAGING_BINDIR}/
+}
+
diff --git a/packages/m4/m4_1.4.11.bb b/packages/m4/m4_1.4.11.bb
new file mode 100644
index 0000000000..77d8e822b0
--- /dev/null
+++ b/packages/m4/m4_1.4.11.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro \
+processor."
+LICENSE = "GPL"
+SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz"
+S = "${WORKDIR}/m4-${PV}"
+
+inherit autotools
+
+EXTRA_OEMAKE += "'infodir=${infodir}'"
+
+do_configure() {
+ oe_runconf
+}
diff --git a/packages/makedevs/makedevs_1.0.0.bb b/packages/makedevs/makedevs_1.0.0.bb
index c78b73b6e7..a80a518709 100644
--- a/packages/makedevs/makedevs_1.0.0.bb
+++ b/packages/makedevs/makedevs_1.0.0.bb
@@ -11,7 +11,7 @@ do_configure() {
}
do_compile() {
- ${CC} ${CFLAGS} -o ${S}/makedevs ${S}/makedevs.c
+ ${CC} ${CFLAGS} -L${STAGING_LIBDIR}/ -o ${S}/makedevs ${S}/makedevs.c
}
do_install() {
diff --git a/packages/meta/meta-toolchain-slugos.bb b/packages/meta/meta-toolchain-slugos.bb
new file mode 100644
index 0000000000..60326c0bc1
--- /dev/null
+++ b/packages/meta/meta-toolchain-slugos.bb
@@ -0,0 +1,10 @@
+PR = "r0"
+
+TOOLCHAIN_HOST_TASK = "task-slugos-toolchain-host"
+
+# TBD: need to determine minimal library set to provide;
+# uncomment next line and bump PR when this is done.
+#TOOLCHAIN_TARGET_TASK = "task-slugos-toolchain-target"
+
+require meta-toolchain.bb
+SDK_SUFFIX = "toolchain-slugos" \ No newline at end of file
diff --git a/packages/meta/meta-toolchain.bb b/packages/meta/meta-toolchain.bb
index 6e6ebca51b..1fa4cdb63e 100644
--- a/packages/meta/meta-toolchain.bb
+++ b/packages/meta/meta-toolchain.bb
@@ -31,9 +31,11 @@ do_populate_sdk() {
revipkgarchs="$arch $revipkgarchs"
done
+ mkdir -p ${SDK_OUTPUT}/usr/lib/opkg
${IPKG_HOST} update
${IPKG_HOST} -force-depends install ${TOOLCHAIN_HOST_TASK}
+ mkdir -p ${SDK_OUTPUT}/${SDK_PREFIX}/${TARGET_SYS}/usr/lib/opkg
${IPKG_TARGET} update
${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK}
diff --git a/packages/meta/slugos-packages.bb b/packages/meta/slugos-packages.bb
index 7fc6fef26c..946b51b210 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 = "r54"
+PR = "r57"
CONFLICTS = "db3"
COMPATIBLE_MACHINE = "nslu2|ixp4xx"
@@ -53,6 +53,7 @@ SLUGOS_PACKAGES = "\
bonnie++ \
boost \
bridge-utils \
+ bwmon \
bzip2 \
ccxstream \
cdparanoia \
@@ -61,7 +62,6 @@ SLUGOS_PACKAGES = "\
coreutils \
cron \
cryptsetup \
- ctorrent \
ctrlproxy \
cups \
curl \
@@ -81,6 +81,7 @@ SLUGOS_PACKAGES = "\
expat \
ez-ipupdate \
fconfig \
+ fetchmail \
file \
findutils \
fis \
@@ -134,7 +135,6 @@ SLUGOS_PACKAGES = "\
libvorbis \
libxml2 \
lighttpd \
- linphone \
litestream \
logrotate \
lrzsz \
@@ -189,7 +189,6 @@ SLUGOS_PACKAGES = "\
pkgconfig \
popt \
portmap \
- postfix \
ppp \
procps \
psmisc \
@@ -219,6 +218,7 @@ SLUGOS_PACKAGES = "\
stunnel \
sudo \
sysfsutils \
+ syslog-ng \
tar \
task-mokogateway-everything \
tcpdump \
@@ -246,7 +246,6 @@ SLUGOS_PACKAGES = "\
wview-vpro \
wview-wxt510 \
xinetd \
- yeaphone \
yp-tools ypbind ypserv \
zd1211-firmware \
zip \
@@ -255,21 +254,22 @@ SLUGOS_PACKAGES = "\
# Packages currently broken on all platforms
SLUGOS_BROKEN_PACKAGES = "\
- bwmon \
+ ctorrent \
dsniff \
eciadsl \
- fetchmail \
gspcav1 \
+ linphone \
lirc-modules lirc \
madfu \
motion \
openldap \
+ postfix \
pwc \
qc-usb-messenger \
- syslog-ng \
task-native-sdk \
unionfs-modules unionfs-utils \
wview-sim-mysql wview-wxt510-mysql wview-vpro-mysql \
+ yeaphone \
zd1211 \
"
diff --git a/packages/midpath/files/0.2+0.3rc1-fix-crlf.patch b/packages/midpath/files/0.2+0.3rc1-fix-crlf.patch
new file mode 100644
index 0000000000..7e763bd587
--- /dev/null
+++ b/packages/midpath/files/0.2+0.3rc1-fix-crlf.patch
@@ -0,0 +1,87 @@
+Index: configuration/com/sun/midp/configuration/system_properties
+===================================================================
+--- configuration/com/sun/midp/configuration/system_properties (Revision 290)
++++ configuration/com/sun/midp/configuration/system_properties (Revision 291)
+@@ -1,47 +1,47 @@
+ javax.microedition.io.Connector.protocolpath=com.sun.midp.io
+-microedition.profiles=MIDP-2.0
+-microedition.configuration=CLDC-1.1
+-microedition.locale=en-US
++microedition.profiles=MIDP-2.0
++microedition.configuration=CLDC-1.1
++microedition.locale=en-US
+ microedition.platform=j2me
+-microedition.encoding=ISO8859_1
+-microedition.hostname=localhost
++microedition.encoding=ISO8859_1
++microedition.hostname=localhost
+ microedition.commports=
+-microedition.jtwi.version=1.0
+-microedition.media.version=1.1
+-supports.mixing=true
+-supports.audio.capture=false
+-supports.video.capture=false
+-supports.recording=false
++microedition.jtwi.version=1.0
++microedition.media.version=1.1
++supports.mixing=true
++supports.audio.capture=false
++supports.video.capture=false
++supports.recording=false
+ audio.encodings=encoding=audio/wav encoding=audio/x-wav encoding=pcm encoding=audio/mp3 encoding=audio/ogg
+ video.snapshot.encodings=encoding=png encoding=image/png
+ video.encodings=
+-streamable.contents=encoding=audio/wav encoding=audio/x-wav encoding=pcm encoding=audio/mp3 encoding=audio/ogg
+-microedition.io.file.FileConnection.version=1.0
+-Bluetooth.api.version=1.1
+-obex.api.version=1.1
+-bluetooth.l2cap.receiveMTU.max=1024
+-bluetooth.master.switch=true
+-bluetooth.connected.devices.max=6
+-bluetooth.sd.trans.max=8
+-bluetooth.sd.attr.retrievable.max=16
+-bluetooth.connected.inquiry=true
+-bluetooth.connected.inquiry.scan=true
+-bluetooth.connected.page=true
+-bluetooth.connected.page.scan=true
+-microedition.m3g.version=1.1
+-microedition.location.version=1.1
+-microedition.m2g.version=1.1
+-microedition.m2g.svg.version=1.1
+-microedition.m2g.svg.baseProfile=tiny
+-xml.jaxp.subset.version=1.0
+-xml.rpc.subset.version=1.0
+-wireless.messaging.version=2.0
+-wireless.messaging.sms.smsc=+17815511212
+-wireless.messaging.mms.mmsc=+17815511212
++streamable.contents=encoding=audio/wav encoding=audio/x-wav encoding=pcm encoding=audio/mp3 encoding=audio/ogg
++microedition.io.file.FileConnection.version=1.0
++Bluetooth.api.version=1.1
++obex.api.version=1.1
++bluetooth.l2cap.receiveMTU.max=1024
++bluetooth.master.switch=true
++bluetooth.connected.devices.max=6
++bluetooth.sd.trans.max=8
++bluetooth.sd.attr.retrievable.max=16
++bluetooth.connected.inquiry=true
++bluetooth.connected.inquiry.scan=true
++bluetooth.connected.page=true
++bluetooth.connected.page.scan=true
++microedition.m3g.version=1.1
++microedition.location.version=1.1
++microedition.m2g.version=1.1
++microedition.m2g.svg.version=1.1
++microedition.m2g.svg.baseProfile=tiny
++xml.jaxp.subset.version=1.0
++xml.rpc.subset.version=1.0
++wireless.messaging.version=2.0
++wireless.messaging.sms.smsc=+17815511212
++wireless.messaging.mms.mmsc=+17815511212
+
+ # microedition.pim.version=
+ # microedition.global.version=
+-# microedition.sip.version=1.0.1
++# microedition.sip.version=1.0.1
+ #
+ # com.sun.midp.io.http.proxy=
+ # com.sun.midp.io.http.force_non_persistent=
diff --git a/packages/midpath/files/configuration_maemo.cfg b/packages/midpath/files/configuration_maemo.cfg
new file mode 100644
index 0000000000..441a9cdfc5
--- /dev/null
+++ b/packages/midpath/files/configuration_maemo.cfg
@@ -0,0 +1,123 @@
+##========================================
+## Graphics parameters
+##========================================
+javax.microedition.lcdui.screenWidth:600
+javax.microedition.lcdui.screenHeight:400
+# Toolkit configuration (possible values: SDL, virtual)
+# The toolkit parameter should be set to "virtual" unless you know what you do.
+# (to change the UI backend, see the backend parameter of the virtual toolkit below)
+javax.microedition.lcdui.toolkit:virtual
+
+##======================================
+## Parameters for the Virtual UI Toolkit
+##======================================
+# Possible backend values: NULL, SDL, AWT, AWTGRABBER, SWT, X11, GTK, QT, FB
+org.thenesis.microbackend.ui.backend:SWT
+# SDL backend configuration.
+# Possible bitsPerPixels values: 8, 16, 32
+# Possible video mode values: SW, HW (i.e software, hardware)
+org.thenesis.microbackend.ui.sdl.bitsPerPixel:32
+org.thenesis.microbackend.ui.sdl.videoMode:SW
+# X11 backend configuration.
+# Display value examples: :0.0, 192.168.0.1:1.0
+org.thenesis.microbackend.ui.x11.Display::0.0
+# Linux Framebuffer (FB) backend configuration
+# (see /proc/bus/input/devices to know which special files are
+# associated with your mouse or touchscreen)
+org.thenesis.microbackend.ui.fb.framebufferDevice:/dev/fb0
+org.thenesis.microbackend.ui.fb.keyboardDevice:/dev/tty
+org.thenesis.microbackend.ui.fb.mouseDevice:/dev/input/event1
+org.thenesis.microbackend.ui.fb.touchscreenDevice:/dev/input/event2
+# Possible fontRenderer values: raw, BDF
+org.thenesis.midpath.ui.fontRenderer:raw
+org.thenesis.midpath.font.bdf.filename:VeraMono-12-8.bdf
+
+##==========================
+## Parameters for the sound
+##==========================
+# Sound configuration (possible values: SDL, virtual)
+# The "player" parameter should be set to "virtual" unless you know what you do.
+# The virtual engine requires this hardware configuration: 16 bits, stereo, little endian
+org.thenesis.midpath.sound.engine:virtual
+# Possible sound backend values: NULL, ALSA, ESD, PulseAudio
+org.thenesis.midpath.sound.backend:NULL
+org.thenesis.midpath.sound.device:default
+org.thenesis.midpath.sound.sampleRate:44100
+# Buffer size MUST be a power of two
+org.thenesis.midpath.sound.bufferSize:8192
+
+##======================================
+## IO parameters
+##======================================
+# IO (file, socket) backends (possible values: J2SE, CLDC)
+com.sun.midp.io.backend:J2SE
+# The RMS root path (if not defined, records are read/written in the current directory)
+com.sun.midp.rms.rootPath:/home/user/
+
+##======================================
+## Location (JSR179)
+##======================================
+# Location mode (possible values: GPS, KML, LMS, NMEA)
+org.thenesis.midpath.location.mode:GPS
+# Resource file URI (KML and NMEA mode only)
+# Examples:
+# -Load a KML file in the "res" package from the java classloader:
+# org.thenesis.midpath.location.resource.uri:/res/location.kml
+# -Load a NMEA file from the file system:
+# org.thenesis.midpath.location.resource.uri:file:////absolute/path/to/location.kml
+org.thenesis.midpath.location.resource.uri:
+# Resource poll interval in milliseconds (KML, LMS, NMEA mode only)
+org.thenesis.midpath.location.resource.pollInterval:5000
+
+##======================================
+## Messaging (JSR120, JSR205)
+##======================================
+# SMS backend (possible values: NULL)
+org.thenesis.midpath.messaging.backend:NULL
+
+##======================================
+## MIDlet Suite Manager (J2SE only)
+##======================================
+# The MIDlet repository path (if not defined, MIDlets are searched in the current directory)
+org.thenesis.midpath.main.repositoryPath:/usr/share/midpath/repository
+
+##======================================
+## Event parameters
+##======================================
+javax.microedition.lcdui.pointerSupported:true
+javax.microedition.lcdui.pointerMotionSupported:true
+
+##======================================
+## Key mapping
+## (AWT codes are used by convention - see java.awt.event.KeyEvent javadocs)
+##======================================
+# Cursor left
+org.thenesis.midpath.ui.keys.LEFT:37
+# Cursor up
+org.thenesis.midpath.ui.keys.UP:38
+# Cursor right
+org.thenesis.midpath.ui.keys.RIGHT:39
+# Cursor down
+org.thenesis.midpath.ui.keys.DOWN:40
+
+# Zoom -
+org.thenesis.midpath.ui.keys.GAME_A:119
+# Minimize/Maximize
+org.thenesis.midpath.ui.keys.GAME_B:117
+# Zoom +
+org.thenesis.midpath.ui.keys.GAME_C:118
+# Cursor button
+org.thenesis.midpath.ui.keys.FIRE:10
+
+# Back button
+org.thenesis.midpath.ui.keys.SOFT_BUTTON1:27
+# Menu button
+org.thenesis.midpath.ui.keys.SOFT_BUTTON2:115
+
+# unmapped
+org.thenesis.midpath.ui.keys.STAR:0
+org.thenesis.midpath.ui.keys.POUND:0
+org.thenesis.midpath.ui.keys.DELETE:8
+org.thenesis.midpath.ui.keys.END:39
+org.thenesis.midpath.ui.keys.POWER:0
+org.thenesis.midpath.ui.keys.GAME_D:0
diff --git a/packages/midpath/files/configuration_openmoko.cfg b/packages/midpath/files/configuration_openmoko.cfg
new file mode 100644
index 0000000000..0691dca561
--- /dev/null
+++ b/packages/midpath/files/configuration_openmoko.cfg
@@ -0,0 +1,124 @@
+##========================================
+## Graphics parameters
+##========================================
+javax.microedition.lcdui.screenWidth:480
+javax.microedition.lcdui.screenHeight:330
+# Toolkit configuration (possible values: SDL, virtual)
+# The toolkit parameter should be set to "virtual" unless you know what you do.
+# (to change the UI backend, see the backend parameter of the virtual toolkit below)
+javax.microedition.lcdui.toolkit:virtual
+
+##======================================
+## Parameters for the Virtual UI Toolkit
+##======================================
+# Possible backend values: NULL, SDL, AWT, AWTGRABBER, SWT, X11, GTK, QT, FB
+org.thenesis.microbackend.ui.backend:SWT
+# SDL backend configuration.
+# Possible bitsPerPixels values: 8, 16, 32
+# Possible video mode values: SW, HW (i.e software, hardware)
+org.thenesis.microbackend.ui.sdl.bitsPerPixel:32
+org.thenesis.microbackend.ui.sdl.videoMode:SW
+# X11 backend configuration.
+# Display value examples: :0.0, 192.168.0.1:1.0
+org.thenesis.microbackend.ui.x11.Display::0.0
+# Linux Framebuffer (FB) backend configuration
+# (see /proc/bus/input/devices to know which special files are
+# associated with your mouse or touchscreen)
+org.thenesis.microbackend.ui.fb.framebufferDevice:/dev/fb0
+org.thenesis.microbackend.ui.fb.keyboardDevice:/dev/tty
+org.thenesis.microbackend.ui.fb.mouseDevice:/dev/input/event1
+org.thenesis.microbackend.ui.fb.touchscreenDevice:/dev/input/event2
+# Possible fontRenderer values: raw, BDF
+org.thenesis.midpath.ui.fontRenderer:raw
+org.thenesis.midpath.font.bdf.filename:VeraMono-12-8.bdf
+
+##==========================
+## Parameters for the sound
+##==========================
+# Sound configuration (possible values: SDL, virtual)
+# The "player" parameter should be set to "virtual" unless you know what you do.
+# The virtual engine requires this hardware configuration: 16 bits, stereo, little endian
+org.thenesis.midpath.sound.engine:virtual
+# Possible sound backend values: NULL, ALSA, ESD, PulseAudio
+org.thenesis.midpath.sound.backend:PulseAudio
+org.thenesis.midpath.sound.device:default
+org.thenesis.midpath.sound.sampleRate:44100
+# Buffer size MUST be a power of two
+org.thenesis.midpath.sound.bufferSize:8192
+
+##======================================
+## IO parameters
+##======================================
+# IO (file, socket) backends (possible values: J2SE, CLDC)
+com.sun.midp.io.backend:J2SE
+# The RMS root path (if not defined, records are read/written in the current directory)
+com.sun.midp.rms.rootPath:/home/root/
+
+##======================================
+## Location (JSR179)
+##======================================
+# Location mode (possible values: GPS, KML, LMS, NMEA)
+org.thenesis.midpath.location.mode:GPS
+# Resource file URI (KML and NMEA mode only)
+# Examples:
+# -Load a KML file in the "res" package from the java classloader:
+# org.thenesis.midpath.location.resource.uri:/res/location.kml
+# -Load a NMEA file from the file system:
+# org.thenesis.midpath.location.resource.uri:file:////absolute/path/to/location.kml
+org.thenesis.midpath.location.resource.uri:
+# Resource poll interval in milliseconds (KML, LMS, NMEA mode only)
+org.thenesis.midpath.location.resource.pollInterval:5000
+
+##======================================
+## Messaging (JSR120, JSR205)
+##======================================
+# SMS backend (possible values: NULL)
+org.thenesis.midpath.messaging.backend:NULL
+
+##======================================
+## MIDlet Suite Manager (J2SE only)
+##======================================
+# The MIDlet repository path (if not defined, MIDlets are searched in the current directory)
+org.thenesis.midpath.main.repositoryPath:/usr/share/midpath/repository
+
+##======================================
+## Event parameters
+##======================================
+javax.microedition.lcdui.pointerSupported:true
+javax.microedition.lcdui.pointerMotionSupported:true
+
+##======================================
+## Key mapping
+## (AWT codes are used by convention - see java.awt.event.KeyEvent javadocs)
+##======================================
+# 4
+org.thenesis.midpath.ui.keys.LEFT:52
+# 2
+org.thenesis.midpath.ui.keys.UP:50
+# 6
+org.thenesis.midpath.ui.keys.RIGHT:54
+# 8
+org.thenesis.midpath.ui.keys.DOWN:56
+
+# 1
+org.thenesis.midpath.ui.keys.GAME_A:49
+# 3
+org.thenesis.midpath.ui.keys.GAME_B:51
+# 7
+org.thenesis.midpath.ui.keys.GAME_C:55
+# 9
+org.thenesis.midpath.ui.keys.GAME_D:57
+# 5
+org.thenesis.midpath.ui.keys.FIRE:53
+
+# 0
+org.thenesis.midpath.ui.keys.SOFT_BUTTON1:48
+# pound/sign/#
+org.thenesis.midpath.ui.keys.SOFT_BUTTON2:520
+
+# unmapped
+org.thenesis.midpath.ui.keys.STAR:0
+org.thenesis.midpath.ui.keys.POUND:0
+org.thenesis.midpath.ui.keys.DELETE:8
+org.thenesis.midpath.ui.keys.END:39
+org.thenesis.midpath.ui.keys.POWER:0
diff --git a/packages/midpath/files/midpath-launcher-j2se b/packages/midpath/files/midpath-launcher-j2se
new file mode 100644
index 0000000000..22928a0e1e
--- /dev/null
+++ b/packages/midpath/files/midpath-launcher-j2se
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+if [ ! $LAUNCHER_CLASS ]; then
+ LAUNCHER_CLASS=org.thenesis.midpath.main.MIDletLauncher
+fi
+
+if [ ! $JAVA ]; then
+ JAVA=java
+fi
+
+JAR_HOME=/usr/share/java
+
+MIDPATH_HOME=/usr/share/midpath
+
+JLP=/usr/lib/jni
+
+# Set the classpath
+CP=\
+$MIDPATH_HOME/configuration:\
+$MIDPATH_HOME/midpath.jar:\
+$MIDPATH_HOME/microbackend.jar:\
+$MIDPATH_HOME/sdljava-cldc.jar:\
+$MIDPATH_HOME/escher-cldc.jar:\
+$MIDPATH_HOME/jlayerme-cldc.jar:\
+$MIDPATH_HOME/jorbis-cldc.jar:\
+$MIDPATH_HOME/avetanabt-cldc.jar:\
+$MIDPATH_HOME/jgl-cldc.jar:\
+$MIDPATH_HOME/jsr239-opengles-jgl.jar:\
+$MIDPATH_HOME/jsr239-opengles-core.jar:\
+$MIDPATH_HOME/jsr239-opengles-nio.jar:\
+$MIDPATH_HOME/jsr184-m3g.jar:\
+$MIDPATH_HOME/jsr205-messaging.jar:\
+$MIDPATH_HOME/jsr179-location.jar:\
+$MIDPATH_HOME/jsr226-svg-core.jar:\
+$MIDPATH_HOME/jsr226-svg-midp2.jar:\
+$JAR_HOME/kxml2.jar:\
+$JAR_HOME/xmlpull.jar:\
+$JAR_HOME/swt.jar
+
+# Add whatever is mentioned in the CLASSPATH environment variable
+if [ $CLASSPATH ]
+then
+ CP=$CP:$CLASSPATH
+fi
+
+# Add the MIDlet jar to the classpath (must be loaded by the main classloader)
+CP=$CP:$MIDPATH_HOME/repository/midpath-demos.jar
+
+$JAVA -cp $CP -Djava.library.path=$JLP $LAUNCHER_CLASS "$@"
+
diff --git a/packages/midpath/files/midpath-suitemanager b/packages/midpath/files/midpath-suitemanager
new file mode 100644
index 0000000000..41ccd5fcb6
--- /dev/null
+++ b/packages/midpath/files/midpath-suitemanager
@@ -0,0 +1,2 @@
+#!/bin/sh
+LAUNCHER_CLASS=org.thenesis.midpath.main.SuiteManager midpath-launcher-j2se "$@"
diff --git a/packages/midpath/files/midpath-suitemanager.desktop b/packages/midpath/files/midpath-suitemanager.desktop
new file mode 100644
index 0000000000..3d7833e74e
--- /dev/null
+++ b/packages/midpath/files/midpath-suitemanager.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=MIDPath SuiteManager
+Comment=Manage MIDlets
+Exec=midpath-suitemanager
+Icon=midpath
+Terminal=false
+Type=Application
+Categories=GTK;Office;
+X-SingleInstance=true
+StartupNotify=true
+
diff --git a/packages/midpath/files/midpath.png b/packages/midpath/files/midpath.png
new file mode 100644
index 0000000000..0066fe4f29
--- /dev/null
+++ b/packages/midpath/files/midpath.png
Binary files differ
diff --git a/packages/midpath/files/shellscript.patch b/packages/midpath/files/shellscript.patch
deleted file mode 100644
index 17c39d0810..0000000000
--- a/packages/midpath/files/shellscript.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Index: midpath-0.1/bin/midpath-test-cacao-cldc.sh
-===================================================================
---- midpath-0.1.orig/bin/midpath-test-cacao-cldc.sh 2007-07-03 22:09:33.000000000 +0200
-+++ midpath-0.1/bin/midpath-test-cacao-cldc.sh 2007-08-24 22:31:32.000000000 +0200
-@@ -3,19 +3,13 @@
- # Adapt the next line to your environment
- JAVA_CMD=cacao
-
--if [ "$MIDPATH_HOME" = "" ]; then
-- MIDPATH_HOME=$(pwd)/..
--fi
-+MIDPATH_HOME=
-
- # Set the classpath
--BCP=$MIDPATH_HOME/dist/cldc1.1.jar:$MIDPATH_HOME/dist/midpath.jar:$MIDPATH_HOME/resources-embedded:$MIDPATH_HOME/dist/sdljava-cldc.jar:$MIDPATH_HOME/dist/escher-x11-cldc.jar:$MIDPATH_HOME/dist/kxml2-2.3.0.jar
-+BCP=$MIDPATH_HOME/cldc1.1.jar:$MIDPATH_HOME/midpath.jar:$MIDPATH_HOME/resources-embedded:$MIDPATH_HOME/sdljava-cldc.jar:$MIDPATH_HOME/escher-x11-cldc.jar:$MIDPATH_HOME/kxml2-2.3.0.jar
- # Add the MIDlet jar to the classpath (must be loaded by the main
- # classloader yet)
--BCP=$BCP:$MIDPATH_HOME/dist/midpath-tests.jar
--
--# Path of the native libraries
--JLP=$MIDPATH_HOME/dist
--export LD_LIBRARY_PATH=$JLP
-+BCP=$BCP:$MIDPATH_HOME/midpath-tests.jar
-
- CLASS=org.thenesis.midpath.main.StandardMIDletLauncher
- # The classname of the MIDlet (we have to set it manually yet)
diff --git a/packages/midpath/midpath-alsa_0.1.bb b/packages/midpath/midpath-alsa_0.1.bb
deleted file mode 100644
index 1ccace8500..0000000000
--- a/packages/midpath/midpath-alsa_0.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-
-require midpath_${PV}.bb
-
-DEPENDS += "alsa-lib"
-RDEPENDS = "alsa-lib"
-
-do_configure() {
- cd ${S}/native/alsa
- sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" Makefile
- cd ${S}/resources-embedded/com/sun/midp/configuration
- sed -i -e "s|sound.backend:NULL|sound.backend:ALSA|" configuration.cfg
-}
-
-do_compile() {
-
-# Build the ALSA native part
-cd ${S}/native/alsa
-make || exit 1
-
-}
-
-do_install() {
- install -d ${D}${libdir}
- install -m 0644 ${S}/native/alsa/libmidpathalsa.so ${D}${libdir}
- install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration
- install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/
-}
-
-do_stage() {
- :
-}
-
-
-FILES_${PN} = "${libdir}/libmidpathalsa.so \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
- "
-
-CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg"
diff --git a/packages/midpath/midpath-backend-alsa_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-alsa_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..664fb242e1
--- /dev/null
+++ b/packages/midpath/midpath-backend-alsa_0.2+0.3rc1.bb
@@ -0,0 +1,43 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "classpath linux-libc-headers"
+
+do_compile() {
+ # Only ALSA backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --alsa
+}
+
+do_install() {
+ oe_libinstall -C dist -so libmidpathalsa ${D}${libdir_jni}
+}
+
+do_stage() {
+ :
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir_jni}/lib*.so"
+FILES_${PN}-dbg = "${libdir_jni}/.debug/lib*.so"
diff --git a/packages/midpath/midpath-backend-escher_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-escher_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..18f448c1ec
--- /dev/null
+++ b/packages/midpath/midpath-backend-escher_0.2+0.3rc1.bb
@@ -0,0 +1,42 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS += "midpath-cldc"
+
+do_compile() {
+ # Only escher-cldc is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/escher-cldc.jar ${D}${datadir}/midpath
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/escher-cldc.jar ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/midpath/escher-cldc.jar"
diff --git a/packages/midpath/midpath-backend-esd_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-esd_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..79994d1395
--- /dev/null
+++ b/packages/midpath/midpath-backend-esd_0.2+0.3rc1.bb
@@ -0,0 +1,44 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "classpath esound"
+
+do_compile() {
+ # Only native esd backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --esd
+}
+
+do_install() {
+ oe_libinstall -C dist -so libmidpathesd ${D}${libdir_jni}
+}
+
+do_stage() {
+ :
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir_jni}/lib*.so"
+FILES_${PN}-dbg = "${libdir_jni}/.debug/lib*.so"
+
diff --git a/packages/midpath/midpath-backend-fb_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-fb_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..c2fd6376a3
--- /dev/null
+++ b/packages/midpath/midpath-backend-fb_0.2+0.3rc1.bb
@@ -0,0 +1,43 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "classpath linux-libc-headers"
+
+do_compile() {
+ # Only native framebuffer backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --fb
+}
+
+do_install() {
+ oe_libinstall -C dist -so libmicrobackendfb ${D}${libdir_jni}
+}
+
+do_stage() {
+ :
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir_jni}/lib*.so"
+FILES_${PN}-dbg = "${libdir_jni}/.debug/lib*.so"
diff --git a/packages/midpath/midpath-backend-gtk-hildon_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-gtk-hildon_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..2e7c8bb53b
--- /dev/null
+++ b/packages/midpath/midpath-backend-gtk-hildon_0.2+0.3rc1.bb
@@ -0,0 +1,34 @@
+require midpath-backend-gtk_${PV}.bb
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+PROVIDES = "midpath-backend-gtk"
+
+DEPENDS += "libhildon libhildonfm"
+
+do_compile() {
+ # Only native gtk backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --gtk \
+ --enable-hildon
+}
+
diff --git a/packages/midpath/midpath-backend-gtk_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-gtk_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..619f56ffa7
--- /dev/null
+++ b/packages/midpath/midpath-backend-gtk_0.2+0.3rc1.bb
@@ -0,0 +1,44 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "classpath gtk+"
+
+do_compile() {
+ # Only native gtk backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --gtk
+}
+
+do_install() {
+ oe_libinstall -C dist -so libmicrobackendgtk ${D}${libdir_jni}
+}
+
+do_stage() {
+ :
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir_jni}/lib*.so"
+FILES_${PN}-dbg = "${libdir_jni}/.debug/lib*.so"
+
diff --git a/packages/midpath/midpath-backend-pulseaudio_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-pulseaudio_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..9f169c652e
--- /dev/null
+++ b/packages/midpath/midpath-backend-pulseaudio_0.2+0.3rc1.bb
@@ -0,0 +1,44 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "classpath pulseaudio"
+
+do_compile() {
+ # Only native pulseaudio backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --pulse
+}
+
+do_install() {
+ oe_libinstall -C dist -so libmidpathpulse ${D}${libdir_jni}
+}
+
+do_stage() {
+ :
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir_jni}/lib*.so"
+FILES_${PN}-dbg = "${libdir_jni}/.debug/lib*.so"
+
diff --git a/packages/midpath/midpath-backend-qt3x11_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-qt3x11_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..3f1c0e594f
--- /dev/null
+++ b/packages/midpath/midpath-backend-qt3x11_0.2+0.3rc1.bb
@@ -0,0 +1,47 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "classpath qt-mt"
+RCONFLICTS = "midpath-backend-qte"
+
+inherit qt3x11
+
+do_compile() {
+ # Only native qt3 backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --qt3
+}
+
+do_install() {
+ oe_libinstall -C dist -so libmidpathqt ${D}${libdir_jni}
+}
+
+do_stage() {
+ :
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir_jni}/lib*.so"
+FILES_${PN}-dbg = "${libdir_jni}/.debug/lib*.so"
+
diff --git a/packages/midpath/midpath-backend-qt4x11_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-qt4x11_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..ba12796d28
--- /dev/null
+++ b/packages/midpath/midpath-backend-qt4x11_0.2+0.3rc1.bb
@@ -0,0 +1,46 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "classpath qt-mt"
+
+inherit qt4x11
+
+do_compile() {
+ # Only native qt4 backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --qt4
+}
+
+do_install() {
+ oe_libinstall -C dist -so libmidpathqt4 ${D}${libdir_jni}
+}
+
+do_stage() {
+ :
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir_jni}/lib*.so"
+FILES_${PN}-dbg = "${libdir_jni}/.debug/lib*.so"
+
diff --git a/packages/midpath/midpath-backend-qte_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-qte_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..c812b34234
--- /dev/null
+++ b/packages/midpath/midpath-backend-qte_0.2+0.3rc1.bb
@@ -0,0 +1,47 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "classpath qt-mt"
+RCONFLICTS = "midpath-backend-qt3"
+
+inherit qt3e
+
+do_compile() {
+ # Only native qt3 backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --qte
+}
+
+do_install() {
+ oe_libinstall -C dist -so libmidpathqt ${D}${libdir_jni}
+}
+
+do_stage() {
+ :
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir_jni}/lib*.so"
+FILES_${PN}-dbg = "${libdir_jni}/.debug/lib*.so"
+
diff --git a/packages/midpath/midpath-backend-sdl_0.2+0.3rc1.bb b/packages/midpath/midpath-backend-sdl_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..723fd41e43
--- /dev/null
+++ b/packages/midpath/midpath-backend-sdl_0.2+0.3rc1.bb
@@ -0,0 +1,59 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS += "midpath-cldc virtual/libsdl libsdl-mixer libsdl-ttf libsdl-image libsdl-gfx"
+
+RDEPENDS_${PN} = "${PN}-jni"
+
+do_compile() {
+ # Only sdljava-cldc and native SDL backend library is enabled
+ midpath_build \
+ --disable-cldc \
+ --disable-midpath \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --sdl \
+ --with-sdl-include="`sdl-config --cflags`"
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/sdljava-cldc.jar ${D}${datadir}/midpath
+
+ install -d ${D}${libdir_jni}
+ oe_libinstall -C dist -so libsdljava ${D}${libdir_jni}
+ oe_libinstall -C dist -so libsdljava_mixer ${D}${libdir_jni}
+ oe_libinstall -C dist -so libsdljava_ttf ${D}${libdir_jni}
+ oe_libinstall -C dist -so libsdljava_image ${D}${libdir_jni}
+ oe_libinstall -C dist -so libsdljava_gfx ${D}${libdir_jni}
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/sdljava-cldc.jar ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN} ${PN}-jni ${PN}-jni-dbg"
+
+FILES_${PN} = "\
+ ${datadir}/midpath/sdljava-cldc.jar \
+ "
+
+FILES_${PN}-jni = "${libdir_jni}/lib*.so"
+FILES_${PN}-jni-dbg = "${libdir_jni}/.debug/lib*.so"
+
diff --git a/packages/midpath/midpath-cldc-native_0.1.bb b/packages/midpath/midpath-cldc-native_0.1.bb
deleted file mode 100644
index 4e54497bde..0000000000
--- a/packages/midpath/midpath-cldc-native_0.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-
-inherit native
-
-require midpath-cldc_${PV}.bb
-
-
-PACKAGES = "${PN}-dbg "
-
-do_install() {
- :
-}
diff --git a/packages/midpath/midpath-cldc-sdl_0.1.bb b/packages/midpath/midpath-cldc-sdl_0.1.bb
deleted file mode 100644
index 6d777f6e8c..0000000000
--- a/packages/midpath/midpath-cldc-sdl_0.1.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-
-require midpath.inc
-
-do_configure() {
-
- cd ${S}/resources-embedded/com/sun/midp/configuration
- sed -i -e "s|ui.backend:AWT|ui.backend:SDL|" \
- -e "s|bitsPerPixel:32|bitsPerPixel:16|" \
- configuration.cfg
-
-}
-
-
-do_compile() {
-
-# Build SDLJava for CLDC
-cd ${S}/external/sdljava-cldc
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH}:${GNU_CLASSPATH_PATH} -sourcepath ${S}/external/sdljava-cldc -source 1.3 -target 1.1" || exit 1
-make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH}:${GNU_CLASSPATH_PATH} -source 1.3 -target 1.1" JAR_FILE="sdljava-cldc.jar" JAR_FLAGS="cvf" || exit 1
-
-}
-
-do_install() {
- install -d ${D}${datadir}/java
- install -m 0644 ${S}/external/sdljava-cldc/sdljava-cldc.jar ${D}${datadir}/java
- install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration
- install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/
-}
-
-do_stage() {
- install -d ${STAGING_DATADIR}/java
- install -m 0644 ${S}/external/sdljava-cldc/sdljava-cldc.jar ${STAGING_DATADIR}/java
-}
-
-
-FILES_${PN} = "${datadir}/java/sdljava-cldc.jar \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
- "
-
-CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg"
diff --git a/packages/midpath/midpath-cldc-x11_0.1.bb b/packages/midpath/midpath-cldc-x11_0.1.bb
deleted file mode 100644
index 7aa8e9c6d9..0000000000
--- a/packages/midpath/midpath-cldc-x11_0.1.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-
-require midpath.inc
-
-DEPENDS += "virtual/libx11 midpath-cldc"
-
-do_configure() {
-
- cd ${S}/resources-embedded/com/sun/midp/configuration
- sed -i -e "s|ui.backend:AWT|ui.backend:X11|" configuration.cfg
-
-}
-
-do_compile() {
-
-# Build Escher X11 library
-cd ${S}/external/escher-cldc/core
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -sourcepath ${S}/external/escher-cldc/core -source 1.3 -target 1.1" || exit 1
-make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="escher-x11-cldc.jar" JAR_FLAGS="cvf" || exit 1
-
-}
-
-do_install() {
- install -d ${D}${datadir}
- install -m 0644 ${S}/external/escher-cldc/core/escher-x11-cldc.jar ${D}${datadir}
- install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration
- install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/
-}
-
-do_stage() {
- install -d ${STAGING_DATADIR}/java
- install -m 0644 ${S}/external/escher-cldc/core/escher-x11-cldc.jar ${STAGING_DATADIR}/java
-}
-
-
-FILES_${PN} = "${datadir}/java/escher-x11-cldc.jar \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
- "
diff --git a/packages/midpath/midpath-cldc_0.1.bb b/packages/midpath/midpath-cldc_0.1.bb
deleted file mode 100644
index e18d42781d..0000000000
--- a/packages/midpath/midpath-cldc_0.1.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-
-require midpath.inc
-
-do_compile() {
-
-mkdir -p ${S}/dist
-
-# Build CLDC1.1
-# Build base classes
-cd ${S}/external/cldc1.1/src
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath . -source 1.3 -target 1.1" || exit 1
-make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath . -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes || exit 1
-# Build CLDC extra classes for MIDP2
-cd ${S}/src/cldc-glue
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -sourcepath ${S}/src/cldc-glue -source 1.3 -target 1.1"
-make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes
-# Make a jar
-${FASTJAR_CMD} cvf ${S}/dist/midpath-cldc1.1.jar -C ${S}/external/cldc1.1/classes .
-
-
-}
-
-do_install() {
- install -d ${D}${datadir}/midpath-cldc
- install -m 0644 dist/midpath-cldc1.1.jar ${D}${datadir}/midpath-cldc
-}
-
-do_stage() {
- install -d ${STAGING_DATADIR}/midpath-cldc
- install -m 0644 dist/midpath-cldc1.1.jar ${STAGING_DATADIR}/midpath-cldc
-}
-
-
-FILES_${PN} = "${datadir}/midpath-cldc/midpath-cldc1.1.jar"
diff --git a/packages/midpath/midpath-cldc_0.2+0.3rc1.bb b/packages/midpath/midpath-cldc_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..f8dd8e6e22
--- /dev/null
+++ b/packages/midpath/midpath-cldc_0.2+0.3rc1.bb
@@ -0,0 +1,45 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DESCRIPTION = "Implementation of the CLDC profile for use in the MIDPath library"
+RPROVIDES = "midpath-cldc java-cldc1.1"
+
+JAR = "midpath-cldc1.1.jar"
+
+do_compile() {
+ midpath_build \
+ --disable-midpath \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --with-cldc-jar=dist/${JAR}
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath-cldc
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath-cldc
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath-cldc
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath-cldc
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/midpath-cldc/${JAR}"
diff --git a/packages/midpath/midpath-common.inc b/packages/midpath/midpath-common.inc
new file mode 100644
index 0000000000..1690b4fc44
--- /dev/null
+++ b/packages/midpath/midpath-common.inc
@@ -0,0 +1,33 @@
+inherit java
+
+HOMEPAGE = "http://midpath.thenesis.org/"
+LICENSE = "GPL"
+PRIORITY = "optional"
+SECTION = "interpreters"
+
+DEPENDS = "virtual/javac-native classpath-native classpath fastjar-native"
+
+GLIBJ_ZIP = "${STAGING_DATADIR}/classpath/glibj.zip"
+
+CLDC_JAR = "${STAGING_DATADIR}/midpath-cldc/midpath-cldc1.1.jar"
+
+do_unpackpost() {
+ # Remove unneccessary binary bits.
+ find lib -name "*.jar" -exec rm \{\} \;
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+midpath_build() {
+ sh build.sh \
+ --enable-fastjar \
+ --with-j2se-jar ${GLIBJ_ZIP} \
+ --with-jar=fastjar \
+ --with-javac=javac \
+ --with-cldc-jar=${CLDC_JAR} \
+ --with-midpath-jar=${STAGING_DATADIR}/midpath/midpath.jar \
+ --with-kxml="${STAGING_DATADIR_JAVA}/kxml2.jar:${STAGING_DATADIR_JAVA}/xmlpull.jar" \
+ --with-jni-include="-I${STAGING_INCDIR}/classpath" \
+ "$@"
+
+}
diff --git a/packages/midpath/midpath-core_0.2+0.3rc1.bb b/packages/midpath/midpath-core_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..d0ba53bfbd
--- /dev/null
+++ b/packages/midpath/midpath-core_0.2+0.3rc1.bb
@@ -0,0 +1,90 @@
+DESCRIPTION = "MIDPath is a Java library which provides a MIDP2 implementation"
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+require midpath-common.inc
+
+SRC_URI += "\
+ file://midpath-suitemanager \
+ file://midpath-launcher-j2se \
+ file://midpath-suitemanager.desktop \
+ file://midpath.png \
+ "
+
+PROVIDES = "java-midp2.0"
+DEPENDS += "midpath-cldc midpath-backend-sdl midpath-backend-escher swt3.4-gtk kxml2 bluez-libs"
+
+RDEPENDS += "libkxml2-java"
+
+JAR = "midpath.jar"
+
+do_compile() {
+ midpath_build \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --with-sdljava-cldc=${STAGING_DATADIR}/midpath/sdljava-cldc.jar \
+ --with-escher-cldc=${STAGING_DATADIR}/midpath/escher-cldc.jar \
+ --with-swt-jar=${STAGING_DATADIR_JAVA}/swt.jar \
+ --with-midpath-jar=${S}/dist/midpath.jar \
+ --bt
+}
+
+do_install() {
+ oe_libinstall -C dist -so libavetanabtcldc ${D}${libdir_jni}
+
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath
+ install -m 0644 dist/microbackend.jar ${D}${datadir}/midpath
+ install -m 0644 dist/avetanabt-cldc.jar ${D}${datadir}/midpath
+ install -m 0644 dist/jorbis-cldc.jar ${D}${datadir}/midpath
+ install -m 0644 dist/jlayerme-cldc.jar ${D}${datadir}/midpath
+
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/midpath-launcher-j2se ${D}${bindir}
+ install -m 0755 ${WORKDIR}/midpath-suitemanager ${D}${bindir}
+
+ install -d ${D}${datadir}/applications
+ install -m 0644 ${WORKDIR}/midpath-suitemanager.desktop ${D}${datadir}/applications
+
+ install -d ${D}${datadir}/pixmaps
+ install -m 0644 ${WORKDIR}/midpath.png ${D}${datadir}/pixmaps
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/microbackend.jar ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/avetanabt-cldc.jar ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/jorbis-cldc.jar ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/jlayerme-cldc.jar ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN}-bluetooth ${PN}-bluetooth-jni ${PN}-bluetooth-jni-dbg ${PN}-mp3 ${PN}-ogg ${PN}"
+RDEPENDS_${PN}-bluetooth = "${PN}-bluetooth-jni"
+
+FILES_${PN}-bluetooth = "${datadir}/midpath/avetanabt-cldc.jar"
+FILES_${PN}-bluetooth-jni = "${libdir_jni}/lib*.so"
+FILES_${PN}-bluetooth-jni-dbg = "${libdir_jni}/.debug/lib*.so"
+FILES_${PN}-mp3 = "${datadir}/midpath/jlayerme-cldc.jar"
+FILES_${PN}-ogg = "${datadir}/midpath/jorbis-cldc.jar"
+
+FILES_${PN} = "\
+ ${datadir}/midpath/*.jar \
+ ${datadir}/applications \
+ ${datadir}/pixmaps \
+ ${bindir} \
+ "
+
diff --git a/packages/midpath/midpath-demos_0.2+0.3rc1.bb b/packages/midpath/midpath-demos_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..1a2f690bf1
--- /dev/null
+++ b/packages/midpath/midpath-demos_0.2+0.3rc1.bb
@@ -0,0 +1,53 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS = "midpath-core midpath-location midpath-messaging midpath-svg midpath-opengles midpath-m3g"
+RDEPENDS = "midpath midpath-location midpath-messaging midpath-svg-midp midpath-opengles midpath-m3g"
+
+DESCRIPTION = "Demonstration programs of the MIDPath library"
+
+JAR = "midpath-demos.jar"
+
+do_compile() {
+ # Only Demos enabled.
+ midpath_build \
+ --disable-midpath \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --with-location-jar=${STAGING_DATADIR}/midpath/jsr179-location.jar \
+ --with-messaging-jar=${STAGING_DATADIR}/midpath/jsr205-messaging.jar \
+ --with-svg-core-jar=${STAGING_DATADIR}/midpath/jsr226-svg-core.jar \
+ --with-opengles-core-jar=${STAGING_DATADIR}/midpath/jsr239-opengles-core.jar \
+ --with-opengles-nio-jar=${STAGING_DATADIR}/midpath/jsr239-opengles-nio.jar \
+ --with-m3g-jar=${STAGING_DATADIR}/midpath/jsr184-m3g.jar \
+ --with-avetanabt-cldc-jar=${STAGING_DATADIR}/midpath/avetanabt-cldc.jar
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath/repository
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath/repository
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath/repository
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath/repository
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/midpath/repository/${JAR}"
diff --git a/packages/midpath/midpath-gtk_0.1.bb b/packages/midpath/midpath-gtk_0.1.bb
deleted file mode 100644
index 42f6325efa..0000000000
--- a/packages/midpath/midpath-gtk_0.1.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-
-require midpath.inc
-
-DEPENDS += "gtk+"
-
-do_configure() {
-
- cd ${S}/resources-embedded/com/sun/midp/configuration
- sed -i -e "s|ui.backend:AWT|ui.backend:GTK|" configuration.cfg
-
- cd ${S}/native/gtk
- sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" Makefile
-
-}
-
-do_compile() {
-
-# Build the GTK native part
-cd ${S}/native/gtk
-make || exit 1
-
-}
-
-do_install() {
- install -d ${D}${libdir}
- install -m 0644 ${S}/native/gtk/libmidpathgtk.so ${D}${libdir}
- install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration
- install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/
-}
-
-do_stage() {
- :
-}
-
-
-FILES_${PN} = "${libdir}/libmidpathgtk.so \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
- "
-CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg"
diff --git a/packages/midpath/midpath-jgl_0.2+0.3rc1.bb b/packages/midpath/midpath-jgl_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..e003fe9bdb
--- /dev/null
+++ b/packages/midpath/midpath-jgl_0.2+0.3rc1.bb
@@ -0,0 +1,46 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS += "midpath-core"
+
+DESCRIPTION = "JGL CLDC API for use in the MIDPath library"
+
+JAR = "jgl-cldc.jar"
+
+do_compile() {
+ # Only JGL CLDC is enabled.
+ midpath_build \
+ --disable-midpath \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/midpath/${JAR}"
diff --git a/packages/midpath/midpath-location_0.2+0.3rc1.bb b/packages/midpath/midpath-location_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..349356fa65
--- /dev/null
+++ b/packages/midpath/midpath-location_0.2+0.3rc1.bb
@@ -0,0 +1,45 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DESCRIPTION = "Implementation of the JSR179 Location API for use in the MIDPath library"
+
+JAR = "jsr179-location.jar"
+
+do_compile() {
+ # Only location API is enabled.
+ midpath_build \
+ --disable-midpath \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --with-avetanabt-cldc-jar=${STAGING_DATADIR}/midpath/avetanabt-cldc.jar
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/midpath/${JAR}"
diff --git a/packages/midpath/midpath-m3g_0.2+0.3rc1.bb b/packages/midpath/midpath-m3g_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..a0a1c42dd4
--- /dev/null
+++ b/packages/midpath/midpath-m3g_0.2+0.3rc1.bb
@@ -0,0 +1,48 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS += "midpath-core midpath-opengles"
+
+DESCRIPTION = "Implementation of the JSR184 Mobile 3D Graphics API for use in the MIDPath library"
+
+JAR = "jsr184-m3g.jar"
+
+do_compile() {
+ # Only M3G API is enabled.
+ midpath_build \
+ --disable-midpath \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-demos \
+ --with-opengles-core-jar=${STAGING_DATADIR}/midpath/jsr239-opengles-core.jar \
+ --with-opengles-nio-jar=${STAGING_DATADIR}/midpath/jsr239-opengles-nio.jar
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/midpath/${JAR}"
diff --git a/packages/midpath/midpath-maemo_0.2+0.3rc1.bb b/packages/midpath/midpath-maemo_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..10fcf6681d
--- /dev/null
+++ b/packages/midpath/midpath-maemo_0.2+0.3rc1.bb
@@ -0,0 +1,19 @@
+require midpath.inc
+
+PR = "r0"
+
+# The patch fixes the system_properties file only deployed in this recipe.
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz \
+ file://0.2+0.3rc1-fix-crlf.patch;patch=1;pnum=0 \
+ "
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+PR = "r0"
+
+SRC_URI += "file://configuration_maemo.cfg"
+
+RDEPENDS += "java2-runtime libswt3.4-gtk-java midpath-core-bluetooth"
+
+CONFIGURATION = "configuration_maemo.cfg"
diff --git a/packages/midpath/midpath-messaging_0.2+0.3rc1.bb b/packages/midpath/midpath-messaging_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..554f864491
--- /dev/null
+++ b/packages/midpath/midpath-messaging_0.2+0.3rc1.bb
@@ -0,0 +1,46 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS += "midpath-core"
+
+DESCRIPTION = "Implementation of the JSR205 Wireless Messaging API for use in the MIDPath library"
+
+JAR = "jsr205-messaging.jar"
+
+do_compile() {
+ # Only location API is enabled.
+ midpath_build \
+ --disable-midpath \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${datadir}/midpath/${JAR}"
diff --git a/packages/midpath/midpath-opengles_0.2+0.3rc1.bb b/packages/midpath/midpath-opengles_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..b5b7d67954
--- /dev/null
+++ b/packages/midpath/midpath-opengles_0.2+0.3rc1.bb
@@ -0,0 +1,56 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS += "midpath-core midpath-jgl"
+RDEPENDS_${PN} = "midpath-core midpath-jgl ${PN}-core ${PN}-nio"
+
+DESCRIPTION = "Implementation of the JSR239 OpenGL ES API for use in the MIDPath library"
+
+JAR = "jsr239-opengles-jgl.jar"
+JAR2 = "jsr239-opengles-core.jar"
+JAR3 = "jsr239-opengles-nio.jar"
+
+do_compile() {
+ # Only OpenGL ES API is enabled.
+ midpath_build \
+ --disable-midpath \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-jgl-cldc \
+ --disable-avetanabt-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --with-jgl-cldc-jar=${STAGING_DATADIR}/midpath/jgl-cldc.jar
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR2} ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR3} ${D}${datadir}/midpath
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR2} ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR3} ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN} ${PN}-core ${PN}-nio"
+
+FILES_${PN} = "${datadir}/midpath/${JAR}"
+FILES_${PN}-core = "${datadir}/midpath/${JAR2}"
+FILES_${PN}-nio = "${datadir}/midpath/${JAR3}"
diff --git a/packages/midpath/midpath-openmoko_0.2+0.3rc1.bb b/packages/midpath/midpath-openmoko_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..edb20af441
--- /dev/null
+++ b/packages/midpath/midpath-openmoko_0.2+0.3rc1.bb
@@ -0,0 +1,19 @@
+require midpath.inc
+
+PR = "r0"
+
+# The patch fixes the system_properties file only deployed in this recipe.
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz \
+ file://0.2+0.3rc1-fix-crlf.patch;patch=1;pnum=0 \
+ "
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+PR = "r0"
+
+SRC_URI += "file://configuration_openmoko.cfg"
+
+RDEPENDS += "java2-runtime midpath-backend-pulseaudio libswt3.4-gtk-java midpath-core-bluetooth"
+
+CONFIGURATION = "configuration_openmoko.cfg"
diff --git a/packages/midpath/midpath-pulseaudio_0.1.bb b/packages/midpath/midpath-pulseaudio_0.1.bb
deleted file mode 100644
index 1a8c44d38c..0000000000
--- a/packages/midpath/midpath-pulseaudio_0.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-
-require midpath_${PV}.bb
-
-DEPENDS = "pulseaudio"
-RDEPENDS = "pulseaudio"
-
-do_configure() {
- cd ${S}/native/pulseaudio
- sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" Makefile
- cd ${S}/resources-embedded/com/sun/midp/configuration
- sed -i -e "s|sound.backend:NULL|sound.backend:PulseAudio|" configuration.cfg
-}
-
-do_compile() {
-
-# Build the PulseAudio native part
-cd ${S}/native/pulseaudio
-make || exit 1
-
-}
-
-do_install() {
- install -d ${D}${libdir}
- install -m 0644 ${S}/native/pulseaudio/libmidpathpulse.so ${D}${libdir}
- install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration
- install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/
-}
-
-do_stage() {
- :
-}
-
-
-FILES_${PN} = "${libdir}/libmidpathpulse.so \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
- "
-
-CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg"
diff --git a/packages/midpath/midpath-qt3x11_0.1.bb b/packages/midpath/midpath-qt3x11_0.1.bb
deleted file mode 100644
index 7ad9af9991..0000000000
--- a/packages/midpath/midpath-qt3x11_0.1.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-
-require midpath.inc
-
-DEPENDS += " qt-mt"
-RCONFILCTS = "midpath-qte"
-
-inherit qt3x11
-
-do_configure() {
-
- cd ${S}/resources-embedded/com/sun/midp/configuration
- sed -i -e "s|ui.backend:AWT|ui.backend:QT|" configuration.cfg
-
- cd ${S}/native/qt
- sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" \
- -e "s|\`pkg\-config \-\-cflags qt\-mt\`|\-I${QTDIR}/include/ -DQT_THREAD_SUPPORT|" \
- -e "s|\`pkg\-config \-\-libs qt\-mt\`|\-L${QTDIR}/lib \-lqt-mt -lsupc++|" \
- Makefile
-}
-
-do_compile() {
-
-# Build the QT native part
-cd ${S}/native/qt
-make || exit 1
-
-}
-
-do_install() {
- install -d ${D}${libdir}
- install -m 0644 ${S}/native/qt/libmidpathqt.so ${D}${libdir}
- install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration
- install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/
-}
-
-do_stage() {
- :
-}
-
-
-FILES_${PN} = "${libdir}/libmidpathqt.so \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
- "
-
-CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg"
diff --git a/packages/midpath/midpath-qte_0.1.bb b/packages/midpath/midpath-qte_0.1.bb
deleted file mode 100644
index 4b7144722f..0000000000
--- a/packages/midpath/midpath-qte_0.1.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-
-require midpath.inc
-
-DEPENDS += " qte-mt"
-RCONFLICTS = "midpath-qt3x11"
-
-do_configure() {
-
- cd ${S}/resources-embedded/com/sun/midp/configuration
- sed -i -e "s|ui.backend:AWT|ui.backend:QT|" configuration.cfg
-
- cd ${S}/native/qt
- sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal -DQWS|" \
- -e "s|\`pkg\-config \-\-cflags qt\-mt\`|\-I${QTDIR}/include/ -DQWS -DQT_THREAD_SUPPORT|" \
- -e "s|\`pkg\-config \-\-libs qt\-mt\`|\-L${QTDIR}/lib \-lqte-mt -lsupc++|" \
- Makefile
-}
-
-do_compile() {
-
-# Build the QT native part
-cd ${S}/native/qt
-make || exit 1
-
-}
-
-do_install() {
- install -d ${D}${libdir}
- install -m 0644 ${S}/native/qt/libmidpathqt.so ${D}${libdir}
- install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration
- install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/
-}
-
-do_stage() {
- :
-}
-
-
-FILES_${PN} = "${libdir}/libmidpathqt.so \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
- "
-
-CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg"
diff --git a/packages/midpath/midpath-svg_0.2+0.3rc1.bb b/packages/midpath/midpath-svg_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..d63caa5363
--- /dev/null
+++ b/packages/midpath/midpath-svg_0.2+0.3rc1.bb
@@ -0,0 +1,60 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS += "midpath-core midpath-webservices"
+RDEPENDS_${PN}-midp = "${PN}"
+RDEPENDS_${PN}-awt = "${PN}"
+
+DESCRIPTION = "Implementation of the JSR226 SVG API for use in the MIDPath library"
+
+JAR = "jsr226-svg-core.jar"
+JAR2 = "jsr226-svg-midp2.jar"
+JAR3 = "jsr226-svg-core.jar"
+
+do_compile() {
+ # Only SVG API is enabled.
+ midpath_build \
+ --disable-midpath \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-web_services-api \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos \
+ --enable-svg-api-awt \
+ --with-jaxp-jar=${STAGING_DATADIR}/midpath/jsr172-jaxp.jar
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR2} ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR3} ${D}${datadir}/midpath
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR2} ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR3} ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN} ${PN}-midp ${PN}-awt"
+
+FILES_${PN} = "${datadir}/midpath/${JAR}"
+
+FILES_${PN}-midp = "${datadir}/midpath/${JAR2}"
+
+FILES_${PN}-awt = "${datadir}/midpath/${JAR3}"
diff --git a/packages/midpath/midpath-test_0.1.bb b/packages/midpath/midpath-test_0.1.bb
deleted file mode 100644
index 3d06e80797..0000000000
--- a/packages/midpath/midpath-test_0.1.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-
-require midpath.inc
-
-SRC_URI += "file://shellscript.patch;patch=1"
-
-DEPENDS += " midpath"
-RDEPENDS += " midpath"
-
-CLDC_PATH = ${STAGING_DATADIR}/java/cldc1.1.jar
-
-do_configure() {
-
- cd ${S}/bin
- sed -i -e "s|MIDPATH_HOME=|MIDPATH_HOME=${datadir}/java|" \
- midpath-test-cacao-cldc.sh
-
-}
-
-do_compile() {
-
-cd ${S}/tests
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${STAGING_DATADIR}/java/midpath.jar:${CLDC_PATH} -sourcepath ${S}/tests -source 1.3 -target 1.1" || exit 1
-make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${STAGING_DATADIR}/java/midpath.jar:${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="midpath-tests.jar" JAR_FLAGS="cvf" || exit 1
-
-}
-
-do_install() {
- install -d ${D}${bindir}
-# install -m 0755 bin/graphical_launcher-j2se.sh ${D}${bindir}
-# install -m 0755 bin/midpath-test.sh ${D}${bindir}
- install -m 0755 bin/midpath-test-cacao-cldc.sh ${D}${bindir}
- install -d ${D}${datadir}/java
- install -m 0644 ${S}/tests/midpath-tests.jar ${D}${datadir}/java
-}
-
-do_stage() {
- :
-}
-
-
-FILES_${PN} = "${datadir}/java/midpath-tests.jar \
-# ${bindir}/graphical_launcher-j2se.sh \
-# ${bindir}/midpath-test.sh \
- ${bindir}/midpath-test-cacao-cldc.sh \
- "
diff --git a/packages/midpath/midpath-webservices_0.2+0.3rc1.bb b/packages/midpath/midpath-webservices_0.2+0.3rc1.bb
new file mode 100644
index 0000000000..7f2f197cc1
--- /dev/null
+++ b/packages/midpath/midpath-webservices_0.2+0.3rc1.bb
@@ -0,0 +1,51 @@
+require midpath-common.inc
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc1.tar.gz"
+
+S = "${WORKDIR}/midpath-0.3rc1"
+
+DEPENDS += "midpath-core"
+RSUGGESTS_${PN} = "${PN}-jaxp"
+
+DESCRIPTION = "Implementation of the JSR172 J2ME Web Services API for use in the MIDPath library"
+
+JAR = "jsr172-jaxp.jar"
+JAR2 = "jsr172-jaxrpc.jar"
+
+do_compile() {
+ # Only web services API is enabled.
+ midpath_build \
+ --disable-midpath \
+ --disable-cldc \
+ --disable-sdljava-cldc \
+ --disable-escher-cldc \
+ --disable-jlayerme-cldc \
+ --disable-jorbis-cldc \
+ --disable-avetanabt-cldc \
+ --disable-jgl-cldc \
+ --disable-location-api \
+ --disable-messaging-api \
+ --disable-svg-api \
+ --disable-opengl-api \
+ --disable-m3g-api \
+ --disable-demos
+}
+
+do_install() {
+ install -d ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR} ${D}${datadir}/midpath
+ install -m 0644 dist/${JAR2} ${D}${datadir}/midpath
+}
+
+do_stage() {
+ install -d ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR} ${STAGING_DATADIR}/midpath
+ install -m 0644 dist/${JAR2} ${STAGING_DATADIR}/midpath
+}
+
+PACKAGES = "${PN} ${PN}-jaxp"
+
+FILES_${PN}-jaxp = "${datadir}/midpath/${JAR}"
+FILES_${PN} = "${datadir}/midpath/${JAR2}"
diff --git a/packages/midpath/midpath.inc b/packages/midpath/midpath.inc
index 4bc3b71598..703d9bdd3c 100644
--- a/packages/midpath/midpath.inc
+++ b/packages/midpath/midpath.inc
@@ -1,22 +1,49 @@
-DESCRIPTION = "MIDPath is a Java library which provides a MIDP2 implementation"
-HOMEPAGE = "http://midpath.thenesis.org/"
-LICENSE = "GPL"
-PRIORITY = "optional"
-SECTION = "interpreters"
-PR = "r1"
+# This is the include recipe for the midpath recipes for your platform.
+#
+# To support your particular platform, write a proper configuration, add
+# a new recipe and decided which components it should install by modifying
+# RDEPENDS.
+require midpath-common.inc
-SRC_URI = "http://downloads.sourceforge.net/midpath/midpath-${PV}.tar.gz"
+RDEPENDS = "midpath-core midpath-core-bluetooth midpath-core-ogg midpath-core-mp3"
-S = "${WORKDIR}/midpath-${PV}"
+PROVIDES = "midpath"
+RPROVIDES = "midpath"
-DEPENDS = "virtual/javac-native fastjar-native classpath"
+CONFIGURATION = "${@bb.fatal('Variable CONFIGURATION is not set in your midpath.inc-based recipe.')}"
-JAVAC_CMD = "${STAGING_BINDIR_NATIVE}/javac"
+do_compile() {
+ :
+}
-FASTJAR_CMD = "${STAGING_BINDIR_NATIVE}/fastjar"
+do_install() {
+ # Installation of configuration.cfg:
+ # Creates a symbolic link at ${datadir}/midpath which points to ${sysconfdir}/midpath
+ install -d ${D}${datadir}/midpath/configuration/com/sun/midp/configuration
+ ln -sf ${sysconfdir}/midpath/configuration.cfg ${D}${datadir}/midpath/configuration/com/sun/midp/configuration/configuration.cfg
-JAVA_PATH = "${STAGING_DATADIR}/java"
+ # Put the file itself into ${sysconfdir}/midpath
+ install -d ${D}${sysconfdir}/midpath
+ install -m 0644 ${WORKDIR}/${CONFIGURATION} ${D}${sysconfdir}/midpath/configuration.cfg
-GNU_CLASSPATH_PATH = "${JAVA_PATH}/classpath/glibj.zip"
+ # Same procedure for MIDP2.0 required system properties
+ ln -sf ${sysconfdir}/midpath/system_properties ${D}${datadir}/midpath/configuration/com/sun/midp/configuration/system_properties
+ install -m 0644 configuration/com/sun/midp/configuration/system_properties ${D}${sysconfdir}/midpath
+
+ # Put l10n data into $datadir
+ install -d ${D}${datadir}/midpath/configuration/com/sun/midp/configuration/l10n
+ install -m 0644 configuration/com/sun/midp/configuration/l10n/en-US.xml ${D}${datadir}/midpath/configuration/com/sun/midp/configuration/l10n
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "\
+ ${datadir}/midpath/configuration \
+ ${sysconfdir}/midpath \
+ "
+
+CONFFILES_${PN} = "\
+ ${sysconfdir}/midpath/system_properties \
+ ${sysconfdir}/midpath/configuration.cfg \
+ "
-CLDC_PATH = ${STAGING_DATADIR}/midpath-cldc/midpath-cldc1.1.jar
diff --git a/packages/midpath/midpath_0.1.bb b/packages/midpath/midpath_0.1.bb
deleted file mode 100644
index e787b053be..0000000000
--- a/packages/midpath/midpath_0.1.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-
-require midpath.inc
-
-DEPENDS += " kxml2 midpath-cldc midpath-cldc-x11 midpath-cldc-sdl"
-RSUGGESTS += " kxml2"
-
-do_compile() {
-
-mkdir -p ${S}/dist
-
-# Build MP3 library
-cd ${S}/external/jlayerme-cldc/src
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -sourcepath ${S}/external/jlayerme-cldc/src -source 1.3 -target 1.1" || exit 1
-make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="jlayerme-cldc.jar" JAR_FLAGS="cvf" || exit 1
-cp ${S}/external/jlayerme-cldc/src/jlayerme-cldc.jar ${S}/dist
-
-# Build OGG library
-cd ${S}/external/jorbis-cldc/src
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -sourcepath ${S}/external/jorbis-cldc/src -source 1.3 -target 1.1" || exit 1
-make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="jorbis-cldc.jar" JAR_FLAGS="cvf" || exit 1
-cp ${S}/external/jorbis-cldc/src/jorbis-cldc.jar ${S}/dist
-
-# Build Bluetooth library
-cd ${S}/external/javabluetooth/src
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${GNU_CLASSPATH_PATH}:${CLDC_PATH}:${S}/lib/RXTXcomm.jar -sourcepath ${S}/external/javabluetooth/src -source 1.3 -target 1.1" || exit 1
-make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${GNU_CLASSPATH_PATH}:${CLDC_PATH}:${S}/lib/RXTXcomm.jar -source 1.3 -target 1.1" JAR_FILE="jsr82-bluetooth.jar" JAR_FLAGS="cvf" || exit 1
-cp ${S}/external/javabluetooth/src/jsr82-bluetooth.jar ${S}/dist
-
-# Build MIDPath
-cd ${S}/src/core
-make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH}:${GNU_CLASSPATH_PATH}:${JAVA_PATH}/sdljava-cldc.jar:${JAVA_PATH}/escher-x11-cldc.jar:${S}/dist/jlayerme-cldc.jar:${S}/dist/jorbis-cldc.jar:${S}/dist/jsr82-bluetooth.jar:${JAVA_PATH}/kxml2-2.3.0.jar:${S}/lib/swt.jar -sourcepath ${S}/src/core -source 1.3 -target 1.1" || exit 1
-make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH}:${GNU_CLASSPATH_PATH}:${JAVA_PATH}/sdljava-cldc.jar:${JAVA_PATH}/dist/escher-x11-cldc.jar:${S}/dist/jlayerme-cldc.jar:${S}/dist/jorbis-cldc.jar:${S}/dist/jsr82-bluetooth.jar:${JAVA_PATH}/lib/kxml2-2.3.0.jar:${S}/lib/swt.jar -source 1.3 -target 1.1" CLASS_DIR=${S}/src/core/classes || exit 1
-# Compile JVM.java separately as it can't be compiled against cldc.jar
-${JAVAC_CMD} -bootclasspath ${GNU_CLASSPATH_PATH} -source 1.3 -target 1.1 -d ${S}/src/core/classes com/sun/cldchi/jvm/JVM.java
-${FASTJAR_CMD} cvf ${S}/dist/midpath.jar -C ${S}/src/core/classes .
-
-}
-
-do_install() {
- install -d ${D}${datadir}/java
- install -m 0644 dist/midpath.jar ${D}${datadir}/java
- install -d ${D}${datadir}/java/resources-embedded
- cp -rf resources-embedded/ ${D}${datadir}/java/
-}
-
-do_stage() {
- install -d ${STAGING_DATADIR}/java
- install -m 0644 dist/midpath.jar ${STAGING_DATADIR}/java
-}
-
-
-FILES_${PN} = "${datadir}/java/midpath.jar \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/ \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/chameleon/ \
- ${datadir}/java/resources-embedded/com/sun/midp/configuration/l10n/ \
- ${datadir}/java/resources-embedded/com/sun/midp/chameleon/skins/resources/images/ \
-
- ${datadir}/java/resources-embedded/org/thenesis/midpath/font/bdf/ \
- "
-CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg"
diff --git a/packages/modplugplay/modplugplay_1.0.bb b/packages/modplugplay/modplugplay_1.0.bb
index 45caf8d083..d91e2b3a97 100644
--- a/packages/modplugplay/modplugplay_1.0.bb
+++ b/packages/modplugplay/modplugplay_1.0.bb
@@ -1,20 +1,20 @@
-LICENSE = "GPL"
DESCRIPTION = "modplugplay is a commandline mod-like audio file player."
+HOMEPAGE = "http://gnu.ethz.ch/linuks.mine.nu/modplugplay/"
+LICENSE = "GPL"
SECTION = "console/multimedia"
DEPENDS = "libmodplug"
PR = "r1"
-SRC_URI = "http://www.linuks.mine.nu/modplugplay/modplugplay-${PV}.tar.gz"
+SRC_URI = "http://gnu.ethz.ch/linuks.mine.nu/modplugplay/modplugplay-${PV}.tar.gz"
do_compile() {
${CC} -c ${CFLAGS} modplugplay.c -o modplugplay.o
- ${CC} -o modplugplay modplugplay.o ${LDFLAGS} -lmodplug
+ ${CC} -o modplugplay modplugplay.o ${LDFLAGS} -lmodplug -lstdc++
}
do_install() {
install -d ${D}${bindir}
install -d ${D}${mandir}/man1
- install -m 0755 modplugplay ${D}${bindir}/
- install -m 0644 modplugplay.1 ${D}${mandir}/man1/
+ install -m 0755 modplugplay ${D}${bindir}/
+ install -m 0644 modplugplay.1 ${D}${mandir}/man1/
}
-
diff --git a/packages/module-init-tools/module-init-tools_3.2.1.bb b/packages/module-init-tools/module-init-tools_3.2.1.bb
index 3733562c62..91c0efcd64 100644
--- a/packages/module-init-tools/module-init-tools_3.2.1.bb
+++ b/packages/module-init-tools/module-init-tools_3.2.1.bb
@@ -3,7 +3,7 @@ removing kernel modules for Linux (versions 2.5.48 and above). It serves \
the same function that the modutils package serves for Linux 2.4."
LICENSE = "GPL"
SECTION = "base"
-PR = "r0"
+PR = "r1"
PACKAGES =+ "module-init-tools-insmod-static module-init-tools-depmod"
RDEPENDS_${PN} += "module-init-tools-depmod"
diff --git a/packages/module-init-tools/module-init-tools_3.2.2.bb b/packages/module-init-tools/module-init-tools_3.2.2.bb
index dcf9063219..1c1fa90b04 100644
--- a/packages/module-init-tools/module-init-tools_3.2.2.bb
+++ b/packages/module-init-tools/module-init-tools_3.2.2.bb
@@ -3,7 +3,7 @@ removing kernel modules for Linux (versions 2.5.48 and above). It serves \
the same function that the modutils package serves for Linux 2.4."
LICENSE = "GPL"
SECTION = "base"
-PR = "r3"
+PR = "r4"
PACKAGES =+ "module-init-tools-insmod-static module-init-tools-depmod"
RDEPENDS_${PN} += "module-init-tools-depmod"
diff --git a/packages/mozilla/firefox-3.0/.mtn2git_empty b/packages/mozilla/firefox-3.0/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/.mtn2git_empty
diff --git a/packages/mozilla/firefox-3.0/010_FPU_IS_ARM_FPA_xslt.diff b/packages/mozilla/firefox-3.0/010_FPU_IS_ARM_FPA_xslt.diff
new file mode 100644
index 0000000000..854100c4c3
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/010_FPU_IS_ARM_FPA_xslt.diff
@@ -0,0 +1,56 @@
+# Bug 369722 – prdtoa.c jsnum.h txDouble.h not required IEEE_ARM define on Codesourcery EABI gcc3.4.4 compiler
+#
+--- mozilla/content/xslt/public/txDouble.h.orig 2006-07-13 17:21:52.000000000 +0300
++++ mozilla/content/xslt/public/txDouble.h 2007-10-25 15:01:25.000000000 +0300
+@@ -58,46 +58,48 @@ fp_except_t oldmask = fpsetmask(~allmask
+ /**
+ * Stefan Hanske <sh990154@mail.uni-greifswald.de> reports:
+ * ARM is a little endian architecture but 64 bit double words are stored
+ * differently: the 32 bit words are in little endian byte order, the two words
+ * are stored in big endian`s way.
+ */
+
+ #if defined(__arm) || defined(__arm32__) || defined(__arm26__) || defined(__arm__)
+-#define CPU_IS_ARM
++#if !defined(__VFP_FP__)
++#define FPU_IS_ARM_FPA
++#endif
+ #endif
+
+ #if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
+ /**
+ * This version of the macros is safe for the alias optimizations
+ * that gcc does, but uses gcc-specific extensions.
+ */
+
+ typedef union txdpun {
+ PRFloat64 d;
+ struct {
+-#if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
++#if defined(IS_LITTLE_ENDIAN) && !defined(FPU_IS_ARM_FPA)
+ PRUint32 lo, hi;
+ #else
+ PRUint32 hi, lo;
+ #endif
+ } s;
+ } txdpun;
+
+ #define TX_DOUBLE_HI32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.hi; }))
+ #define TX_DOUBLE_LO32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.lo; }))
+
+ #else // __GNUC__
+
+ /* We don't know of any non-gcc compilers that perform alias optimization,
+ * so this code should work.
+ */
+
+-#if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
++#if defined(IS_LITTLE_ENDIAN) && !defined(FPU_IS_ARM_FPA)
+ #define TX_DOUBLE_HI32(x) (((PRUint32 *)&(x))[1])
+ #define TX_DOUBLE_LO32(x) (((PRUint32 *)&(x))[0])
+ #else
+ #define TX_DOUBLE_HI32(x) (((PRUint32 *)&(x))[0])
+ #define TX_DOUBLE_LO32(x) (((PRUint32 *)&(x))[1])
+ #endif
+
+ #endif // __GNUC__
diff --git a/packages/mozilla/firefox-3.0/Bug339782.additional.fix.diff b/packages/mozilla/firefox-3.0/Bug339782.additional.fix.diff
new file mode 100644
index 0000000000..0848e730d3
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/Bug339782.additional.fix.diff
@@ -0,0 +1,39 @@
+# XPTC_InvokeByIndex crashes
+# Bug 339782 [ARM] XPTC_InvokeByIndex crashes when cross-compiled under GCC 3.4.x with EABI (CodeSourcery)
+Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
+===================================================================
+--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
+@@ -51,22 +51,32 @@
+ #ifdef __ARM_EABI__
+ #define DOUBLEWORD_ALIGN(p) ((PRUint32 *)((((PRUint32)(p)) + 7) & 0xfffffff8))
+ #define VAR_STACK_SIZE_64 3
+ #else
+ #define DOUBLEWORD_ALIGN(p) (p)
+ #define VAR_STACK_SIZE_64 2
+ #endif
+
++#ifdef __ARM_EABI__
++#define DOUBLEWORD_ALIGN(p) ((PRUint32 *)((((PRUint32)(p)) + 7) & 0xfffffff8))
++#else
++#define DOUBLEWORD_ALIGN(p) (p)
++#endif
++
+ // Remember that these 'words' are 32bit DWORDS
+
+ static PRUint32
+ invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
+ {
+ PRUint32 result = 0;
++
++ /* Note that we give a "worst case" estimate of how much stack _might_ be
++ * needed, rather than the real count - this should be safe */
++
+ for(PRUint32 i = 0; i < paramCount; i++, s++)
+ {
+ if(s->IsPtrData())
+ {
+ result++;
+ continue;
+ }
+ switch(s->type)
diff --git a/packages/mozilla/firefox-3.0/Bug385583.nspr.jmp_buf.eabi.diff b/packages/mozilla/firefox-3.0/Bug385583.nspr.jmp_buf.eabi.diff
new file mode 100644
index 0000000000..486440c30e
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/Bug385583.nspr.jmp_buf.eabi.diff
@@ -0,0 +1,33 @@
+diff -up mozilla/nsprpub/pr/include/md/_linux.h.orig mozilla/nsprpub/pr/include/md/_linux.h
+--- mozilla/nsprpub/pr/include/md/_linux.h.orig 2007-11-28 14:16:03.000000000 -0500
++++ mozilla/nsprpub/pr/include/md/_linux.h 2007-11-28 14:12:09.000000000 -0500
+@@ -346,8 +346,8 @@ extern void _MD_CleanupBeforeExit(void);
+ #error "Linux/MIPS pre-glibc2 not supported yet"
+ #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
+
+-#elif defined(__arm__)
+-/* ARM/Linux */
++#elif defined(__arm__) && !defined(__ARM_EABI__)
++/* ARM/Linux (old-ABI) */
+ #if defined(__GLIBC__) && __GLIBC__ >= 2
+ #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20]
+ #define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[19] = (val))
+@@ -358,6 +358,18 @@ extern void _MD_CleanupBeforeExit(void);
+ #error "ARM/Linux pre-glibc2 not supported yet"
+ #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
+
++#elif defined(__arm__) && defined(__ARM_EABI__)
++/* ARM/Linux (EABI) */
++#if defined(__GLIBC__) && __GLIBC__ >= 2
++#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[8]
++#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[7] = (val))
++#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
++#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[7])
++#define _MD_SP_TYPE __ptr_t
++#else
++#error "ARM/Linux pre-glibc2 not supported yet"
++#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
++
+ #else
+
+ #error "Unknown CPU architecture"
diff --git a/packages/mozilla/firefox-3.0/Bug405992.atomic.nspr.diff b/packages/mozilla/firefox-3.0/Bug405992.atomic.nspr.diff
new file mode 100644
index 0000000000..f54f916a6a
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/Bug405992.atomic.nspr.diff
@@ -0,0 +1,48 @@
+# Add atomic operations for ARM.
+diff --git a/nsprpub/pr/include/md/_linux.h b/nsprpub/pr/include/md/_linux.h
+index 5b794c5..cb8d58e 100644
+--- a/nsprpub/pr/include/md/_linux.h
++++ b/nsprpub/pr/include/md/_linux.h
+@@ -194,6 +194,42 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
+ })
+ #endif
+
++#if defined(__arm__)
++#define _PR_HAVE_ATOMIC_OPS
++#define _MD_INIT_ATOMIC()
++
++typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
++#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *)0xffff0fc0)
++
++#define _MD_ATOMIC_INCREMENT(ptr) _MD_ATOMIC_ADD(ptr, 1)
++#define _MD_ATOMIC_DECREMENT(ptr) _MD_ATOMIC_ADD(ptr, -1)
++#define _MD_ATOMIC_ADD(ptr, n) \
++ ({ \
++ PRInt32 ov, nv; \
++ volatile PRInt32 *vp = (ptr); \
++ \
++ do { \
++ ov = *vp; \
++ nv = ov + (n); \
++ } \
++ while (__kernel_cmpxchg(ov, nv, vp)); \
++ \
++ nv; \
++ })
++#define _MD_ATOMIC_SET(ptr, nv) \
++ ({ \
++ PRInt32 ov; \
++ volatile PRInt32 *vp = (ptr); \
++ \
++ do { \
++ ov = *vp; \
++ } \
++ while (__kernel_cmpxchg(ov, (nv), vp)); \
++ \
++ ov; \
++ })
++#endif
++
+ #define USE_SETJMP
+ #if defined(__GLIBC__) && __GLIBC__ >= 2
+ #define _PR_POLL_AVAILABLE
diff --git a/packages/mozilla/firefox-3.0/jemalloc-tls.patch b/packages/mozilla/firefox-3.0/jemalloc-tls.patch
new file mode 100644
index 0000000000..d1d740989e
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/jemalloc-tls.patch
@@ -0,0 +1,28 @@
+--- /tmp/jemalloc.c 2008-06-23 10:57:36.000000000 +0200
++++ mozilla/memory/jemalloc/jemalloc.c 2008-06-23 11:20:13.000000000 +0200
+@@ -386,7 +386,7 @@
+ #else
+ # define NO_TLS
+ #endif
+-#if 0
++
+ #ifdef __i386__
+ # define QUANTUM_2POW_MIN 4
+ # define SIZEOF_PTR_2POW 2
+@@ -420,7 +420,6 @@
+ # define QUANTUM_2POW_MIN 4
+ # define SIZEOF_PTR_2POW 2
+ #endif
+-#endif
+
+ #define SIZEOF_PTR (1U << SIZEOF_PTR_2POW)
+
+@@ -2582,7 +2581,7 @@
+ * knowledge of how _pthread_self() calculates values, we can't
+ * easily do much better than this.
+ */
+- ind = (unsigned long) _pthread_self() % narenas;
++ ind = 255255 % narenas;
+
+ /*
+ * Optimistially assume that arenas[ind] has been initialized.
diff --git a/packages/mozilla/firefox-3.0/jsautocfg-dontoverwrite.patch b/packages/mozilla/firefox-3.0/jsautocfg-dontoverwrite.patch
new file mode 100644
index 0000000000..39978cfd11
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/jsautocfg-dontoverwrite.patch
@@ -0,0 +1,23 @@
+--- mozilla/js/src/Makefile.in.orig 2006-12-12 11:46:02.000000000 +0000
++++ mozilla/js/src/Makefile.in 2006-12-12 11:46:27.000000000 +0000
+@@ -319,20 +319,8 @@
+
+ jsopcode.h jsopcode.c: jsopcode.tbl
+
+-ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
+ jsautocfg.h:
+ touch $@
+-else
+-ifeq ($(OS_ARCH),WINCE)
+-jsautocfg.h:
+- touch $@
+-else
+-jsautocfg.h: jscpucfg$(HOST_BIN_SUFFIX)
+- @rm -f $@ jsautocfg.tmp
+- ./jscpucfg > jsautocfg.tmp
+- mv jsautocfg.tmp $@
+-endif
+-endif
+
+ # jscpucfg is a strange target
+ # Needs to be built with the host compiler but needs to include
diff --git a/packages/mozilla/firefox-3.0/linkage-problem.patch b/packages/mozilla/firefox-3.0/linkage-problem.patch
new file mode 100644
index 0000000000..28bffd1e22
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/linkage-problem.patch
@@ -0,0 +1,14 @@
+--- mozilla/layout/build/Makefile.in~ 2007-11-24 00:38:14.000000000 -0200
++++ mozilla/layout/build/Makefile.in 2007-11-24 00:38:14.000000000 -0200
+@@ -229,6 +229,11 @@
+ $(NULL)
+ endif
+
++ifdef MOZ_ENABLE_XFT
++EXTRA_DSO_LDOPTS += $(MOZ_XFT_LIBS) \
++ $(NULL)
++endif
++
+ ifneq (,$(MOZ_ENABLE_CANVAS)$(MOZ_SVG_RENDERER_CAIRO))
+ EXTRA_DSO_LDOPTS += $(MOZ_CAIRO_LIBS) \
+ $(NULL)
diff --git a/packages/mozilla/firefox-3.0/mozconfig b/packages/mozilla/firefox-3.0/mozconfig
new file mode 100644
index 0000000000..6e85c5eda2
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/mozconfig
@@ -0,0 +1,61 @@
+. $topsrcdir/browser/config/mozconfig
+
+# use GTK+-2 widget set with XFT font rendering
+#ac_add_options --enable-default-toolkit=gtk2
+ac_add_options --enable-xft
+ac_add_options --disable-freetype2
+
+# enable minimal profile support
+ac_add_options --disable-profilesharing
+ac_add_options --disable-profilelocking
+ac_add_options --enable-single-profile
+
+ac_add_options --with-system-zlib
+ac_add_options --with-system-jpeg
+#ac_add_options --with-system-png
+
+ac_add_options --disable-accessibility
+ac_add_options --disable-composer
+#ac_add_options --enable-plaintext-editor-only
+ac_add_options --disable-mailnews
+ac_add_options --disable-ldap
+#ac_add_options --disable-postscript
+ac_add_options --disable-mathml
+ac_add_options --disable-jsd
+ac_add_options --disable-installer
+ac_add_options --disable-xprint
+ac_add_options --disable-necko-disk-cache
+
+# configure necko to allocate smaller network buffers
+ac_add_options --enable-necko-small-buffers
+
+# disable debug logging and tests
+#ac_add_options --disable-dtd-debug
+ac_add_options --disable-logging
+ac_add_options --enable-debug=-ggdb
+ac_add_options --disable-gtktest
+ac_add_options --disable-tests
+ac_add_options --disable-printing
+ac_add_options --disable-gnomevfs
+ac_add_options --disable-gnomeui
+
+# build crypto module (PSM + NSS)
+ac_add_options --enable-crypto
+
+# build minimal set of protocol handlers
+ac_add_options --enable-necko-protocols=http,file,res,jar,ftp,about,viewsource
+
+# build minimal set of image decoders
+ac_add_options --enable-image-decoders=png,gif,jpeg
+
+#ac_add_options --enable-reorder
+#ac_add_options --enable-elf-dynstr-gc
+
+# enable static build
+#ac_add_options --disable-shared
+#ac_add_options --enable-static
+ac_add_options --enable-optimize=-O1
+
+# Use cairo from system
+ac_add_options --enable-system-cairo
+
diff --git a/packages/mozilla/firefox-3.0/random_to_urandom.diff b/packages/mozilla/firefox-3.0/random_to_urandom.diff
new file mode 100644
index 0000000000..f969752381
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/random_to_urandom.diff
@@ -0,0 +1,26 @@
+# Component manager should not use /dev/random for generation ranodm numbers
+# It cause hangs on embedding platforms,which does not have enough devices for generation required entropy
+# Bug somewhere exists but it is very old
+Index: nsprpub/pr/src/md/unix/uxrng.c
+===================================================================
+--- mozilla/nsprpub/pr/src/md/unix/uxrng.c.orig
++++ mozilla/nsprpub/pr/src/md/unix/uxrng.c
+@@ -144,17 +144,17 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+
+ static int fdDevRandom;
+ static PRCallOnceType coOpenDevRandom;
+
+ static PRStatus OpenDevRandom( void )
+ {
+- fdDevRandom = open( "/dev/random", O_RDONLY );
++ fdDevRandom = open( "/dev/urandom", O_RDONLY );
+ return((-1 == fdDevRandom)? PR_FAILURE : PR_SUCCESS );
+ } /* end OpenDevRandom() */
+
+ static size_t GetDevRandom( void *buf, size_t size )
+ {
+ int bytesIn;
+ int rc;
+
diff --git a/packages/mozilla/firefox-3.0/security-cross.patch b/packages/mozilla/firefox-3.0/security-cross.patch
new file mode 100644
index 0000000000..56c8d04a9e
--- /dev/null
+++ b/packages/mozilla/firefox-3.0/security-cross.patch
@@ -0,0 +1,93 @@
+--- mozilla/security/coreconf/Linux.mk.orig 2006-12-12 10:53:12.000000000 +0000
++++ mozilla/security/coreconf/Linux.mk 2006-12-12 10:54:13.000000000 +0000
+@@ -52,88 +52,8 @@
+
+ DEFAULT_COMPILER = gcc
+
+-ifeq ($(OS_TEST),m68k)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = m68k
+-else
+-ifeq ($(OS_TEST),ppc64)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = ppc
+-ifeq ($(USE_64),1)
+- ARCHFLAG = -m64
+-endif
+-else
+-ifeq ($(OS_TEST),ppc)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = ppc
+-else
+-ifeq ($(OS_TEST),alpha)
+- OS_REL_CFLAGS = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = alpha
+-else
+-ifeq ($(OS_TEST),ia64)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = ia64
+-else
+-ifeq ($(OS_TEST),x86_64)
+-ifeq ($(USE_64),1)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = x86_64
+-else
+- OS_REL_CFLAGS = -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
+- CPU_ARCH = x86
+- ARCHFLAG = -m32
+-endif
+-else
+-ifeq ($(OS_TEST),sparc)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = sparc
+-else
+-ifeq ($(OS_TEST),sparc64)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = sparc
+-else
+-ifeq (,$(filter-out arm% sa110,$(OS_TEST)))
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = arm
+-else
+-ifeq ($(OS_TEST),parisc)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = hppa
+-else
+-ifeq ($(OS_TEST),parisc64)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = hppa
+-else
+-ifeq ($(OS_TEST),s390)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = s390
+-else
+-ifeq ($(OS_TEST),s390x)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = s390x
+-else
+-ifeq ($(OS_TEST),mips)
+- OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+- CPU_ARCH = mips
+-else
+- OS_REL_CFLAGS = -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
+- CPU_ARCH = x86
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-
++OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
++CPU_ARCH =
+
+ LIBC_TAG = _glibc
+
diff --git a/packages/mozilla/firefox_3.0.bb b/packages/mozilla/firefox_3.0.bb
new file mode 100644
index 0000000000..1198344888
--- /dev/null
+++ b/packages/mozilla/firefox_3.0.bb
@@ -0,0 +1,46 @@
+DEPENDS += "cairo"
+PR = "r0"
+
+SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0/source/firefox-${PV}-source.tar.bz2 \
+ file://jsautocfg.h \
+ file://security-cross.patch;patch=1 \
+ file://jsautocfg-dontoverwrite.patch;patch=1 \
+ file://Bug339782.additional.fix.diff;patch=1 \
+ file://Bug385583.nspr.jmp_buf.eabi.diff;patch=1 \
+ file://Bug405992.atomic.nspr.diff;patch=1 \
+ file://random_to_urandom.diff;patch=1 \
+ file://jemalloc-tls.patch;patch=1 \
+ http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz \
+ http://ftp.debian.org/debian/pool/main/i/iceweasel/iceweasel_3.0~rc2-2.diff.gz;patch=1 \
+"
+
+S = "${WORKDIR}/mozilla"
+
+#DEFAULT_PREFERENCE = "-1"
+
+inherit mozilla
+require firefox.inc
+
+do_unpack2() {
+ cp -pPr ${WORKDIR}/js/src* ${S}/js/
+}
+
+do_compile_prepend() {
+ cp ${WORKDIR}/jsautocfg.h ${S}/js/src/
+ sed -i "s|CPU_ARCH =|CPU_ARCH = ${TARGET_ARCH}|" security/coreconf/Linux.mk
+}
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/firefox-${PV}
+ cd dist/sdk/include
+ rm -rf obsolete
+ headers=`find . -name "*.h"`
+ for f in $headers
+ do
+ install -D -m 0644 $f ${STAGING_INCDIR}/firefox-${PV}/
+ done
+ # removes 2 lines that call absent headers
+ sed -e '178,179d' ${STAGING_INCDIR}/firefox-${PV}/nsIServiceManager.h
+}
+
+addtask unpack2 after do_unpack before do_patch
diff --git a/packages/mplayer/files/Makefile-codec-cfg.patch b/packages/mplayer/files/Makefile-codec-cfg.patch
index 78fb6e98ce..84c17a9017 100644
--- a/packages/mplayer/files/Makefile-codec-cfg.patch
+++ b/packages/mplayer/files/Makefile-codec-cfg.patch
@@ -1,11 +1,11 @@
---- /tmp/Makefile 2008-04-17 21:41:29.623907292 +0200
-+++ trunk/Makefile 2008-04-17 21:42:04.164926258 +0200
-@@ -311,7 +311,7 @@
+--- /tmp/Makefile 2008-06-10 20:55:43.100403024 +0200
++++ trunk/Makefile 2008-06-10 20:56:10.881647093 +0200
+@@ -731,7 +731,7 @@
$(CC) -o $@ $^ $(LDFLAGS_MENCODER)
codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
-- $(HOST_CC) -O -I. -DCODECS2HTML $< -o $@
-+ $(BUILD_CC) -O -I. -DCODECS2HTML $< -o $@
+- $(HOST_CC) -O -I. -DCODECS2HTML -o $@ $<
++ $(BUILD_CC) -O -I. -DCODECS2HTML -o $@ $<
codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
./codec-cfg$(EXESUF) ./etc/codecs.conf > $@
diff --git a/packages/mplayer/files/makefile-nostrip-svn.patch b/packages/mplayer/files/makefile-nostrip-svn.patch
index b1a60af312..c684001792 100644
--- a/packages/mplayer/files/makefile-nostrip-svn.patch
+++ b/packages/mplayer/files/makefile-nostrip-svn.patch
@@ -1,22 +1,11 @@
-upstream: not applicable, I think (unless somebody claims there is a more portable way to stripping)
-
---- /tmp/Makefile 2008-04-17 21:48:32.987984542 +0200
-+++ trunk/Makefile 2008-04-17 21:48:52.042750779 +0200
-@@ -337,7 +337,7 @@
- if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi
+--- /tmp/Makefile 2008-06-10 21:05:55.613676241 +0200
++++ trunk/Makefile 2008-06-10 21:06:30.701172833 +0200
+@@ -797,7 +797,7 @@
+ $(INSTALL) -d $(BINDIR) $(CONFDIR)
- install-mplayer: mplayer$(EXESUF)
-- $(INSTALL) -m 755 $(INSTALLSTRIP) mplayer$(EXESUF) $(BINDIR)
-+ $(INSTALL) -m 755 mplayer$(EXESUF) $(BINDIR)
+ install-%: %$(EXESUF) install-dirs
+- $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR)
++ $(INSTALL) -m 755 $< $(BINDIR)
- install-mplayer-man:
- for lang in $(MAN_LANG); do \
-@@ -350,7 +350,7 @@
- done
-
- install-mencoder: mencoder$(EXESUF)
-- $(INSTALL) -m 755 $(INSTALLSTRIP) mencoder$(EXESUF) $(BINDIR)
-+ $(INSTALL) -m 755 mencoder$(EXESUF) $(BINDIR)
- for lang in $(MAN_LANG); do \
- if test "$$lang" = en ; then \
- cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1 ; \
+ install-mplayer-man: $(foreach lang,$(MAN_LANG_ALL),install-mplayer-man-$(lang))
+ install-mencoder-man: $(foreach lang,$(MAN_LANG_ALL),install-mencoder-man-$(lang))
diff --git a/packages/mplayer/mplayer-maemo_svn.bb b/packages/mplayer/mplayer-maemo_svn.bb
index df2c64a6f9..5fb3425e64 100644
--- a/packages/mplayer/mplayer-maemo_svn.bb
+++ b/packages/mplayer/mplayer-maemo_svn.bb
@@ -54,6 +54,7 @@ EXTRA_OECONF = " \
--disable-xf86keysym \
--disable-tv \
--disable-tv-v4l2 \
+ --enable-v4l2 \
--disable-tv-bsdbt848 \
--enable-rtc \
--enable-network \
diff --git a/packages/mplayer/mplayer_0.0+1.0rc2.bb b/packages/mplayer/mplayer_0.0+1.0rc2.bb
index 7588b7e2cb..e50fa46eec 100644
--- a/packages/mplayer/mplayer_0.0+1.0rc2.bb
+++ b/packages/mplayer/mplayer_0.0+1.0rc2.bb
@@ -71,6 +71,7 @@ EXTRA_OECONF = " \
--disable-xf86keysym \
--disable-tv \
--disable-tv-v4l2 \
+ --enable-v4l2 \
--disable-tv-bsdbt848 \
--enable-rtc \
--enable-network \
diff --git a/packages/navit/navit.inc b/packages/navit/navit.inc
index 23e3f9b23d..011c058370 100644
--- a/packages/navit/navit.inc
+++ b/packages/navit/navit.inc
@@ -14,7 +14,6 @@ FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug"
FILES_${PN}-dev += "${libdir}/${PN}/*/*.so ${libdir}/${PN}/*/*.la"
SRC_URI_append = " \
- file://navit.xml-so.patch;patch=1 \
file://navit.desktop \
file://navit.launcher \
"
diff --git a/packages/navit/navit_0.0.4.bb b/packages/navit/navit_0.0.4.bb
index f1dfb1ceb4..104495f6f5 100644
--- a/packages/navit/navit_0.0.4.bb
+++ b/packages/navit/navit_0.0.4.bb
@@ -3,3 +3,5 @@ require navit.inc
PR = "r0"
SRC_URI = "${SOURCEFORGE_MIRROR}/navit/navit-${PV}.tar.gz"
+
+SRC_URI_append += "file://navit.xml-so.patch;patch=1"
diff --git a/packages/navit/navit_cvs.bb b/packages/navit/navit_cvs.bb
deleted file mode 100644
index 5739063f7b..0000000000
--- a/packages/navit/navit_cvs.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require navit.inc
-
-PV = "0.1.0+cvs${SRCDATE}"
-PR = "r0"
-
-DEFAULT_PREFERENCE = "-1"
-
-S = "${WORKDIR}/navit"
-
-SRC_URI = "cvs://anonymous@navit.cvs.sourceforge.net/cvsroot/navit;module=navit"
-
-EXTRA_AUTORECONF = " -I m4"
-
diff --git a/packages/navit/navit_svn.bb b/packages/navit/navit_svn.bb
new file mode 100644
index 0000000000..2cf3750671
--- /dev/null
+++ b/packages/navit/navit_svn.bb
@@ -0,0 +1,12 @@
+require navit.inc
+
+PV = "0.1.0+svnrev${SRCREV}"
+PR = "r0"
+
+DEFAULT_PREFERENCE = "-1"
+
+S = "${WORKDIR}/navit"
+
+SRC_URI = "svn://anonymous@navit.svn.sourceforge.net/svnroot/navit/trunk;module=navit;proto=https"
+
+EXTRA_AUTORECONF = " -I m4"
diff --git a/packages/ncurses/ncurses-native_5.4.bb b/packages/ncurses/ncurses-native_5.4.bb
index 95ca23f717..310a4bb27c 100644
--- a/packages/ncurses/ncurses-native_5.4.bb
+++ b/packages/ncurses/ncurses-native_5.4.bb
@@ -1,14 +1,4 @@
require ncurses_${PV}.bb
-
inherit native
-
-DEPENDS = ""
-
EXTRA_OEMAKE = '"BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
-
-FILESPATH = "${FILE_DIRNAME}/local:${FILE_DIRNAME}/ncurses-${PV}-${PR}:${FILE_DIRNAME}/ncurses-${PV}:${FILE_DIRNAME}/ncurses:${FILE_DIRNAME}"
-
-do_install() {
- :
-}
-
+DEPENDS = ""
diff --git a/packages/ncurses/ncurses-sdk_5.4.bb b/packages/ncurses/ncurses-sdk_5.4.bb
new file mode 100644
index 0000000000..fb69c1ec7d
--- /dev/null
+++ b/packages/ncurses/ncurses-sdk_5.4.bb
@@ -0,0 +1,3 @@
+require ncurses_${PV}.bb
+inherit sdk
+EXTRA_OEMAKE = '"BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
diff --git a/packages/ncurses/ncurses.inc b/packages/ncurses/ncurses.inc
index 7b1d2cb022..fd0885356b 100644
--- a/packages/ncurses/ncurses.inc
+++ b/packages/ncurses/ncurses.inc
@@ -1,15 +1,28 @@
DESCRIPTION = "Ncurses library"
HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
-SECTION = "libs"
LICENSE = "MIT"
+SECTION = "libs"
DEPENDS = "ncurses-native"
+PACKAGES_prepend = "ncurses-tools "
+PACKAGES_append = " ncurses-terminfo"
+FILES_ncurses_append = " ${datadir}/tabset"
RSUGGESTS_${PN} = "ncurses-terminfo"
+RPROVIDES = "libncurses5"
inherit autotools
-PARALLEL_MAKE = ""
+# This keeps only tput/tset in ncurses
+# clear/reset are in already busybox
+FILES_ncurses-tools = "${bindir}/tic ${bindir}/toe ${bindir}/infotocap ${bindir}/captoinfo ${bindir}/infocmp ${bindir}/clear.${PN} ${bindir}/reset.${PN} ${bindir}/tack "
+FILES_ncurses-terminfo = "${datadir}/terminfo"
+FILES_${PN} = "${bindir}/tput ${bindir}/tset ${libdir}/lib*.so.* usr/share/tabset etc/terminfo"
+
+PARALLEL_MAKE=""
+
+FILESPATH = "${FILE_DIRNAME}/local:${FILE_DIRNAME}/ncurses-${PV}-${PR}:${FILE_DIRNAME}/ncurses-${PV}:${FILE_DIRNAME}/ncurses:${FILE_DIRNAME}"
EXTRA_OECONF = "--with-shared \
+ --with-libtool \
--without-profile \
--without-debug \
--disable-rpath \
@@ -20,7 +33,6 @@ EXTRA_OECONF = "--with-shared \
--without-cxx-binding \
--with-terminfo-dirs=${sysconfdir}/terminfo:${datadir}/terminfo \
--enable-overwrite"
-
export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}"
export BUILD_LDFLAGS = ""
export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
@@ -64,48 +76,24 @@ do_install() {
ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
fi
- mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN}
- mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
+ if [ "${PN}" = "ncurses" ]; then
+ mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN}
+ mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
+ fi
}
pkg_postinst_ncurses-tools () {
- update-alternatives --install ${bindir}/clear clear clear.${PN} 100
- update-alternatives --install ${bindir}/reset reset reset.${PN} 100
+ if [ "${PN}" = "ncurses" ]; then
+ update-alternatives --install ${bindir}/clear clear clear.${PN} 100
+ update-alternatives --install ${bindir}/reset reset reset.${PN} 100
+ fi
}
pkg_prerm_ncurses-tools () {
- update-alternatives --remove clear clear.${PN}
- update-alternatives --remove reset reset.${PN}
+ if [ "${PN}" = "ncurses" ]; then
+ update-alternatives --remove clear clear.${PN}
+ update-alternatives --remove reset reset.${PN}
+ fi
}
-
-
-PACKAGES =+ "${PN}-ncurses ${PN}-panel ${PN}-menu ${PN}-form ${PN}-terminfo ${PN}-tools"
-FILES_${PN}-ncurses = "${libdir}/libncurses.so.*"
-# You can'r really run any ncurses app without terminfo files, which is why the packaging was that way before mickeyl broke it.
-# This RRECOMMENDS should pull in terminfo to fix that
-RRECOMMENDS_${PN}-ncurses = "${PN}-terminfo"
-FILES_${PN}-panel = "${libdir}/libpanel.so.*"
-FILES_${PN}-menu = "${libdir}/libmenu.so.*"
-FILES_${PN}-form = "${libdir}/libform.so.*"
-FILES_${PN}-terminfo = "\
- ${libdir}/terminfo \
- ${datadir}/terminfo \
-"
-FILES_${PN}-tools = "\
- ${bindir}/tic \
- ${bindir}/tack \
- ${bindir}/toe \
- ${bindir}/infotocap \
- ${bindir}/captoinfo \
- ${bindir}/infocmp \
- ${bindir}/clear.${PN} \
- ${bindir}/reset.${PN} \
-"
-FILES_${PN} = "\
- ${bindir}/tput \
- ${bindir}/tset \
- ${datadir}/tabset \
- ${sysconfdir}/terminfo \
-"
diff --git a/packages/ncurses/ncurses/makefile_tweak.patch b/packages/ncurses/ncurses/makefile_tweak.patch
new file mode 100644
index 0000000000..480855bcc6
--- /dev/null
+++ b/packages/ncurses/ncurses/makefile_tweak.patch
@@ -0,0 +1,89 @@
+Libtool 2.2.2 needs to be able to use top_builddir. Automake usually exports
+this but ncurses doesn't use automake.
+
+RP 14/4/08
+
+Index: ncurses-5.4/ncurses/Makefile.in
+===================================================================
+--- ncurses-5.4.orig/ncurses/Makefile.in 2008-04-14 12:22:34.000000000 +0100
++++ ncurses-5.4/ncurses/Makefile.in 2008-04-14 12:22:53.000000000 +0100
+@@ -57,6 +57,7 @@
+ MODEL = @DFT_LWR_MODEL@
+ DESTDIR = @DESTDIR@
+ top_srcdir = @top_srcdir@
++top_builddir = @top_srcdir@
+ srcdir = @srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+Index: ncurses-5.4/form/Makefile.in
+===================================================================
+--- ncurses-5.4.orig/form/Makefile.in 2008-04-14 12:30:35.000000000 +0100
++++ ncurses-5.4/form/Makefile.in 2008-04-14 12:30:59.000000000 +0100
+@@ -51,6 +51,7 @@
+ MODEL = @DFT_LWR_MODEL@
+ DESTDIR = @DESTDIR@
+ srcdir = @srcdir@
++top_builddir = @top_srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+Index: ncurses-5.4/menu/Makefile.in
+===================================================================
+--- ncurses-5.4.orig/menu/Makefile.in 2008-04-14 12:29:00.000000000 +0100
++++ ncurses-5.4/menu/Makefile.in 2008-04-14 12:29:13.000000000 +0100
+@@ -51,6 +51,7 @@
+ MODEL = @DFT_LWR_MODEL@
+ DESTDIR = @DESTDIR@
+ srcdir = @srcdir@
++top_builddir = @top_srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+Index: ncurses-5.4/panel/Makefile.in
+===================================================================
+--- ncurses-5.4.orig/panel/Makefile.in 2008-04-14 12:27:40.000000000 +0100
++++ ncurses-5.4/panel/Makefile.in 2008-04-14 12:27:59.000000000 +0100
+@@ -51,6 +51,7 @@
+ MODEL = @DFT_LWR_MODEL@
+ DESTDIR = @DESTDIR@
+ srcdir = @srcdir@
++top_builddir = @top_srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+Index: ncurses-5.4/progs/Makefile.in
+===================================================================
+--- ncurses-5.4.orig/progs/Makefile.in 2008-04-14 12:24:37.000000000 +0100
++++ ncurses-5.4/progs/Makefile.in 2008-04-14 12:25:06.000000000 +0100
+@@ -54,6 +54,7 @@
+ MODEL = ../@DFT_OBJ_SUBDIR@
+ DESTDIR = @DESTDIR@
+ srcdir = @srcdir@
++top_builddir = @top_srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+Index: ncurses-5.4/tack/Makefile.in
+===================================================================
+--- ncurses-5.4.orig/tack/Makefile.in 2008-04-14 12:26:05.000000000 +0100
++++ ncurses-5.4/tack/Makefile.in 2008-04-14 12:26:26.000000000 +0100
+@@ -22,6 +22,7 @@
+ MODEL = ../@DFT_OBJ_SUBDIR@
+ DESTDIR = @DESTDIR@
+ srcdir = @srcdir@
++top_builddir = @top_srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+Index: ncurses-5.4/test/Makefile.in
+===================================================================
+--- ncurses-5.4.orig/test/Makefile.in 2008-04-14 12:32:37.000000000 +0100
++++ ncurses-5.4/test/Makefile.in 2008-04-14 12:32:56.000000000 +0100
+@@ -43,6 +43,7 @@
+
+ MODEL = ../@DFT_OBJ_SUBDIR@
+ srcdir = @srcdir@
++top_builddir = @top_srcdir@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ libdir = @libdir@
diff --git a/packages/ncurses/ncurses/visibility.patch b/packages/ncurses/ncurses/visibility.patch
index 66366ce3ea..29cac5f1b8 100644
--- a/packages/ncurses/ncurses/visibility.patch
+++ b/packages/ncurses/ncurses/visibility.patch
@@ -2187,14 +2187,14 @@
+ CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
+fi
+if test "$GCC" != yes; then
-+ CPPFLAGS="$CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+elif test "$includedir" != "/usr/include"; then
+ if test "$includedir" = '${prefix}/include' ; then
+ if test $prefix != /usr ; then
-+ CPPFLAGS="$CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+ fi
+ else
-+ CPPFLAGS="$CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+ fi
+fi
+AC_SUBST(CPPFLAGS)
diff --git a/packages/ncurses/ncurses_5.4.bb b/packages/ncurses/ncurses_5.4.bb
index d73164d3c0..2cd0cf0de0 100644
--- a/packages/ncurses/ncurses_5.4.bb
+++ b/packages/ncurses/ncurses_5.4.bb
@@ -1,6 +1,7 @@
-PR = "r14"
+PR = "r15"
SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz \
+ file://makefile_tweak.patch;patch=1 \
file://visibility.patch;patch=1"
S = "${WORKDIR}/ncurses-${PV}"
diff --git a/packages/netbase/netbase/mpc8313e-rdb/interfaces b/packages/netbase/netbase/mpc8313e-rdb/interfaces
deleted file mode 100644
index 64d65e3ad9..0000000000
--- a/packages/netbase/netbase/mpc8313e-rdb/interfaces
+++ /dev/null
@@ -1,16 +0,0 @@
-# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
-
-# The loopback interface
-auto lo
-iface lo inet loopback
-
-# Wired interface
-auto eth1
-iface eth1 inet dhcp
-
-# Wireless interface
-auto ath0
-iface ath0 inet static
- address 192.168.99.1
- netmask 255.255.255.0
-
diff --git a/packages/nonworking/opie-dasher/.mtn2git_empty b/packages/nonworking/opie-dasher/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/nonworking/opie-dasher/.mtn2git_empty
diff --git a/packages/opie-dasher/opie-dasher.inc b/packages/nonworking/opie-dasher/opie-dasher.inc
index 9903dd9a56..9903dd9a56 100644
--- a/packages/opie-dasher/opie-dasher.inc
+++ b/packages/nonworking/opie-dasher/opie-dasher.inc
diff --git a/packages/opie-dasher/opie-dasher_1.2.2.bb b/packages/nonworking/opie-dasher/opie-dasher_1.2.2.bb
index 88c009d775..88c009d775 100644
--- a/packages/opie-dasher/opie-dasher_1.2.2.bb
+++ b/packages/nonworking/opie-dasher/opie-dasher_1.2.2.bb
diff --git a/packages/opie-dasher/opie-dasher_1.2.3.bb b/packages/nonworking/opie-dasher/opie-dasher_1.2.3.bb
index e7774e33df..e7774e33df 100644
--- a/packages/opie-dasher/opie-dasher_1.2.3.bb
+++ b/packages/nonworking/opie-dasher/opie-dasher_1.2.3.bb
diff --git a/packages/opie-dasher/opie-dasher_cvs.bb b/packages/nonworking/opie-dasher/opie-dasher_cvs.bb
index 10cca07fd6..10cca07fd6 100644
--- a/packages/opie-dasher/opie-dasher_cvs.bb
+++ b/packages/nonworking/opie-dasher/opie-dasher_cvs.bb
diff --git a/packages/obexftp/obexftp_0.20.bb b/packages/obexftp/obexftp_0.20.bb
index 386e83d6dc..2a0b310a49 100644
--- a/packages/obexftp/obexftp_0.20.bb
+++ b/packages/obexftp/obexftp_0.20.bb
@@ -2,17 +2,17 @@ DESCRIPTION = "OBEX Ftp Client based on openobex."
SECTION = "console/network"
HOMEPAGE = "http://openobex.triq.net"
LICENSE = "GPL"
-DEPENDS = "openobex libgsm virtual/libiconv"
-PR = "r3"
+DEPENDS = "openobex libgsm"
+PR = "r4"
SRC_URI = "${SOURCEFORGE_MIRROR}/openobex/obexftp-${PV}.tar.gz \
file://iconv.patch;patch=1 \
file://i-hate-libtool.patch;patch=1 \
file://m4.patch;patch=1"
-inherit autotools
+inherit autotools gettext
-EXTRA_OECONF = "--enable-bluetooth --disable-swig --disable-perl --disable-python --disable-tcl --disable-builddocs"
+EXTRA_OECONF += "--enable-bluetooth --disable-swig --disable-perl --disable-python --disable-tcl --disable-builddocs --disable-rpath"
PARALLEL_MAKE = ""
diff --git a/packages/obexftp/obexftp_0.22.bb b/packages/obexftp/obexftp_0.22.bb
new file mode 100644
index 0000000000..89e10a72af
--- /dev/null
+++ b/packages/obexftp/obexftp_0.22.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "OBEX Ftp Client based on openobex."
+SECTION = "console/network"
+HOMEPAGE = "http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp"
+LICENSE = "GPL"
+DEPENDS = "openobex bluez-libs libusb virtual/libiconv"
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/openobex/obexftp-${PV}.tar.bz2 \
+ "
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "--enable-bluetooth \
+ --disable-swig \
+ --disable-perl \
+ --disable-python \
+ --disable-tcl \
+ --disable-ruby \
+ --disable-builddocs \
+ --disable-rpath \
+ "
+
+PARALLEL_MAKE = ""
+
+LEAD_SONAME = "libobexftp.so"
+
+do_stage() {
+ autotools_stage_all
+}
+
diff --git a/packages/obsolete/classpath/classpath-gtk_0.93.bb b/packages/obsolete/classpath/classpath-gtk_0.93.bb
deleted file mode 100644
index 3c9f073e26..0000000000
--- a/packages/obsolete/classpath/classpath-gtk_0.93.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require classpath.inc
-
-DEPENDS = "glib-2.0 gtk+ cairo gconf libart-lgpl pango libxtst virtual/javac-native zip-native"
-RDEPENDS_${PN} = "classpath-common (>= ${PV})"
-RCONFLICTS_${PN} = "classpath-minimal"
-
-SRC_URI += "file://disable-automake-checks-v2.patch;patch=1"
-
-EXTRA_OECONF = "--with-jikes --disable-plugin --disable-dssi"
diff --git a/packages/obsolete/classpath/classpath-gtk_cvs.bb b/packages/obsolete/classpath/classpath-gtk_cvs.bb
deleted file mode 100644
index 4d4895a319..0000000000
--- a/packages/obsolete/classpath/classpath-gtk_cvs.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-require classpath.inc
-
-PR = "r2"
-
-SRCDATE_${PN} ?= "20070501"
-PV = "0.93+cvs${SRCDATE}"
-
-### note from Laibsch: bug 2523 has information on how to build this package
-DEPENDS = "glib-2.0 gtk+ cairo gconf virtual/javac-native zip-native virtual/java-native libxtst"
-RDEPENDS_${PN} = "classpath-common (>= ${PV})"
-RCONFLICTS_${PN} = "classpath-minimal"
-
-SRC_URI = "cvs://anonymous@cvs.savannah.gnu.org/sources/classpath;module=classpath \
- file://disable-automake-checks-v2.patch;patch=1"
-
-S = "${WORKDIR}/classpath"
-
-EXTRA_OECONF = "--with-javac=${STAGING_BINDIR_NATIVE}/javac --with-ecj-jar=${STAGING_DATADIR_NATIVE}/ecj-bootstrap.jar --disable-plugin --disable-dssi --disable-alsa"
-
-do_stage() {
- install -d ${STAGING_INCDIR}/classpath
- install -m 0755 include/jni* ${STAGING_INCDIR}/classpath/
- install -d ${STAGING_DATADIR}/classpath
- install -m 0755 lib/glibj.zip ${STAGING_DATADIR}/classpath/
-}
-
-do_install() {
- autotools_do_install
- mv ${D}${libdir}/security ${D}${libdir}/${PN}
-}
diff --git a/packages/obsolete/classpath/classpath-minimal-native_0.93.bb b/packages/obsolete/classpath/classpath-minimal-native_0.93.bb
deleted file mode 100644
index e7862e6e3f..0000000000
--- a/packages/obsolete/classpath/classpath-minimal-native_0.93.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require classpath.inc
-
-DEPENDS = "glib-2.0 libart-lgpl pango libxtst virtual/javac-native zip-native"
-PR = "r1"
-
-SRC_URI += "file://disable-automake-checks-v2.patch;patch=1"
-
-S = "${WORKDIR}/classpath-${PV}"
-
-inherit native
-
-EXTRA_OECONF = "--with-jikes --disable-gconf-peer --disable-gtk-peer --disable-plugin --disable-dssi --disable-examples"
-
-do_stage() {
- install -d ${STAGING_INCDIR}/classpath
- install -m 0755 include/jni* ${STAGING_INCDIR}/classpath/
- install -d ${STAGING_DATADIR}/classpath
- install -m 0755 lib/glibj.zip ${STAGING_DATADIR}/classpath/
-}
-
-do_install() {
- :
-}
diff --git a/packages/obsolete/classpath/classpath-minimal-native_0.95.bb b/packages/obsolete/classpath/classpath-minimal-native_0.95.bb
deleted file mode 100644
index 28b25a7cb9..0000000000
--- a/packages/obsolete/classpath/classpath-minimal-native_0.95.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# classpath-minimal-native has no packages
-# primary goal is to speed up building of java virtual machines
-
-inherit native
-require classpath-minimal_${PV}.bb
-PR = "r0"
diff --git a/packages/obsolete/classpath/classpath-minimal_0.90.bb b/packages/obsolete/classpath/classpath-minimal_0.90.bb
deleted file mode 100644
index e006e23c32..0000000000
--- a/packages/obsolete/classpath/classpath-minimal_0.90.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require classpath.inc
-
-DEPENDS = "virtual/javac-native zip-native"
-RDEPENDS_${PBN}-minimal = "${PBN}-common (>= ${PV})"
-RCONFLICTS_${PBN}-minimal = "${PBN}-gtk"
-
-SRC_URI += "file://disable-automake-checks.patch;patch=1"
-
-EXTRA_OECONF = "--with-jikes --without-x --with-glibj --disable-gtk-peer --disable-alsa"
diff --git a/packages/obsolete/classpath/classpath-minimal_0.95.bb b/packages/obsolete/classpath/classpath-minimal_0.95.bb
deleted file mode 100644
index 1fe65edc08..0000000000
--- a/packages/obsolete/classpath/classpath-minimal_0.95.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-DESCRIPTION = "GNU Classpath standard Java libraries"
-HOMEPAGE = "http://www.gnu.org/software/classpath/"
-SECTION = "libs"
-PRIORITY = "optional"
-LICENSE = "Classpath"
-PROVIDES = "classpath"
-RPROVIDES = "classpath"
-PR = "r1"
-
-S = "${WORKDIR}/classpath-${PV}"
-
-SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz"
-
-DEPENDS = "virtual/javac-native zip-native"
-
-inherit autotools
-
-
-EXTRA_OECONF = "--with-glibj \
- --with-javac=${STAGING_BINDIR_NATIVE}/javac \
- --disable-alsa \
- --disable-gconf-peer \
- --disable-gtk-peer \
- --disable-plugin \
- --disable-dssi \
- --disable-examples \
- "
-do_install() {
- :
-}
-
-do_stage() {
- install -d ${STAGING_INCDIR}/classpath-minimal/
- install -m 0644 include/jni.h ${STAGING_INCDIR}/classpath-minimal/
- install -m 0644 include/jni_md.h ${STAGING_INCDIR}/classpath-minimal/
- install -d ${STAGING_DATADIR}/java/classpath-minimal/
- install -m 0644 lib/glibj.zip ${STAGING_DATADIR}/java/classpath-minimal/
-}
-
-PACKAGES = "${PN}-dbg "
diff --git a/packages/obsolete/classpath/classpath.inc b/packages/obsolete/classpath/classpath.inc
deleted file mode 100644
index d9498c99d5..0000000000
--- a/packages/obsolete/classpath/classpath.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-DESCRIPTION = "GNU Classpath standard Java libraries"
-HOMEPAGE = "http://www.gnu.org/software/classpath/"
-SECTION = "libs"
-PRIORITY = "optional"
-LICENSE = "Classpath"
-PROVIDES = "classpath"
-RPROVIDES = "classpath"
-
-SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz \
- file://gconf_version.patch;patch=1 \
- file://fix-endian-arm-floats.patch;patch=1"
-
-inherit autotools
-
-do_stage() {
- install -d ${STAGING_INCDIR}/classpath
- install -m 0755 include/jni* ${STAGING_INCDIR}/classpath/
-}
-
-do_install() {
- autotools_do_install
- mv ${D}${libdir}/security ${D}${libdir}/${PN}
-}
-
-PACKAGES =+ "classpath-common classpath-examples classpath-tools"
-FILES_classpath-common += "${datadir}/classpath/glibj.zip"
-FILES_classpath-examples += "${datadir}/classpath/examples"
-FILES_classpath-tools += "${datadir}/classpath/tools.zip ${datadir}/classpath/tools"
-FILES_classpath-dev += "${libdir}/*.so"
-FILES_classpath-dbg += "${libdir}/classpath/.debug"
diff --git a/packages/obsolete/classpath/classpath_0.14.bb b/packages/obsolete/classpath/classpath_0.14.bb
deleted file mode 100644
index a20aa73992..0000000000
--- a/packages/obsolete/classpath/classpath_0.14.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require classpath.inc
-
-DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
-RDEPENDS_${PN} = "${PN}-common (${PV})"
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz \
- file://disable-automake-checks.patch;patch=1"
-
-EXTRA_OECONF = "--with-jikes"
diff --git a/packages/obsolete/classpath/classpath_0.15.bb b/packages/obsolete/classpath/classpath_0.15.bb
deleted file mode 100644
index a20aa73992..0000000000
--- a/packages/obsolete/classpath/classpath_0.15.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require classpath.inc
-
-DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
-RDEPENDS_${PN} = "${PN}-common (${PV})"
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz \
- file://disable-automake-checks.patch;patch=1"
-
-EXTRA_OECONF = "--with-jikes"
diff --git a/packages/obsolete/classpath/classpath_0.17.bb b/packages/obsolete/classpath/classpath_0.17.bb
deleted file mode 100644
index a20aa73992..0000000000
--- a/packages/obsolete/classpath/classpath_0.17.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require classpath.inc
-
-DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
-RDEPENDS_${PN} = "${PN}-common (${PV})"
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz \
- file://disable-automake-checks.patch;patch=1"
-
-EXTRA_OECONF = "--with-jikes"
diff --git a/packages/obsolete/classpath/classpath_0.18.bb b/packages/obsolete/classpath/classpath_0.18.bb
deleted file mode 100644
index 8696501fcf..0000000000
--- a/packages/obsolete/classpath/classpath_0.18.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require classpath.inc
-
-DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
-RDEPENDS_${PN} = "${PN}-common (>= ${PV})"
-PR = "r1"
-
-SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz \
- file://disable-automake-checks.patch;patch=1"
-
-EXTRA_OECONF = "--with-jikes"
diff --git a/packages/obsolete/classpath/classpath_0.19.bb b/packages/obsolete/classpath/classpath_0.19.bb
deleted file mode 100644
index 8696501fcf..0000000000
--- a/packages/obsolete/classpath/classpath_0.19.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require classpath.inc
-
-DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
-RDEPENDS_${PN} = "${PN}-common (>= ${PV})"
-PR = "r1"
-
-SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz \
- file://disable-automake-checks.patch;patch=1"
-
-EXTRA_OECONF = "--with-jikes"
diff --git a/packages/obsolete/classpath/classpath_0.20.bb b/packages/obsolete/classpath/classpath_0.20.bb
deleted file mode 100644
index 8696501fcf..0000000000
--- a/packages/obsolete/classpath/classpath_0.20.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require classpath.inc
-
-DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
-RDEPENDS_${PN} = "${PN}-common (>= ${PV})"
-PR = "r1"
-
-SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz \
- file://disable-automake-checks.patch;patch=1"
-
-EXTRA_OECONF = "--with-jikes"
diff --git a/packages/obsolete/classpath/classpath_cvs.bb b/packages/obsolete/classpath/classpath_cvs.bb
deleted file mode 100644
index 943af376a7..0000000000
--- a/packages/obsolete/classpath/classpath_cvs.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-DESCRIPTION = "GNU Classpath standard Java libraries"
-HOMEPAGE = "http://www.gnu.org/software/classpath/"
-LICENSE = "Classpath"
-PRIORITY = "optional"
-SECTION = "libs"
-PV = "0.20+cvs${SRCDATE}"
-
-DEFAULT_PREFERENCE = "-1"
-
-DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
-RDEPENDS_${PN} = "${PN}-common (>= ${PV})"
-
-SRC_URI = "cvs://anoncvs@cvs.gnu.org/cvsroot/classpath;method=pserver;rsh=ssh;module=classpath \
- file://disable-automake-checks.patch;patch=1"
-S = "${WORKDIR}/classpath"
-
-inherit autotools
-
-EXTRA_OECONF = "--with-jikes"
-
-PACKAGES += " ${PN}-common ${PN}-examples"
-
-FILES_${PN} = "${libdir}/${PN}"
-FILES_${PN}-common = "${datadir}/${PN}/glibj.zip"
-FILES_${PN}-examples = "${datadir}/${PN}/examples"
-
-do_stage() {
- install -d ${STAGING_INCDIR}/classpath
- install -m 0755 include/jni* ${STAGING_INCDIR}/classpath/
-}
-
-do_install() {
- autotools_do_install
- mv ${D}${libdir}/security ${D}${libdir}/${PN}
-}
diff --git a/packages/obsolete/classpath/files/disable-automake-checks-v2.patch b/packages/obsolete/classpath/files/disable-automake-checks-v2.patch
deleted file mode 100644
index 0c1df1acae..0000000000
--- a/packages/obsolete/classpath/files/disable-automake-checks-v2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- sablevm-classpath-1.1.7/configure.ac.orig 2004-11-26 00:23:01.000000000 +0100
-+++ sablevm-classpath-1.1.7/configure.ac 2004-11-26 00:23:46.000000000 +0100
-@@ -34,7 +34,7 @@
- AC_SUBST(CLASSPATH_MODULE)
-
- AC_PREREQ(2.59)
--AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar -Wno-portability])
-+AM_INIT_AUTOMAKE
- AC_CONFIG_HEADERS([include/config.h])
- AC_PREFIX_DEFAULT(/usr/local)
-
diff --git a/packages/obsolete/classpath/files/disable-automake-checks.patch b/packages/obsolete/classpath/files/disable-automake-checks.patch
deleted file mode 100644
index d6a55428ad..0000000000
--- a/packages/obsolete/classpath/files/disable-automake-checks.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- sablevm-classpath-1.1.7/configure.ac.orig 2004-11-26 00:23:01.000000000 +0100
-+++ sablevm-classpath-1.1.7/configure.ac 2004-11-26 00:23:46.000000000 +0100
-@@ -34,7 +34,7 @@
- AC_SUBST(CLASSPATH_MODULE)
-
- AC_PREREQ(2.59)
--AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar])
-+AM_INIT_AUTOMAKE
- AC_CONFIG_HEADERS([include/config.h])
- AC_PREFIX_DEFAULT(/usr/local)
-
diff --git a/packages/obsolete/classpath/files/fix-endian-arm-floats.patch b/packages/obsolete/classpath/files/fix-endian-arm-floats.patch
deleted file mode 100644
index a9af0611b2..0000000000
--- a/packages/obsolete/classpath/files/fix-endian-arm-floats.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- classpath/native/fdlibm/ieeefp.h.orig 2006-04-14 22:33:09.000000000 -0400
-+++ classpath/native/fdlibm/ieeefp.h 2006-04-14 22:41:46.000000000 -0400
-@@ -13,7 +13,7 @@
- byte ordering was big or little endian depending upon the target.
- Modern floating-point formats are naturally ordered; in this case
- __VFP_FP__ will be defined, even if soft-float. */
--#ifdef __VFP_FP__
-+#ifdef __SOFTFP__
- #ifdef __ARMEL__
- #define __IEEE_LITTLE_ENDIAN
- #else
diff --git a/packages/obsolete/classpath/files/gconf_version.patch b/packages/obsolete/classpath/files/gconf_version.patch
deleted file mode 100644
index b1be1209a2..0000000000
--- a/packages/obsolete/classpath/files/gconf_version.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- classpath-0.93/configure.ac~ 2007-03-29 15:52:30.000000000 -0500
-+++ classpath-0.93/configure.ac 2007-03-29 15:52:30.000000000 -0500
-@@ -496,7 +496,7 @@
-
- dnl gconf-peer
- if test "x${COMPILE_GCONF_PEER}" = xyes; then
-- PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.11.2)
-+ PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6.0)
- AC_SUBST(GCONF_CFLAGS)
- AC_SUBST(GCONF_LIBS)
- dnl we also need gdk for locking
diff --git a/packages/obsolete/jamvm/files/jamvm-1.3.1-size-defaults.patch b/packages/obsolete/jamvm/files/jamvm-1.3.1-size-defaults.patch
deleted file mode 100644
index a41beee982..0000000000
--- a/packages/obsolete/jamvm/files/jamvm-1.3.1-size-defaults.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- jamvm-1.3.1.orig/src/jam.h 2005-07-17 23:53:34.000000000 +0200
-+++ jamvm-1.3.1/src/jam.h 2005-07-17 23:54:17.000000000 +0200
-@@ -548,7 +548,9 @@
- #endif
-
- /* default size of the Java stack */
-+#ifndef DEFAULT_STACK
- #define DEFAULT_STACK 64*KB
-+#endif
-
- /* size of emergency area - big enough to create
- a StackOverflow exception */
diff --git a/packages/obsolete/jamvm/jamvm-1.3.0/heap-size.patch b/packages/obsolete/jamvm/jamvm-1.3.0/heap-size.patch
deleted file mode 100644
index 36d681889d..0000000000
--- a/packages/obsolete/jamvm/jamvm-1.3.0/heap-size.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- jamvm-1.3.0/src/jam.h.orig 2005-04-02 14:38:49.000000000 +0200
-+++ jamvm-1.3.0/src/jam.h 2005-04-02 14:41:18.000000000 +0200
-@@ -531,13 +531,19 @@
- #define MIN_STACK 2*KB
-
- /* default minimum size of object heap */
-+#ifndef DEFAULT_MIN_HEAP
- #define DEFAULT_MIN_HEAP 2*MB
-+#endif
-
- /* default maximum size of object heap */
-+#ifndef DEFAULT_MAX_HEAP
- #define DEFAULT_MAX_HEAP 128*MB
-+#endif
-
- /* default size of the Java stack */
-+#ifndef DEFAULT_STACK
- #define DEFAULT_STACK 64*KB
-+#endif
-
- /* size of emergency area - big enough to create
- a StackOverflow exception */
diff --git a/packages/obsolete/jamvm/jamvm_1.3.0.bb b/packages/obsolete/jamvm/jamvm_1.3.0.bb
deleted file mode 100644
index ffdf74938f..0000000000
--- a/packages/obsolete/jamvm/jamvm_1.3.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
-HOMEPAGE = "http://jamvm.sourceforge.net/"
-LICENSE = "GPL"
-PRIORITY = "optional"
-SECTION = "interpreters"
-
-DEPENDS = "zlib classpath"
-RDEPENDS = "classpath (>= 0.14) classpath-common (>= 0.14)"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz \
- file://heap-size.patch;patch=1"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF = "--with-classpath-install-dir=${prefix}"
-CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
-
-PROVIDES = "virtual/java"
-ALTERNATIVE_NAME = "java"
-ALTERNATIVE_PATH = "${bindir}/jamvm"
-ALTERNATIVE_PRIORITY = "10"
diff --git a/packages/obsolete/jamvm/jamvm_1.3.1.bb b/packages/obsolete/jamvm/jamvm_1.3.1.bb
deleted file mode 100644
index 20b1535707..0000000000
--- a/packages/obsolete/jamvm/jamvm_1.3.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
-HOMEPAGE = "http://jamvm.sourceforge.net/"
-LICENSE = "GPL"
-PRIORITY = "optional"
-SECTION = "interpreters"
-
-DEPENDS = "zlib classpath"
-RDEPENDS = "classpath (>= 0.14) classpath-common (>= 0.14)"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz \
- file://jamvm-1.3.1-size-defaults.patch;patch=1"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF = "--with-classpath-install-dir=${prefix}"
-CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
-
-PROVIDES = "virtual/java"
-ALTERNATIVE_NAME = "java"
-ALTERNATIVE_PATH = "${bindir}/jamvm"
-ALTERNATIVE_PRIORITY = "10"
diff --git a/packages/obsolete/jamvm/jamvm_1.3.2.bb b/packages/obsolete/jamvm/jamvm_1.3.2.bb
deleted file mode 100644
index 9727fd6cda..0000000000
--- a/packages/obsolete/jamvm/jamvm_1.3.2.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
-HOMEPAGE = "http://jamvm.sourceforge.net/"
-LICENSE = "GPL"
-PRIORITY = "optional"
-SECTION = "interpreters"
-
-DEPENDS = "zlib classpath"
-RDEPENDS = "classpath (>= 0.14) classpath-common (>= 0.14)"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz \
- file://jamvm-1.3.1-size-defaults.patch;patch=1"
-
-# This uses 32 bit arm, so force the instruction set to arm, not thumb
-ARM_INSTRUCTION_SET = "arm"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF = "--with-classpath-install-dir=${prefix}"
-CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
-
-PROVIDES = "virtual/java"
-ALTERNATIVE_NAME = "java"
-ALTERNATIVE_PATH = "${bindir}/jamvm"
-ALTERNATIVE_PRIORITY = "10"
diff --git a/packages/obsolete/jamvm/jamvm_1.4.1.bb b/packages/obsolete/jamvm/jamvm_1.4.1.bb
deleted file mode 100644
index 9727fd6cda..0000000000
--- a/packages/obsolete/jamvm/jamvm_1.4.1.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
-HOMEPAGE = "http://jamvm.sourceforge.net/"
-LICENSE = "GPL"
-PRIORITY = "optional"
-SECTION = "interpreters"
-
-DEPENDS = "zlib classpath"
-RDEPENDS = "classpath (>= 0.14) classpath-common (>= 0.14)"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz \
- file://jamvm-1.3.1-size-defaults.patch;patch=1"
-
-# This uses 32 bit arm, so force the instruction set to arm, not thumb
-ARM_INSTRUCTION_SET = "arm"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF = "--with-classpath-install-dir=${prefix}"
-CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
-
-PROVIDES = "virtual/java"
-ALTERNATIVE_NAME = "java"
-ALTERNATIVE_PATH = "${bindir}/jamvm"
-ALTERNATIVE_PRIORITY = "10"
diff --git a/packages/obsolete/olsr/.mtn2git_empty b/packages/obsolete/olsr/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/obsolete/olsr/.mtn2git_empty
diff --git a/packages/obsolete/olsr/files/.mtn2git_empty b/packages/obsolete/olsr/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/obsolete/olsr/files/.mtn2git_empty
diff --git a/packages/olsrd/files/0.4.9-httpinfo-makefile.diff b/packages/obsolete/olsr/files/0.4.9-httpinfo-makefile.diff
index d4058f5b30..d4058f5b30 100644
--- a/packages/olsrd/files/0.4.9-httpinfo-makefile.diff
+++ b/packages/obsolete/olsr/files/0.4.9-httpinfo-makefile.diff
diff --git a/packages/olsrd/files/lib.diff b/packages/obsolete/olsr/files/lib.diff
index f3935cc53d..f3935cc53d 100644
--- a/packages/olsrd/files/lib.diff
+++ b/packages/obsolete/olsr/files/lib.diff
diff --git a/packages/olsr/olsr_0.3-1.bb b/packages/obsolete/olsr/olsr_0.3-1.bb
index 276e7b489d..276e7b489d 100644
--- a/packages/olsr/olsr_0.3-1.bb
+++ b/packages/obsolete/olsr/olsr_0.3-1.bb
diff --git a/packages/olsrd/olsrd_0.4.10.bb b/packages/obsolete/olsr/olsrd_0.4.10.bb
index 9722ca7d8d..9722ca7d8d 100644
--- a/packages/olsrd/olsrd_0.4.10.bb
+++ b/packages/obsolete/olsr/olsrd_0.4.10.bb
diff --git a/packages/olsrd/olsrd_0.4.8.bb b/packages/obsolete/olsr/olsrd_0.4.8.bb
index 98a6344fb7..c2b9c825b6 100644
--- a/packages/olsrd/olsrd_0.4.8.bb
+++ b/packages/obsolete/olsr/olsrd_0.4.8.bb
@@ -5,7 +5,8 @@ SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "BSD"
-SRC_URI="http://www.olsr.org/releases/0.4/olsrd-${PV}.tar.bz2 \
+MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
+SRC_URI="http://www.olsr.org/releases/${MAJ_VER}/olsrd-${PV}.tar.bz2 \
file://init \
file://olsrd.conf"
diff --git a/packages/olsrd/olsrd_0.4.9.bb b/packages/obsolete/olsr/olsrd_0.4.9.bb
index 1f186f4bbb..1f186f4bbb 100644
--- a/packages/olsrd/olsrd_0.4.9.bb
+++ b/packages/obsolete/olsr/olsrd_0.4.9.bb
diff --git a/packages/olsrd/olsrd_cvs.bb b/packages/obsolete/olsr/olsrd_cvs.bb
index a6d2ff7657..a6d2ff7657 100644
--- a/packages/olsrd/olsrd_cvs.bb
+++ b/packages/obsolete/olsr/olsrd_cvs.bb
diff --git a/packages/olsrd/files/olsrd-0.5.5-unbreak-makefile.patch b/packages/olsrd/files/olsrd-0.5.5-unbreak-makefile.patch
new file mode 100644
index 0000000000..c08a49524c
--- /dev/null
+++ b/packages/olsrd/files/olsrd-0.5.5-unbreak-makefile.patch
@@ -0,0 +1,47 @@
+Index: olsrd-a5b9cf969979/Makefile
+===================================================================
+--- olsrd-a5b9cf969979.orig/Makefile 2008-02-06 19:32:49.000000000 +0100
++++ olsrd-a5b9cf969979/Makefile 2008-06-23 15:33:35.000000000 +0200
+@@ -95,9 +95,8 @@
+ install: install_olsrd
+
+ install_bin:
+- mkdir -p $(SBINDIR)
+- install -m 755 $(EXENAME) $(SBINDIR)
+- $(STRIP) $(SBINDIR)/$(EXENAME)
++ mkdir -p $(INSTALL_PREFIX)$(SBINDIR)
++ install -m 755 $(EXENAME) $(INSTALL_PREFIX)$(SBINDIR)
+
+ install_olsrd: install_bin
+ @echo ========= C O N F I G U R A T I O N - F I L E ============
+@@ -109,16 +108,15 @@
+ @echo per default.
+ @echo can be found at files/olsrd.conf.default.lq
+ @echo ==========================================================
+- mkdir -p $(ETCDIR)
+- -cp -i files/olsrd.conf.default.lq $(CFGFILE)
++ mkdir -p $(INSTALL_PREFIX)$(ETCDIR)
+ @echo -------------------------------------------
+ @echo Edit $(CFGFILE) before running olsrd!!
+ @echo -------------------------------------------
+ @echo Installing manpages $(EXENAME)\(8\) and $(CFGNAME)\(5\)
+- mkdir -p $(MANDIR)/man8/
+- cp files/olsrd.8.gz $(MANDIR)/man8/$(EXENAME).8.gz
+- mkdir -p $(MANDIR)/man5/
+- cp files/olsrd.conf.5.gz $(MANDIR)/man5/$(CFGNAME).5.gz
++ mkdir -p $(INSTALL_PREFIX)$(MANDIR)/man8/
++ cp files/olsrd.8.gz $(INSTALL_PREFIX)$(MANDIR)/man8/$(EXENAME).8.gz
++ mkdir -p $(INSTALL_PREFIX)$(MANDIR)/man5/
++ cp files/olsrd.conf.5.gz $(INSTALL_PREFIX)$(MANDIR)/man5/$(CFGNAME).5.gz
+
+ tags:
+ $(TAGCMD) -o $(TAGFILE) $(TAG_SRCS)
+@@ -140,7 +138,7 @@
+ $(MAKECMD) -C lib LIBDIR=$(LIBDIR) clean
+
+ libs_install install_libs:
+- $(MAKECMD) -C lib LIBDIR=$(LIBDIR) install
++ $(MAKECMD) -C lib LIBDIR=$(INSTALL_PREFIX)$(LIBDIR) install
+
+ httpinfo:
+ $(MAKECMD) -C lib/httpinfo clean
diff --git a/packages/olsrd/olsrd.inc b/packages/olsrd/olsrd.inc
index 990d8a1678..7fd25c23dd 100644
--- a/packages/olsrd/olsrd.inc
+++ b/packages/olsrd/olsrd.inc
@@ -1,11 +1,11 @@
DESCRIPTION = "OLSR mesh routing daemon"
HOMEPAGE = "http://www.olsr.org"
-DESCRIPTION_olsrd-libs = "OLSR mesh routing daemon - optional libraries"
SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "BSD"
-SRC_URI="http://www.olsr.org/releases/0.4/olsrd-${PV}.tar.bz2 \
+MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
+SRC_URI = "http://www.olsr.org/releases/${MAJ_VER}/olsrd-${PV}.tar.bz2 \
file://init \
file://olsrd.conf"
@@ -15,28 +15,56 @@ inherit update-rc.d
INITSCRIPT_NAME = "olsrd"
INITSCRIPT_PARAMS = "defaults"
-EXTRA_OEMAKE="MAKEFLAGS=-I${WORKDIR}/olsrd-${PV}"
-
+EXTRA_OEMAKE = "MAKEFLAGS=-I${WORKDIR}/olsrd-${PV}"
do_configure() {
oe_runmake OS=linux clean
}
do_compile() {
- oe_runmake
+ oe_runmake OS=linux clean
+ touch .depend
+ touch src/cfgparser/.depend
+ oe_runmake OS=linux all libs
}
do_install () {
oe_runmake OS=linux INSTALL_PREFIX=${D} STRIP=echo install install_libs
+
install -d ${D}/${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/olsrd
install -m 644 ${WORKDIR}/olsrd.conf ${D}/${sysconfdir}
}
+PACKAGES =+ "\
+ olsrd-plugin-dyngw \
+ olsrd-plugin-dyngw-plain \
+ olsrd-plugin-httpinfo \
+ olsrd-plugin-nameservice \
+ olsrd-plugin-quagga \
+ olsrd-plugin-tas \
+ olsrd-plugin-pgraph \
+ olsrd-plugin-bmf \
+ olsrd-plugin-txtinfo \
+ olsrd-plugin-arprefresh \
+ olsrd-plugin-secure \
+ olsrd-plugin-dotdraw \
+ olsrd-plugin-mini \
+ "
-PACKAGES =+ "olsrd-libs"
-FILES_olsrd-libs = "${libdir}/*.so.*"
-
-RDEPENDS_${PN} = "olsrd-libs"
+FILES_olsrd-plugin-dyngw = "${libdir}/${PN}_dyn_gw.so.*"
+FILES_olsrd-plugin-dyngw-plain = "${libdir}/${PN}_dyn_gw_plain.so.*"
+FILES_olsrd-plugin-httpinfo = "${libdir}/${PN}_httpinfo.so.*"
+FILES_olsrd-plugin-nameservice = "${libdir}/${PN}_nameservice.so.*"
+FILES_olsrd-plugin-quagga = "${libdir}/${PN}_quagga.so.*"
+FILES_olsrd-plugin-tas = "${libdir}/${PN}_tas.so.*"
+FILES_olsrd-plugin-pgraph = "${libdir}/${PN}_pgraph.so.*"
+FILES_olsrd-plugin-bmf = "${libdir}/${PN}_bmf.so.*"
+FILES_olsrd-plugin-txtinfo = "${libdir}/${PN}_txtinfo.so.*"
+FILES_olsrd-plugin-arprefresh = "${libdir}/${PN}_arprefresh.so.*"
+FILES_olsrd-plugin-dotdraw = "${libdir}/${PN}_dot_draw.so.*"
+FILES_olsrd-plugin-secure = "${libdir}/${PN}_secure.so.*"
+FILES_olsrd-plugin-mini = "${libdir}/${PN}_mini.so.*"
CONFFILES_${PN} = "${sysconfdir}/olsrd.conf"
+
diff --git a/packages/olsrd/olsrd_0.5.3.bb b/packages/olsrd/olsrd_0.5.3.bb
index 5bc448a126..1af0f257fd 100644
--- a/packages/olsrd/olsrd_0.5.3.bb
+++ b/packages/olsrd/olsrd_0.5.3.bb
@@ -1,14 +1,6 @@
require olsrd.inc
-PR = "r0"
-SRC_URI="http://www.olsr.org/releases/0.5/olsrd-${PV}.tar.bz2 \
- file://init \
- file://olsrd.conf \
- file://unbreak-makefile.patch;patch=1"
+PR = "r1"
+
+SRC_URI += "file://unbreak-makefile.patch;patch=1"
-do_compile() {
- oe_runmake OS=linux clean
- touch .depend
- touch src/cfgparser/.depend
- oe_runmake OS=linux all libs
-}
diff --git a/packages/olsrd/olsrd_0.5.5.bb b/packages/olsrd/olsrd_0.5.5.bb
new file mode 100644
index 0000000000..d87197481e
--- /dev/null
+++ b/packages/olsrd/olsrd_0.5.5.bb
@@ -0,0 +1,7 @@
+require olsrd.inc
+PR = "r0"
+
+# Oddity in the 0.5.5 source tarball.
+S = "${WORKDIR}/olsrd-a5b9cf969979"
+
+SRC_URI += "file://olsrd-0.5.5-unbreak-makefile.patch;patch=1"
diff --git a/packages/openocd/openocd-native_svn.bb b/packages/openocd/openocd-native_svn.bb
index 4ab1d37fe2..3ca688b5c3 100644
--- a/packages/openocd/openocd-native_svn.bb
+++ b/packages/openocd/openocd-native_svn.bb
@@ -10,8 +10,8 @@ do_stage() {
}
do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0755 src/openocd ${DEPLOY_DIR_IMAGE}/openocd
+ install -d ${DEPLOY_DIR_TOOLS}
+ install -m 0755 src/openocd ${DEPLOY_DIR_TOOLS}/openocd-${PV}
}
addtask deploy before do_package after do_install
diff --git a/packages/openocd/openocd_svn.bb b/packages/openocd/openocd_svn.bb
index d5c5ba05cd..6823eabb98 100644
--- a/packages/openocd/openocd_svn.bb
+++ b/packages/openocd/openocd_svn.bb
@@ -1,8 +1,8 @@
DESCRIPTION = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing"
HOMEPAGE = "http://openocd.berlios.de/"
LICENSE = "GPL"
-PV = "0.0+r${SRCREV}"
-PR = "r2"
+PV = "0.0+svnr${SRCREV}"
+PR = "r3"
inherit autotools
@@ -11,4 +11,4 @@ SRC_URI = "svn://svn.berlios.de/openocd;module=trunk \
S = "${WORKDIR}/trunk"
DEPENDS = "libftdi"
-EXTRA_OECONF = " --enable-ft2232_libftdi --disable-ftdi2232 --disable-ftd2xx"
+EXTRA_OECONF = " --enable-ft2232_libftdi --disable-ftdi2232 --disable-ftd2xx"
diff --git a/packages/opensync/libopensync-0.36/.mtn2git_empty b/packages/opensync/libopensync-0.36/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/opensync/libopensync-0.36/.mtn2git_empty
diff --git a/packages/opensync/libopensync-plugin-evolution2_0.36.bb b/packages/opensync/libopensync-plugin-evolution2_0.36.bb
new file mode 100644
index 0000000000..da4ecb80b3
--- /dev/null
+++ b/packages/opensync/libopensync-plugin-evolution2_0.36.bb
@@ -0,0 +1,3 @@
+require libopensync-plugin_0.36.inc
+
+DEPENDS += " eds-dbus"
diff --git a/packages/opensync/libopensync-plugin-file_0.36.bb b/packages/opensync/libopensync-plugin-file_0.36.bb
new file mode 100644
index 0000000000..33a049b7d6
--- /dev/null
+++ b/packages/opensync/libopensync-plugin-file_0.36.bb
@@ -0,0 +1 @@
+require libopensync-plugin_0.36.inc
diff --git a/packages/opensync/libopensync-plugin-google-calendar_0.36.bb b/packages/opensync/libopensync-plugin-google-calendar_0.36.bb
new file mode 100644
index 0000000000..33a049b7d6
--- /dev/null
+++ b/packages/opensync/libopensync-plugin-google-calendar_0.36.bb
@@ -0,0 +1 @@
+require libopensync-plugin_0.36.inc
diff --git a/packages/opensync/libopensync-plugin-irmc_0.36.bb b/packages/opensync/libopensync-plugin-irmc_0.36.bb
new file mode 100644
index 0000000000..295dfdecfa
--- /dev/null
+++ b/packages/opensync/libopensync-plugin-irmc_0.36.bb
@@ -0,0 +1,3 @@
+require libopensync-plugin_0.36.inc
+
+DEPENDS += "openobex bluez-libs"
diff --git a/packages/opensync/libopensync-plugin-syncml_0.36.bb b/packages/opensync/libopensync-plugin-syncml_0.36.bb
new file mode 100644
index 0000000000..e1395a7006
--- /dev/null
+++ b/packages/opensync/libopensync-plugin-syncml_0.36.bb
@@ -0,0 +1,3 @@
+require libopensync-plugin_0.36.inc
+
+DEPENDS += " libsyncml (>= 0.4.6)"
diff --git a/packages/opensync/libopensync-plugin-vformat_0.36.bb b/packages/opensync/libopensync-plugin-vformat_0.36.bb
new file mode 100644
index 0000000000..84a48f21fe
--- /dev/null
+++ b/packages/opensync/libopensync-plugin-vformat_0.36.bb
@@ -0,0 +1,3 @@
+require libopensync-plugin_0.36.inc
+
+DEPENDS += " check"
diff --git a/packages/opensync/libopensync-plugin_0.36.inc b/packages/opensync/libopensync-plugin_0.36.inc
new file mode 100644
index 0000000000..db6b1fa73a
--- /dev/null
+++ b/packages/opensync/libopensync-plugin_0.36.inc
@@ -0,0 +1,9 @@
+DEPENDS = "libopensync (>= 0.36)"
+
+SRC_URI = "http://opensync.org/download/releases/${PV}/${P}.tar.bz2"
+
+inherit cmake
+
+FILES_${PN} += "${libdir}/opensync*/plugins/*.so \
+ ${libdir}/opensync*/formats/*.so \
+ ${datadir}/opensync*/defaults/"
diff --git a/packages/opensync/libopensync/.mtn2git_empty b/packages/opensync/libopensync/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/opensync/libopensync/.mtn2git_empty
diff --git a/packages/opensync/libopensync_0.36.bb b/packages/opensync/libopensync_0.36.bb
new file mode 100644
index 0000000000..f41cf89b5f
--- /dev/null
+++ b/packages/opensync/libopensync_0.36.bb
@@ -0,0 +1,26 @@
+LICENSE = "LGPL"
+HOMEPAGE = "http://www.opensync.org/"
+
+DEPENDS = "sqlite3 libxml2 glib-2.0 check"
+
+SRC_URI = "http://opensync.org/download/releases/${PV}/libopensync-${PV}.tar.bz2\
+ file://cmake.patch;patch=1 \
+ file://build-in-src.patch;patch=1 \
+ file://no-python-check.patch;patch=1"
+
+inherit cmake pkgconfig
+
+LEAD_SONAME = "libopensync.so"
+
+FILES_${PN} += " ${libdir}/opensync*/formats/*.so \
+ ${libdir}/opensync*/osplugin \
+ ${datadir}/opensync*/schemas \
+ ${datadir}/opensync*/capabilities \
+ ${datadir}/opensync*/descriptions \
+ "
+FILES_${PN}-dbg += " ${libdir}/opensync*/formats/.debug/*.so \
+ ${libdir}/opensync*/.debug/osplugin "
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/packages/opensync/libsyncml/.mtn2git_empty b/packages/opensync/libsyncml/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/opensync/libsyncml/.mtn2git_empty
diff --git a/packages/opensync/libsyncml_0.4.6.bb b/packages/opensync/libsyncml_0.4.6.bb
new file mode 100644
index 0000000000..297a1ca450
--- /dev/null
+++ b/packages/opensync/libsyncml_0.4.6.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Libsyncml is a implementation of the SyncML protocol."
+HOMEPAGE = "http://libsyncml.opensync.org/"
+LICENSE = "LGPL"
+DEPENDS = "sed-native wbxml2 libsoup libxml2 bluez-libs openobex"
+
+SRC_URI = "http://libsyncml.opensync.org/download/releases/${PV}/libsyncml-${PV}.tar.bz2 \
+ file://build-in-src.patch;patch=1"
+
+inherit cmake pkgconfig
+
+do_stage() {
+ autotools_stage_all
+}
+
+PACKAGES += "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}"
+FILES_${PN} = "${libdir}/*.so.*"
diff --git a/packages/opensync/msynctool_0.36.bb b/packages/opensync/msynctool_0.36.bb
new file mode 100644
index 0000000000..773166b3be
--- /dev/null
+++ b/packages/opensync/msynctool_0.36.bb
@@ -0,0 +1,7 @@
+SRC_URI = "http://www.opensync.org/download/releases/${PV}/msynctool-${PV}.tar.bz2"
+
+LICENSE = "GPL"
+DEPENDS = "libopensync glib-2.0"
+HOMEPAGE = "http://www.opensync.org/"
+
+inherit cmake pkgconfig
diff --git a/packages/opie-help-en/opie-help-en_cvs.bb b/packages/opie-help-en/opie-help-en_cvs.bb
index 787b40833f..5960820a18 100644
--- a/packages/opie-help-en/opie-help-en_cvs.bb
+++ b/packages/opie-help-en/opie-help-en_cvs.bb
@@ -1,6 +1,6 @@
require ${PN}.inc
-# Remove the dash below when 1.2.1 changes in PV
-PV = "1.2.2+cvs-${SRCDATE}"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/help/en/html "
diff --git a/packages/opie-i18n/opie-i18n_cvs.bb b/packages/opie-i18n/opie-i18n_cvs.bb
index 3e269e73ef..96b8dad1c7 100644
--- a/packages/opie-i18n/opie-i18n_cvs.bb
+++ b/packages/opie-i18n/opie-i18n_cvs.bb
@@ -1,7 +1,7 @@
require ${PN}.inc
-# Remove the dash below when 1.2.1 changes in PV
-PV = "1.2.2+cvs-${SRCDATE}"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/i18n \
${HANDHELDS_CVS};module=opie/etc/dict"
diff --git a/packages/opie-i18n/opie-lrelease-native_cvs.bb b/packages/opie-i18n/opie-lrelease-native_cvs.bb
index 94401fab78..bc1ea8932f 100644
--- a/packages/opie-i18n/opie-lrelease-native_cvs.bb
+++ b/packages/opie-i18n/opie-lrelease-native_cvs.bb
@@ -1,6 +1,7 @@
require ${PN}.inc
-# Remove the dash below when 1.2.1 changes in PV
-PV = "1.2.2+cvs-${SRCDATE}"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
+
SRC_URI = "${HANDHELDS_CVS};module=opie/development/translation/opie-lrelease \
${HANDHELDS_CVS};module=opie/development/translation/shared"
diff --git a/packages/opie-i18n/opie-lupdate-native_cvs.bb b/packages/opie-i18n/opie-lupdate-native_cvs.bb
index 5f2d834b74..f168ca527f 100644
--- a/packages/opie-i18n/opie-lupdate-native_cvs.bb
+++ b/packages/opie-i18n/opie-lupdate-native_cvs.bb
@@ -1,6 +1,7 @@
require ${PN}.inc
-# Remove the dash below when 1.2.1 changes in PV
-PV = "1.2.2+cvs-${SRCDATE}"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
+
SRC_URI = "${HANDHELDS_CVS};module=opie/development/translation/opie-lupdate \
${HANDHELDS_CVS};module=opie/development/translation/shared"
diff --git a/packages/opie-keytabs/opie-keytabs_cvs.bb b/packages/opie-keytabs/opie-keytabs_cvs.bb
index d18339a046..e00a55c6cd 100644
--- a/packages/opie-keytabs/opie-keytabs_cvs.bb
+++ b/packages/opie-keytabs/opie-keytabs_cvs.bb
@@ -1,6 +1,6 @@
require ${PN}.inc
-# Remove the dash below when 1.2.1 changes in PV
-PV = "1.2.2+cvs-${SRCDATE}"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/etc"
diff --git a/packages/opie-mediaplayer2/opie-mediaplayer2-skin-default-landscape_cvs.bb b/packages/opie-mediaplayer2/opie-mediaplayer2-skin-default-landscape_cvs.bb
index 8923861dd6..be992e94db 100644
--- a/packages/opie-mediaplayer2/opie-mediaplayer2-skin-default-landscape_cvs.bb
+++ b/packages/opie-mediaplayer2/opie-mediaplayer2-skin-default-landscape_cvs.bb
@@ -2,16 +2,17 @@ DESCRIPTION = "Skin for opie-mediaplayer2"
SECTION = "opie/multimedia"
PRIORITY = "optional"
LICENSE = "GPL"
-PV = "1.2.2+cvs${SRCDATE}"
APPNAME = "opieplayer2"
-
RPROVIDES = "opie-mediaplayer2-skin"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/pics"
-FILES_${PN} = "${palmtopdir}/pics/${APPNAME}/skins/default_landscape/*.png"
-
do_install() {
install -d ${D}${palmtopdir}/pics/${APPNAME}/skins/default_landscape/
install -m 0644 ${WORKDIR}/pics/${APPNAME}/skins/default_landscape/*.png ${D}${palmtopdir}/pics/${APPNAME}/skins/default_landscape/
}
+
+FILES_${PN} = "${palmtopdir}/pics/${APPNAME}/skins/default_landscape/*.png"
+
diff --git a/packages/opie-mediaplayer2/opie-mediaplayer2-skin-default_cvs.bb b/packages/opie-mediaplayer2/opie-mediaplayer2-skin-default_cvs.bb
index 9546a6450e..1857849069 100644
--- a/packages/opie-mediaplayer2/opie-mediaplayer2-skin-default_cvs.bb
+++ b/packages/opie-mediaplayer2/opie-mediaplayer2-skin-default_cvs.bb
@@ -2,16 +2,16 @@ DESCRIPTION = "Skin for opie-mediaplayer2"
SECTION = "opie/multimedia"
PRIORITY = "optional"
LICENSE = "GPL"
-PV = "1.2.2+cvs${SRCDATE}"
APPNAME = "opieplayer2"
-
RPROVIDES = "opie-mediaplayer2-skin"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/pics"
-FILES_${PN} = "${palmtopdir}/pics/${APPNAME}/skins/default/*.png"
-
do_install() {
install -d ${D}${palmtopdir}/pics/${APPNAME}/skins/default/
install -m 0644 ${WORKDIR}/pics/${APPNAME}/skins/default/*.png ${D}${palmtopdir}/pics/${APPNAME}/skins/default/
}
+
+FILES_${PN} = "${palmtopdir}/pics/${APPNAME}/skins/default/*.png"
diff --git a/packages/opie-mediaplayer2/opie-mediaplayer2-skin-pod_cvs.bb b/packages/opie-mediaplayer2/opie-mediaplayer2-skin-pod_cvs.bb
index 6ffde10a57..4d1e8fcba9 100644
--- a/packages/opie-mediaplayer2/opie-mediaplayer2-skin-pod_cvs.bb
+++ b/packages/opie-mediaplayer2/opie-mediaplayer2-skin-pod_cvs.bb
@@ -2,16 +2,16 @@ DESCRIPTION = "Skin for opie-mediaplayer2"
SECTION = "opie/multimedia"
PRIORITY = "optional"
LICENSE = "GPL"
-PV = "1.2.2+cvs${SRCDATE}"
APPNAME = "opieplayer2"
-
RPROVIDES = "opie-mediaplayer2-skin"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/pics"
-FILES_${PN} = "${palmtopdir}/pics/${APPNAME}/skins/Pod/*.png"
-
do_install() {
install -d ${D}${palmtopdir}/pics/${APPNAME}/skins/Pod/
install -m 0644 ${WORKDIR}/pics/${APPNAME}/skins/Pod/*.png ${D}${palmtopdir}/pics/${APPNAME}/skins/Pod/
}
+
+FILES_${PN} = "${palmtopdir}/pics/${APPNAME}/skins/Pod/*.png"
diff --git a/packages/opie-mediaplayer2/opie-mediaplayer2-skin-techno_cvs.bb b/packages/opie-mediaplayer2/opie-mediaplayer2-skin-techno_cvs.bb
index 3d0eba2089..450c9dbc42 100644
--- a/packages/opie-mediaplayer2/opie-mediaplayer2-skin-techno_cvs.bb
+++ b/packages/opie-mediaplayer2/opie-mediaplayer2-skin-techno_cvs.bb
@@ -2,16 +2,16 @@ DESCRIPTION = "Skin for opie-mediaplayer2"
SECTION = "opie/multimedia"
PRIORITY = "optional"
LICENSE = "GPL"
-PV = "1.2.2+cvs${SRCDATE}"
APPNAME = "opieplayer2"
-
RPROVIDES = "opie-mediaplayer2-skin"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/pics"
-FILES_${PN} = "${palmtopdir}/pics/${APPNAME}/skins/techno/*.png"
-
do_install() {
install -d ${D}${palmtopdir}/pics/${APPNAME}/skins/techno/
install -m 0644 ${WORKDIR}/pics/${APPNAME}/skins/techno/*.png ${D}${palmtopdir}/pics/${APPNAME}/skins/techno/
}
+
+FILES_${PN} = "${palmtopdir}/pics/${APPNAME}/skins/techno/*.png"
diff --git a/packages/opie-pics/opie-pics_cvs.bb b/packages/opie-pics/opie-pics_cvs.bb
index 593ea5bf9c..78bce2c30a 100644
--- a/packages/opie-pics/opie-pics_cvs.bb
+++ b/packages/opie-pics/opie-pics_cvs.bb
@@ -1,7 +1,7 @@
require ${PN}.inc
-# Remove the dash below when 1.2.1 changes in PV
-PV = "1.2.2+cvs-${SRCDATE}"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/pics \
${HANDHELDS_CVS};module=opie/pics-hires"
diff --git a/packages/opie-sh-snes/opie-sh-snes_cvs.bb b/packages/opie-sh-snes/opie-sh-snes_cvs.bb
index 5e69e87688..e28a02a80d 100644
--- a/packages/opie-sh-snes/opie-sh-snes_cvs.bb
+++ b/packages/opie-sh-snes/opie-sh-snes_cvs.bb
@@ -1,5 +1,4 @@
require ${PN}.inc
-#Remove the dash below when 1.2.1 changes
-PV = "1.2.2+cvs-${SRCDATE}"
-PR = "r1"
+PV = "${OPIE_CVS_PV}"
+PR = "r2"
diff --git a/packages/opie-sounds/opie-sounds_cvs.bb b/packages/opie-sounds/opie-sounds_cvs.bb
index 818a1c48f1..fc16d24601 100644
--- a/packages/opie-sounds/opie-sounds_cvs.bb
+++ b/packages/opie-sounds/opie-sounds_cvs.bb
@@ -1,6 +1,6 @@
require ${PN}.inc
-# Remove the dash below when 1.2.1 changes in PV
-PV = "1.2.2+cvs-${SRCDATE}"
+PV = "${OPIE_CVS_PV}"
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};module=opie/sounds"
diff --git a/packages/opie-taskbar/opie-taskbar-images.inc b/packages/opie-taskbar/opie-taskbar-images.inc
index 7ec97bc56c..b35dd8d593 100644
--- a/packages/opie-taskbar/opie-taskbar-images.inc
+++ b/packages/opie-taskbar/opie-taskbar-images.inc
@@ -19,6 +19,15 @@ PIXMAP_SIZE_simpad = "-800x600"
PIXMAP_SIZE_asus730 = "-480x640"
PIXMAP_SIZE_htcuniversal= "-480x640"
PIXMAP_SIZE_hx4700 = "-480x640"
+PIXMAP_SIZE_palmz31 = "-160x160"
+PIXMAP_SIZE_palmz71 = "-320x320"
+PIXMAP_SIZE_palmz72 = "-320x320"
+PIXMAP_SIZE_palmt650 = "-320x320"
+PIXMAP_SIZE_palmt680 = "-320x320"
+PIXMAP_SIZE_palmt3 = "-320x480"
+PIXMAP_SIZE_palmt5 = "-320x480"
+PIXMAP_SIZE_palmtx = "-320x480"
+PIXMAP_SIZE_palmld = "-320x480"
do_configure() {
:
@@ -27,21 +36,14 @@ do_configure() {
do_install() {
install -d ${D}${palmtopdir}/pics/launcher
- install -m 0644 ${FILESDIR}/firstuse-320x320.jpg ${D}${palmtopdir}/pics/launcher/firstuse-320x320.jpg
- install -m 0644 ${FILESDIR}/opie-background-320x320.jpg ${D}${palmtopdir}/pics/launcher/opie-background-320x320.jpg
install -m 0644 ${WORKDIR}/pics/launcher/firstuse.jpg ${D}${palmtopdir}/pics/launcher/firstuse-240x320.jpg
install -m 0644 ${WORKDIR}/pics/launcher/opie-background.jpg ${D}${palmtopdir}/pics/launcher/opie-background-240x320.jpg
- # TODO: those should be correct images for the resolution:
- install -m 0644 ${WORKDIR}/pics/launcher/firstuse.jpg ${D}${palmtopdir}/pics/launcher/firstuse-320x240.jpg
- install -m 0644 ${WORKDIR}/pics/launcher/opie-background.jpg ${D}${palmtopdir}/pics/launcher/opie-background-320x240.jpg
- for res in 320x480 480x320 480x640 640x480 800x600; do
+# for res in 320x240 240x320 320x320 320x480 480x320 480x640 640x480 600x800 800x600; do
+ for res in 240x240 320x320 320x480 480x320 480x640 640x480 800x600; do
install -m 0644 ${WORKDIR}/pics/launcher/firstuse-${res}.jpg ${D}${palmtopdir}/pics/launcher/firstuse-${res}.jpg
install -m 0644 ${WORKDIR}/pics/launcher/opie-background-${res}.jpg ${D}${palmtopdir}/pics/launcher/opie-background-${res}.jpg
done
- # TODO: those should be correct images for the resoltion:
- install -m 0644 ${WORKDIR}/pics/launcher/firstuse-800x600.jpg ${D}${palmtopdir}/pics/launcher/firstuse-600x800.jpg
- install -m 0644 ${WORKDIR}/pics/launcher/opie-background-800x600.jpg ${D}${palmtopdir}/pics/launcher/opie-background-600x800.jpg
}
python do_package_prepend () {
diff --git a/packages/opie-taskbar/opie-taskbar-images_1.2.3+cvs20070922.bb b/packages/opie-taskbar/opie-taskbar-images_1.2.3+cvs20070922.bb
index 0905cd5fe3..a36e85b34d 100644
--- a/packages/opie-taskbar/opie-taskbar-images_1.2.3+cvs20070922.bb
+++ b/packages/opie-taskbar/opie-taskbar-images_1.2.3+cvs20070922.bb
@@ -1,5 +1,5 @@
require ${PN}.inc
-PR = "r0"
-SRCDATE = "20070922"
+PR = "r1"
+SRCDATE = "20070922"
SRC_URI = "${HANDHELDS_CVS};module=opie/pics"
diff --git a/packages/opie-taskbar/opie-taskbar-images_1.2.3.bb b/packages/opie-taskbar/opie-taskbar-images_1.2.3.bb
index 0c5b93780d..74b6c5205e 100644
--- a/packages/opie-taskbar/opie-taskbar-images_1.2.3.bb
+++ b/packages/opie-taskbar/opie-taskbar-images_1.2.3.bb
@@ -1,6 +1,6 @@
require ${PN}.inc
-PR = "r1"
-
-TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}"
+PR = "r2"
SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/pics"
+
+TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}"
diff --git a/packages/opie-taskbar/opie-taskbar-images_cvs.bb b/packages/opie-taskbar/opie-taskbar-images_cvs.bb
index ff7ea9e17b..3d45118134 100644
--- a/packages/opie-taskbar/opie-taskbar-images_cvs.bb
+++ b/packages/opie-taskbar/opie-taskbar-images_cvs.bb
@@ -1,5 +1,5 @@
require ${PN}.inc
-PV = "${OPIE_CVS_PV}"
-PR = "r6"
+PV = "${OPIE_CVS_PV}"
+PR = "r7"
SRC_URI = "${HANDHELDS_CVS};module=opie/pics"
diff --git a/packages/opkg/opkg-native_svn.bb b/packages/opkg/opkg-native_svn.bb
index bc38d512d6..57c6e61fb0 100644
--- a/packages/opkg/opkg-native_svn.bb
+++ b/packages/opkg/opkg-native_svn.bb
@@ -7,4 +7,10 @@ target_libdir := "${libdir}"
inherit native
+# The nogpg version isn't getting much love and has an unused variable which trips up -Werror
+do_configure_prepend() {
+ sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
+}
+
+
EXTRA_OECONF += "--with-opkglibdir=${target_libdir} --disable-gpg"
diff --git a/packages/opkg/opkg-nogpg_svn.bb b/packages/opkg/opkg-nogpg_svn.bb
index aa16b551fe..3a7a0ee3b2 100644
--- a/packages/opkg/opkg-nogpg_svn.bb
+++ b/packages/opkg/opkg-nogpg_svn.bb
@@ -7,4 +7,9 @@ SRCREV = "${SRCREV_pn-opkg}"
EXTRA_OECONF += "--disable-gpg"
+# The nogpg version isn't getting much love and has an unused variable which trips up -Werror
+do_configure_prepend() {
+ sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
+}
+
DEFAULT_PREFERENCE = "-1"
diff --git a/packages/opkg/opkg.inc b/packages/opkg/opkg.inc
index 50816ef0e0..104e0fdb42 100644
--- a/packages/opkg/opkg.inc
+++ b/packages/opkg/opkg.inc
@@ -3,7 +3,7 @@ DESCRIPTION_libopkg = "Opkg Package Manager Library"
SECTION = "base"
LICENSE = "GPL"
DEPENDS = "curl gpgme"
-PV = "0.1+svnr${SRCREV}"
+PV = "0.1.4+svnr${SRCREV}"
SRC_URI = "svn://svn.openmoko.org/trunk/src/target/;module=opkg;proto=http \
file://fix_endianness.patch;patch=1;maxrev=4246"
diff --git a/packages/oprofile/oprofile/armv6_fix.patch b/packages/oprofile/oprofile/armv6_fix.patch
new file mode 100644
index 0000000000..b981871e6e
--- /dev/null
+++ b/packages/oprofile/oprofile/armv6_fix.patch
@@ -0,0 +1,54 @@
+---
+ events/arm/armv6/events | 43 +++++++++++++++++++++----------------------
+ 1 file changed, 21 insertions(+), 22 deletions(-)
+
+Index: oprofile-0.9.3/events/arm/armv6/events
+===================================================================
+--- oprofile-0.9.3.orig/events/arm/armv6/events 2007-07-16 19:22:17.000000000 +0100
++++ oprofile-0.9.3/events/arm/armv6/events 2007-09-28 11:13:32.000000000 +0100
+@@ -1,24 +1,23 @@
+ # ARM V6 events
+ #
+-event:0x00 counters:1,2 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
+-event:0x01 counters:1,2 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
+-event:0x02 counters:1,2 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
+-event:0x03 counters:1,2 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
+-event:0x04 counters:1,2 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
+-event:0x05 counters:1,2 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
+-event:0x06 counters:1,2 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
+-event:0x07 counters:1,2 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
+-event:0x09 counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
+-event:0x0a counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
+-event:0x0b counters:1,2 um:zero minimum:500 name:DCACHE_MISS : data cache miss
+-event:0x0c counters:1,2 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
+-event:0x0d counters:1,2 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
+-event:0x0f counters:1,2 um:zero minimum:500 name:TLB_MISS : Main TLB miss
+-event:0x10 counters:1,2 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
+-event:0x11 counters:1,2 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
+-event:0x12 counters:1,2 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
+-event:0x20 counters:1,2 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
+-event:0x21 counters:1,2 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
+-event:0x22 counters:1,2 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
+-event:0xff counters:1,2 um:zero minimum:500 name:CPU_CYCLES2 : clock cycles counter
+-event:0xfe counters:0 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
++event:0x00 counters:0,1 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
++event:0x01 counters:0,1 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
++event:0x02 counters:0,1 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
++event:0x03 counters:0,1 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
++event:0x04 counters:0,1 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
++event:0x05 counters:0,1 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
++event:0x06 counters:0,1 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
++event:0x07 counters:0,1 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
++event:0x09 counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
++event:0x0a counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
++event:0x0b counters:0,1 um:zero minimum:500 name:DCACHE_MISS : data cache miss
++event:0x0c counters:0,1 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
++event:0x0d counters:0,1 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
++event:0x0f counters:0,1 um:zero minimum:500 name:TLB_MISS : Main TLB miss
++event:0x10 counters:0,1 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
++event:0x11 counters:0,1 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
++event:0x12 counters:0,1 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
++event:0x20 counters:0,1 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
++event:0x21 counters:0,1 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
++event:0x22 counters:0,1 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
++event:0xff counters:0,1,2 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
diff --git a/packages/oprofile/oprofile/fix-arith.patch b/packages/oprofile/oprofile/fix-arith.patch
new file mode 100644
index 0000000000..5c55f4b349
--- /dev/null
+++ b/packages/oprofile/oprofile/fix-arith.patch
@@ -0,0 +1,52 @@
+Index: utils/opcontrol
+===================================================================
+RCS file: /cvsroot/oprofile/oprofile/utils/opcontrol,v
+retrieving revision 1.148
+diff -u -r1.148 opcontrol
+--- utils/opcontrol 8 Nov 2007 09:24:30 -0000 1.148
++++ utils/opcontrol 27 Nov 2007 17:02:20 -0000
+@@ -395,7 +395,7 @@
+ echo "SESSION_DIR=$SESSION_DIR" >>$SETUP_FILE
+
+ if test "$NR_CHOSEN" != "0"; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ echo "CHOSEN_EVENTS_${f}=$GOTEVENT" >>$SETUP_FILE
+ done
+@@ -590,7 +590,7 @@
+ OPHELP_ARGS=
+
+ if test "$NR_CHOSEN" != 0; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ OPHELP_ARGS="$OPHELP_ARGS $GOTEVENT"
+@@ -612,7 +612,7 @@
+ return
+ fi
+
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ EVENT=`echo $GOTEVENT | awk -F: '{print $1}'`
+@@ -1226,7 +1226,7 @@
+ verify_counters
+
+ OPROFILED_EVENTS=
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ EVENT=`echo $GOTEVENT | awk -F: '{print $1}'`
+@@ -1383,7 +1383,7 @@
+ fi
+
+ if test "$NR_CHOSEN" != "0"; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ echo "Event $f: $GOTEVENT"
+ done
diff --git a/packages/oprofile/oprofile/oparchive_fix.patch b/packages/oprofile/oprofile/oparchive_fix.patch
new file mode 100644
index 0000000000..dbdd5eb4ea
--- /dev/null
+++ b/packages/oprofile/oprofile/oparchive_fix.patch
@@ -0,0 +1,22 @@
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp
++++ oprofile/pp/oparchive.cpp
+@@ -95,7 +95,7 @@ int oparchive(options::spec const & spec
+ * to avoid overwriting files with the same name. The
+ * /usr/lib/debug search path is not going to work.
+ */
+- bfd * ibfd = open_bfd(exe_name);
++ bfd * ibfd = open_bfd(options::archive_path + exe_name);
+ if (ibfd) {
+ string global(options::archive_path + DEBUGDIR);
+ string dirname = op_dirname(options::archive_path +
+@@ -106,7 +106,7 @@ int oparchive(options::spec const & spec
+ /* found something copy it over */
+ string dest_debug_dir = options::outdirectory +
+ dirname + "/.debug/";
+- if (create_dir(dest_debug_dir.c_str())) {
++ if (!options::list_files && create_dir(dest_debug_dir.c_str())) {
+ cerr << "Unable to create directory: "
+ << dest_debug_dir << "." << endl;
+ exit (EXIT_FAILURE);
diff --git a/packages/oprofile/oprofile/opstart.patch b/packages/oprofile/oprofile/opstart.patch
new file mode 100644
index 0000000000..e8da0922cc
--- /dev/null
+++ b/packages/oprofile/oprofile/opstart.patch
@@ -0,0 +1,235 @@
+Index: oprofile/utils/Makefile.am
+===================================================================
+--- oprofile.orig/utils/Makefile.am
++++ oprofile/utils/Makefile.am
+@@ -3,8 +3,15 @@ AM_CFLAGS = @OP_CFLAGS@
+
+ LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
+
+-bin_PROGRAMS = ophelp
++bin_PROGRAMS = ophelp opstart
+ dist_bin_SCRIPTS = opcontrol
+
+ ophelp_SOURCES = ophelp.c
+ ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a
++
++opstart_SOURCES = opstart.c
++
++install-exec-local:
++ cd $(DESTDIR)/$(bindir) && \
++ rm -f opstop && \
++ $(LN_S) opstart opstop
+Index: oprofile/utils/opstart.c
+===================================================================
+--- /dev/null
++++ oprofile/utils/opstart.c
+@@ -0,0 +1,110 @@
++/**
++ * @file opstart.c
++ * Start/Stop oprofile
++ *
++ * @remark Copyright 2007 Openedhand Ltd.
++ * @remark Read the file COPYING
++ *
++ * @author Richard Purdie
++ */
++
++#include <signal.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++
++int main(const int argc, const char* argv[])
++{
++ const char *enable = "/dev/oprofile/enable";
++ const char *lockfile;
++ unsigned long dpid;
++ struct stat sbuf;
++ FILE *lfile, *efile;
++ int sig, enb, err;
++
++ if (argc >= 2) {
++ printf("Error: Invalid options.\n");
++ return 1;
++ }
++
++ lockfile = getenv("LOCK_FILE");
++ if (!lockfile)
++ lockfile = "/var/lib/oprofile/lock";
++
++ /* Add SESSION_DIR support? */
++
++ if (geteuid()) {
++ printf("Error: This program must be run as root.\n");
++ return 1;
++ }
++
++ if (stat(enable, &sbuf)) {
++ printf("Error: Could not find /dev/oprofile/enable, the"
++ " kernel module probably isn't loaded.\n");
++ printf("This binary only works with 2.6 kernels and oprofile"
++ " must have been initialised with 'opcontrol --start-daemon'.\n");
++ return 1;
++ }
++
++ if (stat(lockfile, &sbuf)) {
++ printf("Error: Could not find lockfile %s.\n", lockfile);
++ printf("The oprofile daemon must be running (oprofile must"
++ " have been initialised with 'opcontrol --start-daemon').\n");
++ return 1;
++ }
++
++ lfile = fopen(lockfile, "r");
++ if (!lfile) {
++ printf("Error opening lockfile %s.\n", lockfile);
++ return 1;
++ }
++
++ err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
++ if (err != 1) {
++ printf("Error reading pid from lockfile %s.\n", lockfile);
++ return 1;
++ }
++ fclose(lfile);
++
++ efile = fopen(enable, "r");
++ if (!efile) {
++ printf("Error opening %s.\n", enable);
++ return 1;
++ }
++
++ if (strstr(argv[0], "opstart")) {
++ printf("Starting Profiler\n");
++ sig = SIGUSR1;
++ enb = 1;
++ } else if (strstr(argv[0], "opstop")) {
++ printf("Stopping Oprofile.\n");
++ printf("You need to run 'opcontrol --dump' when the session"
++ " is finished.\n");
++ sig = SIGUSR2;
++ enb = 0;
++ } else {
++ printf("Error: Please call as 'opstart' or 'opstop'\n");
++ return 1;
++ }
++
++ err = kill(dpid, 0);
++ if (err) {
++ printf("Error sending signal to oprofiled. Stale lockfile"
++ " (%s) ?\n", lockfile);
++ return 1;
++ }
++
++ fprintf(efile, "%d\n", enb);
++ err = kill(dpid, sig);
++ if (err) {
++ printf("Error sending signal to oprofiled. Stale lockfile"
++ " (%s) ?\n", lockfile);
++ return 1;
++ }
++
++ return 0;
++}
++
+Index: oprofile/configure.in
+===================================================================
+--- oprofile.orig/configure.in
++++ oprofile/configure.in
+@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(oprofile, 0.9.4cvs)
+ AM_CONFIG_HEADER(config.h)
+
+ AC_PROG_RANLIB
++AC_PROG_LN_S
+
+ dnl for the man page
+ DATE="`date '+%a %d %B %Y'`"
+@@ -227,6 +228,8 @@ AC_OUTPUT(Makefile \
+ doc/xsl/catalog-1.xml \
+ doc/oprofile.1 \
+ doc/opcontrol.1 \
++ doc/opstart.1 \
++ doc/opstop.1 \
+ doc/ophelp.1 \
+ doc/opreport.1 \
+ doc/opannotate.1 \
+Index: oprofile/doc/Makefile.am
+===================================================================
+--- oprofile.orig/doc/Makefile.am
++++ oprofile/doc/Makefile.am
+@@ -11,6 +11,8 @@ STYLESHEETS=$(CHUNK_XHTML_STYLESHEET) $(
+ man_MANS = \
+ oprofile.1 \
+ opcontrol.1 \
++ opstart.1 \
++ opstop.1 \
+ opreport.1 \
+ opannotate.1 \
+ opgprof.1 \
+Index: oprofile/doc/opstart.1.in
+===================================================================
+--- /dev/null
++++ oprofile/doc/opstart.1.in
+@@ -0,0 +1,27 @@
++.TH OPSTART 1 "@DATE@" "oprofile @VERSION@"
++.UC 4
++.SH NAME
++opstart \- start OProfile profiling
++.SH SYNOPSIS
++.br
++.B opstart
++.SH DESCRIPTION
++.B opstart
++is a simple optimised command to start profiling with 2.6 Linux kernels.
++OProfile should have already been initialised by calling "opcontrol --start-daemon".
++
++.SH ENVIRONMENT
++No special environment variables are recognised by opstart.
++
++.SH FILES
++.TP
++.I /var/lib/oprofile/samples/
++The location of the generated sample files.
++
++.SH VERSION
++.TP
++This man page is current for @PACKAGE@-@VERSION@.
++
++.SH SEE ALSO
++.BR @OP_DOCDIR@,
++.BR oprofile(1)
+Index: oprofile/doc/opstop.1.in
+===================================================================
+--- /dev/null
++++ oprofile/doc/opstop.1.in
+@@ -0,0 +1,28 @@
++.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@"
++.UC 4
++.SH NAME
++opstop \- stop OProfile profiling
++.SH SYNOPSIS
++.br
++.B opstop
++.SH DESCRIPTION
++.B opstop
++is a simple optimsed command to stop profiling with 2.6 Linux kernels.
++You need to run "opcontrol --dump" before being able to view a profile
++with opreport.
++
++.SH ENVIRONMENT
++No special environment variables are recognised by opstop.
++
++.SH FILES
++.TP
++.I /var/lib/oprofile/samples/
++The location of the generated sample files.
++
++.SH VERSION
++.TP
++This man page is current for @PACKAGE@-@VERSION@.
++
++.SH SEE ALSO
++.BR @OP_DOCDIR@,
++.BR oprofile(1)
diff --git a/packages/oprofile/oprofile/root_option.patch b/packages/oprofile/oprofile/root_option.patch
new file mode 100644
index 0000000000..bcb05f6c16
--- /dev/null
+++ b/packages/oprofile/oprofile/root_option.patch
@@ -0,0 +1,1051 @@
+Index: oprofile/libpp/arrange_profiles.cpp
+===================================================================
+--- oprofile.orig/libpp/arrange_profiles.cpp
++++ oprofile/libpp/arrange_profiles.cpp
+@@ -798,7 +798,7 @@ get_iprofile(app_map_t & app_map, string
+
+ /// Pull out all the images, removing any we can't access.
+ void
+-verify_and_fill(string archive_path, app_map_t & app_map,
++verify_and_fill(std::vector<std::string> const & archive_paths, app_map_t & app_map,
+ list<inverted_profile> & plist, extra_images const & extra)
+ {
+ app_map_t::iterator it = app_map.begin();
+@@ -807,7 +807,7 @@ verify_and_fill(string archive_path, app
+ for (; it != end; ++it) {
+ plist.push_back(it->second);
+ inverted_profile & ip = plist.back();
+- ip.image = find_image_path(archive_path, ip.image, extra,
++ ip.image = find_image_path(archive_paths, ip.image, extra,
+ ip.error);
+ }
+ }
+@@ -816,7 +816,7 @@ verify_and_fill(string archive_path, app
+
+
+ list<inverted_profile> const
+-invert_profiles(string archive_path, profile_classes const & classes,
++invert_profiles(std::vector<std::string> const & archive_paths, profile_classes const & classes,
+ extra_images const & extra)
+ {
+ app_map_t app_map;
+@@ -855,7 +855,7 @@ invert_profiles(string archive_path, pro
+
+ list<inverted_profile> inverted_list;
+
+- verify_and_fill(archive_path, app_map, inverted_list, extra);
++ verify_and_fill(archive_paths, app_map, inverted_list, extra);
+
+ return inverted_list;
+ }
+Index: oprofile/libpp/arrange_profiles.h
+===================================================================
+--- oprofile.orig/libpp/arrange_profiles.h
++++ oprofile/libpp/arrange_profiles.h
+@@ -239,7 +239,7 @@ class extra_images;
+ * applicable (hence image_set).
+ */
+ std::list<inverted_profile> const
+-invert_profiles(std::string archive_path, profile_classes const & classes,
++invert_profiles(std::vector<std::string> const & archive_paths, profile_classes const & classes,
+ extra_images const & extra);
+
+ #endif /* !ARRANGE_PROFILES_H */
+Index: oprofile/libpp/callgraph_container.cpp
+===================================================================
+--- oprofile.orig/libpp/callgraph_container.cpp
++++ oprofile/libpp/callgraph_container.cpp
+@@ -392,7 +392,7 @@ const symbol_collection & arc_recorder::
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<inverted_profile> const & iprofiles,
+ extra_images const & extra, bool debug_info, double threshold,
+ bool merge_lib, string_filter const & sym_filter)
+@@ -405,7 +405,7 @@ void callgraph_container::populate(strin
+ list<inverted_profile>::const_iterator const end = iprofiles.end();
+ for (it = iprofiles.begin(); it != end; ++it) {
+ // populate_caller_image take care about empty sample filename
+- populate_for_image(archive_path, pc, *it, sym_filter, 0);
++ populate_for_image(archive_paths, pc, *it, sym_filter, 0);
+ }
+
+ add_symbols(pc);
+@@ -414,7 +414,7 @@ void callgraph_container::populate(strin
+
+ for (it = iprofiles.begin(); it != end; ++it) {
+ for (size_t i = 0; i < it->groups.size(); ++i) {
+- populate(archive_path, it->groups[i], it->image, extra,
++ populate(archive_paths, it->groups[i], it->image, extra,
+ i, pc, debug_info, merge_lib);
+ }
+ }
+@@ -423,7 +423,7 @@ void callgraph_container::populate(strin
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<image_set> const & lset,
+ string const & app_image, extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info, bool merge_lib)
+@@ -435,14 +435,14 @@ void callgraph_container::populate(strin
+ list<profile_sample_files>::const_iterator pend
+ = lit->files.end();
+ for (pit = lit->files.begin(); pit != pend; ++pit) {
+- populate(archive_path, pit->cg_files, app_image,
++ populate(archive_paths, pit->cg_files, app_image,
+ extra, pclass, pc, debug_info, merge_lib);
+ }
+ }
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<string> const & cg_files,
+ string const & app_image, extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info, bool merge_lib)
+@@ -457,15 +457,15 @@ void callgraph_container::populate(strin
+
+ image_error error;
+ string caller_binary =
+- find_image_path(archive_path, caller_file.lib_image,
++ find_image_path(archive_paths, caller_file.lib_image,
+ extra, error);
+
+ if (error != image_ok)
+- report_image_error(archive_path + caller_file.lib_image,
++ report_image_error(caller_file.lib_image,
+ error, false);
+
+ bool caller_bfd_ok = true;
+- op_bfd caller_bfd(archive_path, caller_binary,
++ op_bfd caller_bfd(archive_paths, caller_binary,
+ string_filter(), caller_bfd_ok);
+ if (!caller_bfd_ok)
+ report_image_error(caller_binary,
+@@ -474,13 +474,13 @@ void callgraph_container::populate(strin
+ parsed_filename callee_file = parse_filename(*it);
+
+ string callee_binary =
+- find_image_path(archive_path, callee_file.cg_image,
++ find_image_path(archive_paths, callee_file.cg_image,
+ extra, error);
+ if (error != image_ok)
+ report_image_error(callee_file.cg_image, error, false);
+
+ bool callee_bfd_ok = true;
+- op_bfd callee_bfd(archive_path, callee_binary,
++ op_bfd callee_bfd(archive_paths, callee_binary,
+ string_filter(), callee_bfd_ok);
+ if (!callee_bfd_ok)
+ report_image_error(callee_binary,
+Index: oprofile/libpp/callgraph_container.h
+===================================================================
+--- oprofile.orig/libpp/callgraph_container.h
++++ oprofile/libpp/callgraph_container.h
+@@ -105,7 +105,7 @@ class callgraph_container {
+ public:
+ /**
+ * Populate the container, must be called once only.
+- * @param archive_path oparchive prefix path
++ * @param archive_paths oparchive prefix paths
+ * @param iprofiles sample file list including callgraph files.
+ * @param extra extra image list to fixup binary name.
+ * @param debug_info true if we must record linenr information
+@@ -116,7 +116,7 @@ public:
+ * Currently all errors core dump.
+ * FIXME: consider if this should be a ctor
+ */
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<inverted_profile> const & iprofiles,
+ extra_images const & extra, bool debug_info,
+ double threshold, bool merge_lib,
+@@ -149,13 +149,13 @@ private:
+ profile_container const & pc, bool debug_info,
+ size_t pclass);
+
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<image_set> const & lset,
+ std::string const & app_image,
+ extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info,
+ bool merge_lib);
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<std::string> const & cg_files,
+ std::string const & app_image,
+ extra_images const & extra, size_t pclass,
+Index: oprofile/libpp/locate_images.cpp
+===================================================================
+--- oprofile.orig/libpp/locate_images.cpp
++++ oprofile/libpp/locate_images.cpp
+@@ -93,14 +93,14 @@ public:
+ } // anon namespace
+
+
+-string const find_image_path(string const & archive_path,
++string const find_image_path(std::vector<std::string> const & archive_paths,
+ string const & image_name,
+ extra_images const & extra_images,
+ image_error & error)
+ {
+ error = image_ok;
+
+- string const image = op_realpath(archive_path + image_name);
++ string const image = op_realpath(op_findfile(archive_paths, image_name));
+
+ // simplest case
+ if (op_file_readable(image)) {
+Index: oprofile/libpp/locate_images.h
+===================================================================
+--- oprofile.orig/libpp/locate_images.h
++++ oprofile/libpp/locate_images.h
+@@ -70,7 +70,7 @@ private:
+ * If we fail to find the file we fill in error and return the original string.
+ */
+ std::string const
+-find_image_path(std::string const & archive_path,
++find_image_path(std::vector<std::string> const & archive_paths,
+ std::string const & image_name,
+ extra_images const & extra_images,
+ image_error & error);
+Index: oprofile/libpp/populate.cpp
+===================================================================
+--- oprofile.orig/libpp/populate.cpp
++++ oprofile/libpp/populate.cpp
+@@ -21,6 +21,7 @@
+ #include "populate_for_spu.h"
+
+ #include "image_errors.h"
++#include "file_manip.h"
+
+ #include <iostream>
+
+@@ -56,16 +57,16 @@ populate_from_files(profile_t & profile,
+
+
+ void
+-populate_for_image(string const & archive_path, profile_container & samples,
++populate_for_image(std::vector<std::string> const & archive_paths, profile_container & samples,
+ inverted_profile const & ip, string_filter const & symbol_filter,
+ bool * has_debug_info)
+ {
+ if (is_spu_profile(ip))
+- return populate_for_spu_image(archive_path, samples, ip,
++ return populate_for_spu_image(archive_paths, samples, ip,
+ symbol_filter, has_debug_info);
+
+ bool ok = ip.error == image_ok;
+- op_bfd abfd(archive_path, ip.image, symbol_filter, ok);
++ op_bfd abfd(archive_paths, ip.image, symbol_filter, ok);
+ if (!ok && ip.error == image_ok)
+ ip.error = image_format_failure;
+
+@@ -96,7 +97,7 @@ populate_for_image(string const & archiv
+ }
+
+ if (found == true && ip.error == image_ok)
+- check_mtime(archive_path + abfd.get_filename(), header);
++ check_mtime(op_findfile(archive_paths, abfd.get_filename()), header);
+
+ if (has_debug_info)
+ *has_debug_info = abfd.has_debug_info();
+Index: oprofile/libpp/populate.h
+===================================================================
+--- oprofile.orig/libpp/populate.h
++++ oprofile/libpp/populate.h
+@@ -19,7 +19,7 @@ class string_filter;
+
+ /// Load all sample file information for exactly one binary image.
+ void
+-populate_for_image(std::string const & archive_path,
++populate_for_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples, inverted_profile const & ip,
+ string_filter const & symbol_filter, bool * has_debug_info);
+
+Index: oprofile/libpp/populate_for_spu.cpp
+===================================================================
+--- oprofile.orig/libpp/populate_for_spu.cpp
++++ oprofile/libpp/populate_for_spu.cpp
+@@ -19,6 +19,7 @@
+ #include "populate_for_spu.h"
+
+ #include "image_errors.h"
++#include "file_manip.h"
+
+ #include <iostream>
+
+@@ -46,7 +47,7 @@ static int spu_profile = unknown_profile
+ void
+ populate_spu_profile_from_files(list<profile_sample_files> const & files,
+ string const app_image,
+- string const & archive_path,
++ std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+@@ -65,14 +66,14 @@ populate_spu_profile_from_files(list<pro
+ profile.add_sample_file(it->sample_filename);
+ opd_header header = profile.get_header();
+ if (header.embedded_offset) {
+- abfd = new op_bfd(archive_path,
++ abfd = new op_bfd(archive_paths,
+ header.embedded_offset,
+ ip.image,
+ symbol_filter,
+ ok);
+ fname_to_check = ip.image;
+ } else {
+- abfd = new op_bfd(archive_path,
++ abfd = new op_bfd(archive_paths,
+ ip.image,
+ symbol_filter,
+ ok);
+@@ -87,7 +88,7 @@ populate_spu_profile_from_files(list<pro
+
+ samples.add(profile, *abfd, app_image, ip_grp_num);
+ if (ip.error == image_ok)
+- check_mtime(archive_path + fname_to_check,
++ check_mtime(op_findfile(archive_paths, fname_to_check),
+ profile.get_header());
+
+ if (has_debug_info && !*has_debug_info)
+@@ -98,7 +99,7 @@ populate_spu_profile_from_files(list<pro
+ } // anon namespace
+
+ void
+-populate_for_spu_image(string const & archive_path,
++populate_for_spu_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+@@ -113,7 +114,7 @@ populate_for_spu_image(string const & ar
+
+ for (; it != end; ++it)
+ populate_spu_profile_from_files(it->files,
+- it->app_image, archive_path, samples, ip,
++ it->app_image, archive_paths, samples, ip,
+ symbol_filter, i, has_debug_info);
+ }
+ }
+Index: oprofile/libpp/populate_for_spu.h
+===================================================================
+--- oprofile.orig/libpp/populate_for_spu.h
++++ oprofile/libpp/populate_for_spu.h
+@@ -13,6 +13,8 @@
+ #ifndef POPULATE_FOR_SPU_H
+ #define POPULATE_FOR_SPU_H
+
++#include <vector>
++
+ class profile_container;
+ class inverted_profile;
+ class string_filter;
+@@ -28,7 +30,7 @@ bool is_spu_profile(inverted_profile con
+ * This is a special-purpose function for CELL BE SPU profiling.
+ * See populate_spu_profile_from_files prologue for more details.
+ */
+-void populate_for_spu_image(std::string const & archive_path,
++void populate_for_spu_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+Index: oprofile/libpp/profile_spec.cpp
+===================================================================
+--- oprofile.orig/libpp/profile_spec.cpp
++++ oprofile/libpp/profile_spec.cpp
+@@ -30,7 +30,7 @@ namespace {
+ // we should maintain the original to maintain the wordexp etc.
+ string const fixup_image_spec(string const & str, extra_images const & extra)
+ {
+- string dummy_archive_path;
++ std::vector<std::string> const dummy_archive_path;
+ // FIXME: what todo if an error in find_image_path() ?
+ image_error error;
+ return find_image_path(dummy_archive_path, str, extra, error);
+Index: oprofile/libpp/xml_utils.cpp
+===================================================================
+--- oprofile.orig/libpp/xml_utils.cpp
++++ oprofile/libpp/xml_utils.cpp
+@@ -111,10 +111,10 @@ string get_cpu_num(size_t pclass)
+
+ xml_utils::xml_utils(format_output::xml_formatter * xo,
+ symbol_collection const & s, size_t nc,
+- string_filter * sf, string const & ap)
++ string_filter * sf, std::vector<std::string> const & ap)
+ :
+ symbol_filter(sf),
+- archive_path(ap),
++ archive_paths(ap),
+ has_subclasses(false),
+ bytes_index(0)
+ {
+@@ -379,11 +379,11 @@ xml_utils::output_symbol_bytes(ostream &
+ string const & image_name = get_image_name(symb->image_name, true);
+ op_bfd * abfd = NULL;
+ if (symb->spu_offset)
+- abfd = new op_bfd(archive_path, symb->spu_offset,
++ abfd = new op_bfd(archive_paths, symb->spu_offset,
+ get_image_name(symb->embedding_filename, true),
+ *symbol_filter, ok);
+ else
+- abfd = new op_bfd(archive_path, image_name, *symbol_filter, ok);
++ abfd = new op_bfd(archive_paths, image_name, *symbol_filter, ok);
+ if (!ok) {
+ report_image_error(image_name, image_format_failure, false);
+ delete abfd;
+Index: oprofile/libpp/xml_utils.h
+===================================================================
+--- oprofile.orig/libpp/xml_utils.h
++++ oprofile/libpp/xml_utils.h
+@@ -22,7 +22,7 @@ class xml_utils {
+ public:
+ xml_utils(format_output::xml_formatter * xo,
+ symbol_collection const & s, size_t nc,
+- string_filter * sf, std::string const & ap);
++ string_filter * sf, std::vector<std::string> const & ap);
+ // these members are static because they are invoked before
+ // the xml_utils object has been created
+ static std::string get_timer_setup(size_t count);
+@@ -51,7 +51,7 @@ public:
+ private:
+ string_filter * symbol_filter;
+ bool multiple_events;
+- std::string archive_path;
++ std::vector<std::string> const & archive_paths;
+ bool has_subclasses;
+ size_t bytes_index;
+ static bool has_nonzero_masks;
+Index: oprofile/libutil++/op_bfd.cpp
+===================================================================
+--- oprofile.orig/libutil++/op_bfd.cpp
++++ oprofile/libutil++/op_bfd.cpp
+@@ -27,6 +27,7 @@
+ #include "string_filter.h"
+ #include "stream_util.h"
+ #include "cverb.h"
++#include "file_manip.h"
+
+ using namespace std;
+
+@@ -87,11 +88,11 @@ bool op_bfd_symbol::operator<(op_bfd_sym
+ }
+
+
+-op_bfd::op_bfd(string const & archive, string const & fname,
++op_bfd::op_bfd(std::vector<std::string> const & archive, string const & fname,
+ string_filter const & symbol_filter, bool & ok)
+ :
+ filename(fname),
+- archive_path(archive),
++ archive_paths(archive),
+ file_size(-1)
+ {
+ int fd;
+@@ -102,7 +103,7 @@ op_bfd::op_bfd(string const & archive, s
+ symbols_found_t symbols;
+ asection const * sect;
+
+- string const image_path = archive_path + filename;
++ string const image_path = op_findfile(archive_paths, filename);
+
+ cverb << vbfd << "op_bfd ctor for " << image_path << endl;
+
+@@ -321,8 +322,8 @@ bool op_bfd::has_debug_info() const
+ return debug_info.reset(true);
+
+ // check to see if there is an .debug file
+- string const global(archive_path + DEBUGDIR);
+- string const image_path = archive_path + filename;
++ string const global(op_findfile(archive_paths, DEBUGDIR));
++ string const image_path = op_findfile(archive_paths, filename);
+ string const dirname(image_path.substr(0, image_path.rfind('/')));
+
+ if (find_separate_debug_file(ibfd.abfd, dirname, global, debug_filename)) {
+Index: oprofile/libutil++/op_bfd.h
+===================================================================
+--- oprofile.orig/libutil++/op_bfd.h
++++ oprofile/libutil++/op_bfd.h
+@@ -89,14 +89,14 @@ private:
+ class op_bfd {
+ public:
+ /**
+- * @param archive_path oparchive prefix path
++ * @param archive_paths oparchive prefix paths
+ * @param filename the name of the image file
+ * @param symbol_filter filter to apply to symbols
+ * @param ok in-out parameter: on in, if not set, don't
+ * open the bfd (because it's not there or whatever). On out,
+ * it's set to false if the bfd couldn't be loaded.
+ */
+- op_bfd(std::string const & archive_path,
++ op_bfd(std::vector<std::string> const & archive_paths,
+ std::string const & filename,
+ string_filter const & symbol_filter,
+ bool & ok);
+@@ -105,7 +105,7 @@ public:
+ * This constructor is used when processing an SPU profile
+ * where the SPU ELF is embedded within the PPE binary.
+ */
+- op_bfd(std::string const & archive_path,
++ op_bfd(std::vector<std::string> const & archive_paths,
+ uint64_t spu_offset,
+ std::string const & filename,
+ string_filter const & symbol_filter,
+@@ -243,8 +243,8 @@ private:
+ /// filename we open (not including archive path)
+ std::string filename;
+
+- /// path to archive
+- std::string archive_path;
++ /// paths to archive
++ std::vector<std::string> archive_paths;
+
+ /// file size in bytes
+ off_t file_size;
+Index: oprofile/libutil++/op_spu_bfd.cpp
+===================================================================
+--- oprofile.orig/libutil++/op_spu_bfd.cpp
++++ oprofile/libutil++/op_spu_bfd.cpp
+@@ -19,6 +19,7 @@
+ #include "op_libiberty.h"
+ #include "string_filter.h"
+ #include "cverb.h"
++#include "file_manip.h"
+
+ using namespace std;
+
+@@ -29,11 +30,11 @@ extern verbose vbfd;
+ * constructor in libutil++/op_bfd.cpp, with the additional processing
+ * needed to handle an embedded spu offset.
+ */
+-op_bfd::op_bfd(string const & archive, uint64_t spu_offset,
++op_bfd::op_bfd(std::vector<std::string> const & archive, uint64_t spu_offset,
+ string const & fname,
+ string_filter const & symbol_filter, bool & ok)
+ :
+- archive_path(archive),
++ archive_paths(archive),
+ file_size(-1),
+ embedding_filename(fname)
+ {
+@@ -48,7 +49,7 @@ op_bfd::op_bfd(string const & archive, u
+ symbols_found_t symbols;
+ asection const * sect;
+
+- string const image_path = archive_path + fname;
++ string const image_path = op_findfile(archive_paths, fname);
+
+ cverb << vbfd << "op_bfd ctor for " << image_path << endl;
+ if (!ok)
+Index: oprofile/pp/opannotate_options.cpp
+===================================================================
+--- oprofile.orig/pp/opannotate_options.cpp
++++ oprofile/pp/opannotate_options.cpp
+@@ -26,7 +26,7 @@ using namespace std;
+ profile_classes classes;
+
+ namespace options {
+- string archive_path;
++ vector<string> archive_paths;
+ demangle_type demangle = dmt_normal;
+ string output_dir;
+ vector<string> search_dirs;
+@@ -87,6 +87,7 @@ popt::option options_array[] = {
+ void handle_options(options::spec const & spec)
+ {
+ using namespace options;
++ string archive_path;
+
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+@@ -125,7 +126,9 @@ void handle_options(options::spec const
+ list<string> sample_files = pspec.generate_file_list(exclude_dependent, true);
+
+ archive_path = pspec.get_archive_path();
++ archive_paths.push_back(archive_path);
+ cverb << vsfile << "Archive: " << archive_path << endl;
++ archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "Matched sample files: " << sample_files.size()
+ << endl;
+Index: oprofile/pp/opannotate_options.h
+===================================================================
+--- oprofile.orig/pp/opannotate_options.h
++++ oprofile/pp/opannotate_options.h
+@@ -21,7 +21,7 @@
+ class profile_classes;
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern demangle_type demangle;
+ extern bool source;
+ extern bool assembly;
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp
++++ oprofile/pp/oparchive.cpp
+@@ -59,7 +59,7 @@ int oparchive(options::spec const & spec
+
+ /* copy over each of the executables and the debuginfo files */
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -86,7 +86,7 @@ int oparchive(options::spec const & spec
+ }
+
+ /* Copy actual executable files */
+- copy_one_file(it->error, options::archive_path + exe_name,
++ copy_one_file(it->error, op_findfile(options::archive_paths, exe_name),
+ exe_archive_file);
+
+ /* If there are any debuginfo files, copy them over.
+@@ -95,11 +95,10 @@ int oparchive(options::spec const & spec
+ * to avoid overwriting files with the same name. The
+ * /usr/lib/debug search path is not going to work.
+ */
+- bfd * ibfd = open_bfd(options::archive_path + exe_name);
++ bfd * ibfd = open_bfd(op_findfile(options::archive_paths, exe_name));
+ if (ibfd) {
+- string global(options::archive_path + DEBUGDIR);
+- string dirname = op_dirname(options::archive_path +
+- exe_name);
++ string global(op_findfile(options::archive_paths, DEBUGDIR));
++ string dirname = op_dirname(op_findfile(options::archive_paths, exe_name));
+ string debug_filename;
+ if (find_separate_debug_file(ibfd, dirname, global,
+ debug_filename)) {
+@@ -130,8 +129,8 @@ int oparchive(options::spec const & spec
+ string sample_name = *sit;
+ string sample_base = sample_name;
+ /* Get rid of the the archive_path from the name */
+- sample_base.replace(sample_base.find(options::archive_path),
+- options::archive_path.size(), "");
++ sample_base.replace(sample_base.find(options::archive_paths[0]),
++ options::archive_paths[0].size(), "");
+ string sample_archive_file = options::outdirectory + sample_base;
+
+ cverb << vdebug << (sample_name) << endl;
+@@ -149,12 +148,12 @@ int oparchive(options::spec const & spec
+
+ /* copy over the /var/lib/oprofile/abi file if it exists */
+ string abi_name = "/var/lib/oprofile/abi";
+- copy_one_file(image_ok, options::archive_path + abi_name,
++ copy_one_file(image_ok, op_findfile(options::archive_paths, abi_name),
+ options::outdirectory + abi_name);
+
+ /* copy over the /var/lib/oprofile/oprofiled.log file */
+ string log_name = "/var/lib/oprofile/oprofiled.log";
+- copy_one_file(image_ok, options::archive_path + log_name,
++ copy_one_file(image_ok, op_findfile(options::archive_paths, log_name),
+ options::outdirectory + log_name);
+
+ return 0;
+Index: oprofile/pp/oparchive_options.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive_options.cpp
++++ oprofile/pp/oparchive_options.cpp
+@@ -31,7 +31,7 @@ profile_classes classes;
+ list<string> sample_files;
+
+ namespace options {
+- string archive_path;
++ std::vector<std::string> archive_paths;
+ demangle_type demangle = dmt_normal;
+ bool exclude_dependent;
+ merge_option merge_by;
+@@ -75,6 +75,7 @@ void check_options()
+ void handle_options(options::spec const & spec)
+ {
+ using namespace options;
++ std::string archive_path;
+
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+@@ -96,7 +97,9 @@ void handle_options(options::spec const
+ sample_files = pspec.generate_file_list(exclude_dependent, false);
+
+ archive_path = pspec.get_archive_path();
++ archive_paths.push_back(archive_path);
+ cverb << vsfile << "Archive: " << archive_path << endl;
++ archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "Matched sample files: " << sample_files.size()
+ << endl;
+Index: oprofile/pp/oparchive_options.h
+===================================================================
+--- oprofile.orig/pp/oparchive_options.h
++++ oprofile/pp/oparchive_options.h
+@@ -18,7 +18,7 @@ class profile_classes;
+ class merge_option;
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern bool exclude_dependent;
+ extern merge_option merge_by;
+ extern std::string outdirectory;
+Index: oprofile/pp/opgprof_options.cpp
+===================================================================
+--- oprofile.orig/pp/opgprof_options.cpp
++++ oprofile/pp/opgprof_options.cpp
+@@ -26,7 +26,7 @@ profile_classes classes;
+ inverted_profile image_profile;
+
+ namespace options {
+- string archive_path;
++ std::vector<std::string> archive_paths;
+ string gmon_filename = "gmon.out";
+
+ // Ugly, for build only
+@@ -71,7 +71,7 @@ bool try_merge_profiles(profile_spec con
+ size_t nr_classes = classes.v.size();
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ if (nr_classes == 1 && iprofiles.size() == 1) {
+@@ -104,6 +104,8 @@ bool try_merge_profiles(profile_spec con
+
+ void handle_options(options::spec const & spec)
+ {
++ string archive_path;
++
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+ exit(EXIT_FAILURE);
+@@ -112,8 +114,10 @@ void handle_options(options::spec const
+ profile_spec const pspec =
+ profile_spec::create(spec.common, options::extra_found_images);
+
+- options::archive_path = pspec.get_archive_path();
+- cverb << vsfile << "Archive: " << options::archive_path << endl;
++ archive_path = pspec.get_archive_path();
++ options::archive_paths.push_back(archive_path);
++ cverb << vsfile << "Archive: " << archive_path << endl;
++ options::archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "output filename: " << options::gmon_filename
+ << endl;
+Index: oprofile/pp/opgprof_options.h
+===================================================================
+--- oprofile.orig/pp/opgprof_options.h
++++ oprofile/pp/opgprof_options.h
+@@ -17,7 +17,7 @@
+ #include "common_option.h"
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern std::string gmon_filename;
+ }
+
+Index: oprofile/pp/opreport_options.cpp
+===================================================================
+--- oprofile.orig/pp/opreport_options.cpp
++++ oprofile/pp/opreport_options.cpp
+@@ -32,8 +32,8 @@ profile_classes classes;
+ profile_classes classes2;
+
+ namespace options {
+- string archive_path;
+- string archive_path2;
++ std::vector<std::string> archive_paths;
++ std::vector<std::string> archive_paths2;
+ demangle_type demangle = dmt_normal;
+ bool symbols;
+ bool callgraph;
+@@ -314,16 +314,19 @@ void handle_options(options::spec const
+ symbol_filter = string_filter(include_symbols, exclude_symbols);
+
+ if (!spec.first.size()) {
+- archive_path = process_spec(classes, spec.common);
++ archive_paths.push_back(process_spec(classes, spec.common));
++ archive_paths.push_back(options::root_path);
+ } else {
+ if (options::xml) {
+ cerr << "differential profiles are incompatible with --xml" << endl;
+ exit(EXIT_FAILURE);
+ }
+ cverb << vsfile << "profile spec 1:" << endl;
+- archive_path = process_spec(classes, spec.first);
++ archive_paths.push_back(process_spec(classes, spec.first));
++ archive_paths.push_back(options::root_path);
+ cverb << vsfile << "profile spec 2:" << endl;
+- archive_path2 = process_spec(classes2, spec.second);
++ archive_paths2.push_back(process_spec(classes2, spec.second));
++ archive_paths2.push_back(options::root_path);
+
+ if (!classes.matches(classes2)) {
+ cerr << "profile classes are incompatible" << endl;
+Index: oprofile/pp/opreport_options.h
+===================================================================
+--- oprofile.orig/pp/opreport_options.h
++++ oprofile/pp/opreport_options.h
+@@ -24,8 +24,8 @@ class profile_classes;
+ class merge_option;
+
+ namespace options {
+- extern std::string archive_path;
+- extern std::string archive_path2;
++ extern std::vector<std::string> archive_paths;
++ extern std::vector<std::string> archive_paths2;
+ extern demangle_type demangle;
+ extern bool symbols;
+ extern bool callgraph;
+Index: oprofile/libutil++/file_manip.cpp
+===================================================================
+--- oprofile.orig/libutil++/file_manip.cpp
++++ oprofile/libutil++/file_manip.cpp
+@@ -205,3 +205,14 @@ string op_basename(string const & path_n
+
+ return erase_to_last_of(result, '/');
+ }
++
++string op_findfile(const vector<string> & paths, string const & file)
++{
++ for (vector<string>::const_iterator it = paths.begin(); it!=paths.end(); ++it)
++ {
++ if (op_file_readable(*it + file))
++ return *it + file;
++ }
++ return "";
++}
++
+Index: oprofile/libutil++/file_manip.h
+===================================================================
+--- oprofile.orig/libutil++/file_manip.h
++++ oprofile/libutil++/file_manip.h
+@@ -12,6 +12,7 @@
+ #ifndef FILE_MANIP_H
+ #define FILE_MANIP_H
+
++#include <vector>
+ #include <string>
+ #include <list>
+
+@@ -86,4 +87,14 @@ std::string op_dirname(std::string const
+ */
+ std::string op_basename(std::string const & path_name);
+
++/**
++ *
++ * op_findfile - search a set of paths for file
++ * @param paths paths to search
++ * @param file filename to search for
++ *
++ * Returns the path to the first matching file or an empty string if not found.
++ */
++std::string op_findfile(const std::vector<std::string> & paths, std::string const & file);
++
+ #endif /* !FILE_MANIP_H */
+Index: oprofile/pp/common_option.cpp
+===================================================================
+--- oprofile.orig/pp/common_option.cpp
++++ oprofile/pp/common_option.cpp
+@@ -30,6 +30,7 @@ namespace options {
+ string session_dir = OP_SESSION_DIR_DEFAULT;
+ string command_options;
+ vector<string> image_path;
++ string root_path;
+ }
+
+ namespace {
+@@ -44,6 +45,8 @@ popt::option common_options_array[] = {
+ "specify session path to hold samples database and session data (" OP_SESSION_DIR_DEFAULT ")", "path"),
+ popt::option(options::image_path, "image-path", 'p',
+ "comma-separated path to search missing binaries", "path"),
++ popt::option(options::root_path, "root", 'R',
++ "path to filesystem to search for missing binaries", "path"),
+ };
+
+
+Index: oprofile/pp/common_option.h
+===================================================================
+--- oprofile.orig/pp/common_option.h
++++ oprofile/pp/common_option.h
+@@ -26,6 +26,7 @@ namespace options {
+ extern std::string threshold_opt;
+ extern std::string command_options;
+ extern std::vector<std::string> image_path;
++ extern std::string root_path;
+
+ struct spec {
+ std::list<std::string> common;
+Index: oprofile/pp/opreport.cpp
+===================================================================
+--- oprofile.orig/pp/opreport.cpp
++++ oprofile/pp/opreport.cpp
+@@ -403,7 +403,7 @@ void output_symbols(profile_container co
+
+ if (options::xml) {
+ xml_support = new xml_utils(xml_out, symbols, nr_classes,
+- &options::symbol_filter, options::archive_path);
++ &options::symbol_filter, options::archive_paths);
+ xml_out->output(cout);
+ } else {
+ text_out->output(cout, symbols);
+@@ -479,7 +479,7 @@ void output_cg_symbols(callgraph_contain
+
+ if (options::xml) {
+ xml_support = new xml_utils(xml_out, symbols, nr_classes,
+- &options::symbol_filter, options::archive_path);
++ &options::symbol_filter, options::archive_paths);
+ xml_out->output(cout);
+ } else {
+ text_out->output(cout, symbols);
+@@ -511,7 +511,7 @@ int opreport(options::spec const & spec)
+ }
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -535,11 +535,11 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end = iprofiles.end();
+
+ for (; it != end; ++it)
+- populate_for_image(options::archive_path, pc1,
++ populate_for_image(options::archive_paths, pc1,
+ *it, options::symbol_filter, 0);
+
+ list<inverted_profile> iprofiles2
+- = invert_profiles(options::archive_path2, classes2,
++ = invert_profiles(options::archive_paths2, classes2,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles2);
+@@ -550,13 +550,13 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end2 = iprofiles2.end();
+
+ for (; it2 != end2; ++it2)
+- populate_for_image(options::archive_path2, pc2,
++ populate_for_image(options::archive_paths2, pc2,
+ *it2, options::symbol_filter, 0);
+
+ output_diff_symbols(pc1, pc2, multiple_apps);
+ } else if (options::callgraph) {
+ callgraph_container cg_container;
+- cg_container.populate(options::archive_path, iprofiles,
++ cg_container.populate(options::archive_paths, iprofiles,
+ options::extra_found_images,
+ options::debug_info, options::threshold,
+ options::merge_by.lib, options::symbol_filter);
+@@ -569,7 +569,7 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end = iprofiles.end();
+
+ for (; it != end; ++it)
+- populate_for_image(options::archive_path, samples,
++ populate_for_image(options::archive_paths, samples,
+ *it, options::symbol_filter, 0);
+
+ output_symbols(samples, multiple_apps);
+Index: oprofile/pp/opannotate.cpp
+===================================================================
+--- oprofile.orig/pp/opannotate.cpp
++++ oprofile/pp/opannotate.cpp
+@@ -690,7 +690,7 @@ int opannotate(options::spec const & spe
+ list<string> images;
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -701,7 +701,7 @@ int opannotate(options::spec const & spe
+ bool debug_info = false;
+ for (; it != end; ++it) {
+ bool tmp = false;
+- populate_for_image(options::archive_path, *samples, *it,
++ populate_for_image(options::archive_paths, *samples, *it,
+ options::symbol_filter, &tmp);
+ images.push_back(it->image);
+ if (tmp)
+Index: oprofile/pp/opgprof.cpp
+===================================================================
+--- oprofile.orig/pp/opgprof.cpp
++++ oprofile/pp/opgprof.cpp
+@@ -282,7 +282,7 @@ int opgprof(options::spec const & spec)
+
+ bool ok = image_profile.error == image_ok;
+ // FIXME: symbol_filter would be allowed through option
+- op_bfd abfd(options::archive_path, image_profile.image,
++ op_bfd abfd(options::archive_paths, image_profile.image,
+ string_filter(), ok);
+ if (!ok && image_profile.error == image_ok)
+ image_profile.error = image_format_failure;
+Index: oprofile/doc/opannotate.1.in
+===================================================================
+--- oprofile.orig/doc/opannotate.1.in
++++ oprofile/doc/opannotate.1.in
+@@ -50,6 +50,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--include-file [files]"
+ Only include files in the given comma-separated list of glob patterns.
+ .br
+Index: oprofile/doc/oparchive.1.in
+===================================================================
+--- oprofile.orig/doc/oparchive.1.in
++++ oprofile/doc/oparchive.1.in
+@@ -42,6 +42,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--output-directory / -o [directory]"
+ Output to the given directory. There is no default. This must be specified.
+ .br
+Index: oprofile/doc/opgprof.1.in
+===================================================================
+--- oprofile.orig/doc/opgprof.1.in
++++ oprofile/doc/opgprof.1.in
+@@ -38,6 +38,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--threshold / -t [percentage]"
+ Only output data for symbols that have more than the given percentage
+ of total samples.
+Index: oprofile/doc/opreport.1.in
+===================================================================
+--- oprofile.orig/doc/opreport.1.in
++++ oprofile/doc/opreport.1.in
+@@ -61,6 +61,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--include-symbols / -i [symbols]"
+ Only include symbols in the given comma-separated list.
+ .br
diff --git a/packages/oprofile/oprofile/xml_callgraph_details.patch b/packages/oprofile/oprofile/xml_callgraph_details.patch
new file mode 100644
index 0000000000..e5ab3d916e
--- /dev/null
+++ b/packages/oprofile/oprofile/xml_callgraph_details.patch
@@ -0,0 +1,232 @@
+Work in Progress- This patch breaks output_symbol_bytes
+---
+ ChangeLog | 9 +++++++++
+ libpp/callgraph_container.cpp | 10 ++++++++--
+ libpp/callgraph_container.h | 14 ++++++++++----
+ libpp/format_output.cpp | 30 +++++++++++++++++++++++++-----
+ libpp/format_output.h | 6 +++---
+ pp/opreport.cpp | 5 +++--
+ pp/opreport_options.cpp | 4 ++--
+ 7 files changed, 60 insertions(+), 18 deletions(-)
+
+Index: oprofile1/pp/opreport.cpp
+===================================================================
+--- oprofile1.orig/pp/opreport.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/pp/opreport.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -555,10 +555,11 @@ int opreport(options::spec const & spec)
+
+ output_diff_symbols(pc1, pc2, multiple_apps);
+ } else if (options::callgraph) {
+- callgraph_container cg_container;
++ callgraph_container cg_container(options::debug_info,
++ options::details);
+ cg_container.populate(options::archive_path, iprofiles,
+ options::extra_found_images,
+- options::debug_info, options::threshold,
++ options::threshold,
+ options::merge_by.lib, options::symbol_filter);
+
+ output_cg_symbols(cg_container, multiple_apps);
+Index: oprofile1/ChangeLog
+===================================================================
+--- oprofile1.orig/ChangeLog 2007-05-24 18:30:47.000000000 +0100
++++ oprofile1/ChangeLog 2007-05-24 20:07:14.000000000 +0100
+@@ -1,5 +1,14 @@
+ 2007-05-24 Richard Purdie <rpurdie@openedhand.com>
+
++ * libpp/callgraph_container.cpp:
++ * libpp/callgraph_container.h:
++ * libpp/format_output.cpp:
++ * libpp/format_output.h:
++ * pp/opreport.cpp:
++ * pp/opreport_options.cpp: Add callgraph XML detail support
++
++2007-05-24 Richard Purdie <rpurdie@openedhand.com>
++
+ * events/arm/xscale1/events:
+ * events/arm/xscale2/events: Add extra Xscale PMU event definitions
+
+Index: oprofile1/libpp/callgraph_container.cpp
+===================================================================
+--- oprofile1.orig/libpp/callgraph_container.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/callgraph_container.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -391,15 +391,21 @@ const symbol_collection & arc_recorder::
+ return cg_syms;
+ }
+
++callgraph_container::callgraph_container(bool debug_info, bool need_details)
++ :
++ pc(debug_info, need_details),
++ debug_info(debug_info)
++{
++}
++
+
+ void callgraph_container::populate(string const & archive_path,
+ list<inverted_profile> const & iprofiles,
+- extra_images const & extra, bool debug_info, double threshold,
++ extra_images const & extra, double threshold,
+ bool merge_lib, string_filter const & sym_filter)
+ {
+ // non callgraph samples container, we record sample at symbol level
+ // not at vma level.
+- profile_container pc(debug_info, false);
+
+ list<inverted_profile>::const_iterator it;
+ list<inverted_profile>::const_iterator const end = iprofiles.end();
+Index: oprofile1/libpp/callgraph_container.h
+===================================================================
+--- oprofile1.orig/libpp/callgraph_container.h 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/callgraph_container.h 2007-05-24 20:07:14.000000000 +0100
+@@ -19,8 +19,8 @@
+ #include "symbol.h"
+ #include "symbol_functors.h"
+ #include "string_filter.h"
++#include "profile_container.h"
+
+-class profile_container;
+ class inverted_profile;
+ class profile_t;
+ class extra_images;
+@@ -103,6 +103,8 @@ private:
+ */
+ class callgraph_container {
+ public:
++ callgraph_container(bool debug_info, bool need_details);
++
+ /**
+ * Populate the container, must be called once only.
+ * @param archive_path oparchive prefix path
+@@ -118,9 +120,8 @@ public:
+ */
+ void populate(std::string const & archive_path,
+ std::list<inverted_profile> const & iprofiles,
+- extra_images const & extra, bool debug_info,
+- double threshold, bool merge_lib,
+- string_filter const & sym_filter);
++ extra_images const & extra, double threshold,
++ bool merge_lib, string_filter const & sym_filter);
+
+ /// return hint on how data must be displayed.
+ column_flags output_hint() const;
+@@ -131,6 +132,9 @@ public:
+ // return all the cg symbols
+ const symbol_collection & get_symbols() const;
+
++ // profile container callgraph is based on
++ profile_container pc;
++
+ private:
+ /**
+ * Record caller/callee for one cg file
+@@ -162,6 +166,8 @@ private:
+ profile_container const & pc, bool debug_info,
+ bool merge_lib);
+
++ bool debug_info;
++
+ /// record all main symbols
+ void add_symbols(profile_container const & pc);
+
+Index: oprofile1/pp/opreport_options.cpp
+===================================================================
+--- oprofile1.orig/pp/opreport_options.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/pp/opreport_options.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -165,8 +165,8 @@ void check_options(bool diff)
+
+ if (callgraph) {
+ symbols = true;
+- if (details) {
+- cerr << "--callgraph is incompatible with --details" << endl;
++ if (details && !xml) {
++ cerr << "--callgraph is incompatible with --details without --xml" << endl;
+ do_exit = true;
+ }
+
+Index: oprofile1/libpp/format_output.cpp
+===================================================================
+--- oprofile1.orig/libpp/format_output.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/format_output.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -594,9 +594,9 @@ xml_formatter::
+ xml_formatter(profile_container const * p,
+ symbol_collection & s)
+ :
++ need_details(false),
+ profile(p),
+- symbols(s),
+- need_details(false)
++ symbols(s)
+ {
+ if (profile)
+ counts.total = profile->samples_count();
+@@ -673,8 +673,8 @@ void xml_formatter::output_symbol_data(o
+ if (name.size() > 0 && name[0] != '?') {
+ output_attribute(out, datum, ff_vma, STARTING_ADDR);
+
+- if (need_details)
+- xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second);
++ //if (need_details)
++ // xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second);
+ }
+ out << close_element();
+
+@@ -843,7 +843,7 @@ output_attribute(ostream & out, field_da
+ xml_cg_formatter::
+ xml_cg_formatter(callgraph_container const * cg, symbol_collection & s)
+ :
+- xml_formatter(0, s),
++ xml_formatter(&cg->pc, s),
+ callgraph(cg)
+ {
+ counts.total = callgraph->samples_count();
+@@ -946,6 +946,26 @@ output_symbol(ostream & out,
+
+ out << init_attr(ID_REF, indx);
+
++ if (need_details) {
++ ostringstream details;
++ symbol_details_t & sd = symbol_details[indx];
++ size_t const detail_lo = sd.index;
++
++ string detail_str = output_symbol_details(symb, sd.index, lo, hi);
++
++ if (detail_str.size() > 0) {
++ if (sd.id < 0)
++ sd.id = indx;
++ details << detail_str;
++ }
++
++ if (sd.index > detail_lo) {
++ sd.details = sd.details + details.str();
++ out << init_attr(DETAIL_LO, detail_lo);
++ out << init_attr(DETAIL_HI, sd.index-1);
++ }
++ }
++
+ out << close_element(NONE, true);
+
+ out << open_element(CALLERS);
+Index: oprofile1/libpp/format_output.h
+===================================================================
+--- oprofile1.orig/libpp/format_output.h 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/format_output.h 2007-05-24 20:07:14.000000000 +0100
+@@ -249,6 +249,9 @@ public:
+ // output SymbolData XML elements
+ void output_symbol_data(std::ostream & out);
+
++ /// true if we need to show details for each symbols
++ bool need_details;
++
+ private:
+ /// container we work from
+ profile_container const * profile;
+@@ -256,9 +259,6 @@ private:
+ // ordered collection of symbols associated with this profile
+ symbol_collection & symbols;
+
+- /// true if we need to show details for each symbols
+- bool need_details;
+-
+ // count of DetailData items output so far
+ size_t detail_count;
+
diff --git a/packages/oprofile/oprofile_0.9.3.bb b/packages/oprofile/oprofile_0.9.3.bb
index 977907e305..c4194ab2e1 100644
--- a/packages/oprofile/oprofile_0.9.3.bb
+++ b/packages/oprofile/oprofile_0.9.3.bb
@@ -1,15 +1,18 @@
+SECTION = "devel"
DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
of profiling all running code at low overhead."
-SECTION = "devel"
LICENSE = "GPL"
DEPENDS = "popt binutils"
-PR = "r1"
+RDEPENDS = "binutils-symlinks"
+PR = "r4"
SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \
- file://acinclude.m4 \
- file://opcontrol-busybox-compat.patch;patch=1 \
- "
-
+ file://armv6_fix.patch;patch=1 \
+ file://oparchive_fix.patch;patch=1 \
+ file://root_option.patch;patch=1 \
+ file://opstart.patch;patch=1 \
+ file://fix-arith.patch;patch=1;pnum=0 \
+ file://acinclude.m4"
S = "${WORKDIR}/oprofile-${PV}"
inherit autotools
@@ -18,12 +21,11 @@ inherit autotools
# Should add the oprofile kernel modules, for those with 2.4
# kernels, as a seperate .oe file.
EXTRA_OECONF = "--with-kernel-support \
- --without-x \
- --disable-werror "
+ --without-x"
do_configure () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
- autotools_do_configure
+ cp ${WORKDIR}/acinclude.m4 ${S}/
+ autotools_do_configure
}
# Available config options
# --enable-abi enable abi portability code (default is disabled)
diff --git a/packages/oprofile/oprofile_cvs.bb b/packages/oprofile/oprofile_cvs.bb
index 2eec2a7836..2096a27b40 100644
--- a/packages/oprofile/oprofile_cvs.bb
+++ b/packages/oprofile/oprofile_cvs.bb
@@ -1,14 +1,14 @@
-PV = "0.9.2+cvs${SRCDATE}"
-PR = "r1"
+PV = "0.9.3+cvs${SRCDATE}"
+PR = "r0"
SECTION = "devel"
DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
of profiling all running code at low overhead."
LICENSE = "GPL"
DEPENDS = "popt binutils"
-
-DEFAULT_PREFERENCE = "-1"
+RDEPENDS = "binutils-symlinks"
SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \
+ file://opstart.patch;patch=1 \
file://acinclude.m4"
S = "${WORKDIR}/oprofile"
diff --git a/packages/oprofile/oprofileui-svn.inc b/packages/oprofile/oprofileui-svn.inc
new file mode 100644
index 0000000000..6d111d1d59
--- /dev/null
+++ b/packages/oprofile/oprofileui-svn.inc
@@ -0,0 +1,8 @@
+require oprofileui.inc
+
+PV = "0.0+svnr${SRCREV}"
+PR = "r1"
+
+S = "${WORKDIR}/trunk"
+
+SRC_URI = "svn://svn.o-hand.com/repos/oprofileui;module=trunk;proto=http"
diff --git a/packages/oprofile/oprofileui.inc b/packages/oprofile/oprofileui.inc
new file mode 100644
index 0000000000..93f4631d14
--- /dev/null
+++ b/packages/oprofile/oprofileui.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "User interface for the OProfile tool"
+SECTION = "x11"
+LICENSE = "GPLv2"
+DEPENDS = "glib-2.0 gtk+ libglade gnome-vfs libxml2 avahi gconf"
+
+inherit autotools pkgconfig gtk-icon-cache
+
+PACKAGES =+ "oprofileui-server oprofileui-viewer"
+
+EXTRA_OECONF = "--with-avahi"
+
+FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/"
+RDEPENDS_oprofile-viewer = "oprofile"
+
+FILES_oprofileui-server = "${bindir}/oprofile-server"
+RDEPENDS_oprofile-server = "oprofile"
diff --git a/packages/oprofile/oprofileui_svn.bb b/packages/oprofile/oprofileui_svn.bb
new file mode 100644
index 0000000000..39e10b4fd2
--- /dev/null
+++ b/packages/oprofile/oprofileui_svn.bb
@@ -0,0 +1,2 @@
+require oprofileui-svn.inc
+
diff --git a/packages/packagekit/files/d1e096c3267c1c9492041382b954e9327bc8bbec.patch b/packages/packagekit/files/d1e096c3267c1c9492041382b954e9327bc8bbec.patch
new file mode 100644
index 0000000000..f050a50002
--- /dev/null
+++ b/packages/packagekit/files/d1e096c3267c1c9492041382b954e9327bc8bbec.patch
@@ -0,0 +1,2938 @@
+diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c
+index 3270e42..45e7a44 100644
+--- a/backends/alpm/pk-backend-alpm.c
++++ b/backends/alpm/pk-backend-alpm.c
+@@ -895,7 +895,7 @@ backend_get_repo_list (PkBackend *backend, PkFilterEnum filters)
+ static gboolean
+ backend_install_files_thread (PkBackend *backend)
+ {
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ gchar **full_paths = pk_backend_get_strv (backend, "full_paths");
+
+@@ -1050,7 +1050,7 @@ backend_install_packages (PkBackend *backend, gchar **package_ids)
+ static gboolean
+ backend_refresh_cache_thread (PkBackend *backend)
+ {
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ if (alpm_trans_init (PM_TRANS_TYPE_SYNC, PM_TRANS_FLAG_NOSCRIPTLET, cb_trans_evt, cb_trans_conv, cb_trans_progress) != 0) {
+ pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, alpm_strerror (pm_errno));
+diff --git a/backends/apt/pk-apt-build-db.cpp b/backends/apt/pk-apt-build-db.cpp
+index d47c348..885275d 100644
+--- a/backends/apt/pk-apt-build-db.cpp
++++ b/backends/apt/pk-apt-build-db.cpp
+@@ -40,7 +40,7 @@ void apt_build_db(PkBackend * backend, sqlite3 *db)
+ sqlite3_stmt *package = NULL;
+
+ pk_backend_set_status(backend, PK_STATUS_ENUM_QUERY);
+- pk_backend_no_percentage_updates(backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ sdir = g_build_filename(_config->Find("Dir").c_str(),_config->Find("Dir::State").c_str(),_config->Find("Dir::State::lists").c_str(), NULL);
+ dir = g_dir_open(sdir,0,&error);
+diff --git a/backends/apt/pk-sqlite-pkg-cache.cpp b/backends/apt/pk-sqlite-pkg-cache.cpp
+index 770fcdf..1bf9a50 100644
+--- a/backends/apt/pk-sqlite-pkg-cache.cpp
++++ b/backends/apt/pk-sqlite-pkg-cache.cpp
+@@ -81,7 +81,7 @@ sqlite_search_packages_thread (PkBackend *backend)
+ const gchar *search;
+
+ pk_backend_set_status(backend, PK_STATUS_ENUM_QUERY);
+- pk_backend_no_percentage_updates(backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+ type = pk_backend_get_uint (backend, "type");
+ search = pk_backend_get_string (backend, "search");
+
+@@ -176,7 +176,7 @@ sqlite_get_details_thread (PkBackend *backend)
+ }
+
+ pk_backend_set_status(backend, PK_STATUS_ENUM_QUERY);
+- pk_backend_no_percentage_updates(backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ pk_debug("finding %s", pi->name);
+
+diff --git a/backends/box/pk-backend-box.c b/backends/box/pk-backend-box.c
+index b7b8167..9263781 100644
+--- a/backends/box/pk-backend-box.c
++++ b/backends/box/pk-backend-box.c
+@@ -138,7 +138,7 @@ backend_find_packages_thread (PkBackend *backend)
+ filter_box = filter_box | PKG_SEARCH_DETAILS;
+ }
+
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ db = db_open();
+
+diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
+index 49d4e5a..2df445e 100644
+--- a/backends/dummy/pk-backend-dummy.c
++++ b/backends/dummy/pk-backend-dummy.c
+@@ -254,7 +254,7 @@ static void
+ backend_get_updates (PkBackend *backend, PkFilterEnum filters)
+ {
+ pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+ /* check network state */
+ if (!pk_backend_is_online (backend)) {
+ pk_backend_error_code (backend, PK_ERROR_ENUM_NO_NETWORK, "Cannot check when offline");
+@@ -268,6 +268,8 @@ static gboolean
+ backend_install_timeout (gpointer data)
+ {
+ PkBackend *backend = (PkBackend *) data;
++ guint sub_percent;
++
+ if (_progress_percentage == 100) {
+ pk_backend_finished (backend);
+ return FALSE;
+@@ -283,9 +285,18 @@ backend_install_timeout (gpointer data)
+ pk_backend_package (backend, PK_INFO_ENUM_INSTALLING,
+ "gtkhtml2-devel;2.19.1-0.fc8;i386;fedora",
+ "Devel files for gtkhtml");
++ /* this duplicate package should be ignored */
++ pk_backend_package (backend, PK_INFO_ENUM_INSTALLING,
++ "gtkhtml2-devel;2.19.1-0.fc8;i386;fedora", NULL);
+ pk_backend_set_status (backend, PK_STATUS_ENUM_INSTALL);
+ }
+- _progress_percentage += 10;
++ if (_progress_percentage > 30 && _progress_percentage < 50) {
++ sub_percent = ((gfloat) (_progress_percentage - 30.0f) / 20.0f) * 100.0f;
++ pk_backend_set_sub_percentage (backend, sub_percent);
++ } else {
++ pk_backend_set_sub_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
++ }
++ _progress_percentage += 1;
+ pk_backend_set_percentage (backend, _progress_percentage);
+ return TRUE;
+ }
+@@ -348,7 +359,7 @@ backend_install_packages (PkBackend *backend, gchar **package_ids)
+ pk_backend_package (backend, PK_INFO_ENUM_DOWNLOADING,
+ "gtkhtml2;2.19.1-4.fc8;i386;fedora",
+ "An HTML widget for GTK+ 2.0");
+- _signal_timeout = g_timeout_add (1000, backend_install_timeout, backend);
++ _signal_timeout = g_timeout_add (100, backend_install_timeout, backend);
+ }
+
+ /**
+@@ -526,7 +537,7 @@ backend_search_name_timeout (gpointer data)
+ static void
+ backend_search_name (PkBackend *backend, PkFilterEnum filters, const gchar *search)
+ {
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+ pk_backend_set_allow_cancel (backend, TRUE);
+ pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
+ _signal_timeout = g_timeout_add (2000, backend_search_name_timeout, backend);
+diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
+index ecc97be..7649bab 100644
+--- a/backends/opkg/pk-backend-opkg.c
++++ b/backends/opkg/pk-backend-opkg.c
+@@ -155,6 +155,38 @@ pk_opkg_progress_cb (opkg_t *opkg, const opkg_progress_data_t *pdata, void *data
+ return;
+
+ pk_backend_set_percentage (backend, pdata->percentage);
++ if (pdata->package)
++ {
++ gchar *uid;
++ opkg_package_t *pkg = pdata->package;
++ gint status = PK_INFO_ENUM_UNKNOWN;
++
++ uid = g_strdup_printf ("%s;%s;%s;",
++ pkg->name, pkg->version, pkg->architecture);
++
++ if (pdata->action == OPKG_DOWNLOAD)
++ status = PK_INFO_ENUM_DOWNLOADING;
++ else if (pdata->action == OPKG_INSTALL)
++ status = PK_INFO_ENUM_INSTALLING;
++ else if (pdata->action == OPKG_REMOVE)
++ status = PK_INFO_ENUM_REMOVING;
++
++ pk_backend_package (backend, status, uid, pkg->description);
++ g_free (uid);
++ }
++
++ switch (pdata->action)
++ {
++ case OPKG_DOWNLOAD:
++ pk_backend_set_status (backend, PK_STATUS_ENUM_DOWNLOAD);
++ break;
++ case OPKG_INSTALL:
++ pk_backend_set_status (backend, PK_STATUS_ENUM_INSTALL);
++ break;
++ case OPKG_REMOVE:
++ pk_backend_set_status (backend, PK_STATUS_ENUM_REMOVE);
++ break;
++ }
+ }
+
+ static gboolean
+@@ -163,8 +195,12 @@ backend_refresh_cache_thread (PkBackend *backend)
+ int ret;
+
+ ret = opkg_update_package_lists (opkg, pk_opkg_progress_cb, backend);
++
+ if (ret) {
+- opkg_unknown_error (backend, ret, "Refreshing cache");
++ if (ret == OPKG_DOWNLOAD_FAILED)
++ pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_AVAILABLE, NULL);
++ else
++ opkg_unknown_error (backend, ret, "Refreshing cache");
+ }
+ pk_backend_finished (backend);
+
+@@ -178,7 +214,7 @@ static void
+ backend_refresh_cache (PkBackend *backend, gboolean force)
+ {
+ pk_backend_set_status (backend, PK_STATUS_ENUM_REFRESH_CACHE);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+
+ pk_backend_thread_create (backend, backend_refresh_cache_thread);
+@@ -279,7 +315,7 @@ backend_search_name (PkBackend *backend, PkFilterEnum filters, const gchar *sear
+
+
+ pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ params = g_new0 (SearchParams, 1);
+ params->filters = filters;
+@@ -301,7 +337,7 @@ backend_search_description (PkBackend *backend, PkFilterEnum filters, const gcha
+
+
+ pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ params = g_new0 (SearchParams, 1);
+ params->filters = filters;
+@@ -320,7 +356,7 @@ backend_search_group (PkBackend *backend, PkFilterEnum filters, const gchar *sea
+
+
+ pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ params = g_new0 (SearchParams, 1);
+ params->filters = filters;
+@@ -337,30 +373,52 @@ static gboolean
+ backend_install_packages_thread (PkBackend *backend)
+ {
+ PkPackageId *pi;
+- gint err;
+- const gchar *package_id;
++ gint err, i;
++ gchar **package_ids;
+
+- package_id = pk_backend_get_string (backend, "pkid");
+- pk_backend_package (backend, PK_INFO_ENUM_INSTALLING, package_id, NULL);
++ package_ids = pk_backend_get_strv (backend, "pkids");
+
+- pi = pk_package_id_new_from_string (package_id);
++ err = 0;
++
++ for (i = 0; package_ids[i]; i++)
++ {
++ pk_backend_package (backend, PK_INFO_ENUM_INSTALLING, package_ids[0], NULL);
+
+- err = opkg_install_package (opkg, pi->name, pk_opkg_progress_cb, backend);
+- if (err != 0)
+- opkg_unknown_error (backend, err, "Install");
++ pi = pk_package_id_new_from_string (package_ids[0]);
++
++ err = opkg_install_package (opkg, pi->name, pk_opkg_progress_cb, backend);
++ switch (err)
++ {
++ case OPKG_NO_ERROR:
++ break;
++ case OPKG_DEPENDANCIES_FAILED:
++ pk_backend_error_code (backend, PK_ERROR_ENUM_DEP_RESOLUTION_FAILED, NULL);
++ break;
++ case OPKG_PACKAGE_ALREADY_INSTALLED:
++ pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED, NULL);
++ break;
++ case OPKG_PACKAGE_NOT_AVAILABLE:
++ pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, NULL);
++ break;
++ default:
++ opkg_unknown_error (backend, err, "Install");
++ }
++ pk_package_id_free (pi);
++ if (err != 0)
++ break;
++ }
+
+- pk_package_id_free (pi);
+ pk_backend_finished (backend);
+ return (err == 0);
+ }
+
+ static void
+-backend_install_packages (PkBackend *backend, gchar **package_id)
++backend_install_packages (PkBackend *backend, gchar **package_ids)
+ {
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+ pk_backend_set_status (backend, PK_STATUS_ENUM_INSTALL);
+
+- pk_backend_set_string (backend, "pkid", package_id[0]);
++ pk_backend_set_strv (backend, "pkids", package_ids);
+
+ pk_backend_thread_create (backend, backend_install_packages_thread);
+ }
+@@ -369,7 +427,7 @@ static gboolean
+ backend_remove_packages_thread (PkBackend *backend)
+ {
+ PkPackageId *pi;
+- gint err;
++ gint err, i;
+ gchar **package_ids;
+ gboolean allow_deps;
+ gboolean autoremove;
+@@ -382,19 +440,34 @@ backend_remove_packages_thread (PkBackend *backend)
+ autoremove = GPOINTER_TO_INT (data[2]);
+ g_free (data);
+
+- pi = pk_package_id_new_from_string (package_ids[0]);
+- pk_backend_package (backend, PK_INFO_ENUM_REMOVING, package_ids[0], NULL);
+-
+ opkg_set_option (opkg, "autoremove", &autoremove);
+ opkg_set_option (opkg, "force_removal_of_dependent_packages", &allow_deps);
+
+- err = opkg_remove_package (opkg, pi->name, pk_opkg_progress_cb, backend);
++ err = 0;
+
+- /* TODO: improve error reporting */
+- if (err != 0)
+- opkg_unknown_error (backend, err, "Remove");
++ for (i = 0; package_ids[i]; i++)
++ {
++ pi = pk_package_id_new_from_string (package_ids[0]);
++ pk_backend_package (backend, PK_INFO_ENUM_REMOVING, package_ids[0], NULL);
++
++ err = opkg_remove_package (opkg, pi->name, pk_opkg_progress_cb, backend);
++
++ switch (err)
++ {
++ case OPKG_NO_ERROR:
++ break;
++ case OPKG_PACKAGE_NOT_INSTALLED:
++ pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, NULL);
++ break;
++ default:
++ opkg_unknown_error (backend, err, "Remove");
++ }
++ pk_package_id_free (pi);
++
++ if (err != 0)
++ break;
++ }
+
+- pk_package_id_free (pi);
+ pk_backend_finished (backend);
+ return (err == 0);
+ }
+@@ -405,7 +478,7 @@ backend_remove_packages (PkBackend *backend, gchar **package_ids, gboolean allow
+ gpointer *params;
+
+ pk_backend_set_status (backend, PK_STATUS_ENUM_REMOVE);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ /* params is a small array we can pack our thread parameters into */
+ params = g_new0 (gpointer, 2);
+@@ -450,7 +523,7 @@ static void
+ backend_update_system (PkBackend *backend)
+ {
+ pk_backend_set_status (backend, PK_STATUS_ENUM_UPDATE);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ pk_backend_thread_create (backend, backend_update_system_thread);
+ }
+@@ -478,8 +551,14 @@ backend_update_package_thread (PkBackend *backend)
+ }
+
+ err = opkg_upgrade_package (opkg, pi->name, pk_opkg_progress_cb, backend);
+-
+- if (err != 0) {
++ switch (err)
++ {
++ case OPKG_NO_ERROR:
++ break;
++ case OPKG_PACKAGE_NOT_INSTALLED:
++ pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, NULL);
++ break;
++ default:
+ opkg_unknown_error (backend, err, "Update package");
+ }
+
+@@ -494,7 +573,7 @@ backend_update_packages (PkBackend *backend, gchar **package_ids)
+ gint i;
+
+ pk_backend_set_status (backend, PK_STATUS_ENUM_UPDATE);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ for (i = 0; package_ids[i]; i++) {
+ pk_backend_set_string (backend, "pkgid", package_ids[i]);
+@@ -536,7 +615,7 @@ static void
+ backend_get_updates (PkBackend *backend, PkFilterEnum filters)
+ {
+ pk_backend_set_status (backend, PK_STATUS_ENUM_UPDATE);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ pk_backend_thread_create (backend, backend_get_updates_thread);
+ }
+@@ -572,19 +651,26 @@ backend_get_details_thread (PkBackend *backend)
+ if (pi == NULL)
+ {
+ pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "invalid package id");
+- pk_package_id_free (pi);
++ pk_backend_finished (backend);
+ return FALSE;
+ }
+
+
+ pkg = opkg_find_package (opkg, pi->name, pi->version, pi->arch, pi->data);
++ pk_package_id_free (pi);
++
++ if (!pkg)
++ {
++ pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, NULL);
++ pk_backend_finished (backend);
++ return FALSE;
++ }
+
+ newid = g_strdup_printf ("%s;%s;%s;%s", pkg->name, pkg->version, pkg->architecture, pkg->repository);
+
+ pk_backend_details (backend, newid, NULL, 0, pkg->description, pkg->url, pkg->size);
+
+ g_free (newid);
+- pk_package_id_free (pi);
+ pk_backend_finished (backend);
+ return TRUE;
+ }
+@@ -592,7 +678,7 @@ backend_get_details_thread (PkBackend *backend)
+ static void
+ backend_get_details (PkBackend *backend, const gchar *package_id)
+ {
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+ pk_backend_thread_create (backend, backend_get_details_thread);
+ }
+
+diff --git a/backends/test/pk-backend-test-dbus.c b/backends/test/pk-backend-test-dbus.c
+index 5dfea32..76686dc 100644
+--- a/backends/test/pk-backend-test-dbus.c
++++ b/backends/test/pk-backend-test-dbus.c
+@@ -36,7 +36,7 @@ static void
+ backend_search_name (PkBackend *backend, PkFilterEnum filters, const gchar *search)
+ {
+ pk_backend_set_allow_cancel (backend, TRUE);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+ pk_backend_dbus_search_name (dbus, filters, search);
+ }
+
+diff --git a/backends/test/pk-backend-test-spawn.c b/backends/test/pk-backend-test-spawn.c
+index 2958c05..584f44c 100644
+--- a/backends/test/pk-backend-test-spawn.c
++++ b/backends/test/pk-backend-test-spawn.c
+@@ -35,7 +35,7 @@ backend_search_name (PkBackend *backend, PkFilterEnum filters, const gchar *sear
+ {
+ gchar *filters_text;
+ pk_backend_set_allow_cancel (backend, TRUE);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+ filters_text = pk_filter_enums_to_text (filters);
+ pk_backend_spawn_helper (spawn, "search-name.sh", filters_text, search, NULL);
+ g_free (filters_text);
+diff --git a/backends/test/pk-backend-test-succeed.c b/backends/test/pk-backend-test-succeed.c
+index 17cdc6e..c046c1d 100644
+--- a/backends/test/pk-backend-test-succeed.c
++++ b/backends/test/pk-backend-test-succeed.c
+@@ -236,7 +236,7 @@ backend_search_name_timeout (gpointer data)
+ static void
+ backend_search_name (PkBackend *backend, PkFilterEnum filters, const gchar *search)
+ {
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+ g_timeout_add (200000, backend_search_name_timeout, backend);
+ }
+
+diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
+index f76e27c..5b2da8f 100644
+--- a/backends/yum/helpers/yumBackend.py
++++ b/backends/yum/helpers/yumBackend.py
+@@ -801,6 +801,8 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ old_throttle = self.yumbase.conf.throttle
+ self.yumbase.conf.throttle = "60%" # Set bandwidth throttle to 60%
+ # to avoid taking all the system's bandwidth.
++ old_skip_broken = self.yumbase.conf.skip_broken
++ self.yumbase.conf.skip_broken = 1
+
+ try:
+ txmbr = self.yumbase.update() # Add all updates to Transaction
+@@ -812,6 +814,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ self.error(ERROR_NO_PACKAGES_TO_UPDATE,"Nothing to do")
+
+ self.yumbase.conf.throttle = old_throttle
++ self.yumbase.conf.skip_broken = old_skip_broken
+
+ def refresh_cache(self):
+ '''
+@@ -905,7 +908,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ if txmbrs:
+ self._runYumTransaction()
+ else:
+- self.error(ERROR_PACKAGE_ALREADY_INSTALLED,"This package could not be installed as it is already installed")
++ self.error(ERROR_PACKAGE_ALREADY_INSTALLED,"The package is already installed")
+
+ def _checkForNewer(self,po):
+ pkgs = self.yumbase.pkgSack.returnNewestByName(name=po.name)
+@@ -1003,7 +1006,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ return False
+
+ if self._is_inst(po):
+- self.error(ERROR_PACKAGE_ALREADY_INSTALLED, "%s is already installed" % str(po))
++ self.error(ERROR_PACKAGE_ALREADY_INSTALLED, "The package %s is already installed" % str(po))
+ return False
+
+ if len(self.yumbase.conf.exclude) > 0:
+diff --git a/backends/yum2/helpers/testyum2.py b/backends/yum2/helpers/testyum2.py
+index cdec507..85b47f9 100755
+--- a/backends/yum2/helpers/testyum2.py
++++ b/backends/yum2/helpers/testyum2.py
+@@ -80,7 +80,7 @@ try:
+ #iface.GetPackages(FILTER_INSTALLED,'no')
+ if cmd == 'get-repolist' or cmd == 'all':
+ print "Testing GetRepoList()"
+- iface.GetRepoList()
++ iface.GetRepoList("")
+ if cmd == 'get-updatedetail' or cmd == 'all':
+ print "Testing GetUpdateDetail(PKG_ID)"
+ iface.GetUpdateDetail(PKG_ID)
+diff --git a/backends/yum2/helpers/yumDBUSBackend.py b/backends/yum2/helpers/yumDBUSBackend.py
+index 9cfed94..29f5b03 100755
+--- a/backends/yum2/helpers/yumDBUSBackend.py
++++ b/backends/yum2/helpers/yumDBUSBackend.py
+@@ -434,7 +434,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ try:
+ pkgGroupDict = self._buildGroupDict()
+ fltlist = filters.split(';')
+- found = {}
++ installed_nevra = [] # yum returns packages as available even when installed
+
+ if not FILTER_NOT_INSTALLED in fltlist:
+ # Check installed for group
+@@ -450,21 +450,31 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ group = groupMap[cg] # use the pk group name, instead of yum 'category/group'
+ if group == key:
+ if self._do_extra_filtering(pkg, fltlist):
+- self._show_package(pkg, INFO_INSTALLED)
++ package_list.append((pkg,INFO_INSTALLED))
++ installed_nevra.append(self._get_nevra(pkg))
++
+ if not FILTER_INSTALLED in fltlist:
+ # Check available for group
+ for pkg in self.yumbase.pkgSack:
+ if self._cancel_check("Search cancelled."):
+ # _cancel_check() sets the error message, unlocks yum, and calls Finished()
+ return
+- group = GROUP_OTHER
+- if pkgGroupDict.has_key(pkg.name):
+- cg = pkgGroupDict[pkg.name]
+- if groupMap.has_key(cg):
+- group = groupMap[cg]
+- if group == key:
+- if self._do_extra_filtering(pkg, fltlist):
+- self._show_package(pkg, INFO_AVAILABLE)
++
++ nevra = self._get_nevra(pkg)
++ if nevra not in installed_nevra:
++ group = GROUP_OTHER
++ if pkgGroupDict.has_key(pkg.name):
++ cg = pkgGroupDict[pkg.name]
++ if groupMap.has_key(cg):
++ group = groupMap[cg]
++ if group == key:
++ if self._do_extra_filtering(pkg, fltlist):
++ package_list.append((pkg,INFO_AVAILABLE))
++
++ except yum.Errors.GroupsError,e:
++ self._unlock_yum()
++ self.ErrorCode(ERROR_GROUP_NOT_FOUND, str(e))
++ self.Finished(EXIT_FAILED)
+ except yum.Errors.RepoError,e:
+ self.Message(MESSAGE_NOTICE, "The package cache is invalid and is being rebuilt.")
+ self._refresh_yum_cache()
+@@ -473,6 +483,14 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+
+ return
+
++ # basename filter if specified
++ if FILTER_BASENAME in fltlist:
++ for (pkg,status) in self._basename_filter(package_list):
++ self._show_package(pkg,status)
++ else:
++ for (pkg,status) in package_list:
++ self._show_package(pkg,status)
++
+ self._unlock_yum()
+ self.Finished(EXIT_SUCCESS)
+
+@@ -724,6 +742,11 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ #we might have a rounding error
+ self.PercentageChanged(100)
+
++ except yum.Errors.RepoError,e:
++ self._unlock_yum()
++ self.ErrorCode(ERROR_REPO_CONFIGURATION_ERROR,str(e))
++ self.Finished(EXIT_FAILED)
++ self.Exit()
+ except yum.Errors.YumBaseError, e:
+ self._unlock_yum()
+ # This should be a better-defined error, but I'm not sure
+@@ -837,6 +860,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ Needed to be implemented in a sub class
+ '''
+ if inst_file.endswith('.src.rpm'):
++ self._unlock_yum()
+ self.ErrorCode(ERROR_CANNOT_INSTALL_SOURCE_PACKAGE,'Backend will not install a src rpm file')
+ self.Finished(EXIT_FAILED)
+ return
+@@ -1385,30 +1409,30 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ res = self.yumbase.searchGenerator(searchlist, [key])
+ fltlist = filters.split(';')
+
+- available = []
+- count = 1
++ seen_nevra = [] # yum returns packages as available even when installed
++ pkg_list = [] # only do the second iteration on not installed pkgs
++ package_list = [] #we can't do emitting as found if we are post-processing
++
+ for (pkg,values) in res:
+ if self._cancel_check("Search cancelled."):
+ return False
+ # are we installed?
+ if pkg.repo.id == 'installed':
+- if FILTER_NOT_INSTALLED not in fltlist:
+- if self._do_extra_filtering(pkg,fltlist):
+- count+=1
+- if count > 100:
+- break
+- self._show_package(pkg, INFO_INSTALLED)
++ if self._do_extra_filtering(pkg,fltlist):
++ package_list.append((pkg,INFO_INSTALLED))
++ seen_nevra.append(self._get_nevra(pkg))
+ else:
+- available.append(pkg)
++ pkg_list.append(pkg)
+
+- # Now show available packages.
+- if FILTER_INSTALLED not in fltlist:
+- for pkg in available:
+- if self._cancel_check("Search cancelled."):
+- return False
+- if self._do_extra_filtering(pkg,fltlist):
+- self._show_package(pkg, INFO_AVAILABLE)
++ for pkg in pkg_list:
++ if self._cancel_check("Search cancelled."):
++ return False
+
++ nevra = self._get_nevra(pkg)
++ if nevra not in seen_nevra:
++ if self._do_extra_filtering(pkg,fltlist):
++ package_list.append((pkg,INFO_AVAILABLE))
++ seen_nevra.append(self._get_nevra(pkg))
+ except yum.Errors.RepoError,e:
+ self.Message(MESSAGE_NOTICE, "The package cache is invalid and is being rebuilt.")
+ self._refresh_yum_cache()
+@@ -1417,13 +1441,22 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+
+ return False
+
++ # basename filter if specified
++ if FILTER_BASENAME in fltlist:
++ for (pkg,status) in self._basename_filter(package_list):
++ self._show_package(pkg,status)
++ else:
++ for (pkg,status) in package_list:
++ self._show_package(pkg,status)
++
+ return True
+
+ def _do_extra_filtering(self,pkg,filterList):
+ ''' do extra filtering (gui,devel etc) '''
+ for filter in filterList:
+ if filter in (FILTER_INSTALLED, FILTER_NOT_INSTALLED):
+- continue
++ if not self._do_installed_filtering(filter,pkg):
++ return False
+ elif filter in (FILTER_GUI, FILTER_NOT_GUI):
+ if not self._do_gui_filtering(filter, pkg):
+ return False
+@@ -1433,11 +1466,17 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ elif filter in (FILTER_FREE, FILTER_NOT_FREE):
+ if not self._do_free_filtering(filter, pkg):
+ return False
+- elif filter in (FILTER_BASENAME, FILTER_NOT_BASENAME):
+- if not self._do_basename_filtering(filter, pkg):
+- return False
+ return True
+
++ def _do_installed_filtering(self,flt,pkg):
++ isInstalled = False
++ if flt == FILTER_INSTALLED:
++ wantInstalled = True
++ else:
++ wantInstalled = False
++ isInstalled = pkg.repo.id == 'installed'
++ return isInstalled == wantInstalled
++
+ def _do_gui_filtering(self,flt,pkg):
+ isGUI = False
+ if flt == FILTER_GUI:
+@@ -1477,32 +1516,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+
+ return isFree == wantFree
+
+- def _do_basename_filtering(self,flt,pkg):
+- if flt == FILTER_BASENAME:
+- wantBase = True
+- else:
+- wantBase = False
+-
+- isBase = self._check_basename(pkg)
+-
+- return isBase == wantBase
+
+- def _check_basename(self, pkg):
+- '''
+- If a package does not have a source rpm (If that ever
+- happens), or it does have a source RPM, and the package's name
+- is the same as the source RPM's name, then we assume it is the
+- 'base' package.
+- '''
+- basename = pkg.name
+-
+- if pkg.sourcerpm:
+- basename = rpmUtils.miscutils.splitFilename(pkg.sourcerpm)[0]
+-
+- if basename == pkg.name:
+- return True
+-
+- return False
+
+ def _is_development_repo(self, repo):
+ if repo.endswith('-debuginfo'):
+@@ -1576,28 +1590,41 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ '''
+ find a package based on a package id (name;version;arch;repoid)
+ '''
+- # Split up the id
+- (n,idver,a,d) = self.get_package_from_id(id)
+- # get e,v,r from package id version
+- e,v,r = self._getEVR(idver)
++ # is this an real id or just an name
++ if len(id.split(';')) > 1:
++ # Split up the id
++ (n,idver,a,d) = self.get_package_from_id(id)
++ # get e,v,r from package id version
++ e,v,r = self._getEVR(idver)
++ else:
++ n = id
++ e = v = r = a = None
+ # search the rpmdb for the nevra
+ pkgs = self.yumbase.rpmdb.searchNevra(name=n,epoch=e,ver=v,rel=r,arch=a)
+- # if the package is found, then return it
++ # if the package is found, then return it (do not have to match the repo_id)
+ if len(pkgs) != 0:
+ return pkgs[0],True
+ # search the pkgSack for the nevra
+- pkgs = self.yumbase.pkgSack.searchNevra(name=n,epoch=e,ver=v,rel=r,arch=a)
+- # if the package is found, then return it
+- if len(pkgs) != 0:
+- return pkgs[0],False
+- else:
++ try:
++ pkgs = self.yumbase.pkgSack.searchNevra(name=n,epoch=e,ver=v,rel=r,arch=a)
++ except yum.Errors.RepoError,e:
++ self.error(ERROR_REPO_NOT_AVAILABLE,str(e))
++ # nothing found
++ if len(pkgs) == 0:
+ return None,False
++ # one NEVRA in a single repo
++ if len(pkgs) == 1:
++ return pkgs[0],False
++ # we might have the same NEVRA in multiple repos, match by repo name
++ for pkg in pkgs:
++ if d == pkg.repoid:
++ return pkg,False
++ # repo id did not match
++ return None,False
+
+ def _is_inst(self,pkg):
+ return self.yumbase.rpmdb.installed(po=pkg)
+
+-
+-
+ def _installable(self, pkg, ematch=False):
+
+ """check if the package is reasonably installable, true/false"""
+@@ -1764,6 +1791,57 @@ class PackageKitYumBackend(PackageKitBaseBackend):
+ return INFO_ENHANCEMENT
+ else:
+ return INFO_UNKNOWN
++ def _is_main_package(self,repo):
++ if repo.endswith('-debuginfo'):
++ return False
++ if repo.endswith('-devel'):
++ return False
++ if repo.endswith('-libs'):
++ return False
++ return True
++
++ def _basename_filter(self,package_list):
++ '''
++ Filter the list so that the number of packages are reduced.
++ This is done by only displaying gtk2 rather than gtk2-devel, gtk2-debuginfo, etc.
++ This imlementation is done by comparing the SRPM name, and if not falling back
++ to the first entry.
++ We have to fall back else we don't emit packages where the SRPM does not produce a
++ RPM with the same name, for instance, mono produces mono-core, mono-data and mono-winforms.
++ @package_list: a (pkg,status) list of packages
++ A new list is returned that has been filtered
++ '''
++ base_list = []
++ output_list = []
++ base_list_already_got = []
++
++ #find out the srpm name and add to a new array of compound data
++ for (pkg,status) in package_list:
++ if pkg.sourcerpm:
++ base = rpmUtils.miscutils.splitFilename(pkg.sourcerpm)[0]
++ base_list.append ((pkg,status,base,pkg.version));
++ else:
++ base_list.append ((pkg,status,'nosrpm',pkg.version));
++
++ #find all the packages that match thier basename name (done seporately so we get the "best" match)
++ for (pkg,status,base,version) in base_list:
++ if base == pkg.name and (base,version) not in base_list_already_got:
++ output_list.append((pkg,status))
++ base_list_already_got.append ((base,version))
++
++ #for all the ones not yet got, can we match against a non devel match?
++ for (pkg,status,base,version) in base_list:
++ if (base,version) not in base_list_already_got:
++ if self._is_main_package(pkg.name):
++ output_list.append((pkg,status))
++ base_list_already_got.append ((base,version))
++
++ #add the remainder of the packages, which should just be the single debuginfo's
++ for (pkg,status,base,version) in base_list:
++ if (base,version) not in base_list_already_got:
++ output_list.append((pkg,status))
++ base_list_already_got.append ((base,version))
++ return output_list
+
+ def _get_obsoleted(self,name):
+ obsoletes = self.yumbase.up.getObsoletesTuples( newest=1 )
+diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
+index 746da82..15c4b4f 100644
+--- a/backends/zypp/pk-backend-zypp.cpp
++++ b/backends/zypp/pk-backend-zypp.cpp
+@@ -1170,7 +1170,7 @@ backend_find_packages_thread (PkBackend *backend)
+ mode = pk_backend_get_uint (backend, "mode");
+
+ pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
+- pk_backend_no_percentage_updates (backend);
++ pk_backend_set_percentage (backend, PK_BACKEND_PERCENTAGE_INVALID);
+
+ std::vector<zypp::sat::Solvable> *v = new std::vector<zypp::sat::Solvable>;
+ std::vector<zypp::sat::Solvable> *v2 = new std::vector<zypp::sat::Solvable>;
+diff --git a/client/pk-console.c b/client/pk-console.c
+index 8f69068..5a05a8e 100644
+--- a/client/pk-console.c
++++ b/client/pk-console.c
+@@ -50,7 +50,7 @@ static gboolean awaiting_space = FALSE;
+ static gboolean trusted = TRUE;
+ static guint timer_id = 0;
+ static guint percentage_last = 0;
+-static gchar *filename = NULL;
++static gchar **files_cache = NULL;
+ static PkControl *control = NULL;
+ static PkClient *client = NULL;
+ static PkClient *client_task = NULL;
+@@ -494,6 +494,12 @@ pk_console_perhaps_resolve (PkClient *client, PkFilterEnum filter, const gchar *
+ return g_strdup (package);
+ }
+
++ ret = pk_client_reset (client_task, error);
++ if (ret == FALSE) {
++ pk_warning ("failed to reset client task");
++ return NULL;
++ }
++
+ /* we need to resolve it */
+ ret = pk_client_resolve (client_task, filter, package, error);
+ if (ret == FALSE) {
+@@ -549,20 +555,93 @@ pk_console_perhaps_resolve (PkClient *client, PkFilterEnum filter, const gchar *
+ }
+
+ /**
+- * pk_console_install_package:
++ * pk_console_install_stuff:
+ **/
+ static gboolean
+-pk_console_install_package (PkClient *client, const gchar *package, GError **error)
++pk_console_install_stuff (PkClient *client, gchar **packages, GError **error)
+ {
+- gboolean ret;
+- gchar *package_id;
+- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_NOT_INSTALLED, package, error);
+- if (package_id == NULL) {
+- g_print ("%s\n", _("Could not find a package with that name to install, or package already installed"));
+- return FALSE;
++ gboolean ret = TRUE;
++ gboolean is_local;
++ gchar *package_id = NULL;
++ gchar **package_ids = NULL;
++ gchar **files = NULL;
++ guint i;
++ guint length;
++ GPtrArray *array_packages;
++ GPtrArray *array_files;
++
++ array_packages = g_ptr_array_new ();
++ array_files = g_ptr_array_new ();
++ length = g_strv_length (packages);
++ for (i=2; i<length; i++) {
++ is_local = g_file_test (packages[i], G_FILE_TEST_EXISTS);
++ if (is_local) {
++ g_ptr_array_add (array_files, g_strdup (packages[i]));
++ } else {
++ package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_NOT_INSTALLED, packages[i], error);
++ if (package_id == NULL) {
++ g_print ("%s\n", _("Could not find a package with that name to install, or package already installed"));
++ ret = FALSE;
++ break;
++ }
++ g_ptr_array_add (array_packages, package_id);
++ }
+ }
+- ret = pk_client_install_package (client, package_id, error);
+- g_free (package_id);
++
++ /* one of the resolves failed */
++ if (!ret) {
++ pk_warning ("resolve failed");
++ goto out;
++ }
++
++
++ /* any to process? */
++ if (array_packages->len > 0) {
++ /* convert to strv */
++ package_ids = pk_ptr_array_to_argv (array_packages);
++
++ /* reset */
++ ret = pk_client_reset (client, error);
++ if (!ret) {
++ pk_warning ("failed to reset");
++ goto out;
++ }
++
++ ret = pk_client_install_package (client, package_id, error);
++ if (!ret) {
++ pk_warning ("failed to install packages");
++ goto out;
++ }
++ }
++
++ /* any to process? */
++ if (array_files->len > 0) {
++ /* convert to strv */
++ files = pk_ptr_array_to_argv (array_files);
++
++ /* save for untrusted callback */
++ g_strfreev (files_cache);
++ files_cache = g_strdupv (files);
++
++ /* reset */
++ ret = pk_client_reset (client, error);
++ if (!ret) {
++ pk_warning ("failed to reset");
++ goto out;
++ }
++
++ ret = pk_client_install_files (client, trusted, files, error);
++ if (!ret) {
++ pk_warning ("failed to install files");
++ goto out;
++ }
++ }
++
++out:
++ g_strfreev (package_ids);
++ g_strfreev (files);
++ g_ptr_array_free (array_files, TRUE);
++ g_ptr_array_free (array_packages, TRUE);
+ return ret;
+ }
+
+@@ -570,16 +649,16 @@ pk_console_install_package (PkClient *client, const gchar *package, GError **err
+ * pk_console_remove_only:
+ **/
+ static gboolean
+-pk_console_remove_only (PkClient *client, const gchar *package_id, gboolean force, gboolean autoremove, GError **error)
++pk_console_remove_only (PkClient *client, gchar **package_ids, gboolean force, GError **error)
+ {
+ gboolean ret;
+
+- pk_debug ("remove %s", package_id);
++ pk_debug ("remove+ %s", package_ids[0]);
+ ret = pk_client_reset (client, error);
+ if (!ret) {
+ return ret;
+ }
+- return pk_client_remove_package (client, package_id, force, autoremove, error);
++ return pk_client_remove_packages (client, package_ids, force, FALSE, error);
+ }
+
+ /**
+@@ -625,64 +704,99 @@ pk_console_get_prompt (const gchar *question, gboolean defaultyes)
+ }
+
+ /**
+- * pk_console_remove_package:
++ * pk_console_remove_packages:
+ **/
+ static gboolean
+-pk_console_remove_package (PkClient *client, const gchar *package, GError **error)
++pk_console_remove_packages (PkClient *client, gchar **packages, GError **error)
+ {
+ gchar *package_id;
+- gboolean ret;
+- guint length;
++ gboolean ret = TRUE;
+ PkPackageItem *item;
+ PkPackageId *ident;
+- guint i;
++ guint i, j;
++ guint size;
++ guint length;
+ gboolean remove;
++ GPtrArray *array;
++ gchar **package_ids = NULL;
++ PkPackageList *list;
++
++ array = g_ptr_array_new ();
++ list = pk_package_list_new ();
++ length = g_strv_length (packages);
++ for (i=2; i<length; i++) {
++ package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_INSTALLED, packages[i], error);
++ if (package_id == NULL) {
++ g_print ("%s:%s\n", _("Could not find a package to remove"), packages[i]);
++ ret = FALSE;
++ break;
++ }
++ g_ptr_array_add (array, g_strdup (package_id));
++ pk_debug ("resolved to %s", package_id);
++ g_free (package_id);
++ }
+
+- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_INSTALLED, package, error);
+- if (package_id == NULL) {
+- g_print ("%s\n", _("Could not find a package with that name to remove"));
+- return FALSE;
++ /* one of the resolves failed */
++ if (!ret) {
++ goto out;
+ }
+
++ /* convert to strv */
++ package_ids = pk_ptr_array_to_argv (array);
++
+ /* are we dumb and can't check for requires? */
+ if (!pk_enums_contain (roles, PK_ROLE_ENUM_GET_REQUIRES)) {
+ /* no, just try to remove it without deps */
+- ret = pk_console_remove_only (client, package_id, FALSE, FALSE, error);
+- g_free (package_id);
+- return ret;
++ ret = pk_console_remove_only (client, package_ids, FALSE, error);
++ goto out;
+ }
+
+- /* see if any packages require this one */
+- ret = pk_client_reset (client_task, error);
+- if (!ret) {
+- pk_warning ("failed to reset");
+- return FALSE;
++ /* get the requires packages for each package_id */
++ length = g_strv_length (package_ids);
++ for (i=0; i<length; i++) {
++ ret = pk_client_reset (client_task, error);
++ if (!ret) {
++ pk_warning ("failed to reset");
++ break;
++ }
++
++ pk_debug ("Getting installed requires for %s", package_ids[i]);
++ /* see if any packages require this one */
++ ret = pk_client_get_requires (client_task, PK_FILTER_ENUM_INSTALLED, package_ids[i], TRUE, error);
++ if (!ret) {
++ pk_warning ("failed to get requires");
++ break;
++ }
++
++ /* see how many packages there are */
++ size = pk_client_package_buffer_get_size (client_task);
++ for (j=0; j<size; j++) {
++ item = pk_client_package_buffer_get_item (client_task, j);
++ pk_package_list_add_item (list, item);
++ }
+ }
+
+- pk_debug ("Getting installed requires for %s", package_id);
+- ret = pk_client_get_requires (client_task, PK_FILTER_ENUM_INSTALLED, package_id, TRUE, error);
++ /* one of the get-requires failed */
+ if (!ret) {
+- return FALSE;
++ goto out;
+ }
+
+- /* see how many packages there are */
+- length = pk_client_package_buffer_get_size (client_task);
+-
+ /* if there are no required packages, just do the remove */
++ length = pk_package_list_get_size (list);
+ if (length == 0) {
+ pk_debug ("no requires");
+- ret = pk_console_remove_only (client, package_id, FALSE, FALSE, error);
+- g_free (package_id);
+- return ret;
++ ret = pk_console_remove_only (client, package_ids, FALSE, error);
++ goto out;
+ }
+
++
+ /* present this to the user */
+ if (awaiting_space) {
+ g_print ("\n");
+ }
+ g_print ("%s:\n", _("The following packages have to be removed"));
+ for (i=0; i<length; i++) {
+- item = pk_client_package_buffer_get_item (client_task, i);
++ item = pk_package_list_get_item (list, i);
+ ident = pk_package_id_new_from_string (item->package_id);
+ g_print ("%i\t%s-%s\n", i, ident->name, ident->version);
+ pk_package_id_free (ident);
+@@ -694,14 +808,17 @@ pk_console_remove_package (PkClient *client, const gchar *package, GError **erro
+ /* we chickened out */
+ if (remove == FALSE) {
+ g_print ("%s\n", _("Cancelled!"));
+- g_free (package_id);
+- return FALSE;
++ ret = FALSE;
++ goto out;
+ }
+
+ /* remove all the stuff */
+- ret = pk_console_remove_only (client, package_id, TRUE, FALSE, error);
+- g_free (package_id);
++ ret = pk_console_remove_only (client, package_ids, TRUE, error);
+
++out:
++ g_object_unref (list);
++ g_strfreev (package_ids);
++ g_ptr_array_free (array, TRUE);
+ return ret;
+ }
+
+@@ -840,7 +957,7 @@ pk_console_error_code_cb (PkClient *client, PkErrorCodeEnum error_code, const gc
+ error_code == PK_ERROR_ENUM_MISSING_GPG_SIGNATURE && trusted) {
+ pk_debug ("need to try again with trusted FALSE");
+ trusted = FALSE;
+- ret = pk_client_install_file (client_install_files, trusted, filename, &error);
++ ret = pk_client_install_files (client_install_files, trusted, files_cache, &error);
+ /* we succeeded, so wait for the requeue */
+ if (!ret) {
+ pk_warning ("failed to install file second time: %s", error->message);
+@@ -1153,7 +1270,6 @@ main (int argc, char *argv[])
+ const gchar *value = NULL;
+ const gchar *details = NULL;
+ const gchar *parameter = NULL;
+- PkRoleEnum roles;
+ PkGroupEnum groups;
+ gchar *text;
+ ret = FALSE;
+@@ -1324,15 +1440,7 @@ main (int argc, char *argv[])
+ g_print (_("You need to specify a package or file to install"));
+ goto out;
+ }
+- /* is it a local file? */
+- ret = g_file_test (value, G_FILE_TEST_EXISTS);
+- if (ret) {
+- ret = pk_client_install_file (client, trusted, value, &error);
+- /* we need this for the untrusted try */
+- filename = g_strdup (value);
+- } else {
+- ret = pk_console_install_package (client, value, &error);
+- }
++ ret = pk_console_install_stuff (client, argv, &error);
+
+ } else if (strcmp (mode, "install-sig") == 0) {
+ if (value == NULL || details == NULL || parameter == NULL) {
+@@ -1346,7 +1454,7 @@ main (int argc, char *argv[])
+ g_print (_("You need to specify a package to remove"));
+ goto out;
+ }
+- ret = pk_console_remove_package (client, value, &error);
++ ret = pk_console_remove_packages (client, argv, &error);
+
+ } else if (strcmp (mode, "accept-eula") == 0) {
+ if (value == NULL) {
+@@ -1465,9 +1573,9 @@ main (int argc, char *argv[])
+ ret = pk_client_get_packages (client, filters, &error);
+
+ } else if (strcmp (mode, "get-actions") == 0) {
+- roles = pk_control_get_actions (control);
+ text = pk_role_enums_to_text (roles);
+- g_print ("roles=%s\n", text);
++ g_strdelimit (text, ";", '\n');
++ g_print ("%s\n", text);
+ g_free (text);
+ maybe_sync = FALSE;
+ /* these can never fail */
+@@ -1476,7 +1584,8 @@ main (int argc, char *argv[])
+ } else if (strcmp (mode, "get-filters") == 0) {
+ filters = pk_control_get_filters (control);
+ text = pk_filter_enums_to_text (filters);
+- g_print ("filters=%s\n", text);
++ g_strdelimit (text, ";", '\n');
++ g_print ("%s\n", text);
+ g_free (text);
+ maybe_sync = FALSE;
+ /* these can never fail */
+@@ -1485,7 +1594,8 @@ main (int argc, char *argv[])
+ } else if (strcmp (mode, "get-groups") == 0) {
+ groups = pk_control_get_groups (control);
+ text = pk_group_enums_to_text (groups);
+- g_print ("groups=%s\n", text);
++ g_strdelimit (text, ";", '\n');
++ g_print ("%s\n", text);
+ g_free (text);
+ maybe_sync = FALSE;
+ /* these can never fail */
+@@ -1525,7 +1635,7 @@ out:
+ g_free (options_help);
+ g_free (filter);
+ g_free (summary);
+- g_free (filename);
++ g_strfreev (files_cache);
+ g_object_unref (control);
+ g_object_unref (client);
+ g_object_unref (client_task);
+diff --git a/configure.ac b/configure.ac
+index 9d734e1..f614d2b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -535,7 +535,7 @@ if test x$enable_box = xyes; then
+ fi
+
+ if test x$enable_opkg = xyes; then
+- PKG_CHECK_MODULES(OPKG, libopkg = 0.1.3)
++ PKG_CHECK_MODULES(OPKG, libopkg = 0.1.4)
+ AC_SUBST(OPKG_CFLAGS)
+ AC_SUBST(OPKG_LIBS)
+ fi
+diff --git a/contrib/yum-packagekit/refresh-packagekit.py b/contrib/yum-packagekit/refresh-packagekit.py
+index 9c0bdf4..b440539 100644
+--- a/contrib/yum-packagekit/refresh-packagekit.py
++++ b/contrib/yum-packagekit/refresh-packagekit.py
+@@ -35,7 +35,7 @@ def posttrans_hook(conduit):
+ '/org/freedesktop/PackageKit')
+ packagekit_iface = dbus.Interface(packagekit_proxy, 'org.freedesktop.PackageKit')
+ packagekit_iface.StateHasChanged('posttrans')
+- except dbus.DBusException, e:
++ except Exception, e:
+ conduit.info(2, "Unable to send message to PackageKit")
+ conduit.info(6, "%s" %(e,))
+
+diff --git a/data/tests/Makefile.am b/data/tests/Makefile.am
+index d15dd6c..6935e66 100644
+--- a/data/tests/Makefile.am
++++ b/data/tests/Makefile.am
+@@ -5,6 +5,7 @@ NULL =
+
+ TEST_FILES = \
+ pk-spawn-test.sh \
++ pk-spawn-proxy.sh \
+ pk-spawn-test-sigquit.sh \
+ pk-spawn-test-profiling.sh \
+ $(NULL)
+diff --git a/data/tests/pk-spawn-proxy.sh b/data/tests/pk-spawn-proxy.sh
+new file mode 100755
+index 0000000..57774f1
+--- /dev/null
++++ b/data/tests/pk-spawn-proxy.sh
+@@ -0,0 +1,20 @@
++#!/bin/bash
++# Copyright (C) 2008 Richard Hughes <richard@hughsie.com>
++# Licensed under the GNU General Public License Version 2
++# 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.
++
++if [ -z "${http_proxy}" ]; then
++ echo "no http proxy"
++ exit 1
++fi
++
++if [ -z "${ftp_proxy}" ]; then
++ echo "no ftp proxy"
++ exit 1
++fi
++
++echo -e "percentage\t100"
++
+diff --git a/docs/html/index.html b/docs/html/index.html
+index 7270eb7..d60f825 100644
+--- a/docs/html/index.html
++++ b/docs/html/index.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ <td width="95%" valign="middle"><p class="title">PackageKit Main Page</p></td>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ </tr>
+ </table>
+
+@@ -20,10 +20,10 @@
+ <table align="center" cellpadding="5px" border="0">
+
+ <tr>
+- <td align="center"><a href="pk-intro.html"><img src="img/large-accessories-text-editor.png" width="128" alt="[img]"/></a></td>
+- <td align="center"><a href="pk-using.html"><img src="img/large-preferences-system.png" width="128" alt="[img]"/></a></td>
+- <td align="center"><a href="pk-download.html"><img src="img/large-dialog-information.png" width="128" alt="[img]"/></a></td>
+- <td align="center"><a href="pk-screenshots.html"><img src="img/large-emblem-photos.png" width="128" alt="[img]"/></a></td>
++ <td align="center"><a href="pk-intro.html"><img src="img/large-accessories-text-editor.png" width="128" alt=""/></a></td>
++ <td align="center"><a href="pk-using.html"><img src="img/large-preferences-system.png" width="128" alt=""/></a></td>
++ <td align="center"><a href="pk-download.html"><img src="img/large-dialog-information.png" width="128" alt=""/></a></td>
++ <td align="center"><a href="pk-screenshots.html"><img src="img/large-emblem-photos.png" width="128" alt=""/></a></td>
+ </tr>
+ <tr>
+ <td><p class="indextitle"><a href="pk-intro.html" class="indextitle">What is<br/>PackageKit?</a></p></td>
+@@ -32,10 +32,10 @@
+ <td><p class="indextitle"><a href="pk-screenshots.html" class="indextitle">Screenshots</a></p></td>
+ </tr>
+ <tr>
+- <td align="center"><a href="pk-authors.html"><img src="img/large-authors.png" width="128" alt="[img]"/></a></td>
+- <td align="center"><a href="pk-bugs.html"><img src="img/large-applications-development.png" width="128" alt="[img]"/></a></td>
+- <td align="center"><a href="pk-help.html"><img src="img/large-system-users.png" width="128" alt="[img]"/></a></td>
+- <td align="center"><a href="pk-faq.html"><img src="img/large-help-browser.png" width="128" alt="[img]"/></a></td>
++ <td align="center"><a href="pk-authors.html"><img src="img/large-authors.png" width="128" alt=""/></a></td>
++ <td align="center"><a href="pk-bugs.html"><img src="img/large-applications-development.png" width="128" alt=""/></a></td>
++ <td align="center"><a href="pk-help.html"><img src="img/large-system-users.png" width="128" alt=""/></a></td>
++ <td align="center"><a href="pk-faq.html"><img src="img/large-help-browser.png" width="128" alt=""/></a></td>
+ </tr>
+ <tr>
+ <td><p class="indextitle"><a href="pk-authors.html" class="indextitle">Who develops<br/>PackageKit?</a></p></td>
+diff --git a/docs/html/pk-authors.html b/docs/html/pk-authors.html
+index 08289ad..607a7a4 100644
+--- a/docs/html/pk-authors.html
++++ b/docs/html/pk-authors.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ <td width="95%" valign="middle"><p class="title">Who develops PackageKit?</p></td>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ </tr>
+ </table>
+
+@@ -22,7 +22,7 @@
+ <table cellpadding="10">
+ <tr>
+ <td>
+- <img src="img/author-hughsie.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-hughsie.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Richard Hughes</h2>
+@@ -48,7 +48,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-kenvandine.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-kenvandine.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Ken VanDine</h2>
+@@ -66,7 +66,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-btimothy.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-btimothy.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Boyd Timothy</h2>
+@@ -84,7 +84,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-rnorwood.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-rnorwood.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Robin Norwood</h2>
+@@ -101,7 +101,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-tomparker.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-tomparker.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Tom Parker</h2>
+@@ -118,7 +118,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-timlau.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-timlau.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Tim Lauridsen</h2>
+@@ -139,7 +139,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-lmacken.png" alt="[img]"/>
++ <img src="img/author-lmacken.png" alt=""/>
+ </td>
+ <td>
+ <h2>Luke Macken</h2>
+@@ -154,7 +154,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-grzegorzdabrowski.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-grzegorzdabrowski.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Grzegorz DÄ…browski</h2>
+@@ -173,7 +173,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-caglar.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-caglar.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>S.Çağlar Onur</h2>
+@@ -195,7 +195,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-elliot.png" alt="[img]"/>
++ <img src="img/author-elliot.png" alt=""/>
+ </td>
+ <td>
+ <h2>Elliot Peele</h2>
+@@ -210,7 +210,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-jbowes.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-jbowes.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>James Bowes</h2>
+@@ -227,7 +227,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-unknown.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-unknown.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Thomas Wood</h2>
+@@ -247,7 +247,7 @@
+
+ <tr>
+ <td>
+- <img src="img/author-unknown.png" alt="[img]"/><!-- image should be 120px wide -->
++ <img src="img/author-unknown.png" alt=""/><!-- image should be 120px wide -->
+ </td>
+ <td>
+ <h2>Scott Reeves</h2>
+diff --git a/docs/html/pk-bugs.html b/docs/html/pk-bugs.html
+index 89f7c48..2ee12ea 100644
+--- a/docs/html/pk-bugs.html
++++ b/docs/html/pk-bugs.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ <td width="95%" valign="middle"><p class="title">Reporting Bugs</p></td>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ </tr>
+ </table>
+
+diff --git a/docs/html/pk-download.html b/docs/html/pk-download.html
+index 6f796b8..0cdc85c 100644
+--- a/docs/html/pk-download.html
++++ b/docs/html/pk-download.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ <td width="95%" valign="middle"><p class="title">Where can I download it?</p></td>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ </tr>
+ </table>
+
+diff --git a/docs/html/pk-faq.html b/docs/html/pk-faq.html
+index a25e2b7..efa8344 100644
+--- a/docs/html/pk-faq.html
++++ b/docs/html/pk-faq.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><center><img src="img/packagekit.png" alt="[img]"/></center></td>
++ <td><center><img src="img/packagekit.png" alt=""/></center></td>
+ <td width="95%" valign="middle"><p class="title">Frequently Asked Questions</p></td>
+- <td><center><img src="img/packagekit.png" alt="[img]"/></center></td>
++ <td><center><img src="img/packagekit.png" alt=""/></center></td>
+ </tr>
+ </table>
+
+@@ -22,6 +22,7 @@
+ <h2>Table Of Contents</h2>
+ <ul>
+ <li><a href="#how-complete">How complete are the backends?</a></li>
++<li><a href="#run-as-root">When run as root, gpk-application and pkcon do not work!</a></li>
+ <li><a href="#session-system">Why is there a session service and and a system service?</a></li>
+ <li><a href="#session-methods">How do I use PackageKit in my application?</a></li>
+ <li><a href="#rawhide-updates">Why don't I get update details with Fedora Rawhide?</a></li>
+@@ -565,6 +566,19 @@
+ </table>
+
+ <hr>
++<h3><a name="run-as-root">When run as root, <code>gpk-application</code> and <code>pkcon</code> do not work!</a></h3>
++<p>
++GTK+ tools should not be run as the root user, <b>PERIOD</b>.
++Any GTK+ program run as the root user is a massive security hole -- GTK+ just isn't designed with
++this in mind.
++There are <b>numerous</b> attack vectors when running as root, and programs shouldn't do such
++insane and insecure things.
++</p>
++<p>
++Please see <a href="http://www.gtk.org/setuid.html">the GTK+ explanation</a> for more rationale.
++</p>
++
++<hr>
+ <h3><a name="session-system">Why is there a session service <b>and</b> and a system service?</a></h3>
+ <p>
+ PackageKit runs a process <code>packagekitd</code> that is a daemon that runs per-system.
+diff --git a/docs/html/pk-help.html b/docs/html/pk-help.html
+index 5b44d50..5bc7827 100644
+--- a/docs/html/pk-help.html
++++ b/docs/html/pk-help.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ <td width="95%" valign="middle"><p class="title">How can I help?</p></td>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ </tr>
+ </table>
+
+@@ -72,9 +72,9 @@ as for instructions!
+ <b>0.2.2</b> - To be released June 2008
+ </p>
+ <ul>
+-<li>Multiple package install and remove from pkcon <i>(0%)</i></li>
++<li>Network proxy server support <i>(70%)</i></li>
++<li>Multiple package install and remove from pkcon <i>(80%)</i></li>
+ <li>NetworkManager integration so we can detect GPRS (and modem) connections. <i>(10%)</i></li>
+-<li>Filter for source packages. <i>(0%)</i></li>
+ </ul>
+ <p>
+ <b>0.2.3</b> - To be released July 2008
+@@ -84,6 +84,12 @@ as for instructions!
+ <li>Multiple package installs from gpk-application <i>(0%)</i></li>
+ <li>Ignoring packages from the update viewer per-session <i>(10%)</i></li>
+ </ul>
++<p>
++<b>0.3.0</b> - To be released December 2008
++</p>
++<ul>
++<li>More composite types <code>s</code> to <code>as</code> <i>(0%)</i></li>
++</ul>
+
+ <p>Back to the <a href="index.html">main page</a></p>
+
+diff --git a/docs/html/pk-intro.html b/docs/html/pk-intro.html
+index c42be21..64f72fc 100644
+--- a/docs/html/pk-intro.html
++++ b/docs/html/pk-intro.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ <td width="95%" valign="middle"><p class="title">What is PackageKit?</p></td>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ </tr>
+ </table>
+
+diff --git a/docs/html/pk-screenshots.html b/docs/html/pk-screenshots.html
+index 78bd01f..5c7d4fa 100644
+--- a/docs/html/pk-screenshots.html
++++ b/docs/html/pk-screenshots.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><center><img src="img/packagekit.png" alt="[img]"/></center></td>
++ <td><center><img src="img/packagekit.png" alt=""/></center></td>
+ <td width="95%" valign="middle"><p class="title">Screenshots</p></td>
+- <td><center><img src="img/packagekit.png" alt="[img]"/></center></td>
++ <td><center><img src="img/packagekit.png" alt=""/></center></td>
+ </tr>
+ </table>
+
+@@ -26,77 +26,77 @@
+
+ <h1><a name="gnome">GNOME Screenshots</a></h1>
+
+-<center><img src="img/gpk-application-search.png" alt="[img]"/></center>
++<center><img src="img/gpk-application-search.png" alt=""/></center>
+ <p class="caption">Add/Remove Software search</p>
+
+-<center><img src="img/gpk-application-groups.png" alt="[img]"/></center>
++<center><img src="img/gpk-application-groups.png" alt=""/></center>
+ <p class="caption">Add/Remove Software groups</p>
+
+-<center><img src="img/gpk-log.png" alt="[img]"/></center>
++<center><img src="img/gpk-log.png" alt=""/></center>
+ <p class="caption">Transaction viewer</p>
+
+-<center><img src="img/gpk-updates-overview.png" alt="[img]"/></center>
++<center><img src="img/gpk-updates-overview.png" alt=""/></center>
+ <p class="caption">Update viewer overview</p>
+
+-<center><img src="img/gpk-updates.png" alt="[img]"/></center>
++<center><img src="img/gpk-updates.png" alt=""/></center>
+ <p class="caption">Update viewer</p>
+
+-<center><img src="img/gpk-prefs.png" alt="[img]"/></center>
++<center><img src="img/gpk-prefs.png" alt=""/></center>
+ <p class="caption">Auto update preferences</p>
+
+-<center><img src="img/gpk-progress.png" alt="[img]"/></center>
++<center><img src="img/gpk-progress.png" alt=""/></center>
+ <p class="caption">Progress dialog</p>
+
+-<center><img src="img/gpk-added-deps.png" alt="[img]"/></center>
++<center><img src="img/gpk-added-deps.png" alt=""/></center>
+ <p class="caption">Added check warning</p>
+
+-<center><img src="img/gpk-eula.png" alt="[img]"/></center>
++<center><img src="img/gpk-eula.png" alt=""/></center>
+ <p class="caption">EULA dialog</p>
+
+-<center><img src="img/gpk-remove-confirm.png" alt="[img]"/></center>
++<center><img src="img/gpk-remove-confirm.png" alt=""/></center>
+ <p class="caption">Remove check warning</p>
+
+-<center><img src="img/gpk-repo-auth.png" alt="[img]"/></center>
++<center><img src="img/gpk-repo-auth.png" alt=""/></center>
+ <p class="caption">Repository authentication</p>
+
+-<center><img src="img/gpk-repo.png" alt="[img]"/></center>
++<center><img src="img/gpk-repo.png" alt=""/></center>
+ <p class="caption">Repository viewer</p>
+
+-<center><img src="img/gpk-backend-status.png" alt="[img]"/></center>
++<center><img src="img/gpk-backend-status.png" alt=""/></center>
+ <p class="caption">PackageKit backend status</p>
+
+-<center><img src="img/gpk-updates-warning.png" alt="[img]"/></center>
++<center><img src="img/gpk-updates-warning.png" alt=""/></center>
+ <p class="caption">Libnotify updates warning</p>
+
+-<center><img src="img/gpk-waiting.png" alt="[img]"/></center>
++<center><img src="img/gpk-waiting.png" alt=""/></center>
+ <p class="caption">Tasks waiting</p>
+
+-<center><img src="img/gpk-battery.png" alt="[img]"/></center>
++<center><img src="img/gpk-battery.png" alt=""/></center>
+ <p class="caption">Intergration with gnome-power-manager</p>
+
+-<center><img src="img/gpk-inhibit.png" alt="[img]"/></center>
++<center><img src="img/gpk-inhibit.png" alt=""/></center>
+ <p class="caption">Inhibit with gnome-power-manager</p>
+
+-<center><img src="img/gpk-require-restart.png" alt="[img]"/></center>
++<center><img src="img/gpk-require-restart.png" alt=""/></center>
+ <p class="caption">We sometimes need to do a restart</p>
+
+-<center><img src="img/gpk-auto-update.png" alt="[img]"/></center>
++<center><img src="img/gpk-auto-update.png" alt=""/></center>
+ <p class="caption">Auto update install dialog</p>
+
+ <h1><a name="kde">KDE Screenshots</a></h1>
+
+-<center><img src="img/kpk-search.png" alt="[img]"/></center>
++<center><img src="img/kpk-search.png" alt=""/></center>
+ <p class="caption">KPackageKit Searching</p>
+
+-<center><img src="img/kpk-information.png" alt="[img]"/></center>
++<center><img src="img/kpk-information.png" alt=""/></center>
+ <p class="caption">KPackageKit Package Information</p>
+
+-<center><img src="img/pk-opensuse-updater.png" alt="[img]"/></center>
++<center><img src="img/pk-opensuse-updater.png" alt=""/></center>
+ <p class="caption">OpenSuse Updater</p>
+
+ <h1><a name="moko">OpenMoko Screenshots</a></h1>
+
+-<center><img src="img/assassin.png" alt="[img]"/></center>
++<center><img src="img/assassin.png" alt=""/></center>
+ <p class="caption">Assassin</p>
+
+ <p>Back to the <a href="index.html">main page</a></p>
+diff --git a/docs/html/pk-using.html b/docs/html/pk-using.html
+index cc455c7..b2b028e 100644
+--- a/docs/html/pk-using.html
++++ b/docs/html/pk-using.html
+@@ -9,9 +9,9 @@
+
+ <table align="center" class="title">
+ <tr>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ <td width="95%" valign="middle"><p class="title">How do I use PackageKit?</p></td>
+- <td><img src="img/packagekit.png" alt="[img]"/></td>
++ <td><img src="img/packagekit.png" alt=""/></td>
+ </tr>
+ </table>
+
+diff --git a/docs/spec/pk-concepts.xml b/docs/spec/pk-concepts.xml
+index 312c5a4..0b75b10 100644
+--- a/docs/spec/pk-concepts.xml
++++ b/docs/spec/pk-concepts.xml
+@@ -127,6 +127,13 @@
+ This allows the used to choose non-native packages if a multi-lib policy is allowed.
+ </entry>
+ </row>
++ <row>
++ <entry><literal>source</literal> or <literal>~source</literal></entry>
++ <entry>
++ The source filter will only return source packages.
++ These are typically useful when rebuilding other packages.
++ </entry>
++ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+diff --git a/etc/PackageKit.conf.in b/etc/PackageKit.conf.in
+index a6af99b..8f9bd57 100644
+--- a/etc/PackageKit.conf.in
++++ b/etc/PackageKit.conf.in
+@@ -31,3 +31,13 @@ ShutdownTimeout=300
+ # default=@defaultbackend@
+ DefaultBackend=@defaultbackend@
+
++# Proxy settings, uncomment as required
++#
++# NOTE: PackageKit does not use these settings, they are passed to backends.
++# Backends may ignore these values, or they may be updated from the session.
++#
++# They are in the format username:password@server:port
++#
++# ProxyHTTP=username:password@server.lan:8080
++# ProxyFTP=username:password@server.lan:21
++
+diff --git a/libpackagekit/Makefile.am b/libpackagekit/Makefile.am
+index 6b8c6b8..aeafe44 100644
+--- a/libpackagekit/Makefile.am
++++ b/libpackagekit/Makefile.am
+@@ -37,6 +37,7 @@ libpackagekit_include_HEADERS = \
+ pk-connection.h \
+ pk-package-id.h \
+ pk-package-ids.h \
++ pk-package-item.h \
+ pk-package-list.h \
+ pk-enum.h \
+ pk-common.h \
+@@ -59,6 +60,8 @@ libpackagekit_la_SOURCES = \
+ pk-package-id.h \
+ pk-package-ids.c \
+ pk-package-ids.h \
++ pk-package-item.c \
++ pk-package-item.h \
+ pk-package-list.c \
+ pk-package-list.h \
+ pk-enum.h \
+diff --git a/libpackagekit/pk-enum.c b/libpackagekit/pk-enum.c
+index b5b6ac3..5743dcb 100644
+--- a/libpackagekit/pk-enum.c
++++ b/libpackagekit/pk-enum.c
+@@ -193,6 +193,8 @@ static PkEnumMatch enum_filter[] = {
+ {PK_FILTER_ENUM_NOT_NEWEST, "~newest"},
+ {PK_FILTER_ENUM_ARCH, "arch"},
+ {PK_FILTER_ENUM_NOT_ARCH, "~arch"},
++ {PK_FILTER_ENUM_SOURCE, "source"},
++ {PK_FILTER_ENUM_NOT_SOURCE, "~source"},
+ {0, NULL}
+ };
+
+diff --git a/libpackagekit/pk-enum.h b/libpackagekit/pk-enum.h
+index 33e8a91..e616b64 100644
+--- a/libpackagekit/pk-enum.h
++++ b/libpackagekit/pk-enum.h
+@@ -182,7 +182,9 @@ typedef enum {
+ PK_FILTER_ENUM_NOT_NEWEST = 1 << 15,
+ PK_FILTER_ENUM_ARCH = 1 << 16,
+ PK_FILTER_ENUM_NOT_ARCH = 1 << 17,
+- PK_FILTER_ENUM_UNKNOWN = 1 << 18
++ PK_FILTER_ENUM_SOURCE = 1 << 18,
++ PK_FILTER_ENUM_NOT_SOURCE = 1 << 19,
++ PK_FILTER_ENUM_UNKNOWN = 1 << 20
+ } PkFilterEnum;
+
+ /**
+diff --git a/libpackagekit/pk-package-item.c b/libpackagekit/pk-package-item.c
+new file mode 100644
+index 0000000..87905dc
+--- /dev/null
++++ b/libpackagekit/pk-package-item.c
+@@ -0,0 +1,190 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2007-2008 Richard Hughes <richard@hughsie.com>
++ *
++ * Licensed under the GNU General Public License Version 2
++ *
++ * 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.
++ */
++
++/**
++ * SECTION:pk-package-item
++ * @short_description: A cached Package structure
++ *
++ * These provide a way to query and store a single package.
++ */
++
++#include "config.h"
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <time.h>
++#include <errno.h>
++
++#include <string.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif /* HAVE_UNISTD_H */
++
++#include <glib/gi18n.h>
++
++#include "pk-debug.h"
++#include "pk-common.h"
++#include "pk-package-item.h"
++
++/**
++ * pk_package_item_new:
++ **/
++PkPackageItem *
++pk_package_item_new (PkInfoEnum info, const gchar *package_id, const gchar *summary)
++{
++ PkPackageItem *item;
++
++ g_return_val_if_fail (package_id != NULL, FALSE);
++
++ pk_debug ("adding to cache item package %s, %s, %s", pk_info_enum_to_text (info), package_id, summary);
++ item = g_new0 (PkPackageItem, 1);
++ item->info = info;
++ item->package_id = g_strdup (package_id);
++ item->summary = g_strdup (summary);
++ return item;
++}
++
++/**
++ * pk_package_item_free:
++ **/
++gboolean
++pk_package_item_free (PkPackageItem *item)
++{
++ if (item == NULL) {
++ return FALSE;
++ }
++ g_free (item->package_id);
++ g_free (item->summary);
++ g_free (item);
++ return TRUE;
++}
++
++/**
++ * pk_package_item_equal:
++ *
++ * Only compares the package_id's and the info enum
++ **/
++gboolean
++pk_package_item_equal (PkPackageItem *item1, PkPackageItem *item2)
++{
++ if (item1 == NULL || item2 == NULL) {
++ return FALSE;
++ }
++ return (item1->info == item2->info &&
++ pk_strequal (item1->package_id, item2->package_id));
++}
++
++/**
++ * pk_package_item_copy:
++ *
++ * Copy a PkPackageItem
++ **/
++PkPackageItem *
++pk_package_item_copy (PkPackageItem *item)
++{
++ g_return_val_if_fail (item != NULL, NULL);
++ return pk_package_item_new (item->info, item->package_id, item->summary);
++}
++
++/***************************************************************************
++ *** MAKE CHECK TESTS ***
++ ***************************************************************************/
++#ifdef PK_BUILD_TESTS
++#include <libselftest.h>
++
++void
++libst_package_item (LibSelfTest *test)
++{
++ PkPackageItem *item1;
++ PkPackageItem *item2;
++ PkPackageItem *item3;
++ gboolean ret;
++
++ if (libst_start (test, "PkPackageItem", CLASS_AUTO) == FALSE) {
++ return;
++ }
++
++ /************************************************************/
++ libst_title (test, "add entry");
++ item1 = pk_package_item_new (PK_INFO_ENUM_INSTALLED, "gnome;1.23;i386;data", "GNOME!");
++ if (item1 != NULL) {
++ libst_success (test, NULL);
++ } else {
++ libst_failed (test, NULL);
++ }
++
++ /************************************************************/
++ libst_title (test, "add entry");
++ item2 = pk_package_item_new (PK_INFO_ENUM_INSTALLED, "gnome;1.23;i386;data", "GNOME foo!");
++ if (item2 != NULL) {
++ libst_success (test, NULL);
++ } else {
++ libst_failed (test, NULL);
++ }
++
++ /************************************************************/
++ libst_title (test, "copy entry");
++ item3 = pk_package_item_copy (item2);
++ if (item3 != NULL) {
++ libst_success (test, NULL);
++ } else {
++ libst_failed (test, NULL);
++ }
++
++ /************************************************************/
++ libst_title (test, "check equal");
++ ret = pk_package_item_equal (item1, item3);
++ if (ret) {
++ libst_success (test, NULL);
++ } else {
++ libst_failed (test, NULL);
++ }
++
++ pk_package_item_free (item2);
++ pk_package_item_free (item3);
++
++ /************************************************************/
++ libst_title (test, "add entry");
++ item2 = pk_package_item_new (PK_INFO_ENUM_INSTALLED, "gnome-do;1.23;i386;data", "GNOME doo!");
++ if (item2 != NULL) {
++ libst_success (test, NULL);
++ } else {
++ libst_failed (test, NULL);
++ }
++
++ /************************************************************/
++ libst_title (test, "check !equal");
++ ret = pk_package_item_equal (item1, item2);
++ if (!ret) {
++ libst_success (test, NULL);
++ } else {
++ libst_failed (test, NULL);
++ }
++
++ pk_package_item_free (item1);
++ pk_package_item_free (item2);
++
++ libst_end (test);
++}
++#endif
++
+diff --git a/libpackagekit/pk-package-item.h b/libpackagekit/pk-package-item.h
+new file mode 100644
+index 0000000..c41a6ea
+--- /dev/null
++++ b/libpackagekit/pk-package-item.h
+@@ -0,0 +1,48 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2008 Richard Hughes <richard@hughsie.com>
++ *
++ * Licensed under the GNU General Public License Version 2
++ *
++ * 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 __PK_PACKAGE_ITEM_H
++#define __PK_PACKAGE_ITEM_H
++
++#include <glib-object.h>
++#include <pk-enum.h>
++
++/**
++ * PkPackageItem:
++ *
++ * A cached store for the complete Package object
++ */
++typedef struct {
++ PkInfoEnum info;
++ gchar *package_id;
++ gchar *summary;
++} PkPackageItem;
++
++PkPackageItem *pk_package_item_new (PkInfoEnum info,
++ const gchar *package_id,
++ const gchar *summary);
++gboolean pk_package_item_free (PkPackageItem *item);
++PkPackageItem *pk_package_item_copy (PkPackageItem *item);
++gboolean pk_package_item_equal (PkPackageItem *item1,
++ PkPackageItem *item2);
++
++#endif /* __PK_PACKAGE_ITEM_H */
++
+diff --git a/libpackagekit/pk-package-list.c b/libpackagekit/pk-package-list.c
+index b0a1a71..5d95e1b 100644
+--- a/libpackagekit/pk-package-list.c
++++ b/libpackagekit/pk-package-list.c
+@@ -45,6 +45,7 @@
+ #include "pk-debug.h"
+ #include "pk-common.h"
+ #include "pk-package-id.h"
++#include "pk-package-item.h"
+ #include "pk-package-list.h"
+
+ static void pk_package_list_class_init (PkPackageListClass *klass);
+@@ -77,16 +78,42 @@ pk_package_list_add (PkPackageList *plist, PkInfoEnum info, const gchar *package
+ g_return_val_if_fail (package_id != NULL, FALSE);
+
+ pk_debug ("adding to cache array package %s, %s, %s", pk_info_enum_to_text (info), package_id, summary);
+- item = g_new0 (PkPackageItem, 1);
+- item->info = info;
+- item->package_id = g_strdup (package_id);
+- item->summary = g_strdup (summary);
++ item = pk_package_item_new (info, package_id, summary);
+ g_ptr_array_add (plist->priv->array, item);
+
+ return TRUE;
+ }
+
+ /**
++ * pk_package_list_add_item:
++ *
++ * Makes a deep copy, and adds to the array
++ **/
++gboolean
++pk_package_list_add_item (PkPackageList *plist, PkPackageItem *item)
++{
++ gboolean ret;
++ PkPackageItem *item_new;
++
++ g_return_val_if_fail (PK_IS_PACKAGE_LIST (plist), FALSE);
++ g_return_val_if_fail (item != NULL, FALSE);
++
++ ret = pk_package_list_contains_item (plist, item);
++ if (ret) {
++ pk_debug ("already added item");
++ return FALSE;
++ }
++
++ pk_debug ("adding to cache array package %s, %s, %s",
++ pk_info_enum_to_text (item->info), item->package_id, item->summary);
++
++ item_new = pk_package_item_copy (item);
++ g_ptr_array_add (plist->priv->array, item_new);
++
++ return TRUE;
++}
++
++/**
+ * pk_package_list_get_string:
+ **/
+ gchar *
+@@ -152,9 +179,7 @@ pk_package_list_clear (PkPackageList *plist)
+
+ while (plist->priv->array->len > 0) {
+ item = g_ptr_array_index (plist->priv->array, 0);
+- g_free (item->package_id);
+- g_free (item->summary);
+- g_free (item);
++ pk_package_item_free (item);
+ g_ptr_array_remove_index_fast (plist->priv->array, 0);
+ }
+ return TRUE;
+@@ -186,6 +211,31 @@ pk_package_list_contains (PkPackageList *plist, const gchar *package_id)
+ }
+
+ /**
++ * pk_package_list_contains_item:
++ **/
++gboolean
++pk_package_list_contains_item (PkPackageList *plist, PkPackageItem *item)
++{
++ PkPackageItem *item_temp;
++ guint i;
++ guint length;
++ gboolean ret = FALSE;
++
++ g_return_val_if_fail (PK_IS_PACKAGE_LIST (plist), FALSE);
++ g_return_val_if_fail (item != NULL, FALSE);
++
++ length = plist->priv->array->len;
++ for (i=0; i<length; i++) {
++ item_temp = g_ptr_array_index (plist->priv->array, i);
++ ret = pk_package_item_equal (item_temp, item);
++ if (ret) {
++ break;
++ }
++ }
++ return ret;
++}
++
++/**
+ * pk_package_list_class_init:
+ * @klass: The PkPackageListClass
+ **/
+diff --git a/libpackagekit/pk-package-list.h b/libpackagekit/pk-package-list.h
+index 9178f77..9734af4 100644
+--- a/libpackagekit/pk-package-list.h
++++ b/libpackagekit/pk-package-list.h
+@@ -25,6 +25,8 @@
+ #include <glib-object.h>
+ #include <pk-enum.h>
+
++#include "pk-package-item.h"
++
+ G_BEGIN_DECLS
+
+ #define PK_TYPE_PACKAGE_LIST (pk_package_list_get_type ())
+@@ -49,26 +51,18 @@ struct _PkPackageListClass
+ GObjectClass parent_class;
+ };
+
+-/**
+- * PkPackageItem:
+- *
+- * A cached store for the complete Package object
+- */
+-typedef struct
+-{
+- PkInfoEnum info;
+- gchar *package_id;
+- gchar *summary;
+-} PkPackageItem;
+-
+ GType pk_package_list_get_type (void) G_GNUC_CONST;
+ PkPackageList *pk_package_list_new (void);
+ gboolean pk_package_list_add (PkPackageList *plist,
+ PkInfoEnum info,
+ const gchar *package_id,
+ const gchar *summary);
++gboolean pk_package_list_add_item (PkPackageList *plist,
++ PkPackageItem *item);
+ gboolean pk_package_list_contains (PkPackageList *plist,
+ const gchar *package_id);
++gboolean pk_package_list_contains_item (PkPackageList *plist,
++ PkPackageItem *item);
+ gchar *pk_package_list_get_string (PkPackageList *plist)
+ G_GNUC_WARN_UNUSED_RESULT;
+ guint pk_package_list_get_size (PkPackageList *plist);
+diff --git a/libpackagekit/pk-self-test.c b/libpackagekit/pk-self-test.c
+index 62e225b..bf151fb 100644
+--- a/libpackagekit/pk-self-test.c
++++ b/libpackagekit/pk-self-test.c
+@@ -29,6 +29,7 @@
+ /* prototypes */
+ void libst_package_id (LibSelfTest *test);
+ void libst_package_ids (LibSelfTest *test);
++void libst_package_item (LibSelfTest *test);
+ void libst_package_list (LibSelfTest *test);
+ void libst_enum (LibSelfTest *test);
+ void libst_common (LibSelfTest *test);
+@@ -51,6 +52,7 @@ main (int argc, char **argv)
+ libst_common (&test);
+ libst_package_id (&test);
+ libst_package_ids (&test);
++ libst_package_item (&test);
+ libst_package_list (&test);
+ libst_enum (&test);
+ libst_extra (&test);
+diff --git a/python/packagekit/daemonBackend.py b/python/packagekit/daemonBackend.py
+index 3711f01..5253b39 100644
+--- a/python/packagekit/daemonBackend.py
++++ b/python/packagekit/daemonBackend.py
+@@ -789,6 +789,21 @@ class PackageKitBaseBackend(dbus.service.Object):
+ self.Finished(EXIT_FAILED)
+
+ @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
++ in_signature='ss', out_signature='')
++ def SetProxy(self, proxy_http, proxy_ftp):
++ '''
++ Set the proxy
++ '''
++ pklog.info("SetProxy(%s, %s)" % (proxy_http, proxy_ftp))
++ self.doSetProxy(proxy_http, proxy_ftp)
++
++ def doSetProxy(self, proxy_http, proxy_ftp):
++ '''
++ Should be replaced in the corresponding backend sub class
++ '''
++ # do not use Finished() in this method
++
++ @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE,
+ in_signature='s', out_signature='')
+ def InstallPublicKey(self, keyurl):
+ '''
+diff --git a/src/pk-backend-dbus.c b/src/pk-backend-dbus.c
+index b06e584..4c6837a 100644
+--- a/src/pk-backend-dbus.c
++++ b/src/pk-backend-dbus.c
+@@ -123,16 +123,6 @@ pk_backend_dbus_sub_percentage_changed_cb (DBusGProxy *proxy, guint sub_percenta
+ }
+
+ /**
+- * pk_backend_dbus_no_percentage_updates_cb:
+- **/
+-static void
+-pk_backend_dbus_no_percentage_updates_cb (DBusGProxy *proxy, PkBackendDbus *backend_dbus)
+-{
+- pk_debug ("got signal");
+- pk_backend_no_percentage_updates (backend_dbus->priv->backend);
+-}
+-
+-/**
+ * pk_backend_dbus_package_cb:
+ **/
+ static void
+@@ -325,8 +315,6 @@ pk_backend_dbus_remove_callbacks (PkBackendDbus *backend_dbus)
+ G_CALLBACK (pk_backend_dbus_percentage_changed_cb), backend_dbus);
+ dbus_g_proxy_disconnect_signal (proxy, "SubPercentageChanged",
+ G_CALLBACK (pk_backend_dbus_sub_percentage_changed_cb), backend_dbus);
+- dbus_g_proxy_disconnect_signal (proxy, "NoPercentageChanged",
+- G_CALLBACK (pk_backend_dbus_no_percentage_updates_cb), backend_dbus);
+ dbus_g_proxy_disconnect_signal (proxy, "Package",
+ G_CALLBACK (pk_backend_dbus_package_cb), backend_dbus);
+ dbus_g_proxy_disconnect_signal (proxy, "Details",
+@@ -353,6 +341,31 @@ pk_backend_dbus_remove_callbacks (PkBackendDbus *backend_dbus)
+ }
+
+ /**
++ * pk_backend_dbus_set_proxy:
++ **/
++static gboolean
++pk_backend_dbus_set_proxy (PkBackendDbus *backend_dbus, const gchar *proxy_http, const gchar *proxy_ftp)
++{
++ gboolean ret;
++ GError *error = NULL;
++
++ g_return_val_if_fail (PK_IS_BACKEND_DBUS (backend_dbus), FALSE);
++ g_return_val_if_fail (backend_dbus->priv->proxy != NULL, FALSE);
++
++ /* new sync method call */
++ pk_backend_dbus_time_reset (backend_dbus);
++ ret = dbus_g_proxy_call (backend_dbus->priv->proxy, "SetProxy", &error,
++ G_TYPE_STRING, proxy_http,
++ G_TYPE_STRING, proxy_ftp,
++ G_TYPE_INVALID, G_TYPE_INVALID);
++ if (error != NULL) {
++ pk_warning ("%s", error->message);
++ g_error_free (error);
++ }
++ return ret;
++}
++
++/**
+ * pk_backend_dbus_set_name:
+ **/
+ gboolean
+@@ -385,7 +398,6 @@ pk_backend_dbus_set_name (PkBackendDbus *backend_dbus, const gchar *service)
+ G_TYPE_UINT, G_TYPE_INVALID);
+ dbus_g_proxy_add_signal (proxy, "SubPercentageChanged",
+ G_TYPE_UINT, G_TYPE_INVALID);
+- dbus_g_proxy_add_signal (proxy, "NoPercentageChanged", G_TYPE_INVALID);
+ dbus_g_proxy_add_signal (proxy, "Package",
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+ dbus_g_proxy_add_signal (proxy, "Details",
+@@ -424,8 +436,6 @@ pk_backend_dbus_set_name (PkBackendDbus *backend_dbus, const gchar *service)
+ G_CALLBACK (pk_backend_dbus_percentage_changed_cb), backend_dbus, NULL);
+ dbus_g_proxy_connect_signal (proxy, "SubPercentageChanged",
+ G_CALLBACK (pk_backend_dbus_sub_percentage_changed_cb), backend_dbus, NULL);
+- dbus_g_proxy_connect_signal (proxy, "NoPercentageChanged",
+- G_CALLBACK (pk_backend_dbus_no_percentage_updates_cb), backend_dbus, NULL);
+ dbus_g_proxy_connect_signal (proxy, "Package",
+ G_CALLBACK (pk_backend_dbus_package_cb), backend_dbus, NULL);
+ dbus_g_proxy_connect_signal (proxy, "Details",
+@@ -465,6 +475,18 @@ pk_backend_dbus_set_name (PkBackendDbus *backend_dbus, const gchar *service)
+ pk_backend_finished (backend_dbus->priv->backend);
+ g_error_free (error);
+ }
++
++ /* set the proxy */
++ if (ret) {
++ gchar *proxy_http;
++ gchar *proxy_ftp;
++ proxy_http = pk_backend_get_proxy_http (backend_dbus->priv->backend);
++ proxy_ftp = pk_backend_get_proxy_http (backend_dbus->priv->backend);
++ pk_backend_dbus_set_proxy (backend_dbus, proxy_http, proxy_ftp);
++ g_free (proxy_http);
++ g_free (proxy_ftp);
++ }
++
+ if (ret) {
+ pk_backend_dbus_time_check (backend_dbus);
+ }
+diff --git a/src/pk-backend-internal.h b/src/pk-backend-internal.h
+index 2213fed..2bffaff 100644
+--- a/src/pk-backend-internal.h
++++ b/src/pk-backend-internal.h
+@@ -59,6 +59,9 @@ gboolean pk_backend_reset (PkBackend *backend);
+ gboolean pk_backend_set_name (PkBackend *backend,
+ const gchar *name)
+ G_GNUC_WARN_UNUSED_RESULT;
++gboolean pk_backend_set_proxy (PkBackend *backend,
++ const gchar *proxy_http,
++ const gchar *proxy_ftp);
+ gchar *pk_backend_get_name (PkBackend *backend)
+ G_GNUC_WARN_UNUSED_RESULT;
+ gboolean pk_backend_get_backend_detail (PkBackend *backend,
+diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c
+index f9e8b68..f9c9f12 100644
+--- a/src/pk-backend-spawn.c
++++ b/src/pk-backend-spawn.c
+@@ -313,7 +313,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
+ ret = FALSE;
+ goto out;
+ }
+- pk_backend_no_percentage_updates (backend_spawn->priv->backend);
++ pk_backend_set_percentage (backend_spawn->priv->backend, PK_BACKEND_PERCENTAGE_INVALID);
+ } else if (pk_strequal (command, "repo-signature-required")) {
+
+ if (size != 9+99) {
+@@ -440,6 +440,44 @@ pk_backend_spawn_helper_new (PkBackendSpawn *backend_spawn)
+ }
+
+ /**
++ * pk_backend_spawn_get_envp:
++ *
++ * Return all the environment variables the script will need
++ **/
++static gchar **
++pk_backend_spawn_get_envp (PkBackendSpawn *backend_spawn)
++{
++ gchar **envp;
++ gchar *value;
++ gchar *line;
++ GPtrArray *array;
++
++ array = g_ptr_array_new ();
++
++ /* http_proxy */
++ value = pk_backend_get_proxy_http (backend_spawn->priv->backend);
++ if (!pk_strzero (value)) {
++ line = g_strdup_printf ("%s=%s", "http_proxy", value);
++ pk_debug ("setting evp '%s'", line);
++ g_ptr_array_add (array, line);
++ }
++ g_free (value);
++
++ /* ftp_proxy */
++ value = pk_backend_get_proxy_ftp (backend_spawn->priv->backend);
++ if (!pk_strzero (value)) {
++ line = g_strdup_printf ("%s=%s", "ftp_proxy", value);
++ pk_debug ("setting evp '%s'", line);
++ g_ptr_array_add (array, line);
++ }
++ g_free (value);
++
++ envp = pk_ptr_array_to_argv (array);
++ g_ptr_array_free (array, TRUE);
++ return envp;
++}
++
++/**
+ * pk_backend_spawn_helper_va_list:
+ **/
+ static gboolean
+@@ -448,6 +486,7 @@ pk_backend_spawn_helper_va_list (PkBackendSpawn *backend_spawn, const gchar *exe
+ gboolean ret;
+ gchar *filename;
+ gchar **argv;
++ gchar **envp;
+
+ g_return_val_if_fail (PK_IS_BACKEND_SPAWN (backend_spawn), FALSE);
+
+@@ -476,7 +515,8 @@ pk_backend_spawn_helper_va_list (PkBackendSpawn *backend_spawn, const gchar *exe
+ argv[0] = g_strdup (filename);
+
+ pk_backend_spawn_helper_new (backend_spawn);
+- ret = pk_spawn_argv (backend_spawn->priv->spawn, argv);
++ envp = pk_backend_spawn_get_envp (backend_spawn);
++ ret = pk_spawn_argv (backend_spawn->priv->spawn, argv, envp);
+ if (!ret) {
+ pk_backend_spawn_helper_delete (backend_spawn);
+ pk_backend_error_code (backend_spawn->priv->backend, PK_ERROR_ENUM_INTERNAL_ERROR,
+diff --git a/src/pk-backend.c b/src/pk-backend.c
+index 225c488..37ed024 100644
+--- a/src/pk-backend.c
++++ b/src/pk-backend.c
+@@ -33,6 +33,7 @@
+ #include <glib/gprintf.h>
+ #include <pk-network.h>
+
++#include "pk-package-item.h"
+ #include "pk-debug.h"
+ #include "pk-common.h"
+ #include "pk-marshal.h"
+@@ -44,13 +45,6 @@
+ #define PK_BACKEND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_BACKEND, PkBackendPrivate))
+
+ /**
+- * PK_BACKEND_PERCENTAGE_INVALID:
+- *
+- * The unknown percentage value
+- */
+-#define PK_BACKEND_PERCENTAGE_INVALID 101
+-
+-/**
+ * PK_BACKEND_PERCENTAGE_DEFAULT:
+ *
+ * The default percentage value, should never be emitted, but should be
+@@ -84,12 +78,15 @@ struct _PkBackendPrivate
+ GHashTable *eulas;
+ gchar *name;
+ gchar *c_tid;
++ gchar *proxy_http;
++ gchar *proxy_ftp;
+ gboolean locked;
+ gboolean set_error;
+ gboolean set_signature;
+ gboolean set_eula;
+ gboolean has_sent_package;
+ PkNetwork *network;
++ PkPackageItem *last_package;
+ PkRoleEnum role; /* this never changes for the lifetime of a transaction */
+ PkStatusEnum status; /* this changes */
+ PkExitEnum exit;
+@@ -592,6 +589,44 @@ out:
+ }
+
+ /**
++ * pk_backend_set_proxy:
++ **/
++gboolean
++pk_backend_set_proxy (PkBackend *backend, const gchar *proxy_http, const gchar *proxy_ftp)
++{
++ g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
++ g_free (backend->priv->proxy_http);
++ g_free (backend->priv->proxy_ftp);
++ backend->priv->proxy_http = g_strdup (proxy_http);
++ backend->priv->proxy_ftp = g_strdup (proxy_ftp);
++ return TRUE;
++}
++
++/**
++ * pk_backend_get_proxy_http:
++ *
++ * Return value: proxy string in the form username:password@server:port
++ **/
++gchar *
++pk_backend_get_proxy_http (PkBackend *backend)
++{
++ g_return_val_if_fail (PK_IS_BACKEND (backend), NULL);
++ return g_strdup (backend->priv->proxy_http);
++}
++
++/**
++ * pk_backend_get_proxy_ftp:
++ *
++ * Return value: proxy string in the form username:password@server:port
++ **/
++gchar *
++pk_backend_get_proxy_ftp (PkBackend *backend)
++{
++ g_return_val_if_fail (PK_IS_BACKEND (backend), NULL);
++ return g_strdup (backend->priv->proxy_ftp);
++}
++
++/**
+ * pk_backend_lock:
+ *
+ * Responsible for initialising the external backend object.
+@@ -803,35 +838,6 @@ pk_backend_set_sub_percentage (PkBackend *backend, guint percentage)
+ }
+
+ /**
+- * pk_backend_no_percentage_updates:
+- **/
+-gboolean
+-pk_backend_no_percentage_updates (PkBackend *backend)
+-{
+- g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
+- g_return_val_if_fail (backend->priv->locked != FALSE, FALSE);
+-
+- /* have we already set an error? */
+- if (backend->priv->set_error) {
+- pk_warning ("already set error, cannot process");
+- return FALSE;
+- }
+-
+- /* set the same twice? */
+- if (backend->priv->last_percentage == PK_BACKEND_PERCENTAGE_INVALID) {
+- pk_debug ("duplicate set of %i", PK_BACKEND_PERCENTAGE_INVALID);
+- return FALSE;
+- }
+-
+- /* invalidate previous percentage */
+- backend->priv->last_percentage = PK_BACKEND_PERCENTAGE_INVALID;
+-
+- /* emit the progress changed signal */
+- pk_backend_emit_progress_changed (backend);
+- return TRUE;
+-}
+-
+-/**
+ * pk_backend_set_status:
+ **/
+ gboolean
+@@ -901,11 +907,26 @@ gboolean
+ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id, const gchar *summary)
+ {
+ gchar *summary_safe;
++ PkPackageItem *item;
++ gboolean ret;
+
+ g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
+ g_return_val_if_fail (package_id != NULL, FALSE);
+ g_return_val_if_fail (backend->priv->locked != FALSE, FALSE);
+
++ /* check against the old one */
++ item = pk_package_item_new (info, package_id, summary);
++ ret = pk_package_item_equal (item, backend->priv->last_package);
++ if (ret) {
++ pk_package_item_free (item);
++ pk_debug ("skipping duplicate %s", package_id);
++ return FALSE;
++ }
++ /* update the 'last' package */
++ pk_package_item_free (backend->priv->last_package);
++ backend->priv->last_package = pk_package_item_copy (item);
++ pk_package_item_free (item);
++
+ /* have we already set an error? */
+ if (backend->priv->set_error) {
+ pk_warning ("already set error, cannot process");
+@@ -1689,6 +1710,8 @@ pk_backend_finalize (GObject *object)
+ pk_debug ("backend finalise");
+
+ pk_backend_reset (backend);
++ g_free (backend->priv->proxy_http);
++ g_free (backend->priv->proxy_ftp);
+ g_free (backend->priv->name);
+ g_free (backend->priv->c_tid);
+ g_object_unref (backend->priv->time);
+@@ -1818,6 +1841,7 @@ pk_backend_reset (PkBackend *backend)
+
+ /* TODO: need to wait for Finished() if running */
+
++ pk_package_item_free (backend->priv->last_package);
+ backend->priv->set_error = FALSE;
+ backend->priv->set_signature = FALSE;
+ backend->priv->set_eula = FALSE;
+@@ -1825,6 +1849,7 @@ pk_backend_reset (PkBackend *backend)
+ backend->priv->finished = FALSE;
+ backend->priv->has_sent_package = FALSE;
+ backend->priv->thread = NULL;
++ backend->priv->last_package = NULL;
+ backend->priv->status = PK_STATUS_ENUM_UNKNOWN;
+ backend->priv->exit = PK_EXIT_ENUM_UNKNOWN;
+ backend->priv->role = PK_ROLE_ENUM_UNKNOWN;
+@@ -1855,8 +1880,11 @@ pk_backend_init (PkBackend *backend)
+ backend->priv->handle = NULL;
+ backend->priv->name = NULL;
+ backend->priv->c_tid = NULL;
++ backend->priv->proxy_http = NULL;
++ backend->priv->proxy_ftp = NULL;
+ backend->priv->file_changed_func = NULL;
+ backend->priv->file_changed_data = NULL;
++ backend->priv->last_package = NULL;
+ backend->priv->locked = FALSE;
+ backend->priv->signal_finished = 0;
+ backend->priv->signal_error_timeout = 0;
+diff --git a/src/pk-backend.h b/src/pk-backend.h
+index 95b7fa8..fb17e3c 100644
+--- a/src/pk-backend.h
++++ b/src/pk-backend.h
+@@ -30,6 +30,13 @@
+
+ G_BEGIN_DECLS
+
++/**
++ * PK_BACKEND_PERCENTAGE_INVALID:
++ *
++ * The unknown percentage value
++ */
++#define PK_BACKEND_PERCENTAGE_INVALID 101
++
+ typedef struct _PkBackend PkBackend;
+
+ /* set the state */
+@@ -51,7 +58,6 @@ gboolean pk_backend_set_sub_percentage (PkBackend *backend,
+ guint percentage);
+ gboolean pk_backend_set_exit_code (PkBackend *backend,
+ PkExitEnum exit);
+-gboolean pk_backend_no_percentage_updates (PkBackend *backend);
+ gboolean pk_backend_set_transaction_data (PkBackend *backend,
+ const gchar *data);
+
+@@ -66,6 +72,8 @@ gboolean pk_backend_get_progress (PkBackend *backend,
+ guint *elapsed,
+ guint *remaining);
+ guint pk_backend_get_runtime (PkBackend *backend);
++gchar *pk_backend_get_proxy_ftp (PkBackend *backend);
++gchar *pk_backend_get_proxy_http (PkBackend *backend);
+
+ /* signal helpers */
+ gboolean pk_backend_finished (PkBackend *backend);
+diff --git a/src/pk-engine.c b/src/pk-engine.c
+index db81d36..028a0d0 100644
+--- a/src/pk-engine.c
++++ b/src/pk-engine.c
+@@ -101,6 +101,7 @@ struct PkEnginePrivate
+ PkNetwork *network;
+ PkSecurity *security;
+ PkNotify *notify;
++ PkConf *conf;
+ PkFileMonitor *file_monitor;
+ PkRoleEnum actions;
+ PkGroupEnum groups;
+@@ -579,10 +580,15 @@ pk_engine_init (PkEngine *engine)
+ DBusGConnection *connection;
+ gboolean ret;
+ gchar *filename;
++ gchar *proxy_http;
++ gchar *proxy_ftp;
+
+ engine->priv = PK_ENGINE_GET_PRIVATE (engine);
+ engine->priv->restart_schedule = FALSE;
+
++ /* use the config file */
++ engine->priv->conf = pk_conf_new ();
++
+ /* setup the backend backend */
+ engine->priv->backend = pk_backend_new ();
+ g_signal_connect (engine->priv->backend, "finished",
+@@ -639,6 +645,13 @@ pk_engine_init (PkEngine *engine)
+ G_CALLBACK (pk_engine_file_monitor_changed_cb), engine);
+ g_free (filename);
+
++ /* set the proxy */
++ proxy_http = pk_conf_get_string (engine->priv->conf, "ProxyHTTP");
++ proxy_ftp = pk_conf_get_string (engine->priv->conf, "ProxyFTP");
++ pk_backend_set_proxy (engine->priv->backend, proxy_http, proxy_ftp);
++ g_free (proxy_http);
++ g_free (proxy_ftp);
++
+ engine->priv->transaction_list = pk_transaction_list_new ();
+ g_signal_connect (engine->priv->transaction_list, "changed",
+ G_CALLBACK (pk_engine_transaction_list_changed_cb), engine);
+@@ -696,6 +709,7 @@ pk_engine_finalize (GObject *object)
+ g_object_unref (engine->priv->notify);
+ g_object_unref (engine->priv->backend);
+ g_object_unref (engine->priv->cache);
++ g_object_unref (engine->priv->conf);
+
+ G_OBJECT_CLASS (pk_engine_parent_class)->finalize (object);
+ }
+diff --git a/src/pk-network-unix.c b/src/pk-network-unix.c
+index 11c23a2..74b266c 100644
+--- a/src/pk-network-unix.c
++++ b/src/pk-network-unix.c
+@@ -138,6 +138,11 @@ pk_network_unix_get_network_state (PkNetworkUnix *network_unix)
+ continue;
+ }
+
++ /* is loopback? */
++ if (pk_strequal (sections[0], "lo")) {
++ continue;
++ }
++
+ /* is correct parameters? */
+ number_sections = g_strv_length (sections);
+ if (number_sections != 11) {
+@@ -145,9 +150,8 @@ pk_network_unix_get_network_state (PkNetworkUnix *network_unix)
+ continue;
+ }
+
+- /* is MTU and gateway nonzero? */
+- if (!pk_strequal (sections[8], "0") &&
+- !pk_strequal (sections[2], "00000000")) {
++ /* is gateway nonzero? */
++ if (!pk_strequal (sections[2], "00000000")) {
+ pk_debug ("interface %s is valid", sections[0]);
+ online = TRUE;
+ }
+diff --git a/src/pk-network.c b/src/pk-network.c
+index 9656958..0ad839e 100644
+--- a/src/pk-network.c
++++ b/src/pk-network.c
+@@ -39,6 +39,7 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
++#include <libgbus.h>
+
+ #include <glib/gi18n.h>
+
+@@ -67,6 +68,7 @@ struct _PkNetworkPrivate
+ PkNetworkNm *net_nm;
+ PkNetworkUnix *net_unix;
+ PkConf *conf;
++ LibGBus *nm_bus;
+ };
+
+ enum {
+@@ -154,6 +156,7 @@ pk_network_class_init (PkNetworkClass *klass)
+ static void
+ pk_network_init (PkNetwork *network)
+ {
++ gboolean nm_alive;
+ network->priv = PK_NETWORK_GET_PRIVATE (network);
+ network->priv->conf = pk_conf_new ();
+ network->priv->net_nm = pk_network_nm_new ();
+@@ -167,6 +170,17 @@ pk_network_init (PkNetwork *network)
+ network->priv->use_nm = pk_conf_get_bool (network->priv->conf, "UseNetworkManager");
+ network->priv->use_unix = pk_conf_get_bool (network->priv->conf, "UseNetworkHeuristic");
+
++ /* check if NM is on the bus */
++ network->priv->nm_bus = libgbus_new ();
++ libgbus_assign (network->priv->nm_bus, LIBGBUS_SYSTEM, "org.freedesktop.NetworkManager");
++ nm_alive = libgbus_is_connected (network->priv->nm_bus);
++
++ /* NetworkManager isn't up, so we can't use it */
++ if (network->priv->use_nm && !nm_alive) {
++ pk_warning ("UseNetworkManager true, but org.freedesktop.NetworkManager not up");
++ network->priv->use_nm = FALSE;
++ }
++
+ #if !PK_BUILD_NETWORKMANAGER
+ /* check we can actually use the default */
+ if (network->priv->use_nm) {
+@@ -190,6 +204,7 @@ pk_network_finalize (GObject *object)
+
+ g_return_if_fail (network->priv != NULL);
+ g_object_unref (network->priv->conf);
++ g_object_unref (network->priv->nm_bus);
+ g_object_unref (network->priv->net_nm);
+ g_object_unref (network->priv->net_unix);
+ G_OBJECT_CLASS (pk_network_parent_class)->finalize (object);
+diff --git a/src/pk-spawn.c b/src/pk-spawn.c
+index 9b415b1..c4622f9 100644
+--- a/src/pk-spawn.c
++++ b/src/pk-spawn.c
+@@ -273,7 +273,7 @@ pk_spawn_kill (PkSpawn *spawn)
+ *
+ **/
+ gboolean
+-pk_spawn_argv (PkSpawn *spawn, gchar **argv)
++pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp)
+ {
+ gboolean ret;
+
+@@ -284,7 +284,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv)
+ spawn->priv->finished = FALSE;
+
+ /* create spawned object for tracking */
+- ret = g_spawn_async_with_pipes (NULL, argv, NULL,
++ ret = g_spawn_async_with_pipes (NULL, argv, envp,
+ G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
+ NULL, NULL, &spawn->priv->child_pid,
+ NULL, /* stdin */
+@@ -484,6 +484,7 @@ libst_spawn (LibSelfTest *test)
+ gboolean ret;
+ gchar *path;
+ gchar **argv;
++ gchar **envp;
+
+ if (libst_start (test, "PkSpawn", CLASS_AUTO) == FALSE) {
+ return;
+@@ -496,7 +497,7 @@ libst_spawn (LibSelfTest *test)
+ libst_title (test, "make sure return error for missing file");
+ mexit = BAD_EXIT;
+ argv = g_strsplit ("pk-spawn-test-xxx.sh", " ", 0);
+- ret = pk_spawn_argv (spawn, argv);
++ ret = pk_spawn_argv (spawn, argv, NULL);
+ g_strfreev (argv);
+ if (ret == FALSE) {
+ libst_success (test, "failed to run invalid file");
+@@ -517,7 +518,7 @@ libst_spawn (LibSelfTest *test)
+ mexit = -1;
+ path = pk_test_get_data ("pk-spawn-test.sh");
+ argv = g_strsplit (path, " ", 0);
+- ret = pk_spawn_argv (spawn, argv);
++ ret = pk_spawn_argv (spawn, argv, NULL);
+ g_free (path);
+ g_strfreev (argv);
+ if (ret) {
+@@ -558,11 +559,34 @@ libst_spawn (LibSelfTest *test)
+ new_spawn_object (test, &spawn);
+
+ /************************************************************/
++ libst_title (test, "make sure we set the proxy");
++ mexit = -1;
++ path = pk_test_get_data ("pk-spawn-proxy.sh");
++ argv = g_strsplit (path, " ", 0);
++ envp = g_strsplit ("http_proxy=username:password@server:port "
++ "ftp_proxy=username:password@server:port", " ", 0);
++ ret = pk_spawn_argv (spawn, argv, envp);
++ g_free (path);
++ g_strfreev (argv);
++ if (ret) {
++ libst_success (test, "ran correct file");
++ } else {
++ libst_failed (test, "did not run helper");
++ }
++
++ /* wait for finished */
++ libst_loopwait (test, 10000);
++ libst_loopcheck (test);
++
++ /* get new object */
++ new_spawn_object (test, &spawn);
++
++ /************************************************************/
+ libst_title (test, "make sure run correct helper, and kill it");
+ mexit = BAD_EXIT;
+ path = pk_test_get_data ("pk-spawn-test.sh");
+ argv = g_strsplit (path, " ", 0);
+- ret = pk_spawn_argv (spawn, argv);
++ ret = pk_spawn_argv (spawn, argv, NULL);
+ g_free (path);
+ g_strfreev (argv);
+ if (ret) {
+@@ -592,7 +616,7 @@ libst_spawn (LibSelfTest *test)
+ mexit = BAD_EXIT;
+ path = pk_test_get_data ("pk-spawn-test-sigquit.sh");
+ argv = g_strsplit (path, " ", 0);
+- ret = pk_spawn_argv (spawn, argv);
++ ret = pk_spawn_argv (spawn, argv, NULL);
+ g_free (path);
+ g_strfreev (argv);
+ if (ret) {
+@@ -618,7 +642,7 @@ libst_spawn (LibSelfTest *test)
+ libst_title (test, "run lots of data for profiling");
+ path = pk_test_get_data ("pk-spawn-test-profiling.sh");
+ argv = g_strsplit (path, " ", 0);
+- ret = pk_spawn_argv (spawn, argv);
++ ret = pk_spawn_argv (spawn, argv, NULL);
+ g_free (path);
+ g_strfreev (argv);
+ if (ret) {
+diff --git a/src/pk-spawn.h b/src/pk-spawn.h
+index 1b20fef..0e58859 100644
+--- a/src/pk-spawn.h
++++ b/src/pk-spawn.h
+@@ -52,7 +52,8 @@ GType pk_spawn_get_type (void) G_GNUC_CONST;
+ PkSpawn *pk_spawn_new (void);
+
+ gboolean pk_spawn_argv (PkSpawn *spawn,
+- gchar **argv)
++ gchar **argv,
++ gchar **envp)
+ G_GNUC_WARN_UNUSED_RESULT;
+ gboolean pk_spawn_kill (PkSpawn *spawn);
+
diff --git a/packages/packagekit/files/pk-nodocs.patch b/packages/packagekit/files/pk-nodocs.patch
new file mode 100644
index 0000000000..c775128867
--- /dev/null
+++ b/packages/packagekit/files/pk-nodocs.patch
@@ -0,0 +1,10 @@
+--- /tmp/Makefile.am 2008-05-31 12:17:08.492193028 +0200
++++ git/Makefile.am 2008-05-31 12:17:18.884499290 +0200
+@@ -16,7 +16,6 @@
+ client \
+ backends \
+ python \
+- docs \
+ $(NULL)
+
+ clean-local :
diff --git a/packages/packagekit/packagekit_git.bb b/packages/packagekit/packagekit_git.bb
index b2d7ea8886..8e2adff2cf 100644
--- a/packages/packagekit/packagekit_git.bb
+++ b/packages/packagekit/packagekit_git.bb
@@ -4,12 +4,13 @@ PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "dbus (>= 1.1.1) dbus-glib glib-2.0 sqlite3 opkg intltool intltool-native (>= 0.37.1)"
RDEPENDS_${PN} = "opkg"
-PV = "0.1+git${SRCREV}"
-PR = "r8"
+PV = "0.2.3+gitr${SRCREV}"
+PR = "r9"
SRC_URI = "git://anongit.freedesktop.org/git/packagekit;protocol=git \
file://disable-docbook2man.patch;patch=1"
+
S = "${WORKDIR}/git"
inherit autotools pkgconfig
diff --git a/packages/pciutils/pciutils-2.2.4/configure.patch b/packages/pciutils/pciutils-2.2.4/configure.patch
index 78d113c498..cfb5ef71d5 100644
--- a/packages/pciutils/pciutils-2.2.4/configure.patch
+++ b/packages/pciutils/pciutils-2.2.4/configure.patch
@@ -1,13 +1,8 @@
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
Index: pciutils-2.2.4/lib/configure
===================================================================
--- pciutils-2.2.4.orig/lib/configure 2006-09-09 13:06:10.000000000 +0200
-+++ pciutils-2.2.4/lib/configure 2006-10-31 11:52:13.000000000 +0100
-@@ -12,15 +12,15 @@
++++ pciutils-2.2.4/lib/configure 2008-06-17 10:15:07.000000000 +0200
+@@ -12,15 +12,15 @@ echo_n() {
echo_n "Configuring libpci for your system..."
idsdir=${1:-/usr/share}
version=${2:-0.0}
@@ -26,10 +21,15 @@ Index: pciutils-2.2.4/lib/configure
fi
if [ "$sys" = "GNU/kFreeBSD" ]
then
-@@ -34,6 +34,11 @@
+@@ -34,6 +34,16 @@ rel=${4:-$rel}
echo " $host $rel"
zlib=$5
++if [ "$host" = "linux--gnuspe" ]
++then
++ sys=linux
++fi
++
+if [ "$host" = "linux--gnueabi" ]
+then
+ sys=linux
diff --git a/packages/pciutils/pciutils_2.2.4.bb b/packages/pciutils/pciutils_2.2.4.bb
index 0cd335eb32..1f863b6057 100644
--- a/packages/pciutils/pciutils_2.2.4.bb
+++ b/packages/pciutils/pciutils_2.2.4.bb
@@ -13,7 +13,7 @@ SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.b
PARALLEL_MAKE = ""
-PR="r1"
+PR="r2"
do_configure () {
(cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH})
diff --git a/packages/pidgin/pidgin.inc b/packages/pidgin/pidgin.inc
index a2ef61a508..6eb29233fc 100644
--- a/packages/pidgin/pidgin.inc
+++ b/packages/pidgin/pidgin.inc
@@ -2,7 +2,7 @@ SECTION = "x11/network"
DESCRIPTION = "multi-protocol instant messaging client"
LICENSE = "GPL"
-DEPENDS = "avahi gtk+ ncurses gnutls virtual/libintl gstreamer dbus"
+DEPENDS = "startup-notification avahi gtk+ ncurses gnutls virtual/libintl gstreamer dbus"
RRECOMMENDS_${PN} = "libpurple-plugin-ssl-gnutls libpurple-protocol-irc libpurple-protocol-xmpp"
EXTRA_OECONF = " \
diff --git a/packages/pidgin/pidgin_2.4.2.bb b/packages/pidgin/pidgin_2.4.2.bb
new file mode 100644
index 0000000000..99b4563523
--- /dev/null
+++ b/packages/pidgin/pidgin_2.4.2.bb
@@ -0,0 +1,17 @@
+require pidgin.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+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 \
+ "
+
+EXTRA_OECONF += " --disable-gtkspell \
+ --disable-meanwhile \
+ --disable-nm \
+ "
+
+PR = "r0"
diff --git a/packages/pkgconfig/pkgconfig-0.22/sysroot-support.patch b/packages/pkgconfig/pkgconfig-0.22/sysrootfix.patch
index 2e4f796cc9..2e4f796cc9 100644
--- a/packages/pkgconfig/pkgconfig-0.22/sysroot-support.patch
+++ b/packages/pkgconfig/pkgconfig-0.22/sysrootfix.patch
diff --git a/packages/pkgconfig/pkgconfig-0.23/.mtn2git_empty b/packages/pkgconfig/pkgconfig-0.23/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/pkgconfig/pkgconfig-0.23/.mtn2git_empty
diff --git a/packages/pkgconfig/pkgconfig-0.23/autofoo.patch b/packages/pkgconfig/pkgconfig-0.23/autofoo.patch
new file mode 100644
index 0000000000..97895387f5
--- /dev/null
+++ b/packages/pkgconfig/pkgconfig-0.23/autofoo.patch
@@ -0,0 +1,526 @@
+---
+ glib-1.2.10/acglib.m4 | 12 +-
+ glib-1.2.10/configure.in | 212 ++++++++++++++++++++++++++++++------------------
+ 2 files changed, 140 insertions(+), 84 deletions(-)
+
+Index: pkg-config-0.23/glib-1.2.10/acglib.m4
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/acglib.m4 2008-01-16 22:52:24.000000000 +0000
++++ pkg-config-0.23/glib-1.2.10/acglib.m4 2008-03-26 20:59:12.000000000 +0000
+@@ -10,7 +10,7 @@
+ AC_DIVERT_POP()])])])
+
+ dnl GLIB_IF_VAR_EQ (ENV_VAR, VALUE [, EQUALS_ACTION] [, ELSE_ACTION])
+-AC_DEFUN(GLIB_IF_VAR_EQ,[
++AC_DEFUN([GLIB_IF_VAR_EQ],[
+ case "$[$1]" in
+ "[$2]"[)]
+ [$3]
+@@ -21,7 +21,7 @@
+ esac
+ ])
+ dnl GLIB_STR_CONTAINS (SRC_STRING, SUB_STRING [, CONTAINS_ACTION] [, ELSE_ACTION])
+-AC_DEFUN(GLIB_STR_CONTAINS,[
++AC_DEFUN([GLIB_STR_CONTAINS],[
+ case "[$1]" in
+ *"[$2]"*[)]
+ [$3]
+@@ -32,12 +32,12 @@
+ esac
+ ])
+ dnl GLIB_ADD_TO_VAR (ENV_VARIABLE, CHECK_STRING, ADD_STRING)
+-AC_DEFUN(GLIB_ADD_TO_VAR,[
++AC_DEFUN([GLIB_ADD_TO_VAR],[
+ GLIB_STR_CONTAINS($[$1], [$2], [$1]="$[$1]", [$1]="$[$1] [$3]")
+ ])
+
+ dnl GLIB_SIZEOF (INCLUDES, TYPE, ALIAS [, CROSS-SIZE])
+-AC_DEFUN(GLIB_SIZEOF,
++AC_DEFUN([GLIB_SIZEOF],
+ [changequote(<<, >>)dnl
+ dnl The name to #define.
+ define(<<AC_TYPE_NAME>>, translit(glib_sizeof_$3, [a-z *], [A-Z_P]))dnl
+@@ -62,7 +62,7 @@
+ ])
+
+ dnl GLIB_BYTE_CONTENTS (INCLUDES, TYPE, ALIAS, N_BYTES, INITIALIZER)
+-AC_DEFUN(GLIB_BYTE_CONTENTS,
++AC_DEFUN([GLIB_BYTE_CONTENTS],
+ [changequote(<<, >>)dnl
+ dnl The name to #define.
+ define(<<AC_TYPE_NAME>>, translit(glib_byte_contents_$3, [a-z *], [A-Z_P]))dnl
+@@ -92,7 +92,7 @@
+ ])
+
+ dnl GLIB_SYSDEFS (INCLUDES, DEFS_LIST, OFILE [, PREFIX])
+-AC_DEFUN(GLIB_SYSDEFS,
++AC_DEFUN([GLIB_SYSDEFS],
+ [glib_sysdefso="translit($3, [-_a-zA-Z0-9 *], [-_a-zA-Z0-9])"
+ glib_sysdef_msg=`echo $2 | sed 's/:[[^ ]]*//g'`
+ if test "x`(echo '\n') 2>/dev/null`" != 'x\n'; then
+Index: pkg-config-0.23/glib-1.2.10/configure.in
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/configure.in 2008-01-16 22:52:24.000000000 +0000
++++ pkg-config-0.23/glib-1.2.10/configure.in 2008-03-26 20:59:12.000000000 +0000
+@@ -1,10 +1,11 @@
+ dnl ***********************************
+ dnl *** include special GLib macros ***
+ dnl ***********************************
+-builtin(include, acglib.m4)dnl
++dnl no need, just use aclocal -I . --CL
++dnl builtin(include, acglib.m4)dnl
+
+ # require autoconf 2.13
+-AC_PREREQ(2.13)
++AC_PREREQ(2.53)
+
+ # init autoconf (and check for presence of glist.c)
+ AC_INIT(glist.c)
+@@ -13,11 +14,48 @@
+ cflags_set=${CFLAGS+set}
+
+ # we rewrite this file
++if test "x$cross_compiling" != "xyes"; then
+ rm -f glibconfig-sysdefs.h
++fi
++
++# config defines
++
++AH_TEMPLATE([ENABLE_MEM_CHECK],
++ [Define if enabling memory checking])
++AH_TEMPLATE([ENABLE_MEM_PROFILE], [])
++AH_TEMPLATE([GLIB_BINARY_AGE], [])
++AH_TEMPLATE([GLIB_BYTE_CONTENTS_GMUTEX], [])
++AH_TEMPLATE([GLIB_INTERFACE_AGE], [])
++AH_TEMPLATE([GLIB_MAJOR_VERSION], [])
++AH_TEMPLATE([GLIB_MINOR_VERSION], [])
++AH_TEMPLATE([GLIB_MICRO_VERSION], [])
++AH_TEMPLATE([GLIB_SIZEOF_GMUTEX], [])
++AH_TEMPLATE([G_COMPILED_WITH_DEBUGGING], [])
++AH_TEMPLATE([G_HAVE_INLINE], [])
++AH_TEMPLATE([G_HAVE___INLINE], [])
++AH_TEMPLATE([G_HAVE___INLINE__], [])
++AH_TEMPLATE([G_THREAD_SOURCE], [])
++AH_TEMPLATE([G_VA_COPY], [])
++AH_TEMPLATE([G_VA_COPY_AS_ARRAY], [])
++AH_TEMPLATE([HAVE_BROKEN_WCTYPE], [])
++AH_TEMPLATE([HAVE_GETPWUID_R], [])
++AH_TEMPLATE([HAVE_GETPWUID_R_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_COND_TIMEDWAIT_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_GETSPECIFIC_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX], [])
++AH_TEMPLATE([HAVE_WCHAR_H], [])
++AH_TEMPLATE([HAVE_WCTYPE_H], [])
++AH_TEMPLATE([NO_FD_SET], [])
++AH_TEMPLATE([NO_SYS_ERRLIST], [])
++AH_TEMPLATE([NO_SYS_SIGLIST], [])
++AH_TEMPLATE([NO_SYS_SIGLIST_DECL], [])
++AH_TEMPLATE([REALLOC_0_WORKS], [])
++
+
+ dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
+ dnl are available for $ac_help expansion (don't we all *love* autoconf?)
+-GLIB_AC_DIVERT_BEFORE_HELP([
++#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)
++#dnl
+ #
+ # The following version number definitions apply to GLib, GModule and GThread
+ # as a whole, so if changes occoured in any of them, they are all
+@@ -38,7 +76,7 @@
+ GLIB_BINARY_AGE=10
+ GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
+ dnl
+-])
++#AC_DIVERT_POP()dnl
+
+ AC_SUBST(GLIB_MAJOR_VERSION)
+ AC_SUBST(GLIB_MINOR_VERSION)
+@@ -72,22 +110,20 @@
+ AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE)
+
+ dnl Initialize libtool
+-AC_PROG_LIBTOOL
++AM_PROG_LIBTOOL
+
+ dnl Initialize maintainer mode
+ AM_MAINTAINER_MODE
+
+-AC_CANONICAL_HOST
+-
+ dnl figure debugging default, prior to $ac_help setup
+ dnl
+-GLIB_AC_DIVERT_BEFORE_HELP([
++#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+ if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then
+ debug_default=yes
+ else
+ debug_default=minimum
+ fi
+-]) dnl
++#AC_DIVERT_POP()dnl
+
+ dnl declare --enable-* args and collect ac_help strings
+ AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
+@@ -194,7 +230,9 @@
+ CFLAGS=$glib_save_CFLAGS
+ AC_MSG_WARN(
+ [No ANSI prototypes found in library. (-std1 didn't work.)])
++ , AC_MSG_WARN([Skipping test due to crosscompilation])
+ )
++ , AC_MSG_WARN([Skipping test due to crosscompilation])
+ )
+ LIBS=$glib_save_LIBS
+
+@@ -336,7 +374,7 @@
+ if test $gtk_ok = yes; then
+ AC_MSG_RESULT([yes, found in sys/types.h])
+ else
+- AC_HEADER_EGREP(fd_set, sys/select.h, gtk_ok=yes)
++ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
+ if test $gtk_ok = yes; then
+ AC_DEFINE(HAVE_SYS_SELECT_H)
+ AC_MSG_RESULT([yes, found in sys/select.h])
+@@ -409,7 +447,7 @@
+ glib_cv_sane_realloc=no
+ ,)
+ ])
+-if test x$glib_cv_sane_realloc = xyes; then
++if test "x$glib_cv_sane_realloc" = "xyes"; then
+ AC_DEFINE(REALLOC_0_WORKS)
+ fi
+ AC_MSG_RESULT($glib_cv_sane_realloc)
+@@ -487,7 +525,8 @@
+ ])
+ if test "x$glib_cv_va_copy" = "xyes"; then
+ AC_DEFINE(G_VA_COPY, va_copy)
+-else if test "x$glib_cv___va_copy" = "xyes"; then
++else
++if test "x$glib_cv___va_copy" = "xyes"; then
+ AC_DEFINE(G_VA_COPY, __va_copy)
+ fi
+ fi
+@@ -496,6 +535,7 @@
+ fi
+ AC_MSG_RESULT($glib_cv_va_val_copy)
+
++AC_MSG_WARN([hi mom])
+
+ dnl ***********************
+ dnl *** g_module checks ***
+@@ -507,23 +547,27 @@
+ G_MODULE_BROKEN_RTLD_GLOBAL=0
+ G_MODULE_HAVE_DLERROR=0
+ dnl *** dlopen() and dlsym() in system libraries
++AC_CHECK_FUNC(dlopen,[
++ AC_CHECK_FUNC(dlsym,[
++ G_MODULE_IMPL=G_MODULE_IMPL_DL
++ ],
++ )],
++)
+ if test -z "$G_MODULE_IMPL"; then
+- AC_CHECK_FUNC(dlopen,
+- [AC_CHECK_FUNC(dlsym,
++ AC_CHECK_FUNC(dlopen,[
++ AC_CHECK_FUNC(dlsym,[
+ G_MODULE_IMPL=G_MODULE_IMPL_DL
+- ,)]
+- ,)
+-
++ ])],
++ )
+ fi
+-
+ dnl *** dlopen() and dlsym() in libdl
+ if test -z "$G_MODULE_IMPL"; then
+- AC_CHECK_LIB(dl, dlopen,
+- [AC_CHECK_LIB(dl, dlsym,
++ AC_CHECK_LIB(dl, dlopen,[
++ AC_CHECK_LIB(dl, dlsym,[
+ G_MODULE_LIBS=-ldl
+ G_MODULE_IMPL=G_MODULE_IMPL_DL
+- ,)]
+- ,)
++ ])]
++ )
+ fi
+ dnl *** shl_load() in libdld (HP-UX)
+ if test -z "$G_MODULE_IMPL"; then
+@@ -633,6 +677,7 @@
+ AC_SUBST(G_MODULE_NEED_USCORE)
+ AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
+ AC_SUBST(GLIB_DEBUG_FLAGS)
++AC_MSG_WARN([hi mom])
+
+
+ dnl ***********************
+@@ -869,40 +914,50 @@
+ fi
+ if test x"$have_threads" = xposix; then
+ LIBS="$LIBS $G_THREAD_LIBS"
+- AC_MSG_CHECKING(whether pthread_getspecific is posix like)
+ # PCThreads has pthread_getspecific(pthread_key_t, void **);
+- AC_TRY_COMPILE([#include <pthread.h>],
+- [pthread_getspecific(0,NULL);],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
+- AC_MSG_CHECKING(whether pthread_mutex_trylock is posix like)
++ AC_CACHE_CHECK([whether pthread_getspecific is posix like],
++ [glib_cv_sys_pthread_getspecific_posix],
++ AC_TRY_COMPILE([#include <pthread.h>],
++ [pthread_getspecific(0,NULL);],
++ [glib_cv_sys_pthread_getspecific_posix=no],
++ [glib_cv_sys_pthread_getspecific_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_getspecific_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)
++ fi
+ # DCE Threads return 1 as success, posix 0. what a mess.
+- AC_TRY_RUN([#include <pthread.h>
+- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+- int main () {
+- return !pthread_mutex_trylock (&mutex); }],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
+- AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
++ AC_CACHE_CHECK([whether pthread_mutex_trylock is posix like],
++ [glib_cv_sys_pthread_mutex_trylock_posix],
++ AC_TRY_RUN([#include <pthread.h>
++ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
++ int main () {
++ return !pthread_mutex_trylock (&mutex); }],
++ [glib_cv_sys_pthread_mutex_trylock_posix=no],
++ [glib_cv_sys_pthread_mutex_trylock_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_mutex_trylock_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)
++ fi
+ # DCE Threads return -1 as failure, posix ETIMEDOUT.
+- AC_TRY_RUN([#include <pthread.h>
+- #include <sys/time.h>
+- int main () {
+- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
+- struct timeval tval;
+- struct timespec tspec;
+- gettimeofday (&tval, NULL);
+- tspec.tv_sec = tval.tv_sec;
+- tspec.tv_nsec = 0;
+- pthread_mutex_lock (&mutex);
+- return pthread_cond_timedwait (&cond,&mutex,&tspec)
+- != -1;}],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
++ AC_CACHE_CHECK([whether pthread_cond_timedwait is posix like],
++ [glib_cv_sys_pthread_cond_timedwait_posix],
++ AC_TRY_RUN([#include <pthread.h>
++ int main () {
++ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
++ pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
++ struct timeval tval;
++ struct timespec tspec;
++ gettimeofday (&tval, NULL);
++ tspec.tv_sec = tval.tv_sec;
++ tspec.tv_nsec = 0;
++ return pthread_cond_timedwait (&cond,&mutex,&tspec)
++ != -1;}],
++ [glib_cv_sys_pthread_cond_timedwait_posix=no],
++ [glib_cv_sys_pthread_cond_timedwait_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_cond_timedwait_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)
++ fi
+ fi
+ LIBS="$glib_save_LIBS"
+ CFLAGS="$glib_save_CFLAGS"
+@@ -946,13 +1001,14 @@
+ dnl ****************************************
+ dnl *** GLib POLL* compatibility defines ***
+ dnl ****************************************
++if test x"$cross_compiling" != xyes; then
+ GLIB_SYSDEFS(
+ [#include <sys/types.h>
+ #include <sys/poll.h>],
+ POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
+ glibconfig-sysdefs.h,
+ =)
+-
++fi
+
+ dnl ******************************
+ dnl *** output the whole stuff ***
+@@ -1005,7 +1061,7 @@
+ echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
+ fi
+
+- cat >> $outfile <<_______EOF
++ cat >> $outfile <<EOF
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -1022,60 +1078,60 @@
+ #define G_MINLONG $glib_ml
+ #define G_MAXLONG $glib_Ml
+
+-_______EOF
++EOF
+
+
+ ### this should always be true in a modern C/C++ compiler
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed char gint8;
+ typedef unsigned char guint8;
+-_______EOF
++EOF
+
+
+ if test -n "$gint16"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed $gint16 gint16;
+ typedef unsigned $gint16 guint16;
+-_______EOF
++EOF
+ fi
+
+
+ if test -n "$gint32"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed $gint32 gint32;
+ typedef unsigned $gint32 guint32;
+-_______EOF
++EOF
+ fi
+
+
+ if test -n "$gint64"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ ${glib_warning_guard}#define G_HAVE_GINT64 1
+
+ ${glib_extension}typedef signed $gint64 gint64;
+ ${glib_extension}typedef unsigned $gint64 guint64;
+
+ #define G_GINT64_CONSTANT(val) $gint64_constant
+-_______EOF
++EOF
+ fi
+
+
+ if test -z "$glib_unknown_void_p"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+
+ #define GPOINTER_TO_INT(p) ((gint) ${glib_gpi_cast} (p))
+ #define GPOINTER_TO_UINT(p) ((guint) ${glib_gpui_cast} (p))
+
+ #define GINT_TO_POINTER(i) ((gpointer) ${glib_gpi_cast} (i))
+ #define GUINT_TO_POINTER(u) ((gpointer) ${glib_gpui_cast} (u))
+-_______EOF
++EOF
+ else
+ echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
+ fi
+
+
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $glib_atexit
+ $glib_memmove
+ $glib_defines
+@@ -1087,11 +1143,11 @@
+ #else /* !__cplusplus */
+ $glib_inline
+ #endif /* !__cplusplus */
+-_______EOF
++EOF
+
+ echo >>$outfile
+ if test x$g_mutex_has_default = xyes; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $g_enable_threads_def G_THREADS_ENABLED
+ #define G_THREADS_IMPL_$g_threads_impl_def
+ typedef struct _GStaticMutex GStaticMutex;
+@@ -1109,15 +1165,15 @@
+ #define g_static_mutex_get_mutex(mutex) \
+ (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
+ g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
+-_______EOF
++EOF
+ else
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $g_enable_threads_def G_THREADS_ENABLED
+ #define G_THREADS_IMPL_$g_threads_impl_def
+ typedef struct _GMutex* GStaticMutex;
+ #define G_STATIC_MUTEX_INIT NULL
+ #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
+-_______EOF
++EOF
+ fi
+
+ echo >>$outfile
+@@ -1126,15 +1182,15 @@
+ g_bit_sizes="$g_bit_sizes 64"
+ fi
+ for bits in $g_bit_sizes; do
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ #define GINT${bits}_TO_${g_bs_native}(val) ((gint${bits}) (val))
+ #define GUINT${bits}_TO_${g_bs_native}(val) ((guint${bits}) (val))
+ #define GINT${bits}_TO_${g_bs_alien}(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
+ #define GUINT${bits}_TO_${g_bs_alien}(val) (GUINT${bits}_SWAP_LE_BE (val))
+-_______EOF
++EOF
+ done
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ #define GLONG_TO_LE(val) ((glong) GINT${glongbits}_TO_LE (val))
+ #define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
+ #define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val))
+@@ -1145,14 +1201,14 @@
+ #define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
+ #define G_BYTE_ORDER $g_byte_order
+
+-_______EOF
++EOF
+
+ if test -r glibconfig-sysdefs.h; then
+ cat glibconfig-sysdefs.h >>$outfile
+ fi
+
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+
+ $glib_wc
+
+@@ -1162,7 +1218,7 @@
+ #endif /* __cplusplus */
+
+ #endif /* GLIBCONFIG_H */
+-_______EOF
++EOF
+
+
+ if cmp -s $outfile glibconfig.h; then
+Index: pkg-config-0.23/glib-1.2.10/glib.m4
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/glib.m4 2008-04-14 23:34:39.000000000 +0100
++++ pkg-config-0.23/glib-1.2.10/glib.m4 2008-04-14 09:26:29.000000000 +0100
+@@ -5,7 +5,7 @@
+ dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
+ dnl gthread is specified in MODULES, pass to glib-config
+ dnl
+-AC_DEFUN(AM_PATH_GLIB,
++AC_DEFUN([AM_PATH_GLIB],
+ [dnl
+ dnl Get the cflags and libraries from the glib-config script
+ dnl
diff --git a/packages/pkgconfig/pkgconfig-0.23/glibconfig-sysdefs.h b/packages/pkgconfig/pkgconfig-0.23/glibconfig-sysdefs.h
new file mode 100644
index 0000000000..1329e7f21c
--- /dev/null
+++ b/packages/pkgconfig/pkgconfig-0.23/glibconfig-sysdefs.h
@@ -0,0 +1,6 @@
+#define GLIB_SYSDEF_POLLIN =1
+#define GLIB_SYSDEF_POLLOUT =4
+#define GLIB_SYSDEF_POLLPRI =2
+#define GLIB_SYSDEF_POLLERR =8
+#define GLIB_SYSDEF_POLLHUP =16
+#define GLIB_SYSDEF_POLLNVAL =32
diff --git a/packages/pkgconfig/pkgconfig-0.23/sysrootfix.patch b/packages/pkgconfig/pkgconfig-0.23/sysrootfix.patch
new file mode 100644
index 0000000000..c5ee82e9aa
--- /dev/null
+++ b/packages/pkgconfig/pkgconfig-0.23/sysrootfix.patch
@@ -0,0 +1,31 @@
+Index: pkg-config-0.23/pkg.c
+===================================================================
+--- pkg-config-0.23.orig/pkg.c 2008-03-26 22:18:39.000000000 +0000
++++ pkg-config-0.23/pkg.c 2008-03-26 22:31:11.000000000 +0000
+@@ -472,19 +472,15 @@
+ while (tmp != NULL)
+ {
+ char *tmpstr = (char*) tmp->data;
+- if (pcsysrootdir != NULL)
++ if (pcsysrootdir != NULL && tmpstr[0] == '-' &&
++ (tmpstr[1] == 'I' || tmpstr[1] == 'L'))
+ {
+- if (tmpstr[0] == '-' &&
+- (tmpstr[1] == 'I' ||
+- tmpstr[1] == 'L'))
+- {
+- g_string_append_c (str, '-');
+- g_string_append_c (str, tmpstr[1]);
+- g_string_append (str, pcsysrootdir);
+- g_string_append (str, tmpstr+2);
+- }
++ g_string_append_c (str, '-');
++ g_string_append_c (str, tmpstr[1]);
++ g_string_append (str, pcsysrootdir);
++ g_string_append (str, tmpstr+2);
+ }
+- else
++ else
+ {
+ g_string_append (str, tmpstr);
+ }
diff --git a/packages/pkgconfig/pkgconfig-native_0.23.bb b/packages/pkgconfig/pkgconfig-native_0.23.bb
new file mode 100644
index 0000000000..c4028ab43c
--- /dev/null
+++ b/packages/pkgconfig/pkgconfig-native_0.23.bb
@@ -0,0 +1,8 @@
+require pkgconfig.inc
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/pkgconfig-${PV}"
+
+DEFAULT_PREFERENCE = "-1"
+
+S = "${WORKDIR}/pkg-config-${PV}/"
+inherit native
+DEPENDS = ""
diff --git a/packages/pkgconfig/pkgconfig-sdk_0.23.bb b/packages/pkgconfig/pkgconfig-sdk_0.23.bb
new file mode 100644
index 0000000000..3b20371777
--- /dev/null
+++ b/packages/pkgconfig/pkgconfig-sdk_0.23.bb
@@ -0,0 +1,6 @@
+require pkgconfig.inc
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/pkgconfig-${PV}"
+
+S = "${WORKDIR}/pkg-config-${PV}/"
+inherit sdk
+DEPENDS = ""
diff --git a/packages/pkgconfig/pkgconfig.inc b/packages/pkgconfig/pkgconfig.inc
index a246c8750f..939199bc37 100644
--- a/packages/pkgconfig/pkgconfig.inc
+++ b/packages/pkgconfig/pkgconfig.inc
@@ -5,10 +5,11 @@ It replaces the ubiquitous *-config scripts you may have \
seen with a single tool."
HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/"
LICENSE = "GPL"
-PR = "r2"
+PR = "r7"
SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \
- file://sysroot-support.patch;patch=1 \
+ file://autofoo.patch;patch=1 \
+ file://sysrootfix.patch;patch=1 \
file://glibconfig-sysdefs.h"
S = "${WORKDIR}/pkg-config-${PV}/"
@@ -17,7 +18,7 @@ inherit autotools
acpaths = "-I ."
do_configure_prepend () {
- install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h glib-1.2.8/
+ install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h glib-1.2.*/
}
do_stage_prepend() {
diff --git a/packages/pkgconfig/pkgconfig_0.22.bb b/packages/pkgconfig/pkgconfig_0.22.bb
index 599e1c815e..a0f5241a12 100644
--- a/packages/pkgconfig/pkgconfig_0.22.bb
+++ b/packages/pkgconfig/pkgconfig_0.22.bb
@@ -1,3 +1,2 @@
require pkgconfig.inc
-SRC_URI += "file://autofoo.patch;patch=1"
diff --git a/packages/pkgconfig/pkgconfig_0.23.bb b/packages/pkgconfig/pkgconfig_0.23.bb
new file mode 100644
index 0000000000..154e302844
--- /dev/null
+++ b/packages/pkgconfig/pkgconfig_0.23.bb
@@ -0,0 +1,6 @@
+require pkgconfig.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+DEPENDS += "glib-2.0"
+EXTRA_OECONF = "--with-installed-glib"
diff --git a/packages/powertop/powertop_1.9.bb b/packages/powertop/powertop_1.10.bb
index ab84161ddc..0b2d4ffa05 100644
--- a/packages/powertop/powertop_1.9.bb
+++ b/packages/powertop/powertop_1.10.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.linuxpowertop.org/"
LICENSE = "GPLv2"
DEPENDS = "ncurses"
-SRC_URI = "http://www.linuxpowertop.org/download/powertop-${PV}.tar.gz"
+SRC_URI = "http://www.lesswatts.org/projects/powertop/download/powertop-${PV}.tar.gz"
CFLAGS += "${LDFLAGS}"
diff --git a/packages/pulseaudio/files/asound.conf.pulseaudio b/packages/pulseaudio/files/asound.conf.pulseaudio
new file mode 100644
index 0000000000..71f01f2c3c
--- /dev/null
+++ b/packages/pulseaudio/files/asound.conf.pulseaudio
@@ -0,0 +1,7 @@
+pcm.pulse {
+ type pulse
+}
+
+ctl.pulse {
+ type pulse
+}
diff --git a/packages/pulseaudio/padevchooser_0.9.3.bb b/packages/pulseaudio/padevchooser_0.9.3.bb
new file mode 100644
index 0000000000..535e871242
--- /dev/null
+++ b/packages/pulseaudio/padevchooser_0.9.3.bb
@@ -0,0 +1,9 @@
+DESCRIPTION = "PulseAudio Device Chooser (padevchooser) is a simple GTK tool which registers an icon in the tray area and allows quick access to some features of the PulseAudio sound server"
+LICENSE = "GPLv2"
+DEPENDS = "gtk+ libnotify gconf pulseaudio"
+
+SRC_URI = "http://0pointer.de/lennart/projects/padevchooser/padevchooser-${PV}.tar.gz"
+
+inherit autotools
+
+
diff --git a/packages/pulseaudio/pulseaudio-0.9.10/2113.diff b/packages/pulseaudio/pulseaudio-0.9.10/2113.diff
new file mode 100644
index 0000000000..666ed34ad3
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-0.9.10/2113.diff
@@ -0,0 +1,19 @@
+from upstream svn r2113
+
+Index: configure.ac
+===================================================================
+--- configure.ac (wersja 2112)
++++ configure.ac (wersja 2113)
+@@ -172,6 +172,12 @@
+ AC_SUBST(LIBLTDL)
+ AC_CONFIG_SUBDIRS(libltdl)
+
++old_LIBS=$LIBS
++LIBS="$LIBS $LIBLTDL"
++AC_CHECK_FUNCS([lt_dlmutex_register])
++LIBS=$old_LIBS
++AC_CHECK_TYPES([lt_user_dlloader, lt_dladvise], , , [#include <ltdl.h>])
++
+ if test "x$enable_ltdl_install" = "xno" && test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then
+ AC_MSG_ERROR([[
+
diff --git a/packages/pulseaudio/pulseaudio-0.9.10/2114.diff b/packages/pulseaudio/pulseaudio-0.9.10/2114.diff
new file mode 100644
index 0000000000..cbd82eeb84
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-0.9.10/2114.diff
@@ -0,0 +1,15 @@
+from upstream svn r2114
+
+Index: configure.ac
+===================================================================
+--- configure.ac (wersja 2113)
++++ configure.ac (wersja 2114)
+@@ -176,7 +176,7 @@
+ LIBS="$LIBS $LIBLTDL"
+ AC_CHECK_FUNCS([lt_dlmutex_register])
+ LIBS=$old_LIBS
+-AC_CHECK_TYPES([lt_user_dlloader, lt_dladvise], , , [#include <ltdl.h>])
++AC_CHECK_TYPES([struct lt_user_dlloader, lt_dladvise], , , [#include <ltdl.h>])
+
+ if test "x$enable_ltdl_install" = "xno" && test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then
+ AC_MSG_ERROR([[
diff --git a/packages/pulseaudio/pulseaudio-0.9.10/libtool2.patch b/packages/pulseaudio/pulseaudio-0.9.10/libtool2.patch
new file mode 100644
index 0000000000..9e9e5f55d3
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-0.9.10/libtool2.patch
@@ -0,0 +1,48 @@
+Tell where is libltdl from libtool - was needed to get it built with libtool 2.2.4
+
+---
+ configure.ac | 26 +++++++++++++++++++-------
+ 1 file changed, 19 insertions(+), 7 deletions(-)
+
+--- pulseaudio-0.9.10.orig/configure.ac
++++ pulseaudio-0.9.10/configure.ac
+@@ -242,20 +242,32 @@ if test $ret -eq 0 ; then
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ #### libtool stuff ####
+-
+-AC_LTDL_ENABLE_INSTALL
+-AC_LIBLTDL_INSTALLABLE
+-AC_LIBTOOL_DLOPEN
+-AC_LIBTOOL_WIN32_DLL
++LT_PREREQ([2.2])
++LT_INIT([dlopen win32-dll])
+ AC_PROG_LIBTOOL
+-AC_SUBST(LTDLINCL)
+-AC_SUBST(LIBLTDL)
++#AC_SUBST(LTDLINCL)
++#AC_SUBST(LIBLTDL)
+ AC_CONFIG_SUBDIRS(libltdl)
+
++AC_ARG_WITH(libltdl-libs,
++ [ --with-libltdl-libs=DIR path to libltdl libs], libltdl_libs_prefix=$withval)
++if test x$libltdl_libs_prefix != x; then
++ LIBLTDL="-L${libltdl_libs_prefix}/libltdl.so -lltdl"
++fi
++AC_SUBST(LIBLTDL)
++
++AC_ARG_WITH(libltdl-includes,
++ [ --with-libltdl-includes=DIR path to libltdl includes], libltdl_prefix=$withval)
++if test x$libltdl_prefix != x; then
++ LTDLINCL="-I${libltdl_prefix} ${libltdl_libs_prefix}/libltdl.so"
++fi
++AC_SUBST(LTDLINCL)
++
++
+ old_LIBS=$LIBS
+ LIBS="$LIBS $LIBLTDL"
+ AC_CHECK_FUNCS([lt_dlmutex_register])
+ LIBS=$old_LIBS
+ AC_CHECK_TYPES([struct lt_user_dlloader, lt_dladvise], , , [#include <ltdl.h>])
diff --git a/packages/pulseaudio/pulseaudio-alsa-wrapper.bb b/packages/pulseaudio/pulseaudio-alsa-wrapper.bb
new file mode 100644
index 0000000000..e555d50075
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-alsa-wrapper.bb
@@ -0,0 +1,43 @@
+DESCRIPTION = "Meta package to make alsa transparently use pulseaudio"
+LICENSE = "GPLv2"
+
+PR = "r1"
+
+SRC_URI = "file://asound.conf.pulseaudio"
+
+RDEPENDS = "hal \
+ pulseaudio-server \
+ pulseaudio-misc \
+ pulseaudio-module-alsa-sink \
+ pulseaudio-module-alsa-source \
+ pulseaudio-module-hal-detect \
+ pulseaudio-module-volume-restore \
+ pulseaudio-module-default-device-restore \
+ pulseaudio-module-rescue-streams \
+ pulseaudio-module-suspend-on-idle \
+ libasound-module-ctl-pulse \
+ libasound-module-pcm-pulse \
+"
+
+do_install() {
+ install -d ${D}/${sysconfdir}
+ install -m 0644 ${WORKDIR}/asound.conf.pulseaudio ${D}/${sysconfdir}
+}
+
+PACKAGE_ARCH = "all"
+
+pkg_postinst_${PN} () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+ exit 1
+fi
+
+mkdir -p /etc/pulse || true
+# Remove existing entries
+if [ -e /etc/pulse/session ] ; then
+ sed -i -e /load-module\ module-hal-detect/d /etc/pulse/session
+fi
+# Load hal-detect module to avoid alsa->pulse-alsa-pulse->.. loops
+echo "load-module module-hal-detect" >> /etc/pulse/session
+}
+
diff --git a/packages/pulseaudio/pulseaudio-esd-wrapper.bb b/packages/pulseaudio/pulseaudio-esd-wrapper.bb
new file mode 100644
index 0000000000..d1ae362c14
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-esd-wrapper.bb
@@ -0,0 +1,42 @@
+DESCRIPTION = "Drop-in Esound replacement"
+LICENSE = "GPLv2"
+
+PR = "r1"
+
+RCONFLICTS = "esd"
+RREPLACES = "esd"
+
+RDEPENDS = " \
+ pulseaudio-server \
+ pulseaudio-misc \
+ pulseaudio-lib-protocol-esound \
+ pulseaudio-module-esound-compat-spawnfd \
+ pulseaudio-module-esound-compat-spawnpid \
+ pulseaudio-module-esound-protocol-tcp \
+ pulseaudio-module-esound-protocol-unix \
+"
+
+do_install() {
+ install -d ${D}/${bindir}
+ ln -sf ${bindir}/esdcompat ${D}/${bindir}/esd
+}
+
+
+PACKAGE_ARCH = "all"
+
+pkg_postinst_${PN} () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+ exit 1
+fi
+
+mkdir -p /etc/pulse || true
+# Remove existing entries
+if [ -e /etc/pulse/session ] ; then
+ sed -i -e /load-module\ module-esound-protocol-unix/d -e /load-module\ module-esound-protocol-tcp/d /etc/pulse/session
+fi
+# Load esound modules
+echo "load-module module-esound-protocol-tcp" >> /etc/pulse/session
+echo "load-module module-esound-protocol-unix" >> /etc/pulse/session
+}
+
diff --git a/packages/pulseaudio/pulseaudio-meta/.mtn2git_empty b/packages/pulseaudio/pulseaudio-meta/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-meta/.mtn2git_empty
diff --git a/packages/pulseaudio/pulseaudio-meta/asound.conf b/packages/pulseaudio/pulseaudio-meta/asound.conf
new file mode 100644
index 0000000000..b435184575
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-meta/asound.conf
@@ -0,0 +1,8 @@
+# set default output to pulseaudio
+pcm.!default {
+ type pulse
+}
+
+ctl.!default {
+ type pulse
+}
diff --git a/packages/pulseaudio/pulseaudio-meta/pulseaudio b/packages/pulseaudio/pulseaudio-meta/pulseaudio
new file mode 100755
index 0000000000..964947376e
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-meta/pulseaudio
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# pulseaudio This shell script starts and stops pulseaudio.
+#
+# chkconfig: 345 90 40
+# description: Pulseaudio manages the sound input/output
+# processname: pulseaudio
+
+# Source function library.
+#. /etc/rc.d/init.d/functions
+
+RETVAL=0
+prog="pulseaudio"
+
+start() {
+ echo -n "Starting audio server: "
+ # FIXME once alsa/shm permissions have been fixed, supply --system
+ start-stop-daemon -S -x /usr/bin/pulseaudio -- --no-cpu-limit --resample-method=trivial -D -nF /etc/pulse/session
+
+ if [ $? = 0 ]; then
+ echo "$prog (warning ignores)." # FIXME remove comment on warning
+ else
+ echo "(failed.)"
+ fi
+}
+
+stop() {
+ echo -n "Stopping audio server: "
+ start-stop-daemon -K -x /usr/bin/pulseaudio
+ echo "pulseaudio."
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ stop
+ start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $RETVAL
diff --git a/packages/pulseaudio/pulseaudio-meta/session b/packages/pulseaudio/pulseaudio-meta/session
new file mode 100644
index 0000000000..55f2c16f26
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-meta/session
@@ -0,0 +1,36 @@
+#!/usr/bin/pulseaudio -nF
+
+#
+# Barebones PA Session File for Devices w/ ALSA
+# (C) Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+#
+
+# Create autoload entries for the device drivers
+add-autoload-sink output module-alsa-sink device=hw:0 sink_name=output
+add-autoload-source input module-alsa-source device=hw:0 source_name=input
+
+# Core protocols
+load-module module-esound-protocol-unix
+load-module module-simple-protocol-tcp
+load-module module-native-protocol-unix
+load-module module-cli-protocol-unix
+
+# Suspend on idle
+load-module module-suspend-on-idle
+
+# Set default sink and source
+set-default-sink output
+set-default-source input
+
+# Don't fail if the audio files referred to below don't exist
+.nofail
+
+# Load an audio to the sample cache for usage with module-x11-bell
+#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_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/pulseaudio/pulseaudio-meta_0.9.10.bb b/packages/pulseaudio/pulseaudio-meta_0.9.10.bb
new file mode 100644
index 0000000000..0f1dd6a5b6
--- /dev/null
+++ b/packages/pulseaudio/pulseaudio-meta_0.9.10.bb
@@ -0,0 +1,44 @@
+DESCRIPTION = "Pulseaudio Meta package w/ initscript et. al."
+SECTION = "audio"
+RDEPENDS = "\
+ pulseaudio-server \
+ pulseaudio-module-alsa-sink \
+ pulseaudio-module-alsa-source \
+ pulseaudio-module-cli \
+ pulseaudio-module-esound-protocol-unix \
+ pulseaudio-module-simple-protocol-tcp \
+ pulseaudio-module-native-protocol-unix \
+ pulseaudio-module-cli-protocol-unix \
+ pulseaudio-module-suspend-on-idle \
+ gst-plugin-pulse \
+ libasound-module-ctl-pulse \
+ libasound-module-pcm-pulse \
+"
+PR = "r1"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "pulseaudio"
+INITSCRIPT_PARAMS = "defaults 35"
+
+SRC_URI = "\
+ file://pulseaudio \
+ file://session \
+ file://asound.conf \
+"
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/pulseaudio ${D}/${sysconfdir}/init.d/
+ install -d ${D}/${sysconfdir}/pulse
+ install -m 0755 ${WORKDIR}/session ${D}/${sysconfdir}/pulse/session
+ install -m 0644 ${WORKDIR}/asound.conf ${D}/${sysconfdir}
+}
+
+PACKAGE_ARCH = "all"
+
+CONFFILES_${PN} = "\
+ ${sysconfdir}/pulse/session \
+ ${sysconfdir}/asound.conf \
+"
diff --git a/packages/pulseaudio/pulse.inc b/packages/pulseaudio/pulseaudio.inc
index 4b13980cc4..4b13980cc4 100644
--- a/packages/pulseaudio/pulse.inc
+++ b/packages/pulseaudio/pulseaudio.inc
diff --git a/packages/pulseaudio/pulseaudio_0.9.10.bb b/packages/pulseaudio/pulseaudio_0.9.10.bb
index 5a445a45cb..8c858f9015 100644
--- a/packages/pulseaudio/pulseaudio_0.9.10.bb
+++ b/packages/pulseaudio/pulseaudio_0.9.10.bb
@@ -1,16 +1,26 @@
-require pulse.inc
+require pulseaudio.inc
DEPENDS += "dbus"
-PR = "r1"
+PR = "r3"
-# this is not correct (see below)
SRC_URI += "\
file://disable-using-glibc-tls.patch;patch=1 \
file://libpulsedsp-references-libpulsecore.patch;patch=1 \
file://pa-drop-caps-returns-void.patch;patch=1 \
+# file://libtool2.patch;patch=1 \
+ file://2113.diff;patch=1;pnum=0 \
+ file://2114.diff;patch=1;pnum=0 \
"
+do_compile_prepend() {
+ cd ${S}
+ mkdir -p ${S}/libltdl
+ cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+}
+
+
# problems w/ pulseaudio 0.9.10 atm:
# 1.) needs libltdl >= 1.5.24 (yes, any older version will NOT work at runtime)
# 2.) doesn't build w/ glibc TLS support (hence patched out)
# 3.) fails with hierarchical pthread stuff w/ gst-pulse (hence patched out)
+
diff --git a/packages/pulseaudio/pulseaudio_0.9.6.bb b/packages/pulseaudio/pulseaudio_0.9.6.bb
index 56b717aac7..8944b664c0 100644
--- a/packages/pulseaudio/pulseaudio_0.9.6.bb
+++ b/packages/pulseaudio/pulseaudio_0.9.6.bb
@@ -1,4 +1,4 @@
-require pulse.inc
+require pulseaudio.inc
-PR = "r7"
+PR = "r8"
diff --git a/packages/pulseaudio/pulseaudio_0.9.9.bb b/packages/pulseaudio/pulseaudio_0.9.9.bb
index f38595e5dd..764f891654 100644
--- a/packages/pulseaudio/pulseaudio_0.9.9.bb
+++ b/packages/pulseaudio/pulseaudio_0.9.9.bb
@@ -1,7 +1,7 @@
-require pulse.inc
+require pulseaudio.inc
DEPENDS += "dbus"
-PR = "r4"
+PR = "r5"
# this is not correct (see below)
SRC_URI += "\
diff --git a/packages/python/python-etk_git.bb b/packages/python/python-etk_git.bb
index 3c2cb71d7e..8f266449d9 100644
--- a/packages/python/python-etk_git.bb
+++ b/packages/python/python-etk_git.bb
@@ -1,11 +1,10 @@
-DESCRIPTION = "Python etk binding"
-require python-efl.inc
-DEPENDS += "etk python-setuptools python-ecore python-cython python-edje"
-RDEPENDS += "etk python-cython python-evas python-ecore python-edje python-numeric python-math etk-themes"
-PR = "r0.01"
+require python-efl.inc
+DEPENDS += "etk"
+RDEPENDS += "python-evas python-ecore python-edje python-numeric python-math etk-themes"
+PV = "0.0.0+git${SRCREV}"
+PR = "r1"
SRC_URI = "git://staff.get-e.org/users/cmarcelo/python-etk.git;protocol=git"
-
S = "${WORKDIR}/git"
do_stage() {
diff --git a/packages/python/python-flup_1.0.bb b/packages/python/python-flup_1.0.bb
new file mode 100644
index 0000000000..963c1ca6c2
--- /dev/null
+++ b/packages/python/python-flup_1.0.bb
@@ -0,0 +1,10 @@
+DESCRIPTION = "Random assortment of WSGI servers"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "BSD"
+SRCNAME = "flup"
+
+SRC_URI = "http://pypi.python.org/packages/source/f/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools
diff --git a/packages/python/python-gst/import-gobject-instead-of-pygtk.patch b/packages/python/python-gst/import-gobject-instead-of-pygtk.patch
new file mode 100644
index 0000000000..b4dafa1cea
--- /dev/null
+++ b/packages/python/python-gst/import-gobject-instead-of-pygtk.patch
@@ -0,0 +1,19 @@
+Index: gst-python-0.10.10/gst/__init__.py
+===================================================================
+--- gst-python-0.10.10.orig/gst/__init__.py
++++ gst-python-0.10.10/gst/__init__.py
+@@ -28,13 +28,8 @@ try:
+ except:
+ pass
+
+-import sys
++import sys, gobject
+
+-# we always require 2.0 of pygtk; so if pygtk is not imported anywhere
+-# yet, we import pygtk here and .require
+-if 'gobject' not in sys.modules:
+- import pygtk
+- pygtk.require('2.0')
+
+ class Value:
+ def __init__(self, type):
diff --git a/packages/python/python-gst_0.10.10.bb b/packages/python/python-gst_0.10.10.bb
index 59cc6ad268..ea2b10095a 100644
--- a/packages/python/python-gst_0.10.10.bb
+++ b/packages/python/python-gst_0.10.10.bb
@@ -2,10 +2,13 @@ DESCRIPTION = "Python Gstreamer bindings"
SECTION = "devel/python"
LICENSE = "LGPL"
DEPENDS = "gstreamer gst-plugins-base python-pygobject"
-PR = "ml1"
+PR = "ml2"
-SRC_URI = "http://gstreamer.freedesktop.org/src/gst-python/gst-python-${PV}.tar.bz2 \
- file://python-path.patch;patch=1"
+SRC_URI = "\
+ http://gstreamer.freedesktop.org/src/gst-python/gst-python-${PV}.tar.bz2 \
+ file://python-path.patch;patch=1 \
+ file://import-gobject-instead-of-pygtk.patch;patch=1 \
+"
S = "${WORKDIR}/gst-python-${PV}"
inherit autotools distutils-base pkgconfig
@@ -30,3 +33,4 @@ FILES_${PN}-dev += "\
"
FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/gst-0.10/gst/.debug/"
FILES_${PN}-examples = "${datadir}/gst-python/0.10/examples"
+
diff --git a/packages/python/python-pyalsa_1.0.16.bb b/packages/python/python-pyalsa_1.0.16.bb
new file mode 100644
index 0000000000..f98e144c75
--- /dev/null
+++ b/packages/python/python-pyalsa_1.0.16.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "Support for the Linux 2.6.x ALSA Sound System"
+SECTION = "devel/python"
+DEPENDS = "alsa-lib"
+PRIORITY = "optional"
+LICENSE = "GPL"
+SRCNAME = "pyalsa"
+PR = "ml0"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/${SRCNAME}/${SRCNAME}-${PV}.tar.bz2"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils
diff --git a/packages/python/python-pyalsaaudio_0.3.bb b/packages/python/python-pyalsaaudio_0.3.bb
new file mode 100644
index 0000000000..42b15ce5be
--- /dev/null
+++ b/packages/python/python-pyalsaaudio_0.3.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "Support for the Linux 2.6.x ALSA Sound System"
+SECTION = "devel/python"
+DEPENDS = "alsa-lib"
+PRIORITY = "optional"
+LICENSE = "GPL"
+SRCNAME = "pyalsaaudio"
+PR = "ml0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pyalsaaudio/${SRCNAME}-${PV}.tar.gz"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils
diff --git a/packages/python/python-pygobject-native_2.12.3.bb b/packages/python/python-pygobject-native_2.12.3.bb
deleted file mode 100644
index 3b8c204c7f..0000000000
--- a/packages/python/python-pygobject-native_2.12.3.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require python-pygobject_${PV}.bb
-
-DEPENDS = "python-native glib-2.0-native"
-
-MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
-SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 "
-
-inherit native
diff --git a/packages/python/python-pygobject-native_2.14.2.bb b/packages/python/python-pygobject-native_2.14.2.bb
new file mode 100644
index 0000000000..70af95259c
--- /dev/null
+++ b/packages/python/python-pygobject-native_2.14.2.bb
@@ -0,0 +1,16 @@
+require python-pygobject_${PV}.bb
+
+DEPENDS = "python-native glib-2.0-native"
+PR = "r1"
+
+inherit native
+
+SRC_URI = "\
+ ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 \
+ file://python-path.patch;patch=1 \
+"
+
+do_stage_append() {
+ install -d ${STAGING_BINDIR}
+ install -m 0755 gobject/generate-constants ${STAGING_BINDIR}/gobject-generate-constants
+}
diff --git a/packages/python/python-pygobject/generate-constants.patch b/packages/python/python-pygobject/generate-constants.patch
new file mode 100644
index 0000000000..57a9380620
--- /dev/null
+++ b/packages/python/python-pygobject/generate-constants.patch
@@ -0,0 +1,18 @@
+Index: pygobject-2.14.2/gobject/Makefile.am
+===================================================================
+--- pygobject-2.14.2.orig/gobject/Makefile.am
++++ pygobject-2.14.2/gobject/Makefile.am
+@@ -21,11 +21,11 @@ if PLATFORM_WIN32
+ common_ldflags += -no-undefined
+ endif
+
+-constants.py: generate-constants$(EXEEXT) constants.py.in
++constants.py: constants.py.in
+ rm -f constants.py
+ cp $(srcdir)/constants.py.in constants.py
+ chmod 644 constants.py
+- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py
++ gobject-generate-constants$(EXEEXT) >> constants.py
+ chmod 444 constants.py
+
+ generate_constants_CFLAGS = $(GLIB_CFLAGS)
diff --git a/packages/python/python-pygobject/python-path.patch b/packages/python/python-pygobject/python-path.patch
index 2ab7bdce6e..d7907703f5 100644
--- a/packages/python/python-pygobject/python-path.patch
+++ b/packages/python/python-pygobject/python-path.patch
@@ -1,23 +1,46 @@
-Index: pygobject-2.12.3/m4/python.m4
+Index: pygobject-2.14.2/m4/python.m4
===================================================================
---- pygobject-2.12.3.orig/m4/python.m4 2007-03-02 15:00:20.945635455 +0100
-+++ pygobject-2.12.3/m4/python.m4 2007-03-02 15:00:43.532189734 +0100
-@@ -43,12 +43,18 @@
+--- pygobject-2.14.2.orig/m4/python.m4
++++ pygobject-2.14.2/m4/python.m4
+@@ -43,6 +43,11 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
+AC_ARG_WITH(python-includes,
-+ [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
++ [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
+if test x$py_exec_prefix != x; then
+PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+else
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
- PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
- if test "$py_prefix" != "$py_exec_prefix"; then
+ if test -x "$PYTHON-config"; then
+@@ -53,6 +58,7 @@ if test "$py_prefix" != "$py_exec_prefix
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
+ fi
+fi
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist:
save_CPPFLAGS="$CPPFLAGS"
+Index: pygobject-2.14.2/configure.ac
+===================================================================
+--- pygobject-2.14.2.orig/configure.ac
++++ pygobject-2.14.2/configure.ac
+@@ -71,9 +71,6 @@ AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(c
+
+ AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
+ py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+-old_CPPFLAGS=$CPPFLAGS
+-CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
+ AC_TRY_COMPILE([#include <Python.h>],
+ [PySignal_SetWakeupFd(0);],
+ setwakeupfd_ok=yes,
+@@ -83,7 +80,6 @@ if test "x$setwakeupfd_ok" != xno; then
+ AC_DEFINE(HAVE_PYSIGNAL_SETWAKEUPFD, 1,
+ [Define to 1 if PySignal_SetWakeupFd is available])
+ fi
+-CPPFLAGS=$old_CPPFLAGS
+
+ PLATFORM=`$PYTHON -c "from distutils import util; print util.get_platform()"`
+ AC_SUBST(PLATFORM)
diff --git a/packages/python/python-pygobject_2.12.3.bb b/packages/python/python-pygobject_2.14.2.bb
index c7781c32d8..00d179d667 100644
--- a/packages/python/python-pygobject_2.12.3.bb
+++ b/packages/python/python-pygobject_2.14.2.bb
@@ -2,16 +2,22 @@ DESCRIPTION = "Python GObject bindings"
SECTION = "devel/python"
LICENSE = "LGPL"
DEPENDS = "python-pygobject-native"
-PR = "r3"
+PR = "r1"
MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
-SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 \
- file://python-path.patch;patch=1"
+
+SRC_URI = "\
+ ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 \
+ file://python-path.patch;patch=1 \
+ file://generate-constants.patch;patch=1 \
+"
S = "${WORKDIR}/pygobject-${PV}"
+FILESPATH = "${FILE_DIRNAME}/python-pygobject:${FILE_DIRNAME}/files"
+
inherit autotools distutils-base pkgconfig
-EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
+EXTRA_OECONF += '--with-python-includes="${STAGING_INCDIR}/.."'
do_stage() {
autotools_stage_all
diff --git a/packages/python/python-pyyaml_3.05.bb b/packages/python/python-pyyaml_3.05.bb
new file mode 100644
index 0000000000..7f86bbadf7
--- /dev/null
+++ b/packages/python/python-pyyaml_3.05.bb
@@ -0,0 +1,10 @@
+DESCRIPTION = "Python support for YAML"
+HOMEPAGE = "http://www.pyyaml.org"
+SECTION = "devel/python"
+LICENSE = "MIT"
+PR = "ml0"
+
+SRC_URI = "http://pyyaml.org/download/pyyaml/PyYAML-3.05.tar.gz"
+S = "${WORKDIR}/PyYAML-${PV}"
+
+inherit distutils
diff --git a/packages/qemu/qemu_0.9.1.bb b/packages/qemu/qemu_0.9.1.bb
index 164296b0d4..e3e7aa0887 100644
--- a/packages/qemu/qemu_0.9.1.bb
+++ b/packages/qemu/qemu_0.9.1.bb
@@ -6,7 +6,7 @@ FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
FILESDIR = "${WORKDIR}"
SRC_URI = "\
- http://fabrice.bellard.free.fr/qemu/qemu-0.9.1.tar.gz \
+ http://www.bellard.org/qemu/qemu-0.9.1.tar.gz \
file://02_snapshot_use_tmpdir.patch;patch=1;pnum=0 \
file://04_do_not_print_rtc_freq_if_ok.patch;patch=1;pnum=1 \
file://05_non-fatal_if_linux_hd_missing.patch;patch=1;pnum=1 \
diff --git a/packages/qpe-games/crossword_0.0.3.bb b/packages/qpe-games/crossword_0.0.3.bb
index db468235f1..3301009cc8 100644
--- a/packages/qpe-games/crossword_0.0.3.bb
+++ b/packages/qpe-games/crossword_0.0.3.bb
@@ -8,6 +8,8 @@ HOMEPAGE = "http://www.linux-solutions.at/projects/zaurus/games-Crossword.html"
SRC_URI = "http://handhelds.org/~zecke/oe_packages/crossword_V0.0.3.tar.gz \
file://crossword.patch;patch=1"
+PR = "r1"
+
PV = "0.0.3"
S = "${WORKDIR}/crossword_V${PV}"
diff --git a/packages/qte/qte-2.3.10/disable-dup-rotation.patch b/packages/qte/qte-2.3.10/disable-dup-rotation.patch
index ae2332c5f0..8a2a02240d 100644
--- a/packages/qte/qte-2.3.10/disable-dup-rotation.patch
+++ b/packages/qte/qte-2.3.10/disable-dup-rotation.patch
@@ -1,13 +1,13 @@
---- qte/src/kernel/kernelkeyboard.cpp 2008-04-04 11:07:42.000000000 +0100
-+++ qte/src/kernel/kernelkeyboard.cpp 2008-04-04 11:07:45.000000000 +0100
-@@ -627,8 +627,8 @@
+--- qte/src/kernel/kernelkeyboard.cpp 2008-05-26 16:25:23.000000000 +0100
++++ qte/src/kernel/kernelkeyboard.cpp 2008-05-26 16:27:52.000000000 +0100
+@@ -627,8 +627,10 @@
case Qt::Key_Down:
unicode = 0xffff;
mod_key = false;
-- if (qt_screen->isTransformed())
-- qtKeyCode = static_cast<Qt::Key>( xform_dirkey(static_cast<int>( qtKeyCode ) ) );
-+// if (qt_screen->isTransformed())
-+// qtKeyCode = static_cast<Qt::Key>( xform_dirkey(static_cast<int>( qtKeyCode ) ) );
++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
+ if (qt_screen->isTransformed())
+ qtKeyCode = static_cast<Qt::Key>( xform_dirkey(static_cast<int>( qtKeyCode ) ) );
++#endif
break;
/*
* handle lock, we don't handle scroll lock!
diff --git a/packages/qte/qte-mt_2.3.10.bb b/packages/qte/qte-mt_2.3.10.bb
index 9e3ee5c584..32afeda271 100644
--- a/packages/qte/qte-mt_2.3.10.bb
+++ b/packages/qte/qte-mt_2.3.10.bb
@@ -1,5 +1,5 @@
require qte-common_${PV}.inc
-PR = "r26"
+PR = "r27"
EXTRA_OECONF += "-thread"
diff --git a/packages/readline/readline_4.3.bb b/packages/readline/readline_4.3.bb
index 6dfce726fe..a2420c57e4 100644
--- a/packages/readline/readline_4.3.bb
+++ b/packages/readline/readline_4.3.bb
@@ -10,7 +10,7 @@ RPROVIDES_${PN} += "readline"
LEAD_SONAME = "libreadline.so"
PR = "r3"
-SRC_URI = "ftp://ftp.cwru.edu/pub/bash/readline-${PV}.tar.gz \
+SRC_URI = "${GNU_MIRROR}/readline/readline-${PV}.tar.gz \
file://shlink-termcap.patch;patch=1 \
file://acinclude.m4"
S = "${WORKDIR}/readline-${PV}"
diff --git a/packages/rt-tests/rt-tests_0.21.bb b/packages/rt-tests/rt-tests_0.21.bb
index 7be7f48f5f..83600d5329 100644
--- a/packages/rt-tests/rt-tests_0.21.bb
+++ b/packages/rt-tests/rt-tests_0.21.bb
@@ -1,21 +1,20 @@
-## Reminder: Tabs should not be used (use spaces instead) in : install -d ${D}${bindir}
-## Reminder: Tabs should not be used (use spaces instead) in : for binary in `find . -perm 0755 -type f`
-## Reminder: Tabs should not be used (use spaces instead) in : do
-## Reminder: Tabs should not be used (use spaces instead) in : install -m 0755 $binary ${D}${bindir}
-## Reminder: Tabs should not be used (use spaces instead) in : done
-DESCRIPTION = "Real-time tests, such as cyclictest."
+DESCRIPTION = "Real-time tests, such as cyclictest, for real-time linux PREEMPT RT kernels"
HOMEPAGE = "http://rt.wiki.kernel.org/index.php/Cyclictest"
LICENSE = "GPL"
-PR = "r0"
+PR = "r2"
SRC_URI = "http://www.kernel.org/pub/linux/kernel/people/tglx/rt-tests/rt-tests-${PV}.tar.bz2"
S = "${WORKDIR}/rt-tests"
+# Limit to cyclictest only for non-real-time kernels.
+# EXTRA_OEMAKE = "cyclictest"
+
do_install() {
- install -d ${D}${bindir}
- for binary in `find . -perm 0755 -type f`
- do
- install -m 0755 $binary ${D}${bindir}
- done
+ install -d ${D}${bindir}
+ # any file that is executable by user and/or group
+ for binary in `find . -perm /u+x,g+x -type f`
+ do
+ install -m 0755 $binary ${D}${bindir}
+ done
}
diff --git a/packages/rt2x00/rt73-k2wrlz_3.0.0.bb b/packages/rt2x00/rt73-k2wrlz_3.0.0.bb
new file mode 100644
index 0000000000..68b6b5710b
--- /dev/null
+++ b/packages/rt2x00/rt73-k2wrlz_3.0.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Enhanced Driver for Ralink rt73 USB 802.11g WiFi sticks"
+HOMEPAGE = "http://homepages.tu-darmstadt.de/~p_larbig/wlan"
+SECTION = "kernel/modules"
+LICENSE = "GPL"
+PR = "r0"
+
+SRC_URI="http://homepages.tu-darmstadt.de/~p_larbig/wlan/${PN}-${PV}.tar.bz2"
+
+inherit module
+
+S = "${WORKDIR}/${PN}-${PV}/Module/"
+
+EXTRA_OEMAKE = "KERNDIR=${STAGING_KERNEL_DIR}"
+
+do_install() {
+ install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
+ install -m 0644 rt73${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra/
+}
+
diff --git a/packages/s3c24xx-utils/s3c2410-boot-usb-native_svn.bb b/packages/s3c24xx-utils/s3c2410-boot-usb-native_svn.bb
index 671606c201..675d07c910 100644
--- a/packages/s3c24xx-utils/s3c2410-boot-usb-native_svn.bb
+++ b/packages/s3c24xx-utils/s3c2410-boot-usb-native_svn.bb
@@ -1,10 +1,10 @@
DESCRIPTION = "Boots a S3C2410 device with a user supplied kernel zImage"
DEPENDS = "libusb-native"
SECTION = "devel"
-AUTHOR = "Harald Welte"
+AUTHOR = "Harald Welte <laforge@openmoko.org>"
LICENSE = "GPL"
-PV = "0.1.0+svn${SRCREV}"
-PR = "r0"
+PV = "0.1.0+svnr${SRCREV}"
+PR = "r1"
SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=s3c2410_boot_usb;proto=https"
S = "${WORKDIR}/s3c2410_boot_usb"
@@ -16,8 +16,8 @@ do_compile() {
}
do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0755 s3c2410-boot-usb ${DEPLOY_DIR_IMAGE}
+ install -d ${DEPLOY_DIR_TOOLS}
+ install -m 0755 s3c2410-boot-usb ${DEPLOY_DIR_TOOLS}/s3c2410-boot-usb-${PV}
}
do_stage() {
diff --git a/packages/s3c24xx-utils/s3c24xx-gpio_svn.bb b/packages/s3c24xx-utils/s3c24xx-gpio_svn.bb
index 516fbb0c3a..0a57d2c0e6 100644
--- a/packages/s3c24xx-utils/s3c24xx-gpio_svn.bb
+++ b/packages/s3c24xx-utils/s3c24xx-gpio_svn.bb
@@ -1,8 +1,9 @@
DESCRIPTION = "A user-space tool to show and modify the state of GPIOs on the S3c24xx platform"
SECTION = "console/utils"
+AUTHOR = "Werner Almesberger <werner@openmoko.org>"
LICENSE = "GPL"
-PV = "1.0+svn${SRCREV}"
-PR = "r1"
+PV = "1.0+svnr${SRCREV}"
+PR = "r2"
SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gpio;proto=http"
S = "${WORKDIR}/gpio"
diff --git a/packages/s3c24xx-utils/sjf2410-linux-native_svn.bb b/packages/s3c24xx-utils/sjf2410-linux-native_svn.bb
index bead6039f8..fcfbba923d 100644
--- a/packages/s3c24xx-utils/sjf2410-linux-native_svn.bb
+++ b/packages/s3c24xx-utils/sjf2410-linux-native_svn.bb
@@ -1,8 +1,8 @@
DESCRIPTION = "JTAG utility to interface w/ a S3C2410 device"
SECTION = "devel"
-AUTHOR = "Harald Welte"
+AUTHOR = "Harald Welte <laforge@openmoko.org>"
LICENSE = "GPL"
-PV = "0.1+svn${SRCREV}"
+PV = "0.1+svnr${SRCREV}"
PR = "r0"
SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=sjf2410-linux;proto=https"
@@ -17,8 +17,8 @@ do_compile() {
}
do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0755 sjf2410 ${DEPLOY_DIR_IMAGE}/sjf2410
+ install -d ${DEPLOY_DIR_TOOLS}
+ install -m 0755 sjf2410 ${DEPLOY_DIR_TOOLS}/sjf2410-${PV}
}
do_stage() {
diff --git a/packages/sablevm/sablevm-classpath_1.12.bb b/packages/sablevm/sablevm-classpath_1.12.bb
index 0546dcacd6..0380c91ada 100644
--- a/packages/sablevm/sablevm-classpath_1.12.bb
+++ b/packages/sablevm/sablevm-classpath_1.12.bb
@@ -7,7 +7,7 @@ SECTION = "libs"
DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
RDEPENDS_${PN} = "${PN}-native (>= ${PV})"
-SRC_URI = "http://sablevm.org/download/release/${PV}/${PN}-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/sablevm/sablevm-classpath-${PV}.tar.gz \
file://disable-automake-checks.patch;patch=1"
inherit autotools
diff --git a/packages/sablevm/sablevm_1.12.bb b/packages/sablevm/sablevm_1.12.bb
index 541694e2e7..b39dcf53f6 100644
--- a/packages/sablevm/sablevm_1.12.bb
+++ b/packages/sablevm/sablevm_1.12.bb
@@ -9,7 +9,7 @@ DEPENDS = "libffi libtool popt \
# unzip"
RRECOMMENDS = "sablevm-classpath (>= ${PV})"
-SRC_URI = "http://sablevm.org/download/release/${PV}/${PN}-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/sablevm/${PN}-${PV}.tar.gz \
file://no-internal-libs.patch;patch=1"
inherit autotools update-alternatives
diff --git a/packages/setserial/files/.mtn2git_empty b/packages/setserial/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/setserial/files/.mtn2git_empty
diff --git a/packages/setserial/files/addflags.patch b/packages/setserial/files/addflags.patch
new file mode 100644
index 0000000000..d4f4c91190
--- /dev/null
+++ b/packages/setserial/files/addflags.patch
@@ -0,0 +1,21 @@
+Index: setserial-2.17/Makefile.in
+===================================================================
+--- setserial-2.17.orig/Makefile.in
++++ setserial-2.17/Makefile.in
+@@ -13,6 +13,7 @@ STRIP = @STRIP@
+ CC = @CC@
+ RM = rm -f
+ CFLAGS = @CFLAGS@
++LDFLAGS = @LDFLAGS@
+ DEFS = @DEFS@
+ INCS = -I.
+ TAR = tar
+@@ -20,7 +21,7 @@ TAR = tar
+ all: setserial setserial.cat
+
+ setserial: setserial.c
+- $(CC) $(CFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
++ $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
+
+ setserial.cat: setserial.8
+ nroff -man setserial.8 > setserial.cat
diff --git a/packages/setserial/setserial_2.17.bb b/packages/setserial/setserial_2.17.bb
index 6b73eed0cf..0255a9f2b0 100644
--- a/packages/setserial/setserial_2.17.bb
+++ b/packages/setserial/setserial_2.17.bb
@@ -1,13 +1,17 @@
-DESCRIPTION = "setserial is a program designed to set and/or report the configuration information associated with a serial port"
+DESCRIPTION = "setserial is a program designed to set and/or \
+report the configuration information associated with a serial port"
HOMEPAGE = "http://setserial.sourceforge.net"
-AUTHOR = "Theodore Ts'o tytso@mit.edu"
+AUTHOR = "Theodore Ts'o >tytso@mit.edu>"
SECTION = "console/utils"
LICENSE = "GPL"
-PR = "r2"
+PR = "r3"
inherit autotools
-SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${PN}-${PV}.tar.gz"
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/setserial/${PN}-${PV}.tar.gz \
+ file://addflags.patch;patch=1 \
+"
do_install() {
install -d ${D}${bindir}
diff --git a/packages/sphinx/pocketsphinx_0.4.1.bb b/packages/sphinx/pocketsphinx_0.4.1.bb
new file mode 100644
index 0000000000..813146ed86
--- /dev/null
+++ b/packages/sphinx/pocketsphinx_0.4.1.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "CMU PocketSphinx - speech recognition engine for handhelds"
+HOMEPAGE = "http://www.speech.cs.cmu.edu/pocketsphinx/"
+LICENSE = "BSD"
+DEPENDS = "sphinxbase"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/cmusphinx/${PN}-${PV}.tar.bz2 \
+ file://cross-compile.patch;patch=1"
+
+inherit autotools
+
+do_configure () {
+ CPPFLAGS="-I${STAGING_INCDIR}/sphinxbase" oe_runconf
+}
diff --git a/packages/sphinx/sphinx-fpu.inc b/packages/sphinx/sphinx-fpu.inc
new file mode 100644
index 0000000000..73ae2ec16e
--- /dev/null
+++ b/packages/sphinx/sphinx-fpu.inc
@@ -0,0 +1,6 @@
+
+def get_sphinx_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--enable-fixed"
+ return ""
+
diff --git a/packages/sphinx/sphinxbase_0.1.bb b/packages/sphinx/sphinxbase_0.1.bb
index 1ee41cc485..2830b9010a 100644
--- a/packages/sphinx/sphinxbase_0.1.bb
+++ b/packages/sphinx/sphinxbase_0.1.bb
@@ -2,11 +2,12 @@ DESCRIPTION = "Base library for CMU Sphinx speech recognition engines"
HOMEPAGE = "http://www.speech.cs.cmu.edu/pocketsphinx/"
LICENSE = "BSD"
-SRC_URI = "${SOURCEFORGE_MIRROR}/cmusphinx/sphinxbase-0.1.tar.bz2"
+SRC_URI = "${SOURCEFORGE_MIRROR}/cmusphinx/sphinxbase-${PV}.tar.bz2"
inherit autotools
-EXTRA_OECONF = "--enable-fixed"
+require sphinx-fpu.inc
+EXTRA_OECONF += "${@get_sphinx_fpu_setting(bb, d)}"
do_stage () {
autotools_stage_all
diff --git a/packages/sphinx/sphinxbase_0.3.bb b/packages/sphinx/sphinxbase_0.3.bb
new file mode 100644
index 0000000000..2830b9010a
--- /dev/null
+++ b/packages/sphinx/sphinxbase_0.3.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "Base library for CMU Sphinx speech recognition engines"
+HOMEPAGE = "http://www.speech.cs.cmu.edu/pocketsphinx/"
+LICENSE = "BSD"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/cmusphinx/sphinxbase-${PV}.tar.bz2"
+
+inherit autotools
+
+require sphinx-fpu.inc
+EXTRA_OECONF += "${@get_sphinx_fpu_setting(bb, d)}"
+
+do_stage () {
+ autotools_stage_all
+}
diff --git a/packages/stage-manager/files/stage-manager-ipkg b/packages/stage-manager/files/stage-manager-ipkg
index 7bcf85a5fa..2559fdbcd8 100755
--- a/packages/stage-manager/files/stage-manager-ipkg
+++ b/packages/stage-manager/files/stage-manager-ipkg
@@ -33,7 +33,7 @@ ipkg_src_names() {
ipkg_src_byname() {
local src="$1"
- ipkg_srcs $src | head -1
+ ipkg_srcs $src | head -n1
}
ipkg_dests() {
@@ -58,16 +58,16 @@ ipkg_state_dirs() {
}
ipkg_dest_default() {
- ipkg_dests_all | head -1
+ ipkg_dests_all | head -n1
}
ipkg_dest_default_name() {
- ipkg_dest_names | head -1
+ ipkg_dest_names | head -n1
}
ipkg_dest_byname() {
local dest="$1"
- ipkg_dests $dest | head -1
+ ipkg_dests $dest | head -n1
}
ipkg_option() {
@@ -878,7 +878,7 @@ diff -u $dest/$conffile $IPKG_TMP/$pkg/data/$conffile"
if [ -n "$new_conffiles" ]; then
new_conffiles='Conffiles: '`echo $new_conffiles | ipkg_protect_slashes`
fi
- local sed_safe_root=`echo $dest | sed -e "s/^${IPKG_OFFLINE_ROOT}//" | ipkg_protect_slashes`
+ local sed_safe_root=`echo $dest | sed -e "s#^${IPKG_OFFLINE_ROOT}##" | ipkg_protect_slashes`
sed -e "s/\(Package:.*\)/\1\\
Status: install ok installed\\
Root: ${sed_safe_root}\\
@@ -975,7 +975,7 @@ ipkg_install_wanted() {
ipkg_upgrade_pkg() {
local pkg="$1"
- local avail_ver=`ipkg_info $pkg Version | ipkg_extract_value | head -1`
+ local avail_ver=`ipkg_info $pkg Version | ipkg_extract_value | head -n1`
is_installed=
for dest_name in `ipkg_dest_names`; do
diff --git a/packages/stage-manager/stagemanager-native_0.0.1.bb b/packages/stage-manager/stagemanager-native_0.0.1.bb
index cfa14498e4..5708045e73 100644
--- a/packages/stage-manager/stagemanager-native_0.0.1.bb
+++ b/packages/stage-manager/stagemanager-native_0.0.1.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Helper script for packaged-staging.bbclass"
-PR = "r9"
+PR = "r11"
SRC_URI = "file://stage-manager \
file://stage-manager-ipkg \
diff --git a/packages/sysfsutils/sysfsutils-2.1.0/.mtn2git_empty b/packages/sysfsutils/sysfsutils-2.1.0/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/sysfsutils/sysfsutils-2.1.0/.mtn2git_empty
diff --git a/packages/sysfsutils/sysfsutils-2.1.0/get_mnt_path_check.patch b/packages/sysfsutils/sysfsutils-2.1.0/get_mnt_path_check.patch
new file mode 100644
index 0000000000..47f6cafb05
--- /dev/null
+++ b/packages/sysfsutils/sysfsutils-2.1.0/get_mnt_path_check.patch
@@ -0,0 +1,56 @@
+diff -ruN sysfsutils-2.0.0-old/lib/sysfs_utils.c sysfsutils-2.0.0/lib/sysfs_utils.c
+--- sysfsutils-2.0.0-old/lib/sysfs_utils.c 2005-12-07 12:28:18.000000000 +0100
++++ sysfsutils-2.0.0/lib/sysfs_utils.c 2006-03-06 19:06:11.000000000 +0100
+@@ -22,6 +22,7 @@
+ */
+ #include "libsysfs.h"
+ #include "sysfs.h"
++#include <mntent.h>
+
+ /**
+ * sysfs_remove_trailing_slash: Removes any trailing '/' in the given path
+@@ -53,6 +54,9 @@
+ {
+ static char sysfs_path[SYSFS_PATH_MAX] = "";
+ const char *sysfs_path_env;
++ FILE *mnt;
++ struct mntent *mntent;
++ int ret;
+
+ if (len == 0 || mnt_path == NULL)
+ return -1;
+@@ -64,12 +68,31 @@
+ if (sysfs_path_env != NULL) {
+ safestrcpymax(mnt_path, sysfs_path_env, len);
+ sysfs_remove_trailing_slash(mnt_path);
+- return 0;
++ } else {
++ safestrcpymax(mnt_path, SYSFS_MNT_PATH, len);
+ }
+- safestrcpymax(mnt_path, SYSFS_MNT_PATH, len);
+ }
+
+- return 0;
++ /* check that mount point is indeed mounted */
++ ret = -1;
++ if ((mnt = setmntent(SYSFS_PROC_MNTS, "r")) == NULL) {
++ dprintf("Error getting mount information\n");
++ return -1;
++ }
++ while ((mntent = getmntent(mnt)) != NULL) {
++ if (strcmp(mntent->mnt_type, SYSFS_FSTYPE_NAME) == 0 &&
++ strcmp(mntent->mnt_dir, mnt_path) == 0) {
++ ret = 0;
++ break;
++ }
++ }
++
++ endmntent(mnt);
++
++ if (ret < 0)
++ errno = ENOENT;
++
++ return ret;
+ }
+
+ /**
diff --git a/packages/sysfsutils/sysfsutils_2.1.0.bb b/packages/sysfsutils/sysfsutils_2.1.0.bb
new file mode 100644
index 0000000000..4f540d5181
--- /dev/null
+++ b/packages/sysfsutils/sysfsutils_2.1.0.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "System Utilities Based on Sysfs"
+HOMEPAGE = "http://linux-diag.sourceforge.net/Sysfsutils.html"
+LICENSE = "GPLv2"
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/linux-diag/sysfsutils-${PV}.tar.gz \
+ file://get_mnt_path_check.patch;patch=1"
+
+inherit autotools
+
+do_stage () {
+ autotools_stage_all
+}
+
+PACKAGES = "libsysfs libsysfs-dbg libsysfs-dev \
+ ${PN} ${PN}-dbg ${PN}-doc ${PN}-locale"
+
+FILES_libsysfs = "${libdir}/*.so.*"
+FILES_libsysfs-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la \
+ ${libdir}/*.a"
+FILES_libsysfs-dbg += "${libdir}/.debug"
+FILES_${PN}-dbg += "${bindir}/.debug"
diff --git a/packages/syslog-ng/syslog-ng_2.0.5.bb b/packages/syslog-ng/syslog-ng_2.0.5.bb
index 217af346de..80f0fc59c6 100644
--- a/packages/syslog-ng/syslog-ng_2.0.5.bb
+++ b/packages/syslog-ng/syslog-ng_2.0.5.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Alternative system logger daemon"
-DEPENDS = "libol flex eventlog"
-PR = "r1"
+DEPENDS = "libol flex eventlog glib-2.0"
+PR = "r2"
SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/stable/src/${P}.tar.gz \
file://syslog-ng.conf \
diff --git a/packages/sysvinit/sysvinit_2.86.bb b/packages/sysvinit/sysvinit_2.86.bb
index a6765c4508..aac840ae58 100644
--- a/packages/sysvinit/sysvinit_2.86.bb
+++ b/packages/sysvinit/sysvinit_2.86.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "System-V like init."
SECTION = "base"
LICENSE = "GPL"
HOMEPAGE = "http://freshmeat.net/projects/sysvinit/"
-PR = "r40"
+PR = "r41"
# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
# Set PACKAGE_ARCH appropriately.
diff --git a/packages/tasks/task-python-efl-examples.bb b/packages/tasks/task-python-efl-examples.bb
index e78a4cabae..34efbeab6b 100644
--- a/packages/tasks/task-python-efl-examples.bb
+++ b/packages/tasks/task-python-efl-examples.bb
@@ -6,9 +6,10 @@ RDEPENDS = "\
python-ecore-examples \
python-emotion-examples \
python-edje-examples \
+ python-etk-examples \
python-epsilon-examples \
python-math python-textutils \
"
-PR = "ml3"
+PR = "ml4"
ALLOW_EMPTY = "1"
diff --git a/packages/tasks/task-python-efl.bb b/packages/tasks/task-python-efl.bb
index 1c7f23a1eb..d7b2d694dd 100644
--- a/packages/tasks/task-python-efl.bb
+++ b/packages/tasks/task-python-efl.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Python Bindings to the Enlightenment Foundation Libraries"
LICENSE = "MIT"
SECTION = "devel/python"
-RDEPENDS = "python-evas python-ecore python-emotion python-edje python-epsilon python-edbus"
-PR = "ml2"
+RDEPENDS = "python-evas python-ecore python-emotion python-edje python-etk python-epsilon python-edbus"
+PR = "ml3"
ALLOW_EMPTY = "1"
diff --git a/packages/tasks/task-python-everything.bb b/packages/tasks/task-python-everything.bb
index de6e5dfaf2..669c94159b 100644
--- a/packages/tasks/task-python-everything.bb
+++ b/packages/tasks/task-python-everything.bb
@@ -1,7 +1,7 @@
DESCRIPTION= "Everything Python"
HOMEPAGE = "http://www.vanille.de/projects/python.spy"
LICENSE = "MIT"
-PR = "ml27"
+PR = "ml30"
RDEPENDS = "\
python-ao \
@@ -9,10 +9,8 @@ RDEPENDS = "\
python-constraint \
python-dbus \
python-dialog \
- python-pydirectfb \
task-python-efl \
task-python-efl-examples \
- python-pycurl \
python-fam \
python-fnorb \
python-formencode \
@@ -39,10 +37,14 @@ RDEPENDS = "\
python-numeric \
python-ogg \
python-pexpect \
+ python-pyalsa \
+ python-pyalsaaudio \
python-pybluez \
python-pycairo \
python-pychecker \
python-pycodes \
+ python-pycurl \
+ python-pydirectfb \
python-pyephem \
python-pyfits \
python-pyflakes \
@@ -67,6 +69,7 @@ RDEPENDS = "\
python-pyweather \
python-pyxml \
python-pyxmlrpc \
+ python-pyyaml \
python-scapy \
python-scons \
python-setuptools \
diff --git a/packages/tasks/task-sdk-host.bb b/packages/tasks/task-sdk-host.bb
index d238b46144..a8ac3706c4 100644
--- a/packages/tasks/task-sdk-host.bb
+++ b/packages/tasks/task-sdk-host.bb
@@ -3,7 +3,7 @@
#
DESCRIPTION = "Host packages for the standalone SDK or external toolchain"
-PR = "r1"
+PR = "r2"
LICENSE = "MIT"
ALLOW_EMPTY = "1"
@@ -15,10 +15,6 @@ RDEPENDS_${PN} = "\
binutils-cross-sdk \
gcc-cross-sdk \
gdb-cross-sdk \
- g++ \
- cpp \
- libgcc \
- libgcc-dev \
- libstdc++ \
- libstdc++-dev \
+ pkgconfig-sdk \
+ opkg-sdk \
"
diff --git a/packages/tasks/task-slugos-toolchain-host.bb b/packages/tasks/task-slugos-toolchain-host.bb
new file mode 100644
index 0000000000..7550301bfd
--- /dev/null
+++ b/packages/tasks/task-slugos-toolchain-host.bb
@@ -0,0 +1,10 @@
+require task-sdk-host.bb
+PR = "r0"
+DESCRIPTION = "Packages for a standalone SlugOS external toolchain"
+ALLOW_EMPTY = "1"
+
+PACKAGES = "${PN}"
+
+RDEPENDS_${PN} += "\
+ devio-sdk \
+"
diff --git a/packages/u-boot/u-boot-git/.mtn2git_empty b/packages/u-boot/u-boot-git/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/u-boot/u-boot-git/.mtn2git_empty
diff --git a/packages/u-boot/u-boot-git/beagleboard/.mtn2git_empty b/packages/u-boot/u-boot-git/beagleboard/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/u-boot/u-boot-git/beagleboard/.mtn2git_empty
diff --git a/packages/u-boot/u-boot-git/beagleboard/armv7-a.patch b/packages/u-boot/u-boot-git/beagleboard/armv7-a.patch
new file mode 100644
index 0000000000..49f8de0879
--- /dev/null
+++ b/packages/u-boot/u-boot-git/beagleboard/armv7-a.patch
@@ -0,0 +1,11 @@
+--- u-boot/cpu/omap3/config.mk-orig 2008-05-27 16:46:45.000000000 -0700
++++ u-boot/cpu/omap3/config.mk 2008-05-29 12:50:49.000000000 -0700
+@@ -23,7 +23,7 @@
+ PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
+ -msoft-float
+
+-PLATFORM_CPPFLAGS += -march=armv7a
++PLATFORM_CPPFLAGS += -march=armv7-a
+ # =========================================================================
+ #
+ # Supply options according to compiler version
diff --git a/packages/u-boot/u-boot-git/beagleboard/base.patch b/packages/u-boot/u-boot-git/beagleboard/base.patch
new file mode 100644
index 0000000000..1d3a9e5154
--- /dev/null
+++ b/packages/u-boot/u-boot-git/beagleboard/base.patch
@@ -0,0 +1,6672 @@
+diff --git a/Makefile b/Makefile
+index 8bfc891..e9bf61a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -141,7 +141,7 @@ ifeq ($(ARCH),ppc)
+ CROSS_COMPILE = ppc_8xx-
+ endif
+ ifeq ($(ARCH),arm)
+-CROSS_COMPILE = arm-linux-
++CROSS_COMPILE = arm-none-linux-gnueabi-
+ endif
+ ifeq ($(ARCH),i386)
+ CROSS_COMPILE = i386-linux-
+@@ -252,7 +252,7 @@ LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
+ LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
+
+ # Add GCC lib
+-PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
++PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc -lgcc_eh
+
+ # The "tools" are needed early, so put this first
+ # Don't include stuff already done in $(LIBS)
+@@ -2565,6 +2565,12 @@ SMN42_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm720t SMN42 siemens lpc2292
+
+ #########################################################################
++## ARM CORTEX Systems
++#########################################################################
++omap3530beagle_config : unconfig
++ @./mkconfig $(@:_config=) arm omap3 omap3530beagle
++
++#########################################################################
+ ## XScale Systems
+ #########################################################################
+
+diff --git a/board/omap3530beagle/Makefile b/board/omap3530beagle/Makefile
+new file mode 100644
+index 0000000..7065345
+--- /dev/null
++++ b/board/omap3530beagle/Makefile
+@@ -0,0 +1,47 @@
++#
++# (C) Copyright 2000, 2001, 2002
++# 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 := omap3530beagle.o mem.o clock.o syslib.o sys_info.o nand.o
++SOBJS := lowlevel_init.o
++
++$(LIB): $(OBJS) $(SOBJS)
++ $(AR) crv $@ $^
++
++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 --git a/board/omap3530beagle/clock.c b/board/omap3530beagle/clock.c
+new file mode 100644
+index 0000000..1f4b4f3
+--- /dev/null
++++ b/board/omap3530beagle/clock.c
+@@ -0,0 +1,314 @@
++/*
++ * (C) Copyright 2008
++ * Texas Instruments, <www.ti.com>
++ *
++ * Author :
++ * Sunil Kumar <sunilsaini05@gmail.com>
++ * Shashi Ranjan <shashiranjanmca05@gmail.com>
++ *
++ * Derived from Beagle Board and OMAP3 SDP code by
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Mohammed Khasim <khasim@ti.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.
++ *
++ * 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 <asm/io.h>
++#include <asm/arch/bits.h>
++#include <asm/arch/clocks.h>
++#include <asm/arch/clocks_omap3.h>
++#include <asm/arch/mem.h>
++#include <asm/arch/sys_proto.h>
++#include <environment.h>
++#include <command.h>
++
++/******************************************************************************
++ * get_sys_clk_speed() - determine reference oscillator speed
++ * based on known 32kHz clock and gptimer.
++ *****************************************************************************/
++u32 get_osc_clk_speed(void)
++{
++ u32 start, cstart, cend, cdiff, val;
++
++ val = __raw_readl(PRM_CLKSRC_CTRL);
++
++ /* If SYS_CLK is being divided by 2, remove for now */
++ val = (val & (~BIT7)) | BIT6;
++ __raw_writel(val, PRM_CLKSRC_CTRL);
++
++ /* enable timer2 */
++ val = __raw_readl(CM_CLKSEL_WKUP) | BIT0;
++ __raw_writel(val, CM_CLKSEL_WKUP); /* select sys_clk for GPT1 */
++
++ /* Enable I and F Clocks for GPT1 */
++ val = __raw_readl(CM_ICLKEN_WKUP) | BIT0 | BIT2;
++ __raw_writel(val, CM_ICLKEN_WKUP);
++ val = __raw_readl(CM_FCLKEN_WKUP) | BIT0;
++ __raw_writel(val, CM_FCLKEN_WKUP);
++
++ __raw_writel(0, OMAP34XX_GPT1 + TLDR); /* start counting at 0 */
++ __raw_writel(GPT_EN, OMAP34XX_GPT1 + TCLR); /* enable clock */
++
++ /* enable 32kHz source, determine sys_clk via gauging */
++ start = 20 + __raw_readl(S32K_CR); /* start time in 20 cycles */
++ while (__raw_readl(S32K_CR) < start) ; /* dead loop till start time */
++ /* get start sys_clk count */
++ cstart = __raw_readl(OMAP34XX_GPT1 + TCRR);
++ /* wait for 40 cycles */
++ while (__raw_readl(S32K_CR) < (start + 20)) ;
++ cend = __raw_readl(OMAP34XX_GPT1 + TCRR); /* get end sys_clk count */
++ cdiff = cend - cstart; /* get elapsed ticks */
++
++ /* based on number of ticks assign speed */
++ if (cdiff > 19000)
++ return (S38_4M);
++ else if (cdiff > 15200)
++ return (S26M);
++ else if (cdiff > 13000)
++ return (S24M);
++ else if (cdiff > 9000)
++ return (S19_2M);
++ else if (cdiff > 7600)
++ return (S13M);
++ else
++ return (S12M);
++}
++
++/******************************************************************************
++ * get_sys_clkin_sel() - returns the sys_clkin_sel field value based on
++ * input oscillator clock frequency.
++ *****************************************************************************/
++void get_sys_clkin_sel(u32 osc_clk, u32 *sys_clkin_sel)
++{
++ if (osc_clk == S38_4M)
++ *sys_clkin_sel = 4;
++ else if (osc_clk == S26M)
++ *sys_clkin_sel = 3;
++ else if (osc_clk == S19_2M)
++ *sys_clkin_sel = 2;
++ else if (osc_clk == S13M)
++ *sys_clkin_sel = 1;
++ else if (osc_clk == S12M)
++ *sys_clkin_sel = 0;
++}
++
++/******************************************************************************
++ * prcm_init() - inits clocks for PRCM as defined in clocks.h
++ * called from SRAM, or Flash (using temp SRAM stack).
++ *****************************************************************************/
++void prcm_init(void)
++{
++ void (*f_lock_pll) (u32, u32, u32, u32);
++ int xip_safe, p0, p1, p2, p3;
++ u32 osc_clk = 0, sys_clkin_sel;
++ u32 clk_index, sil_index;
++ dpll_param *dpll_param_p;
++
++ f_lock_pll = (void *) ((u32) &_end_vect - (u32) &_start +
++ SRAM_VECT_CODE);
++
++ xip_safe = running_in_sram();
++
++ /* Gauge the input clock speed and find out the sys_clkin_sel
++ * value corresponding to the input clock.
++ */
++ osc_clk = get_osc_clk_speed();
++ get_sys_clkin_sel(osc_clk, &sys_clkin_sel);
++
++ sr32(PRM_CLKSEL, 0, 3, sys_clkin_sel); /* set input crystal speed */
++
++ /* If the input clock is greater than 19.2M always divide/2 */
++ if (sys_clkin_sel > 2) {
++ sr32(PRM_CLKSRC_CTRL, 6, 2, 2); /* input clock divider */
++ clk_index = sys_clkin_sel / 2;
++ } else {
++ sr32(PRM_CLKSRC_CTRL, 6, 2, 1); /* input clock divider */
++ clk_index = sys_clkin_sel;
++ }
++
++ /* The DPLL tables are defined according to sysclk value and
++ * silicon revision. The clk_index value will be used to get
++ * the values for that input sysclk from the DPLL param table
++ * and sil_index will get the values for that SysClk for the
++ * appropriate silicon rev.
++ */
++ sil_index = get_cpu_rev() - 1;
++ /* Unlock MPU DPLL (slows things down, and needed later) */
++ sr32(CM_CLKEN_PLL_MPU, 0, 3, PLL_LOW_POWER_BYPASS);
++ wait_on_value(BIT0, 0, CM_IDLEST_PLL_MPU, LDELAY);
++
++ /* Getting the base address of Core DPLL param table */
++ dpll_param_p = (dpll_param *) get_core_dpll_param();
++ /* Moving it to the right sysclk and ES rev base */
++ dpll_param_p = dpll_param_p + 3 * clk_index + sil_index;
++ if (xip_safe) {
++ /* CORE DPLL */
++ /* sr32(CM_CLKSEL2_EMU) set override to work when asleep */
++ sr32(CM_CLKEN_PLL, 0, 3, PLL_FAST_RELOCK_BYPASS);
++ wait_on_value(BIT0, 0, CM_IDLEST_CKGEN, LDELAY);
++ /* For OMAP3 ES1.0 Errata 1.50, default value directly doesnt
++ work. write another value and then default value. */
++ sr32(CM_CLKSEL1_EMU, 16, 5, CORE_M3X2 + 1); /* m3x2 */
++ sr32(CM_CLKSEL1_EMU, 16, 5, CORE_M3X2); /* m3x2 */
++ sr32(CM_CLKSEL1_PLL, 27, 2, dpll_param_p->m2); /* Set M2 */
++ sr32(CM_CLKSEL1_PLL, 16, 11, dpll_param_p->m); /* Set M */
++ sr32(CM_CLKSEL1_PLL, 8, 7, dpll_param_p->n); /* Set N */
++ sr32(CM_CLKSEL1_PLL, 6, 1, 0); /* 96M Src */
++ sr32(CM_CLKSEL_CORE, 8, 4, CORE_SSI_DIV); /* ssi */
++ sr32(CM_CLKSEL_CORE, 4, 2, CORE_FUSB_DIV); /* fsusb */
++ sr32(CM_CLKSEL_CORE, 2, 2, CORE_L4_DIV); /* l4 */
++ sr32(CM_CLKSEL_CORE, 0, 2, CORE_L3_DIV); /* l3 */
++ sr32(CM_CLKSEL_GFX, 0, 3, GFX_DIV); /* gfx */
++ sr32(CM_CLKSEL_WKUP, 1, 2, WKUP_RSM); /* reset mgr */
++ sr32(CM_CLKEN_PLL, 4, 4, dpll_param_p->fsel); /* FREQSEL */
++ sr32(CM_CLKEN_PLL, 0, 3, PLL_LOCK); /* lock mode */
++ wait_on_value(BIT0, 1, CM_IDLEST_CKGEN, LDELAY);
++ } else if (running_in_flash()) {
++ /* if running from flash, jump to small relocated code
++ area in SRAM. */
++ p0 = __raw_readl(CM_CLKEN_PLL);
++ sr32((u32) &p0, 0, 3, PLL_FAST_RELOCK_BYPASS);
++ sr32((u32) &p0, 4, 4, dpll_param_p->fsel); /* FREQSEL */
++
++ p1 = __raw_readl(CM_CLKSEL1_PLL);
++ sr32((u32) &p1, 27, 2, dpll_param_p->m2); /* Set M2 */
++ sr32((u32) &p1, 16, 11, dpll_param_p->m); /* Set M */
++ sr32((u32) &p1, 8, 7, dpll_param_p->n); /* Set N */
++ sr32((u32) &p1, 6, 1, 0); /* set source for 96M */
++ p2 = __raw_readl(CM_CLKSEL_CORE);
++ sr32((u32) &p2, 8, 4, CORE_SSI_DIV); /* ssi */
++ sr32((u32) &p2, 4, 2, CORE_FUSB_DIV); /* fsusb */
++ sr32((u32) &p2, 2, 2, CORE_L4_DIV); /* l4 */
++ sr32((u32) &p2, 0, 2, CORE_L3_DIV); /* l3 */
++
++ p3 = CM_IDLEST_CKGEN;
++
++ (*f_lock_pll) (p0, p1, p2, p3);
++ }
++
++ /* PER DPLL */
++ sr32(CM_CLKEN_PLL, 16, 3, PLL_STOP);
++ wait_on_value(BIT1, 0, CM_IDLEST_CKGEN, LDELAY);
++
++ /* Getting the base address to PER DPLL param table */
++ /* Set N */
++ dpll_param_p = (dpll_param *) get_per_dpll_param();
++ /* Moving it to the right sysclk base */
++ dpll_param_p = dpll_param_p + clk_index;
++ /* Errata 1.50 Workaround for OMAP3 ES1.0 only */
++ /* If using default divisors, write default divisor + 1
++ and then the actual divisor value */
++ /* Need to change it to silicon and revision check */
++ if (1) {
++ sr32(CM_CLKSEL1_EMU, 24, 5, PER_M6X2 + 1); /* set M6 */
++ sr32(CM_CLKSEL1_EMU, 24, 5, PER_M6X2); /* set M6 */
++ sr32(CM_CLKSEL_CAM, 0, 5, PER_M5X2 + 1); /* set M5 */
++ sr32(CM_CLKSEL_CAM, 0, 5, PER_M5X2); /* set M5 */
++ sr32(CM_CLKSEL_DSS, 0, 5, PER_M4X2 + 1); /* set M4 */
++ sr32(CM_CLKSEL_DSS, 0, 5, PER_M4X2); /* set M4 */
++ sr32(CM_CLKSEL_DSS, 8, 5, PER_M3X2 + 1); /* set M3 */
++ sr32(CM_CLKSEL_DSS, 8, 5, PER_M3X2); /* set M3 */
++ sr32(CM_CLKSEL3_PLL, 0, 5, dpll_param_p->m2 + 1); /* set M2 */
++ sr32(CM_CLKSEL3_PLL, 0, 5, dpll_param_p->m2); /* set M2 */
++ } else {
++ sr32(CM_CLKSEL1_EMU, 24, 5, PER_M6X2); /* set M6 */
++ sr32(CM_CLKSEL_CAM, 0, 5, PER_M5X2); /* set M5 */
++ sr32(CM_CLKSEL_DSS, 0, 5, PER_M4X2); /* set M4 */
++ sr32(CM_CLKSEL_DSS, 8, 5, PER_M3X2); /* set M3 */
++ sr32(CM_CLKSEL3_PLL, 0, 5, dpll_param_p->m2); /* set M2 */
++ }
++ sr32(CM_CLKSEL2_PLL, 8, 11, dpll_param_p->m); /* set m */
++ sr32(CM_CLKSEL2_PLL, 0, 7, dpll_param_p->n); /* set n */
++ sr32(CM_CLKEN_PLL, 20, 4, dpll_param_p->fsel); /* FREQSEL */
++ sr32(CM_CLKEN_PLL, 16, 3, PLL_LOCK); /* lock mode */
++ wait_on_value(BIT1, 2, CM_IDLEST_CKGEN, LDELAY);
++
++ /* Getting the base address to MPU DPLL param table */
++ dpll_param_p = (dpll_param *) get_mpu_dpll_param();
++ /* Moving it to the right sysclk and ES rev base */
++ dpll_param_p = dpll_param_p + 3 * clk_index + sil_index;
++ /* MPU DPLL (unlocked already) */
++ sr32(CM_CLKSEL2_PLL_MPU, 0, 5, dpll_param_p->m2); /* Set M2 */
++ sr32(CM_CLKSEL1_PLL_MPU, 8, 11, dpll_param_p->m); /* Set M */
++ sr32(CM_CLKSEL1_PLL_MPU, 0, 7, dpll_param_p->n); /* Set N */
++ sr32(CM_CLKEN_PLL_MPU, 4, 4, dpll_param_p->fsel); /* FREQSEL */
++ sr32(CM_CLKEN_PLL_MPU, 0, 3, PLL_LOCK); /* lock mode */
++ wait_on_value(BIT0, 1, CM_IDLEST_PLL_MPU, LDELAY);
++
++ /* Getting the base address to IVA DPLL param table */
++ dpll_param_p = (dpll_param *) get_iva_dpll_param();
++ /* Moving it to the right sysclk and ES rev base */
++ dpll_param_p = dpll_param_p + 3 * clk_index + sil_index;
++ /* IVA DPLL (set to 12*20=240MHz) */
++ sr32(CM_CLKEN_PLL_IVA2, 0, 3, PLL_STOP);
++ wait_on_value(BIT0, 0, CM_IDLEST_PLL_IVA2, LDELAY);
++ sr32(CM_CLKSEL2_PLL_IVA2, 0, 5, dpll_param_p->m2); /* set M2 */
++ sr32(CM_CLKSEL1_PLL_IVA2, 8, 11, dpll_param_p->m); /* set M */
++ sr32(CM_CLKSEL1_PLL_IVA2, 0, 7, dpll_param_p->n); /* set N */
++ sr32(CM_CLKEN_PLL_IVA2, 4, 4, dpll_param_p->fsel); /* FREQSEL */
++ sr32(CM_CLKEN_PLL_IVA2, 0, 3, PLL_LOCK); /* lock mode */
++ wait_on_value(BIT0, 1, CM_IDLEST_PLL_IVA2, LDELAY);
++
++ /* Set up GPTimers to sys_clk source only */
++ sr32(CM_CLKSEL_PER, 0, 8, 0xff);
++ sr32(CM_CLKSEL_WKUP, 0, 1, 1);
++
++ sdelay(5000);
++}
++
++/******************************************************************************
++ * peripheral_enable() - Enable the clks & power for perifs (GPT2, UART1,...)
++ *****************************************************************************/
++void per_clocks_enable(void)
++{
++ /* Enable GP2 timer. */
++ sr32(CM_CLKSEL_PER, 0, 1, 0x1); /* GPT2 = sys clk */
++ sr32(CM_ICLKEN_PER, 3, 1, 0x1); /* ICKen GPT2 */
++ sr32(CM_FCLKEN_PER, 3, 1, 0x1); /* FCKen GPT2 */
++
++#ifdef CFG_NS16550
++ /* Enable UART1 clocks */
++ sr32(CM_FCLKEN1_CORE, 13, 1, 0x1);
++ sr32(CM_ICLKEN1_CORE, 13, 1, 0x1);
++
++ /* UART 3 Clocks */
++ sr32(CM_FCLKEN_PER, 11, 1, 0x1);
++ sr32(CM_ICLKEN_PER, 11, 1, 0x1);
++#endif
++#ifdef CONFIG_DRIVER_OMAP34XX_I2C
++ /* Turn on all 3 I2C clocks */
++ sr32(CM_FCLKEN1_CORE, 15, 3, 0x7);
++ sr32(CM_ICLKEN1_CORE, 15, 3, 0x7); /* I2C1,2,3 = on */
++#endif
++ /* Enable the ICLK for 32K Sync Timer as its used in udelay */
++ sr32(CM_ICLKEN_WKUP, 2, 1, 0x1);
++
++ sr32(CM_FCLKEN_IVA2, 0, 32, FCK_IVA2_ON);
++ sr32(CM_FCLKEN1_CORE, 0, 32, FCK_CORE1_ON);
++ sr32(CM_ICLKEN1_CORE, 0, 32, ICK_CORE1_ON);
++ sr32(CM_ICLKEN2_CORE, 0, 32, ICK_CORE2_ON);
++ sr32(CM_FCLKEN_WKUP, 0, 32, FCK_WKUP_ON);
++ sr32(CM_ICLKEN_WKUP, 0, 32, ICK_WKUP_ON);
++ sr32(CM_FCLKEN_DSS, 0, 32, FCK_DSS_ON);
++ sr32(CM_ICLKEN_DSS, 0, 32, ICK_DSS_ON);
++ sr32(CM_FCLKEN_CAM, 0, 32, FCK_CAM_ON);
++ sr32(CM_ICLKEN_CAM, 0, 32, ICK_CAM_ON);
++ sr32(CM_FCLKEN_PER, 0, 32, FCK_PER_ON);
++ sr32(CM_ICLKEN_PER, 0, 32, ICK_PER_ON);
++
++ sdelay(1000);
++}
+diff --git a/board/omap3530beagle/config.mk b/board/omap3530beagle/config.mk
+new file mode 100644
+index 0000000..9639c43
+--- /dev/null
++++ b/board/omap3530beagle/config.mk
+@@ -0,0 +1,17 @@
++#
++# (C) Copyright 2006
++# Texas Instruments, <www.ti.com>
++#
++# Begale Board uses OMAP3 (ARM-CortexA8) cpu
++# see http://www.ti.com/ for more information on Texas Instruments
++#
++# Physical Address:
++# 8000'0000 (bank0)
++# A000/0000 (bank1)
++# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
++# (mem base + reserved)
++
++# For use with external or internal boots.
++TEXT_BASE = 0x80e80000
++
++
+diff --git a/board/omap3530beagle/lowlevel_init.S b/board/omap3530beagle/lowlevel_init.S
+new file mode 100644
+index 0000000..1f9a0e9
+--- /dev/null
++++ b/board/omap3530beagle/lowlevel_init.S
+@@ -0,0 +1,360 @@
++/*
++ * Board specific setup info
++ *
++ * (C) Copyright 2008
++ * Texas Instruments, <www.ti.com>
++ *
++ * Initial Code by:
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Mohammed Khasim <khasim@ti.com>
++ *
++ * 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/mem.h>
++#include <asm/arch/clocks_omap3.h>
++
++_TEXT_BASE:
++ .word TEXT_BASE /* sdram load addr from config.mk */
++
++#if !defined(CFG_NAND_BOOT) && !defined(CFG_NAND_BOOT)
++/**************************************************************************
++ * cpy_clk_code: relocates clock code into SRAM where its safer to execute
++ * R1 = SRAM destination address.
++ *************************************************************************/
++.global cpy_clk_code
++ cpy_clk_code:
++ /* Copy DPLL code into SRAM */
++ adr r0, go_to_speed /* get addr of clock setting code */
++ mov r2, #384 /* r2 size to copy (div by 32 bytes) */
++ mov r1, r1 /* r1 <- dest address (passed in) */
++ add r2, r2, r0 /* r2 <- source end address */
++next2:
++ ldmia r0!, {r3-r10} /* copy from source address [r0] */
++ stmia r1!, {r3-r10} /* copy to target address [r1] */
++ cmp r0, r2 /* until source end address [r2] */
++ bne next2
++ mov pc, lr /* back to caller */
++
++/* ***************************************************************************
++ * go_to_speed: -Moves to bypass, -Commits clock dividers, -puts dpll at speed
++ * -executed from SRAM.
++ * R0 = CM_CLKEN_PLL-bypass value
++ * R1 = CM_CLKSEL1_PLL-m, n, and divider values
++ * R2 = CM_CLKSEL_CORE-divider values
++ * R3 = CM_IDLEST_CKGEN - addr dpll lock wait
++ *
++ * Note: If core unlocks/relocks and SDRAM is running fast already it gets
++ * confused. A reset of the controller gets it back. Taking away its
++ * L3 when its not in self refresh seems bad for it. Normally, this
++ * code runs from flash before SDR is init so that should be ok.
++ ****************************************************************************/
++.global go_to_speed
++ go_to_speed:
++ stmfd sp!, {r4-r6}
++
++ /* move into fast relock bypass */
++ ldr r4, pll_ctl_add
++ str r0, [r4]
++wait1:
++ ldr r5, [r3] /* get status */
++ and r5, r5, #0x1 /* isolate core status */
++ cmp r5, #0x1 /* still locked? */
++ beq wait1 /* if lock, loop */
++
++ /* set new dpll dividers _after_ in bypass */
++ ldr r5, pll_div_add1
++ str r1, [r5] /* set m, n, m2 */
++ ldr r5, pll_div_add2
++ str r2, [r5] /* set l3/l4/.. dividers*/
++ ldr r5, pll_div_add3 /* wkup */
++ ldr r2, pll_div_val3 /* rsm val */
++ str r2, [r5]
++ ldr r5, pll_div_add4 /* gfx */
++ ldr r2, pll_div_val4
++ str r2, [r5]
++ ldr r5, pll_div_add5 /* emu */
++ ldr r2, pll_div_val5
++ str r2, [r5]
++
++ /* now prepare GPMC (flash) for new dpll speed */
++ /* flash needs to be stable when we jump back to it */
++ ldr r5, flash_cfg3_addr
++ ldr r2, flash_cfg3_val
++ str r2, [r5]
++ ldr r5, flash_cfg4_addr
++ ldr r2, flash_cfg4_val
++ str r2, [r5]
++ ldr r5, flash_cfg5_addr
++ ldr r2, flash_cfg5_val
++ str r2, [r5]
++ ldr r5, flash_cfg1_addr
++ ldr r2, [r5]
++ orr r2, r2, #0x3 /* up gpmc divider */
++ str r2, [r5]
++
++ /* lock DPLL3 and wait a bit */
++ orr r0, r0, #0x7 /* set up for lock mode */
++ str r0, [r4] /* lock */
++ nop /* ARM slow at this point working at sys_clk */
++ nop
++ nop
++ nop
++wait2:
++ ldr r5, [r3] /* get status */
++ and r5, r5, #0x1 /* isolate core status */
++ cmp r5, #0x1 /* still locked? */
++ bne wait2 /* if lock, loop */
++ nop
++ nop
++ nop
++ nop
++ ldmfd sp!, {r4-r6}
++ mov pc, lr /* back to caller, locked */
++
++_go_to_speed: .word go_to_speed
++
++/* these constants need to be close for PIC code */
++/* The Nor has to be in the Flash Base CS0 for this condition to happen */
++flash_cfg1_addr:
++ .word (GPMC_CONFIG_CS0 + GPMC_CONFIG1)
++flash_cfg3_addr:
++ .word (GPMC_CONFIG_CS0 + GPMC_CONFIG3)
++flash_cfg3_val:
++ .word STNOR_GPMC_CONFIG3
++flash_cfg4_addr:
++ .word (GPMC_CONFIG_CS0 + GPMC_CONFIG4)
++flash_cfg4_val:
++ .word STNOR_GPMC_CONFIG4
++flash_cfg5_val:
++ .word STNOR_GPMC_CONFIG5
++flash_cfg5_addr:
++ .word (GPMC_CONFIG_CS0 + GPMC_CONFIG5)
++pll_ctl_add:
++ .word CM_CLKEN_PLL
++pll_div_add1:
++ .word CM_CLKSEL1_PLL
++pll_div_add2:
++ .word CM_CLKSEL_CORE
++pll_div_add3:
++ .word CM_CLKSEL_WKUP
++pll_div_val3:
++ .word (WKUP_RSM << 1)
++pll_div_add4:
++ .word CM_CLKSEL_GFX
++pll_div_val4:
++ .word (GFX_DIV << 0)
++pll_div_add5:
++ .word CM_CLKSEL1_EMU
++pll_div_val5:
++ .word CLSEL1_EMU_VAL
++
++#endif
++
++.globl lowlevel_init
++lowlevel_init:
++ ldr sp, SRAM_STACK
++ str ip, [sp] /* stash old link register */
++ mov ip, lr /* save link reg across call */
++ bl s_init /* go setup pll,mux,memory */
++ ldr ip, [sp] /* restore save ip */
++ mov lr, ip /* restore link reg */
++
++ /* back to arch calling code */
++ mov pc, lr
++
++ /* the literal pools origin */
++ .ltorg
++
++REG_CONTROL_STATUS:
++ .word CONTROL_STATUS
++SRAM_STACK:
++ .word LOW_LEVEL_SRAM_STACK
++
++/* DPLL(1-4) PARAM TABLES */
++/* Each of the tables has M, N, FREQSEL, M2 values defined for nominal
++ * OPP (1.2V). The fields are defined according to dpll_param struct(clock.c).
++ * The values are defined for all possible sysclk and for ES1 and ES2.
++ */
++
++mpu_dpll_param:
++/* 12MHz */
++/* ES1 */
++.word 0x0FE,0x07,0x05,0x01
++/* ES2 */
++.word 0x0FA,0x05,0x07,0x01
++/* 3410 */
++.word 0x085,0x05,0x07,0x01
++
++/* 13MHz */
++/* ES1 */
++.word 0x17D,0x0C,0x03,0x01
++/* ES2 */
++.word 0x1F4,0x0C,0x03,0x01
++/* 3410 */
++.word 0x10A,0x0C,0x03,0x01
++
++/* 19.2MHz */
++/* ES1 */
++.word 0x179,0x12,0x04,0x01
++/* ES2 */
++.word 0x271,0x17,0x03,0x01
++/* 3410 */
++.word 0x14C,0x17,0x03,0x01
++
++/* 26MHz */
++/* ES1 */
++.word 0x17D,0x19,0x03,0x01
++/* ES2 */
++.word 0x0FA,0x0C,0x07,0x01
++/* 3410 */
++.word 0x085,0x0C,0x07,0x01
++
++/* 38.4MHz */
++/* ES1 */
++.word 0x1FA,0x32,0x03,0x01
++/* ES2 */
++.word 0x271,0x2F,0x03,0x01
++/* 3410 */
++.word 0x14C,0x2F,0x03,0x01
++
++
++.globl get_mpu_dpll_param
++get_mpu_dpll_param:
++ adr r0, mpu_dpll_param
++ mov pc, lr
++
++iva_dpll_param:
++/* 12MHz */
++/* ES1 */
++.word 0x07D,0x05,0x07,0x01
++/* ES2 */
++.word 0x0B4,0x05,0x07,0x01
++/* 3410 */
++.word 0x085,0x05,0x07,0x01
++
++/* 13MHz */
++/* ES1 */
++.word 0x0FA,0x0C,0x03,0x01
++/* ES2 */
++.word 0x168,0x0C,0x03,0x01
++/* 3410 */
++.word 0x10A,0x0C,0x03,0x01
++
++/* 19.2MHz */
++/* ES1 */
++.word 0x082,0x09,0x07,0x01
++/* ES2 */
++.word 0x0E1,0x0B,0x06,0x01
++/* 3410 */
++.word 0x14C,0x17,0x03,0x01
++
++/* 26MHz */
++/* ES1 */
++.word 0x07D,0x0C,0x07,0x01
++/* ES2 */
++.word 0x0B4,0x0C,0x07,0x01
++/* 3410 */
++.word 0x085,0x0C,0x07,0x01
++
++/* 38.4MHz */
++/* ES1 */
++.word 0x13F,0x30,0x03,0x01
++/* ES2 */
++.word 0x0E1,0x17,0x06,0x01
++/* 3410 */
++.word 0x14C,0x2F,0x03,0x01
++
++
++.globl get_iva_dpll_param
++get_iva_dpll_param:
++ adr r0, iva_dpll_param
++ mov pc, lr
++
++/* Core DPLL targets for L3 at 166 & L133 */
++core_dpll_param:
++/* 12MHz */
++/* ES1 */
++.word M_12_ES1,M_12_ES1,FSL_12_ES1,M2_12_ES1
++/* ES2 */
++.word M_12,N_12,FSEL_12,M2_12
++/* 3410 */
++.word M_12,N_12,FSEL_12,M2_12
++
++/* 13MHz */
++/* ES1 */
++.word M_13_ES1,N_13_ES1,FSL_13_ES1,M2_13_ES1
++/* ES2 */
++.word M_13,N_13,FSEL_13,M2_13
++/* 3410 */
++.word M_13,N_13,FSEL_13,M2_13
++
++/* 19.2MHz */
++/* ES1 */
++.word M_19p2_ES1,N_19p2_ES1,FSL_19p2_ES1,M2_19p2_ES1
++/* ES2 */
++.word M_19p2,N_19p2,FSEL_19p2,M2_19p2
++/* 3410 */
++.word M_19p2,N_19p2,FSEL_19p2,M2_19p2
++
++/* 26MHz */
++/* ES1 */
++.word M_26_ES1,N_26_ES1,FSL_26_ES1,M2_26_ES1
++/* ES2 */
++.word M_26,N_26,FSEL_26,M2_26
++/* 3410 */
++.word M_26,N_26,FSEL_26,M2_26
++
++/* 38.4MHz */
++/* ES1 */
++.word M_38p4_ES1,N_38p4_ES1,FSL_38p4_ES1,M2_38p4_ES1
++/* ES2 */
++.word M_38p4,N_38p4,FSEL_38p4,M2_38p4
++/* 3410 */
++.word M_38p4,N_38p4,FSEL_38p4,M2_38p4
++
++.globl get_core_dpll_param
++get_core_dpll_param:
++ adr r0, core_dpll_param
++ mov pc, lr
++
++/* PER DPLL values are same for both ES1 and ES2 */
++per_dpll_param:
++/* 12MHz */
++.word 0xD8,0x05,0x07,0x09
++
++/* 13MHz */
++.word 0x1B0,0x0C,0x03,0x09
++
++/* 19.2MHz */
++.word 0xE1,0x09,0x07,0x09
++
++/* 26MHz */
++.word 0xD8,0x0C,0x07,0x09
++
++/* 38.4MHz */
++.word 0xE1,0x13,0x07,0x09
++
++.globl get_per_dpll_param
++get_per_dpll_param:
++ adr r0, per_dpll_param
++ mov pc, lr
++
+diff --git a/board/omap3530beagle/mem.c b/board/omap3530beagle/mem.c
+new file mode 100644
+index 0000000..fb803be
+--- /dev/null
++++ b/board/omap3530beagle/mem.c
+@@ -0,0 +1,250 @@
++/*
++ * (C) Copyright 2008
++ * Texas Instruments, <www.ti.com>
++ *
++ * Initial Code from:
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Mohammed Khasim <khasim@ti.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.
++ *
++ * 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 <asm/io.h>
++#include <asm/arch/bits.h>
++#include <asm/arch/mem.h>
++#include <asm/arch/sys_proto.h>
++#include <command.h>
++
++/* Only One NAND allowed on board at a time.
++ * The GPMC CS Base for the same
++ */
++unsigned int nand_cs_base;
++unsigned int boot_flash_base;
++unsigned int boot_flash_off;
++unsigned int boot_flash_sec;
++unsigned int boot_flash_type;
++volatile unsigned int boot_flash_env_addr;
++
++/* help common/env_flash.c */
++#ifdef ENV_IS_VARIABLE
++
++uchar(*boot_env_get_char_spec) (int index);
++int (*boot_env_init) (void);
++int (*boot_saveenv) (void);
++void (*boot_env_relocate_spec) (void);
++
++/* 16 bit NAND */
++uchar env_get_char_spec(int index);
++int env_init(void);
++int saveenv(void);
++void env_relocate_spec(void);
++extern char *env_name_spec;
++
++u8 is_nand;
++
++#endif /* ENV_IS_VARIABLE */
++
++static u32 gpmc_m_nand[GPMC_MAX_REG] = {
++ M_NAND_GPMC_CONFIG1,
++ M_NAND_GPMC_CONFIG2,
++ M_NAND_GPMC_CONFIG3,
++ M_NAND_GPMC_CONFIG4,
++ M_NAND_GPMC_CONFIG5,
++ M_NAND_GPMC_CONFIG6, 0
++};
++
++/**************************************************************************
++ * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow
++ * command line mem=xyz use all memory with out discontinuous support
++ * compiled in. Could do it at the ATAG, but there really is two banks...
++ * Called as part of 2nd phase DDR init.
++ **************************************************************************/
++void make_cs1_contiguous(void)
++{
++ u32 size, a_add_low, a_add_high;
++
++ size = get_sdr_cs_size(SDRC_CS0_OSET);
++ size /= SZ_32M; /* find size to offset CS1 */
++ a_add_high = (size & 3) << 8; /* set up low field */
++ a_add_low = (size & 0x3C) >> 2; /* set up high field */
++ __raw_writel((a_add_high | a_add_low), SDRC_CS_CFG);
++
++}
++
++/********************************************************
++ * mem_ok() - test used to see if timings are correct
++ * for a part. Helps in guessing which part
++ * we are currently using.
++ *******************************************************/
++u32 mem_ok(void)
++{
++ u32 val1, val2, addr;
++ u32 pattern = 0x12345678;
++
++ addr = OMAP34XX_SDRC_CS0;
++
++ __raw_writel(0x0, addr + 0x400); /* clear pos A */
++ __raw_writel(pattern, addr); /* pattern to pos B */
++ __raw_writel(0x0, addr + 4); /* remove pattern off the bus */
++ val1 = __raw_readl(addr + 0x400); /* get pos A value */
++ val2 = __raw_readl(addr); /* get val2 */
++
++ if ((val1 != 0) || (val2 != pattern)) /* see if pos A value changed */
++ return (0);
++ else
++ return (1);
++}
++
++/********************************************************
++ * sdrc_init() - init the sdrc chip selects CS0 and CS1
++ * - early init routines, called from flash or
++ * SRAM.
++ *******************************************************/
++void sdrc_init(void)
++{
++ /* only init up first bank here */
++ do_sdrc_init(SDRC_CS0_OSET, EARLY_INIT);
++}
++
++/*************************************************************************
++ * do_sdrc_init(): initialize the SDRAM for use.
++ * -code sets up SDRAM basic SDRC timings for CS0
++ * -optimal settings can be placed here, or redone after i2c
++ * inspection of board info
++ *
++ * - code called ones in C-Stack only context for CS0 and a possible 2nd
++ * time depending on memory configuration from stack+global context
++ **************************************************************************/
++
++void do_sdrc_init(u32 offset, u32 early)
++{
++
++ /* reset sdrc controller */
++ __raw_writel(SOFTRESET, SDRC_SYSCONFIG);
++ wait_on_value(BIT0, BIT0, SDRC_STATUS, 12000000);
++ __raw_writel(0, SDRC_SYSCONFIG);
++
++ /* setup sdrc to ball mux */
++ __raw_writel(SDP_SDRC_SHARING, SDRC_SHARING);
++
++ /* SDRC_MCFG0 register */
++ (*(unsigned int *) 0x6D000080) = 0x02584099; /* from Micron */
++
++ /* SDRC_RFR_CTRL0 register */
++ (*(unsigned int *) 0x6D0000a4) = 0x54601; /* for 166M */
++
++ /* SDRC_ACTIM_CTRLA0 register */
++ (*(unsigned int *) 0x6D00009c) = 0xa29db4c6; /* for 166M */
++
++ /* SDRC_ACTIM_CTRLB0 register */
++ (*(unsigned int *) 0x6D0000a0) = 0x12214; /* for 166M */
++
++ /* Disble Power Down of CKE cuz of 1 CKE on combo part */
++ (*(unsigned int *) 0x6D000070) = 0x00000081;
++
++ /* SDRC_Manual command register */
++ (*(unsigned int *) 0x6D0000a8) = 0x00000000; /* NOP command */
++ (*(unsigned int *) 0x6D0000a8) = 0x00000001; /* Precharge command */
++ (*(unsigned int *) 0x6D0000a8) = 0x00000002; /* Auto-refresh command */
++ (*(unsigned int *) 0x6D0000a8) = 0x00000002; /* Auto-refresh command */
++
++ /* SDRC MR0 register */
++ (*(int *) 0x6D000084) = 0x00000032; /* Burst length = 4 */
++ /* CAS latency = 3, Write Burst = Read Burst Serial Mode */
++
++ /* SDRC DLLA control register */
++ (*(unsigned int *) 0x6D000060) = 0x0000A;
++ sdelay(0x20000);
++}
++
++void enable_gpmc_config(u32 *gpmc_config, u32 gpmc_base, u32 base, u32 size)
++{
++ __raw_writel(0, GPMC_CONFIG7 + gpmc_base);
++ sdelay(1000);
++ /* Delay for settling */
++ __raw_writel(gpmc_config[0], GPMC_CONFIG1 + gpmc_base);
++ __raw_writel(gpmc_config[1], GPMC_CONFIG2 + gpmc_base);
++ __raw_writel(gpmc_config[2], GPMC_CONFIG3 + gpmc_base);
++ __raw_writel(gpmc_config[3], GPMC_CONFIG4 + gpmc_base);
++ __raw_writel(gpmc_config[4], GPMC_CONFIG5 + gpmc_base);
++ __raw_writel(gpmc_config[5], GPMC_CONFIG6 + gpmc_base);
++ /* Enable the config */
++ __raw_writel((((size & 0xF) << 8) | ((base >> 24) & 0x3F) |
++ (1 << 6)), GPMC_CONFIG7 + gpmc_base);
++ sdelay(2000);
++}
++
++/*****************************************************
++ * gpmc_init(): init gpmc bus
++ * Init GPMC for x16, MuxMode (SDRAM in x32).
++ * This code can only be executed from SRAM or SDRAM.
++ *****************************************************/
++void gpmc_init(void)
++{
++ /* putting a blanket check on GPMC based on ZeBu for now */
++ u32 mux = 0, mwidth;
++ u32 *gpmc_config = NULL;
++ u32 gpmc_base = 0;
++ u32 base = 0;
++ u32 size = 0;
++ u32 f_off = CFG_MONITOR_LEN;
++ u32 f_sec = 0;
++ u32 config = 0;
++
++ mux = BIT9;
++ mwidth = get_gpmc0_width();
++
++ /* global settings */
++ __raw_writel(0x0, GPMC_IRQENABLE); /* isr's sources masked */
++ __raw_writel(0, GPMC_TIMEOUT_CONTROL); /* timeout disable */
++
++ config = __raw_readl(GPMC_CONFIG);
++ config &= (~0xf00);
++ __raw_writel(config, GPMC_CONFIG);
++
++ /* Disable the GPMC0 config set by ROM code
++ * It conflicts with our MPDB (both at 0x08000000)
++ */
++ __raw_writel(0, GPMC_CONFIG7 + GPMC_CONFIG_CS0);
++ sdelay(1000);
++
++ /* CS 0 */
++ gpmc_config = gpmc_m_nand;
++ gpmc_base = GPMC_CONFIG_CS0 + (0 * GPMC_CONFIG_WIDTH);
++ base = PISMO1_NAND_BASE;
++ size = PISMO1_NAND_SIZE;
++ enable_gpmc_config(gpmc_config, gpmc_base, base, size);
++
++ f_off = SMNAND_ENV_OFFSET;
++ f_sec = SZ_128K;
++ is_nand = 1;
++ nand_cs_base = gpmc_base;
++
++ /* env setup */
++ boot_flash_base = base;
++ boot_flash_off = f_off;
++ boot_flash_sec = f_sec;
++ boot_flash_env_addr = f_off;
++
++#ifdef ENV_IS_VARIABLE
++ boot_env_get_char_spec = env_get_char_spec;
++ boot_env_init = env_init;
++ boot_saveenv = saveenv;
++ boot_env_relocate_spec = env_relocate_spec;
++#endif
++
++}
+diff --git a/board/omap3530beagle/nand.c b/board/omap3530beagle/nand.c
+new file mode 100644
+index 0000000..2f94684
+--- /dev/null
++++ b/board/omap3530beagle/nand.c
+@@ -0,0 +1,408 @@
++/*
++ * (C) Copyright 2004-2008 Texas Instruments, <www.ti.com>
++ * Rohit Choraria <rohitkc@ti.com>
++ *
++ * 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 <asm/io.h>
++#include <asm/arch/mem.h>
++#include <linux/mtd/nand_ecc.h>
++
++#if defined(CONFIG_CMD_NAND)
++
++#include <nand.h>
++
++unsigned char cs;
++volatile unsigned long gpmc_cs_base_add;
++
++#define GPMC_BUF_EMPTY 0
++#define GPMC_BUF_FULL 1
++
++#define ECC_P1_128_E(val) ((val) & 0x000000FF) /* Bit 0 to 7 */
++#define ECC_P512_2048_E(val) (((val) & 0x00000F00)>>8) /* Bit 8 to 11 */
++#define ECC_P1_128_O(val) (((val) & 0x00FF0000)>>16) /* Bit 16 to Bit 23 */
++#define ECC_P512_2048_O(val) (((val) & 0x0F000000)>>24) /* Bit 24 to Bit 27 */
++
++/*
++ * omap_nand_hwcontrol - Set the address pointers corretly for the
++ * following address/data/command operation
++ * @mtd: MTD device structure
++ * @ctrl: Says whether Address or Command or Data is following.
++ */
++static void omap_nand_hwcontrol(struct mtd_info *mtd, int ctrl)
++{
++ register struct nand_chip *this = mtd->priv;
++
++ /* Point the IO_ADDR to DATA and ADDRESS registers instead
++ of chip address */
++ switch (ctrl) {
++ case NAND_CTL_SETCLE:
++ this->IO_ADDR_W = (void *) gpmc_cs_base_add + GPMC_NAND_CMD;
++ this->IO_ADDR_R = (void *) gpmc_cs_base_add + GPMC_NAND_DAT;
++ break;
++ case NAND_CTL_SETALE:
++ this->IO_ADDR_W = (void *) gpmc_cs_base_add + GPMC_NAND_ADR;
++ this->IO_ADDR_R = (void *) gpmc_cs_base_add + GPMC_NAND_DAT;
++ break;
++ case NAND_CTL_CLRCLE:
++ this->IO_ADDR_W = (void *) gpmc_cs_base_add + GPMC_NAND_DAT;
++ this->IO_ADDR_R = (void *) gpmc_cs_base_add + GPMC_NAND_DAT;
++ break;
++ case NAND_CTL_CLRALE:
++ this->IO_ADDR_W = (void *) gpmc_cs_base_add + GPMC_NAND_DAT;
++ this->IO_ADDR_R = (void *) gpmc_cs_base_add + GPMC_NAND_DAT;
++ break;
++ }
++}
++
++/*
++ * omap_nand_wait - called primarily after a program/erase operation
++ * so that we access NAND again only after the device
++ * is ready again.
++ * @mtd: MTD device structure
++ * @chip: nand_chip structure
++ * @state: State from which wait function is being called i.e write/erase.
++ */
++static int omap_nand_wait(struct mtd_info *mtd, struct nand_chip *chip,
++ int state)
++{
++ register struct nand_chip *this = mtd->priv;
++ int status = 0;
++
++ this->IO_ADDR_W = (void *) gpmc_cs_base_add + GPMC_NAND_CMD;
++ this->IO_ADDR_R = (void *) gpmc_cs_base_add + GPMC_NAND_DAT;
++ /* Send the status command and loop until the device is free */
++ while (!(status & 0x40)) {
++ __raw_writeb(NAND_CMD_STATUS & 0xFF, this->IO_ADDR_W);
++ status = __raw_readb(this->IO_ADDR_R);
++ }
++ return status;
++}
++
++#ifdef CFG_NAND_WIDTH_16
++/*
++ * omap_nand_write_buf16 - [DEFAULT] write buffer to chip
++ * @mtd: MTD device structure
++ * @buf: data buffer
++ * @len: number of bytes to write
++ *
++ * Default write function for 16bit buswith
++ */
++static void omap_nand_write_buf(struct mtd_info *mtd, const u_char *buf,
++ int len)
++{
++ int i;
++ struct nand_chip *this = mtd->priv;
++ u16 *p = (u16 *) buf;
++ len >>= 1;
++
++ for (i = 0; i < len; i++) {
++ writew(p[i], this->IO_ADDR_W);
++ while (GPMC_BUF_EMPTY == (readl(GPMC_STATUS) & GPMC_BUF_FULL)) ;
++ }
++}
++
++/*
++ * nand_read_buf16 - [DEFAULT] read chip data into buffer
++ * @mtd: MTD device structure
++ * @buf: buffer to store date
++ * @len: number of bytes to read
++ *
++ * Default read function for 16bit buswith
++ */
++static void omap_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
++{
++ int i;
++ struct nand_chip *this = mtd->priv;
++ u16 *p = (u16 *) buf;
++ len >>= 1;
++
++ for (i = 0; i < len; i++)
++ p[i] = readw(this->IO_ADDR_R);
++}
++
++#else
++/*
++ * omap_nand_write_buf - write buffer to NAND controller
++ * @mtd: MTD device structure
++ * @buf: data buffer
++ * @len: number of bytes to write
++ *
++ */
++static void omap_nand_write_buf(struct mtd_info *mtd, const uint8_t *buf,
++ int len)
++{
++ int i;
++ int j = 0;
++ struct nand_chip *chip = mtd->priv;
++
++ for (i = 0; i < len; i++) {
++ writeb(buf[i], chip->IO_ADDR_W);
++ for (j = 0; j < 10; j++) ;
++ }
++
++}
++
++/*
++ * omap_nand_read_buf - read data from NAND controller into buffer
++ * @mtd: MTD device structure
++ * @buf: buffer to store date
++ * @len: number of bytes to read
++ *
++ */
++static void omap_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
++{
++ int i;
++ int j = 0;
++ struct nand_chip *chip = mtd->priv;
++
++ for (i = 0; i < len; i++) {
++ buf[i] = readb(chip->IO_ADDR_R);
++ while (GPMC_BUF_EMPTY == (readl(GPMC_STATUS) & GPMC_BUF_FULL));
++ }
++}
++#endif /* CFG_NAND_WIDTH_16 */
++
++/*
++ * omap_hwecc_init - Initialize the Hardware ECC for NAND flash in
++ * GPMC controller
++ * @mtd: MTD device structure
++ *
++ */
++static void omap_hwecc_init(struct nand_chip *chip)
++{
++ unsigned long val = 0x0;
++
++ /* Init ECC Control Register */
++ /* Clear all ECC | Enable Reg1 */
++ val = ((0x00000001 << 8) | 0x00000001);
++ __raw_writel(val, GPMC_BASE + GPMC_ECC_CONTROL);
++ __raw_writel(0x3fcff000, GPMC_BASE + GPMC_ECC_SIZE_CONFIG);
++}
++
++/*
++ * omap_correct_data - Compares the ecc read from nand spare area with
++ * ECC registers values
++ * and corrects one bit error if it has occured
++ * @mtd: MTD device structure
++ * @dat: page data
++ * @read_ecc: ecc read from nand flash
++ * @calc_ecc: ecc read from ECC registers
++ */
++static int omap_correct_data(struct mtd_info *mtd, u_char *dat,
++ u_char *read_ecc, u_char *calc_ecc)
++{
++ return 0;
++}
++
++/*
++ * omap_calculate_ecc - Generate non-inverted ECC bytes.
++ *
++ * Using noninverted ECC can be considered ugly since writing a blank
++ * page ie. padding will clear the ECC bytes. This is no problem as
++ * long nobody is trying to write data on the seemingly unused page.
++ * Reading an erased page will produce an ECC mismatch between
++ * generated and read ECC bytes that has to be dealt with separately.
++ * @mtd: MTD structure
++ * @dat: unused
++ * @ecc_code: ecc_code buffer
++ */
++static int omap_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
++ u_char *ecc_code)
++{
++ unsigned long val = 0x0;
++ unsigned long reg;
++
++ /* Start Reading from HW ECC1_Result = 0x200 */
++ reg = (unsigned long) (GPMC_BASE + GPMC_ECC1_RESULT);
++ val = __raw_readl(reg);
++
++ *ecc_code++ = ECC_P1_128_E(val);
++ *ecc_code++ = ECC_P1_128_O(val);
++ *ecc_code++ = ECC_P512_2048_E(val) | ECC_P512_2048_O(val) << 4;
++
++ return 0;
++}
++
++/*
++ * omap_enable_ecc - This function enables the hardware ecc functionality
++ * @mtd: MTD device structure
++ * @mode: Read/Write mode
++ */
++static void omap_enable_hwecc(struct mtd_info *mtd, int mode)
++{
++ struct nand_chip *chip = mtd->priv;
++ unsigned int val = __raw_readl(GPMC_BASE + GPMC_ECC_CONFIG);
++ unsigned int dev_width = (chip->options & NAND_BUSWIDTH_16) >> 1;
++
++ switch (mode) {
++ case NAND_ECC_READ:
++ __raw_writel(0x101, GPMC_BASE + GPMC_ECC_CONTROL);
++ /* ECC col width | CS | ECC Enable */
++ val = (dev_width << 7) | (cs << 1) | (0x1);
++ break;
++ case NAND_ECC_READSYN:
++ __raw_writel(0x100, GPMC_BASE + GPMC_ECC_CONTROL);
++ /* ECC col width | CS | ECC Enable */
++ val = (dev_width << 7) | (cs << 1) | (0x1);
++ break;
++ case NAND_ECC_WRITE:
++ __raw_writel(0x101, GPMC_BASE + GPMC_ECC_CONTROL);
++ /* ECC col width | CS | ECC Enable */
++ val = (dev_width << 7) | (cs << 1) | (0x1);
++ break;
++ default:
++ printf("Error: Unrecognized Mode[%d]!\n", mode);
++ break;
++ }
++
++ __raw_writel(val, GPMC_BASE + GPMC_ECC_CONFIG);
++}
++
++static struct nand_oobinfo hw_nand_oob_64 = {
++ .useecc = MTD_NANDECC_AUTOPLACE,
++ .eccbytes = 12,
++ .eccpos = {
++ 2, 3, 4, 5,
++ 6, 7, 8, 9,
++ 10, 11, 12, 13},
++ .oobfree = { {20, 50} } /* don't care */
++};
++
++static struct nand_oobinfo sw_nand_oob_64 = {
++ .useecc = MTD_NANDECC_AUTOPLACE,
++ .eccbytes = 24,
++ .eccpos = {
++ 40, 41, 42, 43, 44, 45, 46, 47,
++ 48, 49, 50, 51, 52, 53, 54, 55,
++ 56, 57, 58, 59, 60, 61, 62, 63},
++ .oobfree = { {2, 38} }
++};
++
++void omap_nand_switch_ecc(struct mtd_info *mtd, int hardware)
++{
++ struct nand_chip *nand = mtd->priv;
++
++ if (!hardware) {
++ nand->eccmode = NAND_ECC_SOFT;
++ nand->autooob = &sw_nand_oob_64;
++ nand->eccsize = 256; /* set default eccsize */
++ nand->eccbytes = 3;
++ nand->eccsteps = 8;
++ nand->enable_hwecc = 0;
++ nand->calculate_ecc = nand_calculate_ecc;
++ nand->correct_data = nand_correct_data;
++ } else {
++ nand->eccmode = NAND_ECC_HW3_512;
++ nand->autooob = &hw_nand_oob_64;
++ nand->eccsize = 512;
++ nand->eccbytes = 3;
++ nand->eccsteps = 4;
++ nand->enable_hwecc = omap_enable_hwecc;
++ nand->correct_data = omap_correct_data;
++ nand->calculate_ecc = omap_calculate_ecc;
++
++ omap_hwecc_init(nand);
++ }
++
++ mtd->eccsize = nand->eccsize;
++ nand->oobdirty = 1;
++
++ if (nand->options & NAND_BUSWIDTH_16) {
++ mtd->oobavail = mtd->oobsize - (nand->autooob->eccbytes + 2);
++ if (nand->autooob->eccbytes & 0x01)
++ mtd->oobavail--;
++ } else
++ mtd->oobavail = mtd->oobsize - (nand->autooob->eccbytes + 1);
++}
++
++/*
++ * Board-specific NAND initialization. The following members of the
++ * argument are board-specific (per include/linux/mtd/nand_new.h):
++ * - IO_ADDR_R?: address to read the 8 I/O lines of the flash device
++ * - IO_ADDR_W?: address to write the 8 I/O lines of the flash device
++ * - hwcontrol: hardwarespecific function for accesing control-lines
++ * - dev_ready: hardwarespecific function for accesing device ready/busy line
++ * - enable_hwecc?: function to enable (reset) hardware ecc generator. Must
++ * only be provided if a hardware ECC is available
++ * - eccmode: mode of ecc, see defines
++ * - chip_delay: chip dependent delay for transfering data from array to
++ * read regs (tR)
++ * - options: various chip options. They can partly be set to inform
++ * nand_scan about special functionality. See the defines for further
++ * explanation
++ * Members with a "?" were not set in the merged testing-NAND branch,
++ * so they are not set here either.
++ */
++int board_nand_init(struct nand_chip *nand)
++{
++ int gpmc_config = 0;
++ cs = 0;
++ while (cs <= GPMC_MAX_CS) {
++ /* Each GPMC set for a single CS is at offset 0x30 */
++ /* already remapped for us */
++ gpmc_cs_base_add = (GPMC_CONFIG_CS0 + (cs * 0x30));
++ /* xloader/Uboot would have written the NAND type for us
++ * NOTE: This is a temporary measure and cannot handle ONENAND.
++ * The proper way of doing this is to pass the setup of
++ * u-boot up to kernel using kernel params - something on
++ * the lines of machineID
++ */
++ /* Check if NAND type is set */
++ if ((__raw_readl(gpmc_cs_base_add + GPMC_CONFIG1) & 0xC00) ==
++ 0x800) {
++ /* Found it!! */
++ break;
++ }
++ cs++;
++ }
++ if (cs > GPMC_MAX_CS) {
++ printf("NAND: Unable to find NAND settings in " \
++ "GPMC Configuration - quitting\n");
++ }
++
++ gpmc_config = __raw_readl(GPMC_CONFIG);
++ /* Disable Write protect */
++ gpmc_config |= 0x10;
++ __raw_writel(gpmc_config, GPMC_CONFIG);
++
++ nand->IO_ADDR_R = (int *) gpmc_cs_base_add + GPMC_NAND_DAT;
++ nand->IO_ADDR_W = (int *) gpmc_cs_base_add + GPMC_NAND_CMD;
++
++ nand->hwcontrol = omap_nand_hwcontrol;
++ nand->options = NAND_NO_PADDING | NAND_CACHEPRG | NAND_NO_AUTOINCR |
++ NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR;
++ nand->read_buf = omap_nand_read_buf;
++ nand->write_buf = omap_nand_write_buf;
++ nand->eccmode = NAND_ECC_SOFT;
++ /* if RDY/BSY line is connected to OMAP then use the omap ready
++ * function and the generic nand_wait function which reads the
++ * status register after monitoring the RDY/BSY line. Otherwise
++ * use a standard chip delay which is slightly more than tR
++ * (AC Timing) of the NAND device and read the status register
++ * until you get a failure or success
++ */
++ nand->waitfunc = omap_nand_wait;
++ nand->chip_delay = 50;
++
++ return 0;
++}
++#endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */
+diff --git a/board/omap3530beagle/omap3530beagle.c b/board/omap3530beagle/omap3530beagle.c
+new file mode 100644
+index 0000000..7d9a566
+--- /dev/null
++++ b/board/omap3530beagle/omap3530beagle.c
+@@ -0,0 +1,388 @@
++/*
++ * (C) Copyright 2004-2008
++ * Texas Instruments, <www.ti.com>
++ *
++ * Author :
++ * Sunil Kumar <sunilsaini05@gmail.com>
++ * Shashi Ranjan <shashiranjanmca05@gmail.com>
++ *
++ * Derived from Beagle Board and 3430 SDP code by
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Mohammed Khasim <khasim@ti.com>
++ *
++ *
++ * 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 <asm/io.h>
++#include <asm/arch/bits.h>
++#include <asm/arch/mux.h>
++#include <asm/arch/sys_proto.h>
++#include <asm/arch/mem.h>
++#include <i2c.h>
++#include <asm/mach-types.h>
++
++#if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
++#include <linux/mtd/nand_legacy.h>
++extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
++#endif
++
++#define NOT_EARLY 0
++
++/* Permission values for registers -Full fledged permissions to all */
++#define UNLOCK_1 0xFFFFFFFF
++#define UNLOCK_2 0x00000000
++#define UNLOCK_3 0x0000FFFF
++
++/******************************************************************************
++ * Routine: delay
++ * Description: spinning delay to use before udelay works
++ *****************************************************************************/
++static inline void delay(unsigned long loops)
++{
++ __asm__ volatile ("1:\n" "subs %0, %1, #1\n"
++ "bne 1b":"=r" (loops):"0"(loops));
++}
++
++/******************************************************************************
++ * Routine: board_init
++ * Description: Early hardware init.
++ *****************************************************************************/
++int board_init(void)
++{
++ DECLARE_GLOBAL_DATA_PTR;
++
++ gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
++ /* board id for Linux */
++ gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE;
++ /* boot param addr */
++ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
++
++ return 0;
++}
++
++/******************************************************************************
++ * Routine: secure_unlock
++ * Description: Setup security registers for access
++ * (GP Device only)
++ *****************************************************************************/
++void secure_unlock_mem(void)
++{
++ /* Protection Module Register Target APE (PM_RT) */
++ __raw_writel(UNLOCK_1, RT_REQ_INFO_PERMISSION_1);
++ __raw_writel(UNLOCK_1, RT_READ_PERMISSION_0);
++ __raw_writel(UNLOCK_1, RT_WRITE_PERMISSION_0);
++ __raw_writel(UNLOCK_2, RT_ADDR_MATCH_1);
++
++ __raw_writel(UNLOCK_3, GPMC_REQ_INFO_PERMISSION_0);
++ __raw_writel(UNLOCK_3, GPMC_READ_PERMISSION_0);
++ __raw_writel(UNLOCK_3, GPMC_WRITE_PERMISSION_0);
++
++ __raw_writel(UNLOCK_3, OCM_REQ_INFO_PERMISSION_0);
++ __raw_writel(UNLOCK_3, OCM_READ_PERMISSION_0);
++ __raw_writel(UNLOCK_3, OCM_WRITE_PERMISSION_0);
++ __raw_writel(UNLOCK_2, OCM_ADDR_MATCH_2);
++
++ /* IVA Changes */
++ __raw_writel(UNLOCK_3, IVA2_REQ_INFO_PERMISSION_0);
++ __raw_writel(UNLOCK_3, IVA2_READ_PERMISSION_0);
++ __raw_writel(UNLOCK_3, IVA2_WRITE_PERMISSION_0);
++
++ __raw_writel(UNLOCK_1, SMS_RG_ATT0); /* SDRC region 0 public */
++}
++
++/******************************************************************************
++ * Routine: secureworld_exit()
++ * Description: If chip is EMU and boot type is external
++ * configure secure registers and exit secure world
++ * general use.
++ *****************************************************************************/
++void secureworld_exit()
++{
++ unsigned long i;
++
++ /* configrue non-secure access control register */
++ __asm__ __volatile__("mrc p15, 0, %0, c1, c1, 2":"=r"(i));
++ /* enabling co-processor CP10 and CP11 accesses in NS world */
++ __asm__ __volatile__("orr %0, %0, #0xC00":"=r"(i));
++ /* allow allocation of locked TLBs and L2 lines in NS world */
++ /* allow use of PLE registers in NS world also */
++ __asm__ __volatile__("orr %0, %0, #0x70000":"=r"(i));
++ __asm__ __volatile__("mcr p15, 0, %0, c1, c1, 2":"=r"(i));
++
++ /* Enable ASA in ACR register */
++ __asm__ __volatile__("mrc p15, 0, %0, c1, c0, 1":"=r"(i));
++ __asm__ __volatile__("orr %0, %0, #0x10":"=r"(i));
++ __asm__ __volatile__("mcr p15, 0, %0, c1, c0, 1":"=r"(i));
++
++ /* Exiting secure world */
++ __asm__ __volatile__("mrc p15, 0, %0, c1, c1, 0":"=r"(i));
++ __asm__ __volatile__("orr %0, %0, #0x31":"=r"(i));
++ __asm__ __volatile__("mcr p15, 0, %0, c1, c1, 0":"=r"(i));
++}
++
++/******************************************************************************
++ * Routine: setup_auxcr()
++ * Description: Write to AuxCR desired value using SMI.
++ * general use.
++ *****************************************************************************/
++void setup_auxcr()
++{
++ unsigned long i;
++ volatile unsigned int j;
++ /* Save r0, r12 and restore them after usage */
++ __asm__ __volatile__("mov %0, r12":"=r"(j));
++ __asm__ __volatile__("mov %0, r0":"=r"(i));
++
++ /* GP Device ROM code API usage here */
++ /* r12 = AUXCR Write function and r0 value */
++ __asm__ __volatile__("mov r12, #0x3");
++ __asm__ __volatile__("mrc p15, 0, r0, c1, c0, 1");
++ /* Enabling ASA */
++ __asm__ __volatile__("orr r0, r0, #0x10");
++ /* SMI instruction to call ROM Code API */
++ __asm__ __volatile__(".word 0xE1600070");
++ __asm__ __volatile__("mov r0, %0":"=r"(i));
++ __asm__ __volatile__("mov r12, %0":"=r"(j));
++}
++
++/******************************************************************************
++ * Routine: try_unlock_sram()
++ * Description: If chip is GP/EMU(special) type, unlock the SRAM for
++ * general use.
++ *****************************************************************************/
++void try_unlock_memory()
++{
++ int mode;
++ int in_sdram = running_in_sdram();
++
++ /* if GP device unlock device SRAM for general use */
++ /* secure code breaks for Secure/Emulation device - HS/E/T */
++ mode = get_device_type();
++ if (mode == GP_DEVICE)
++ secure_unlock_mem();
++
++ /* If device is EMU and boot is XIP external booting
++ * Unlock firewalls and disable L2 and put chip
++ * out of secure world
++ */
++ /* Assuming memories are unlocked by the demon who put us in SDRAM */
++ if ((mode <= EMU_DEVICE) && (get_boot_type() == 0x1F)
++ && (!in_sdram)) {
++ secure_unlock_mem();
++ secureworld_exit();
++ }
++
++ return;
++}
++
++/******************************************************************************
++ * Routine: s_init
++ * Description: Does early system init of muxing and clocks.
++ * - Called path is with SRAM stack.
++ *****************************************************************************/
++void s_init(void)
++{
++ int in_sdram = running_in_sdram();
++
++ watchdog_init();
++
++ try_unlock_memory();
++
++ /* Right now flushing at low MPU speed.
++ Need to move after clock init */
++ v7_flush_dcache_all(get_device_type());
++#ifndef CONFIG_ICACHE_OFF
++ icache_enable();
++#endif
++
++#ifdef CONFIG_L2_OFF
++ l2cache_disable();
++#else
++ l2cache_enable();
++#endif
++ /* Writing to AuxCR in U-boot using SMI for GP DEV */
++ /* Currently SMI in Kernel on ES2 devices seems to have an isse
++ * Once that is resolved, we can postpone this config to kernel
++ */
++ if (get_device_type() == GP_DEVICE)
++ setup_auxcr();
++
++ set_muxconf_regs();
++ delay(100);
++
++ prcm_init();
++
++ per_clocks_enable();
++
++ if (!in_sdram)
++ sdrc_init();
++}
++
++/******************************************************************************
++ * Routine: misc_init_r
++ * Description: Init ethernet (done here so udelay works)
++ *****************************************************************************/
++int misc_init_r(void)
++{
++
++ unsigned char byte;
++
++#ifdef CONFIG_DRIVER_OMAP34XX_I2C
++ i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE);
++#endif
++ byte = 0x20;
++ i2c_write(0x4B, 0x7A, 1, &byte, 1);
++ byte = 0x03;
++ i2c_write(0x4B, 0x7D, 1, &byte, 1);
++ byte = 0xE0;
++ i2c_write(0x4B, 0x8E, 1, &byte, 1);
++ byte = 0x05;
++ i2c_write(0x4B, 0x91, 1, &byte, 1);
++ byte = 0x20;
++ i2c_write(0x4B, 0x96, 1, &byte, 1);
++ byte = 0x03;
++ i2c_write(0x4B, 0x99, 1, &byte, 1);
++ byte = 0x33;
++ i2c_write(0x4A, 0xEE, 1, &byte, 1);
++
++ *((uint *) 0x49058034) = 0xFFFFFAF9;
++ *((uint *) 0x49056034) = 0x0F9F0FFF;
++ *((uint *) 0x49058094) = 0x00000506;
++ *((uint *) 0x49056094) = 0xF060F000;
++
++ return (0);
++}
++
++
++/******************************************************************************
++ * Routine: wait_for_command_complete
++ * Description: Wait for posting to finish on watchdog
++ *****************************************************************************/
++void wait_for_command_complete(unsigned int wd_base)
++{
++ int pending = 1;
++ do {
++ pending = __raw_readl(wd_base + WWPS);
++ } while (pending);
++}
++
++/******************************************************************************
++ * Routine: watchdog_init
++ * Description: Shut down watch dogs
++ *****************************************************************************/
++void watchdog_init(void)
++{
++ /* There are 3 watch dogs WD1=Secure, WD2=MPU, WD3=IVA. WD1 is
++ * either taken care of by ROM (HS/EMU) or not accessible (GP).
++ * We need to take care of WD2-MPU or take a PRCM reset. WD3
++ * should not be running and does not generate a PRCM reset.
++ */
++
++ sr32(CM_FCLKEN_WKUP, 5, 1, 1);
++ sr32(CM_ICLKEN_WKUP, 5, 1, 1);
++ wait_on_value(BIT5, 0x20, CM_IDLEST_WKUP, 5); /* some issue here */
++
++ __raw_writel(WD_UNLOCK1, WD2_BASE + WSPR);
++ wait_for_command_complete(WD2_BASE);
++ __raw_writel(WD_UNLOCK2, WD2_BASE + WSPR);
++}
++
++/******************************************************************************
++ * Routine: dram_init
++ * Description: sets uboots idea of sdram size
++ *****************************************************************************/
++int dram_init(void)
++{
++ DECLARE_GLOBAL_DATA_PTR;
++ unsigned int size0 = 0, size1 = 0;
++ u32 mtype, btype;
++
++ btype = get_board_type();
++ mtype = get_mem_type();
++
++ display_board_info(btype);
++
++ /* If a second bank of DDR is attached to CS1 this is
++ * where it can be started. Early init code will init
++ * memory on CS0.
++ */
++ if ((mtype == DDR_COMBO) || (mtype == DDR_STACKED))
++ do_sdrc_init(SDRC_CS1_OSET, NOT_EARLY);
++
++ size0 = get_sdr_cs_size(SDRC_CS0_OSET);
++ size1 = get_sdr_cs_size(SDRC_CS1_OSET);
++
++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
++ gd->bd->bi_dram[0].size = size0;
++ gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + size0;
++ gd->bd->bi_dram[1].size = size1;
++
++ return 0;
++}
++
++/******************************************************************************
++ * Routine: set_muxconf_regs
++ * Description: Setting up the configuration Mux registers specific to the
++ * hardware. Many pins need to be moved from protect to primary
++ * mode.
++ *****************************************************************************/
++void set_muxconf_regs(void)
++{
++ MUX_DEFAULT_ES2();
++}
++
++#if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
++/******************************************************************************
++ * Routine: nand+_init
++ * Description: Set up nand for nand and jffs2 commands
++ *****************************************************************************/
++void nand_init(void)
++{
++ extern flash_info_t flash_info[];
++
++ nand_probe(CFG_NAND_ADDR);
++ if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN)
++ print_size(nand_dev_desc[0].totlen, "\n");
++
++#ifdef CFG_JFFS2_MEM_NAND
++ flash_info[CFG_JFFS2_FIRST_BANK].flash_id = nand_dev_desc[0].id;
++ /* only read kernel single meg partition */
++ flash_info[CFG_JFFS2_FIRST_BANK].size = 1024 * 1024 * 2;
++ /* 1024 blocks in 16meg chip (use less for raw/copied partition) */
++ flash_info[CFG_JFFS2_FIRST_BANK].sector_count = 1024;
++ /* ?, ram for now, open question, copy to RAM or adapt for NAND */
++ flash_info[CFG_JFFS2_FIRST_BANK].start[0] = 0x80200000;
++#endif
++}
++#endif
++
++/******************************************************************************
++ * Dummy function to handle errors for EABI incompatibility
++ *****************************************************************************/
++void raise(void)
++{
++}
++
++/******************************************************************************
++ * Dummy function to handle errors for EABI incompatibility
++ *****************************************************************************/
++void abort(void)
++{
++}
+diff --git a/board/omap3530beagle/sys_info.c b/board/omap3530beagle/sys_info.c
+new file mode 100644
+index 0000000..a275557
+--- /dev/null
++++ b/board/omap3530beagle/sys_info.c
+@@ -0,0 +1,309 @@
++/*
++ * (C) Copyright 2008
++ * Texas Instruments, <www.ti.com>
++ *
++ * Derived from Beagle Board and 3430 SDP code by
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Mohammed Khasim <khasim@ti.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.
++ *
++ * 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 <asm/io.h>
++#include <asm/arch/bits.h>
++#include <asm/arch/mem.h> /* get mem tables */
++#include <asm/arch/sys_proto.h>
++#include <i2c.h>
++
++/**************************************************************************
++ * get_gpmc0_type()
++ ***************************************************************************/
++u32 get_gpmc0_type(void)
++{
++ /* Default NAND */
++ return (2);
++}
++
++/****************************************************
++ * get_cpu_type() - low level get cpu type
++ * - no C globals yet.
++ ****************************************************/
++u32 get_cpu_type(void)
++{
++ /* fixme, need to get register defines for OMAP3 */
++ return (CPU_3430);
++}
++
++/******************************************
++ * get_cpu_rev(void) - extract version info
++ ******************************************/
++u32 get_cpu_rev(void)
++{
++ u32 cpuid = 0;
++ /* On ES1.0 the IDCODE register is not exposed on L4
++ * so using CPU ID to differentiate
++ * between ES2.0 and ES1.0.
++ */
++ __asm__ __volatile__("mrc p15, 0, %0, c0, c0, 0":"=r"(cpuid));
++ if ((cpuid & 0xf) == 0x0)
++ return CPU_3430_ES1;
++ else
++ return CPU_3430_ES2;
++
++}
++
++/****************************************************
++ * is_mem_sdr() - return 1 if mem type in use is SDR
++ ****************************************************/
++u32 is_mem_sdr(void)
++{
++ volatile u32 *burst = (volatile u32 *) (SDRC_MR_0 + SDRC_CS0_OSET);
++ if (*burst == SDP_SDRC_MR_0_SDR)
++ return (1);
++ return (0);
++}
++
++/***********************************************************
++ * get_mem_type() - identify type of mDDR part used.
++ ***********************************************************/
++u32 get_mem_type(void)
++{
++ /* Current SDP3430 uses 2x16 MDDR Infenion parts */
++ return (DDR_DISCRETE);
++}
++
++/***********************************************************************
++ * get_cs0_size() - get size of chip select 0/1
++ ************************************************************************/
++u32 get_sdr_cs_size(u32 offset)
++{
++ u32 size;
++
++ /* get ram size field */
++ size = __raw_readl(SDRC_MCFG_0 + offset) >> 8;
++ size &= 0x3FF; /* remove unwanted bits */
++ size *= SZ_2M; /* find size in MB */
++ return (size);
++}
++
++/***********************************************************************
++ * get_board_type() - get board type based on current production stats.
++ * - NOTE-1-: 2 I2C EEPROMs will someday be populated with proper info.
++ * when they are available we can get info from there. This should
++ * be correct of all known boards up until today.
++ * - NOTE-2- EEPROMs are populated but they are updated very slowly. To
++ * avoid waiting on them we will use ES version of the chip to get info.
++ * A later version of the FPGA migth solve their speed issue.
++ ************************************************************************/
++u32 get_board_type(void)
++{
++ if (get_cpu_rev() == CPU_3430_ES2)
++ return SDP_3430_V2;
++ else
++ return SDP_3430_V1;
++}
++
++/******************************************************************
++ * get_sysboot_value() - get init word settings
++ ******************************************************************/
++inline u32 get_sysboot_value(void)
++{
++ return (0x0000003F & __raw_readl(CONTROL_STATUS));
++}
++
++/***************************************************************************
++ * get_gpmc0_base() - Return current address hardware will be
++ * fetching from. The below effectively gives what is correct, its a bit
++ * mis-leading compared to the TRM. For the most general case the mask
++ * needs to be also taken into account this does work in practice.
++ * - for u-boot we currently map:
++ * -- 0 to nothing,
++ * -- 4 to flash
++ * -- 8 to enent
++ * -- c to wifi
++ ****************************************************************************/
++u32 get_gpmc0_base(void)
++{
++ u32 b;
++
++ b = __raw_readl(GPMC_CONFIG_CS0 + GPMC_CONFIG7);
++ b &= 0x1F; /* keep base [5:0] */
++ b = b << 24; /* ret 0x0b000000 */
++ return (b);
++}
++
++/*******************************************************************
++ * get_gpmc0_width() - See if bus is in x8 or x16 (mainly for nand)
++ *******************************************************************/
++u32 get_gpmc0_width(void)
++{
++ return (WIDTH_16BIT);
++}
++
++/*************************************************************************
++ * get_board_rev() - setup to pass kernel board revision information
++ * returns:(bit[0-3] sub version, higher bit[7-4] is higher version)
++ *************************************************************************/
++u32 get_board_rev(void)
++{
++ return (0x20);
++}
++
++/*********************************************************************
++ * display_board_info() - print banner with board info.
++ *********************************************************************/
++void display_board_info(u32 btype)
++{
++ char *bootmode[] = {
++ "NOR",
++ "ONND",
++ "NAND",
++ "P2a",
++ "NOR",
++ "NOR",
++ "P2a",
++ "P2b",
++ };
++ u32 brev = get_board_rev();
++ char cpu_3430s[] = "3530";
++ char db_ver[] = "0.0"; /* board type */
++ char mem_sdr[] = "mSDR"; /* memory type */
++ char mem_ddr[] = "LPDDR";
++ char t_tst[] = "TST"; /* security level */
++ char t_emu[] = "EMU";
++ char t_hs[] = "HS";
++ char t_gp[] = "GP";
++ char unk[] = "?";
++#ifdef CONFIG_LED_INFO
++ char led_string[CONFIG_LED_LEN] = { 0 };
++#endif
++ char p_l3[] = "165";
++ char p_cpu[] = "2";
++
++ char *cpu_s, *db_s, *mem_s, *sec_s;
++ u32 cpu, rev, sec;
++
++ rev = get_cpu_rev();
++ cpu = get_cpu_type();
++ sec = get_device_type();
++
++ if (is_mem_sdr())
++ mem_s = mem_sdr;
++ else
++ mem_s = mem_ddr;
++
++ cpu_s = cpu_3430s;
++
++ db_s = db_ver;
++ db_s[0] += (brev >> 4) & 0xF;
++ db_s[2] += brev & 0xF;
++
++ switch (sec) {
++ case TST_DEVICE:
++ sec_s = t_tst;
++ break;
++ case EMU_DEVICE:
++ sec_s = t_emu;
++ break;
++ case HS_DEVICE:
++ sec_s = t_hs;
++ break;
++ case GP_DEVICE:
++ sec_s = t_gp;
++ break;
++ default:
++ sec_s = unk;
++ }
++
++ printf("OMAP%s-%s rev %d, CPU-OPP%s L3-%sMHz\n", cpu_s, sec_s, rev,
++ p_cpu, p_l3);
++ printf("OMAP3 Beagle Board + %s/%s\n",
++ mem_s, bootmode[get_gpmc0_type()]);
++
++}
++
++/********************************************************
++ * get_base(); get upper addr of current execution
++ *******************************************************/
++u32 get_base(void)
++{
++ u32 val;
++
++ __asm__ __volatile__("mov %0, pc \n":"=r"(val)::"memory");
++ val &= 0xF0000000;
++ val >>= 28;
++ return (val);
++}
++
++/********************************************************
++ * running_in_flash() - tell if currently running in
++ * flash.
++ *******************************************************/
++u32 running_in_flash(void)
++{
++ if (get_base() < 4)
++ return (1); /* in flash */
++
++ return (0); /* running in SRAM or SDRAM */
++}
++
++/********************************************************
++ * running_in_sram() - tell if currently running in
++ * sram.
++ *******************************************************/
++u32 running_in_sram(void)
++{
++ if (get_base() == 4)
++ return (1); /* in SRAM */
++
++ return (0); /* running in FLASH or SDRAM */
++}
++
++/********************************************************
++ * running_in_sdram() - tell if currently running in
++ * flash.
++ *******************************************************/
++u32 running_in_sdram(void)
++{
++ if (get_base() > 4)
++ return (1); /* in sdram */
++
++ return (0); /* running in SRAM or FLASH */
++}
++
++/***************************************************************
++ * get_boot_type() - Is this an XIP type device or a stream one
++ * bits 4-0 specify type. Bit 5 sys mem/perif
++ ***************************************************************/
++u32 get_boot_type(void)
++{
++ u32 v;
++
++ v = get_sysboot_value() & (BIT4 | BIT3 | BIT2 | BIT1 | BIT0);
++ return v;
++}
++
++/*************************************************************
++ * get_device_type(): tell if GP/HS/EMU/TST
++ *************************************************************/
++u32 get_device_type(void)
++{
++ int mode;
++
++ mode = __raw_readl(CONTROL_STATUS) & (DEVICE_MASK);
++ return (mode >>= 8);
++}
+diff --git a/board/omap3530beagle/syslib.c b/board/omap3530beagle/syslib.c
+new file mode 100644
+index 0000000..002c6e8
+--- /dev/null
++++ b/board/omap3530beagle/syslib.c
+@@ -0,0 +1,72 @@
++/*
++ * (C) Copyright 2008
++ * Texas Instruments, <www.ti.com>
++ *
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Mohammed Khasim <khasim@ti.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.
++ *
++ * 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 <asm/io.h>
++#include <asm/arch/bits.h>
++#include <asm/arch/mem.h>
++#include <asm/arch/clocks.h>
++#include <asm/arch/sys_proto.h>
++
++/************************************************************
++ * sdelay() - simple spin loop. Will be constant time as
++ * its generally used in bypass conditions only. This
++ * is necessary until timers are accessible.
++ *
++ * not inline to increase chances its in cache when called
++ *************************************************************/
++void sdelay(unsigned long loops)
++{
++ __asm__ volatile ("1:\n" "subs %0, %1, #1\n"
++ "bne 1b":"=r" (loops):"0"(loops));
++}
++
++/*****************************************************************
++ * sr32 - clear & set a value in a bit range for a 32 bit address
++ *****************************************************************/
++void sr32(u32 addr, u32 start_bit, u32 num_bits, u32 value)
++{
++ u32 tmp, msk = 0;
++ msk = 1 << num_bits;
++ --msk;
++ tmp = __raw_readl(addr) & ~(msk << start_bit);
++ tmp |= value << start_bit;
++ __raw_writel(tmp, addr);
++}
++
++/*********************************************************************
++ * wait_on_value() - common routine to allow waiting for changes in
++ * volatile regs.
++ *********************************************************************/
++u32 wait_on_value(u32 read_bit_mask, u32 match_value, u32 read_addr, u32 bound)
++{
++ u32 i = 0, val;
++ do {
++ ++i;
++ val = __raw_readl(read_addr) & read_bit_mask;
++ if (val == match_value)
++ return (1);
++ if (i == bound)
++ return (0);
++ } while (1);
++}
+diff --git a/board/omap3530beagle/u-boot.lds b/board/omap3530beagle/u-boot.lds
+new file mode 100644
+index 0000000..72f15f6
+--- /dev/null
++++ b/board/omap3530beagle/u-boot.lds
+@@ -0,0 +1,63 @@
++/*
++ * January 2004 - Changed to support H4 device
++ * Copyright (c) 2004 Texas Instruments
++ *
++ * (C) Copyright 2002
++ * 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
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(_start)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ cpu/omap3/start.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
++ __exidx_start = .;
++ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
++ __exidx_end = .;
++
++ . = 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 --git a/common/env_nand.c b/common/env_nand.c
+index a48e98e..8b04a01 100644
+--- a/common/env_nand.c
++++ b/common/env_nand.c
+@@ -231,6 +231,8 @@ int saveenv(void)
+ size_t total;
+ int ret = 0;
+
++ nand_erase_options_t nand_erase_options;
++
+ nand_erase_options.length = CFG_ENV_RANGE;
+ nand_erase_options.quiet = 0;
+ nand_erase_options.jffs2 = 0;
+diff --git a/cpu/omap3/Makefile b/cpu/omap3/Makefile
+new file mode 100644
+index 0000000..097447a
+--- /dev/null
++++ b/cpu/omap3/Makefile
+@@ -0,0 +1,43 @@
++#
++# (C) Copyright 2000-2003
++# 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$(CPU).a
++
++START = start.o
++OBJS = interrupts.o cpu.o mmc.o
++
++all: .depend $(START) $(LIB)
++
++$(LIB): $(OBJS)
++ $(AR) crv $@ $(OBJS)
++
++#########################################################################
++
++.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c)
++ $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@
++
++sinclude .depend
++
++#########################################################################
+diff --git a/cpu/omap3/config.mk b/cpu/omap3/config.mk
+new file mode 100644
+index 0000000..7551677
+--- /dev/null
++++ b/cpu/omap3/config.mk
+@@ -0,0 +1,34 @@
++#
++# (C) Copyright 2002
++# 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
++#
++PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
++ -msoft-float
++
++PLATFORM_CPPFLAGS += -march=armv7a
++# =========================================================================
++#
++# Supply options according to compiler version
++#
++# =========================================================================
++#PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
++PLATFORM_CPPFLAGS +=$(call cc-option)
++PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
+diff --git a/cpu/omap3/cpu.c b/cpu/omap3/cpu.c
+new file mode 100644
+index 0000000..59e6a58
+--- /dev/null
++++ b/cpu/omap3/cpu.c
+@@ -0,0 +1,221 @@
++/*
++ * (C) Copyright 2008 Texas Insturments
++ *
++ * (C) Copyright 2002
++ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
++ * Marius Groeger <mgroeger@sysgo.de>
++ *
++ * (C) Copyright 2002
++ * 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
++ */
++
++/*
++ * CPU specific code
++ */
++
++#include <common.h>
++#include <command.h>
++#include <asm/arch/sys_proto.h>
++
++#ifdef CONFIG_USE_IRQ
++DECLARE_GLOBAL_DATA_PTR;
++#endif
++
++#ifndef CONFIG_L2_OFF
++void l2cache_disable(void);
++#endif
++
++/* read co-processor 15, register #1 (control register) */
++static unsigned long read_p15_c1(void)
++{
++ unsigned long value;
++
++ __asm__ __volatile__("mrc p15, 0, %0, c1, c0, 0\
++ @ read control reg\n":"=r"(value)
++ ::"memory");
++ return value;
++}
++
++/* write to co-processor 15, register #1 (control register) */
++static void write_p15_c1(unsigned long value)
++{
++ __asm__ __volatile__("mcr p15, 0, %0, c1, c0, 0\
++ @ write it back\n"::"r"(value)
++ : "memory");
++
++ read_p15_c1();
++}
++
++static void cp_delay(void)
++{
++ volatile int i;
++
++ /* Many OMAP regs need at least 2 nops */
++ for (i = 0; i < 100; i++) ;
++}
++
++/* See also ARM Ref. Man. */
++#define C1_MMU (1<<0) /* mmu off/on */
++#define C1_ALIGN (1<<1) /* alignment faults off/on */
++#define C1_DC (1<<2) /* dcache off/on */
++#define C1_WB (1<<3) /* merging write buffer on/off */
++#define C1_BIG_ENDIAN (1<<7) /* big endian off/on */
++#define C1_SYS_PROT (1<<8) /* system protection */
++#define C1_ROM_PROT (1<<9) /* ROM protection */
++#define C1_IC (1<<12) /* icache off/on */
++#define C1_HIGH_VECTORS (1<<13) /* location of vectors: low/high addresses */
++#define RESERVED_1 (0xf << 3) /* must be 111b for R/W */
++
++int cpu_init(void)
++{
++ /*
++ * setup up stacks if necessary
++ */
++#ifdef CONFIG_USE_IRQ
++ IRQ_STACK_START =
++ _armboot_start - CFG_MALLOC_LEN - CFG_GBL_DATA_SIZE - 4;
++ FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
++#endif
++ return 0;
++}
++
++int cleanup_before_linux(void)
++{
++ unsigned int i;
++
++ /*
++ * this function is called just before we call linux
++ * it prepares the processor for linux
++ *
++ * we turn off caches etc ...
++ */
++ disable_interrupts();
++
++ /* turn off I/D-cache */
++ asm("mrc p15, 0, %0, c1, c0, 0":"=r"(i));
++ i &= ~(C1_DC | C1_IC);
++ asm("mcr p15, 0, %0, c1, c0, 0": :"r"(i));
++
++ /* invalidate I-cache */
++ arm_cache_flush();
++#ifndef CONFIG_L2_OFF
++ /* turn off L2 cache */
++ l2cache_disable();
++ /* invalidate L2 cache also */
++ v7_flush_dcache_all(get_device_type());
++#endif
++ i = 0;
++ /* mem barrier to sync up things */
++ asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i));
++
++#ifndef CONFIG_L2_OFF
++ l2cache_enable();
++#endif
++
++ return (0);
++}
++
++int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ disable_interrupts();
++ reset_cpu(0);
++
++ /* NOTREACHED */
++ return (0);
++}
++
++void icache_enable(void)
++{
++ ulong reg;
++
++ reg = read_p15_c1(); /* get control reg. */
++ cp_delay();
++ write_p15_c1(reg | C1_IC);
++}
++
++void icache_disable(void)
++{
++ ulong reg;
++
++ reg = read_p15_c1();
++ cp_delay();
++ write_p15_c1(reg & ~C1_IC);
++}
++
++void l2cache_enable()
++{
++ unsigned long i;
++ volatile unsigned int j;
++
++ /* ES2 onwards we can disable/enable L2 ourselves */
++ if (get_cpu_rev() == CPU_3430_ES2) {
++ __asm__ __volatile__("mrc p15, 0, %0, c1, c0, 1":"=r"(i));
++ __asm__ __volatile__("orr %0, %0, #0x2":"=r"(i));
++ __asm__ __volatile__("mcr p15, 0, %0, c1, c0, 1":"=r"(i));
++ } else {
++ /* Save r0, r12 and restore them after usage */
++ __asm__ __volatile__("mov %0, r12":"=r"(j));
++ __asm__ __volatile__("mov %0, r0":"=r"(i));
++
++ /* GP Device ROM code API usage here */
++ /* r12 = AUXCR Write function and r0 value */
++ __asm__ __volatile__("mov r12, #0x3");
++ __asm__ __volatile__("mrc p15, 0, r0, c1, c0, 1");
++ __asm__ __volatile__("orr r0, r0, #0x2");
++ /* SMI instruction to call ROM Code API */
++ __asm__ __volatile__(".word 0xE1600070");
++ __asm__ __volatile__("mov r0, %0":"=r"(i));
++ __asm__ __volatile__("mov r12, %0":"=r"(j));
++ }
++
++}
++
++void l2cache_disable()
++{
++ unsigned long i;
++ volatile unsigned int j;
++
++ /* ES2 onwards we can disable/enable L2 ourselves */
++ if (get_cpu_rev() == CPU_3430_ES2) {
++ __asm__ __volatile__("mrc p15, 0, %0, c1, c0, 1":"=r"(i));
++ __asm__ __volatile__("bic %0, %0, #0x2":"=r"(i));
++ __asm__ __volatile__("mcr p15, 0, %0, c1, c0, 1":"=r"(i));
++ } else {
++ /* Save r0, r12 and restore them after usage */
++ __asm__ __volatile__("mov %0, r12":"=r"(j));
++ __asm__ __volatile__("mov %0, r0":"=r"(i));
++
++ /* GP Device ROM code API usage here */
++ /* r12 = AUXCR Write function and r0 value */
++ __asm__ __volatile__("mov r12, #0x3");
++ __asm__ __volatile__("mrc p15, 0, r0, c1, c0, 1");
++ __asm__ __volatile__("bic r0, r0, #0x2");
++ /* SMI instruction to call ROM Code API */
++ __asm__ __volatile__(".word 0xE1600070");
++ __asm__ __volatile__("mov r0, %0":"=r"(i));
++ __asm__ __volatile__("mov r12, %0":"=r"(j));
++ }
++}
++
++int icache_status(void)
++{
++ return (read_p15_c1() & C1_IC) != 0;
++}
+diff --git a/cpu/omap3/interrupts.c b/cpu/omap3/interrupts.c
+new file mode 100644
+index 0000000..818b833
+--- /dev/null
++++ b/cpu/omap3/interrupts.c
+@@ -0,0 +1,304 @@
++/*
++ * (C) Copyright 2008
++ * Texas Instruments
++ *
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Moahmmed Khasim <khasim@ti.com>
++ *
++ * (C) Copyright 2002
++ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
++ * Marius Groeger <mgroeger@sysgo.de>
++ * Alex Zuepke <azu@sysgo.de>
++ *
++ * (C) Copyright 2002
++ * 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
++ */
++
++#include <common.h>
++#include <asm/arch/bits.h>
++
++#include <asm/proc-armv/ptrace.h>
++
++#define TIMER_LOAD_VAL 0
++
++/* macro to read the 32 bit timer */
++#define READ_TIMER (*(volatile ulong *)(CFG_TIMERBASE+TCRR))
++
++#ifdef CONFIG_USE_IRQ
++/* enable IRQ interrupts */
++void enable_interrupts(void)
++{
++ unsigned long temp;
++ __asm__ __volatile__("mrs %0, cpsr\n"
++ "bic %0, %0, #0x80\n" "msr cpsr_c, %0":"=r"(temp)
++ ::"memory");
++}
++
++/*
++ * disable IRQ/FIQ interrupts
++ * returns true if interrupts had been enabled before we disabled them
++ */
++int disable_interrupts(void)
++{
++ unsigned long old, temp;
++ __asm__ __volatile__("mrs %0, cpsr\n"
++ "orr %1, %0, #0xc0\n"
++ "msr cpsr_c, %1":"=r"(old), "=r"(temp)
++ ::"memory");
++ return (old & 0x80) == 0;
++}
++#else
++void enable_interrupts(void)
++{
++ return;
++}
++int disable_interrupts(void)
++{
++ return 0;
++}
++#endif
++
++void bad_mode(void)
++{
++ panic("Resetting CPU ...\n");
++ reset_cpu(0);
++}
++
++void show_regs(struct pt_regs *regs)
++{
++ unsigned long flags;
++ const char *processor_modes[] = {
++ "USER_26", "FIQ_26", "IRQ_26", "SVC_26",
++ "UK4_26", "UK5_26", "UK6_26", "UK7_26",
++ "UK8_26", "UK9_26", "UK10_26", "UK11_26",
++ "UK12_26", "UK13_26", "UK14_26", "UK15_26",
++ "USER_32", "FIQ_32", "IRQ_32", "SVC_32",
++ "UK4_32", "UK5_32", "UK6_32", "ABT_32",
++ "UK8_32", "UK9_32", "UK10_32", "UND_32",
++ "UK12_32", "UK13_32", "UK14_32", "SYS_32",
++ };
++
++ flags = condition_codes(regs);
++
++ printf("pc : [<%08lx>] lr : [<%08lx>]\n"
++ "sp : %08lx ip : %08lx fp : %08lx\n",
++ instruction_pointer(regs),
++ regs->ARM_lr, regs->ARM_sp, regs->ARM_ip, regs->ARM_fp);
++ printf("r10: %08lx r9 : %08lx r8 : %08lx\n",
++ regs->ARM_r10, regs->ARM_r9, regs->ARM_r8);
++ printf("r7 : %08lx r6 : %08lx r5 : %08lx r4 : %08lx\n",
++ regs->ARM_r7, regs->ARM_r6, regs->ARM_r5, regs->ARM_r4);
++ printf("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n",
++ regs->ARM_r3, regs->ARM_r2, regs->ARM_r1, regs->ARM_r0);
++ printf("Flags: %c%c%c%c",
++ flags & CC_N_BIT ? 'N' : 'n',
++ flags & CC_Z_BIT ? 'Z' : 'z',
++ flags & CC_C_BIT ? 'C' : 'c', flags & CC_V_BIT ? 'V' : 'v');
++ printf(" IRQs %s FIQs %s Mode %s%s\n",
++ interrupts_enabled(regs) ? "on" : "off",
++ fast_interrupts_enabled(regs) ? "on" : "off",
++ processor_modes[processor_mode(regs)],
++ thumb_mode(regs) ? " (T)" : "");
++}
++
++void do_undefined_instruction(struct pt_regs *pt_regs)
++{
++ printf("undefined instruction\n");
++ show_regs(pt_regs);
++ bad_mode();
++}
++
++void do_software_interrupt(struct pt_regs *pt_regs)
++{
++ printf("software interrupt\n");
++ show_regs(pt_regs);
++ bad_mode();
++}
++
++void do_prefetch_abort(struct pt_regs *pt_regs)
++{
++ printf("prefetch abort\n");
++ show_regs(pt_regs);
++ bad_mode();
++}
++
++void do_data_abort(struct pt_regs *pt_regs)
++{
++ printf("data abort\n");
++ show_regs(pt_regs);
++ bad_mode();
++}
++
++void do_not_used(struct pt_regs *pt_regs)
++{
++ printf("not used\n");
++ show_regs(pt_regs);
++ bad_mode();
++}
++
++void do_fiq(struct pt_regs *pt_regs)
++{
++ printf("fast interrupt request\n");
++ show_regs(pt_regs);
++ bad_mode();
++}
++
++void do_irq(struct pt_regs *pt_regs)
++{
++ printf("interrupt request\n");
++ show_regs(pt_regs);
++ bad_mode();
++}
++
++
++static ulong timestamp;
++static ulong lastinc;
++
++/* nothing really to do with interrupts, just starts up a counter. */
++int interrupt_init(void)
++{
++ int32_t val;
++
++ /* Start the counter ticking up */
++ /* reload value on overflow */
++ *((int32_t *) (CFG_TIMERBASE + TLDR)) = TIMER_LOAD_VAL;
++ /* mask to enable timer */
++ val = (CFG_PVT << 2) | BIT5 | BIT1 | BIT0;
++ *((int32_t *) (CFG_TIMERBASE + TCLR)) = val; /* start timer */
++
++ reset_timer_masked(); /* init the timestamp and lastinc value */
++
++ return (0);
++}
++
++/*
++ * timer without interrupts
++ */
++void reset_timer(void)
++{
++ reset_timer_masked();
++}
++
++ulong get_timer(ulong base)
++{
++ return get_timer_masked() - base;
++}
++
++void set_timer(ulong t)
++{
++ timestamp = t;
++}
++
++/* delay x useconds AND perserve advance timstamp value */
++void udelay(unsigned long usec)
++{
++ ulong tmo, tmp;
++
++ /* if "big" number, spread normalization to seconds */
++ if (usec >= 1000) {
++ /* if "big" number, spread normalization to seconds */
++ tmo = usec / 1000;
++ /* find number of "ticks" to wait to achieve target */
++ tmo *= CFG_HZ;
++ tmo /= 1000; /* finish normalize. */
++ } else {/* else small number, don't kill it prior to HZ multiply */
++ tmo = usec * CFG_HZ;
++ tmo /= (1000 * 1000);
++ }
++
++ tmp = get_timer(0); /* get current timestamp */
++ /* if setting this forward will roll time stamp */
++ if ((tmo + tmp + 1) < tmp)
++ /* reset "advancing" timestamp to 0, set lastinc value */
++ reset_timer_masked();
++ else
++ tmo += tmp; /* else, set advancing stamp wake up time */
++ while (get_timer_masked() < tmo) /* loop till event */
++ /*NOP*/;
++}
++
++void reset_timer_masked(void)
++{
++ /* reset time */
++ lastinc = READ_TIMER; /* capture current incrementer value time */
++ timestamp = 0; /* start "advancing" time stamp from 0 */
++}
++
++ulong get_timer_masked(void)
++{
++ ulong now = READ_TIMER; /* current tick value */
++
++ if (now >= lastinc) /* normal mode (non roll) */
++ /* move stamp fordward with absoulte diff ticks */
++ timestamp += (now - lastinc);
++ else /* we have rollover of incrementer */
++ timestamp += (0xFFFFFFFF - lastinc) + now;
++ lastinc = now;
++ return timestamp;
++}
++
++/* waits specified delay value and resets timestamp */
++void udelay_masked(unsigned long usec)
++{
++ ulong tmo;
++ ulong endtime;
++ signed long diff;
++
++ /* if "big" number, spread normalization to seconds */
++ if (usec >= 1000) {
++ /* start to normalize for usec to ticks per sec */
++ tmo = usec / 1000;
++ /* find number of "ticks" to wait to achieve target */
++ tmo *= CFG_HZ;
++ tmo /= 1000; /* finish normalize. */
++ } else { /* else small number, */
++ /* don't kill it prior to HZ multiply */
++ tmo = usec * CFG_HZ;
++ tmo /= (1000 * 1000);
++ }
++ endtime = get_timer_masked() + tmo;
++
++ do {
++ ulong now = get_timer_masked();
++ diff = endtime - now;
++ } while (diff >= 0);
++}
++
++/*
++ * This function is derived from PowerPC code (read timebase as long long).
++ * On ARM it just returns the timer value.
++ */
++unsigned long long get_ticks(void)
++{
++ return get_timer(0);
++}
++
++/*
++ * This function is derived from PowerPC code (timebase clock frequency).
++ * On ARM it returns the number of timer ticks per second.
++ */
++ulong get_tbclk(void)
++{
++ ulong tbclk;
++ tbclk = CFG_HZ;
++ return tbclk;
++}
++
+diff --git a/cpu/omap3/mmc.c b/cpu/omap3/mmc.c
+new file mode 100644
+index 0000000..741360b
+--- /dev/null
++++ b/cpu/omap3/mmc.c
+@@ -0,0 +1,559 @@
++/*
++ * (C) Copyright 2008
++ * Texas Instruments, <www.ti.com>
++ * Syed Mohammed Khasim <khasim@ti.com>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation's version 2 of
++ * the License.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <config.h>
++#include <common.h>
++#include <fat.h>
++#include <mmc.h>
++#include <part.h>
++#include <i2c.h>
++
++const unsigned short mmc_transspeed_val[15][4] = {
++ {CLKD(10, 1), CLKD(10, 10), CLKD(10, 100), CLKD(10, 1000)},
++ {CLKD(12, 1), CLKD(12, 10), CLKD(12, 100), CLKD(12, 1000)},
++ {CLKD(13, 1), CLKD(13, 10), CLKD(13, 100), CLKD(13, 1000)},
++ {CLKD(15, 1), CLKD(15, 10), CLKD(15, 100), CLKD(15, 1000)},
++ {CLKD(20, 1), CLKD(20, 10), CLKD(20, 100), CLKD(20, 1000)},
++ {CLKD(26, 1), CLKD(26, 10), CLKD(26, 100), CLKD(26, 1000)},
++ {CLKD(30, 1), CLKD(30, 10), CLKD(30, 100), CLKD(30, 1000)},
++ {CLKD(35, 1), CLKD(35, 10), CLKD(35, 100), CLKD(35, 1000)},
++ {CLKD(40, 1), CLKD(40, 10), CLKD(40, 100), CLKD(40, 1000)},
++ {CLKD(45, 1), CLKD(45, 10), CLKD(45, 100), CLKD(45, 1000)},
++ {CLKD(52, 1), CLKD(52, 10), CLKD(52, 100), CLKD(52, 1000)},
++ {CLKD(55, 1), CLKD(55, 10), CLKD(55, 100), CLKD(55, 1000)},
++ {CLKD(60, 1), CLKD(60, 10), CLKD(60, 100), CLKD(60, 1000)},
++ {CLKD(70, 1), CLKD(70, 10), CLKD(70, 100), CLKD(70, 1000)},
++ {CLKD(80, 1), CLKD(80, 10), CLKD(80, 100), CLKD(80, 1000)}
++};
++
++mmc_card_data cur_card_data;
++static block_dev_desc_t mmc_blk_dev;
++
++block_dev_desc_t *mmc_get_dev(int dev)
++{
++ return ((block_dev_desc_t *) &mmc_blk_dev);
++}
++
++void twl4030_mmc_config(void)
++{
++ unsigned char data;
++
++ data = 0x20;
++ i2c_write(0x4B, 0x82, 1, &data, 1);
++ data = 0x2;
++ i2c_write(0x4B, 0x85, 1, &data, 1);
++}
++
++unsigned char mmc_board_init(void)
++{
++ unsigned int value = 0;
++
++ twl4030_mmc_config();
++
++ value = CONTROL_PBIAS_LITE;
++ CONTROL_PBIAS_LITE = value | (1 << 2) | (1 << 1) | (1 << 9);
++
++ value = CONTROL_DEV_CONF0;
++ CONTROL_DEV_CONF0 = value | (1 << 24);
++
++ return 1;
++}
++
++void mmc_init_stream(void)
++{
++ volatile unsigned int mmc_stat;
++
++ OMAP_HSMMC_CON |= INIT_INITSTREAM;
++
++ OMAP_HSMMC_CMD = MMC_CMD0;
++ do {
++ mmc_stat = OMAP_HSMMC_STAT;
++ } while (!(mmc_stat & CC_MASK));
++
++ OMAP_HSMMC_STAT = CC_MASK;
++
++ OMAP_HSMMC_CMD = MMC_CMD0;
++ do {
++ mmc_stat = OMAP_HSMMC_STAT;
++ } while (!(mmc_stat & CC_MASK));
++
++ OMAP_HSMMC_STAT = OMAP_HSMMC_STAT;
++ OMAP_HSMMC_CON &= ~INIT_INITSTREAM;
++}
++
++unsigned char mmc_clock_config(unsigned int iclk, unsigned short clk_div)
++{
++ unsigned int val;
++
++ mmc_reg_out(OMAP_HSMMC_SYSCTL, (ICE_MASK | DTO_MASK | CEN_MASK),
++ (ICE_STOP | DTO_15THDTO | CEN_DISABLE));
++
++ switch (iclk) {
++ case CLK_INITSEQ:
++ val = MMC_INIT_SEQ_CLK / 2;
++ break;
++ case CLK_400KHZ:
++ val = MMC_400kHz_CLK;
++ break;
++ case CLK_MISC:
++ val = clk_div;
++ break;
++ default:
++ return 0;
++ }
++ mmc_reg_out(OMAP_HSMMC_SYSCTL,
++ ICE_MASK | CLKD_MASK, (val << CLKD_OFFSET) | ICE_OSCILLATE);
++
++ while ((OMAP_HSMMC_SYSCTL & ICS_MASK) == ICS_NOTREADY) {
++ }
++
++ OMAP_HSMMC_SYSCTL |= CEN_ENABLE;
++ return 1;
++}
++
++unsigned char mmc_init_setup(void)
++{
++ unsigned int reg_val;
++
++ mmc_board_init();
++
++ OMAP_HSMMC_SYSCONFIG |= MMC_SOFTRESET;
++ while ((OMAP_HSMMC_SYSSTATUS & RESETDONE) == 0) ;
++
++ OMAP_HSMMC_SYSCTL |= SOFTRESETALL;
++ while ((OMAP_HSMMC_SYSCTL & SOFTRESETALL) != 0x0) ;
++
++ OMAP_HSMMC_HCTL = DTW_1_BITMODE | SDBP_PWROFF | SDVS_3V0;
++ OMAP_HSMMC_CAPA |= VS30_3V0SUP | VS18_1V8SUP;
++
++ reg_val = OMAP_HSMMC_CON & RESERVED_MASK;
++
++ OMAP_HSMMC_CON = CTPL_MMC_SD | reg_val | WPP_ACTIVEHIGH |
++ CDP_ACTIVEHIGH | MIT_CTO | DW8_1_4BITMODE | MODE_FUNC |
++ STR_BLOCK | HR_NOHOSTRESP | INIT_NOINIT | NOOPENDRAIN;
++
++ mmc_clock_config(CLK_INITSEQ, 0);
++ OMAP_HSMMC_HCTL |= SDBP_PWRON;
++
++ OMAP_HSMMC_IE = 0x307f0033;
++
++ mmc_init_stream();
++ return 1;
++}
++
++unsigned char mmc_send_cmd(unsigned int cmd, unsigned int arg,
++ unsigned int *response)
++{
++ volatile unsigned int mmc_stat;
++
++ while ((OMAP_HSMMC_PSTATE & DATI_MASK) == DATI_CMDDIS) {
++ }
++
++ OMAP_HSMMC_BLK = BLEN_512BYTESLEN | NBLK_STPCNT;
++ OMAP_HSMMC_STAT = 0xFFFFFFFF;
++ OMAP_HSMMC_ARG = arg;
++ OMAP_HSMMC_CMD = cmd | CMD_TYPE_NORMAL | CICE_NOCHECK |
++ CCCE_NOCHECK | MSBS_SGLEBLK | ACEN_DISABLE | BCE_DISABLE |
++ DE_DISABLE;
++
++ while (1) {
++ do {
++ mmc_stat = OMAP_HSMMC_STAT;
++ } while (mmc_stat == 0);
++
++ if ((mmc_stat & ERRI_MASK) != 0)
++ return (unsigned char) mmc_stat;
++
++ if (mmc_stat & CC_MASK) {
++ OMAP_HSMMC_STAT = CC_MASK;
++ response[0] = OMAP_HSMMC_RSP10;
++ if ((cmd & RSP_TYPE_MASK) == RSP_TYPE_LGHT136) {
++ response[1] = OMAP_HSMMC_RSP32;
++ response[2] = OMAP_HSMMC_RSP54;
++ response[3] = OMAP_HSMMC_RSP76;
++ }
++ break;
++ }
++ }
++ return 1;
++}
++
++unsigned char mmc_read_data(unsigned int *output_buf)
++{
++ volatile unsigned int mmc_stat;
++ unsigned int read_count = 0;
++
++ /*
++ * Start Polled Read
++ */
++ while (1) {
++ do {
++ mmc_stat = OMAP_HSMMC_STAT;
++ } while (mmc_stat == 0);
++
++ if ((mmc_stat & ERRI_MASK) != 0)
++ return (unsigned char) mmc_stat;
++
++ if (mmc_stat & BRR_MASK) {
++ unsigned int k;
++
++ OMAP_HSMMC_STAT |= BRR_MASK;
++ for (k = 0; k < MMCSD_SECTOR_SIZE / 4; k++) {
++ *output_buf = OMAP_HSMMC_DATA;
++ output_buf++;
++ read_count += 4;
++ }
++ }
++
++ if (mmc_stat & BWR_MASK)
++ OMAP_HSMMC_STAT |= BWR_MASK;
++
++ if (mmc_stat & TC_MASK) {
++ OMAP_HSMMC_STAT |= TC_MASK;
++ break;
++ }
++ }
++ return 1;
++}
++
++unsigned char mmc_detect_card(mmc_card_data *mmc_card_cur)
++{
++ unsigned char err;
++ unsigned int argument = 0;
++ unsigned int ocr_value, ocr_recvd, ret_cmd41, hcs_val;
++ unsigned int resp[4];
++ unsigned short retry_cnt = 2000;
++
++ /* Set to Initialization Clock */
++ err = mmc_clock_config(CLK_400KHZ, 0);
++ if (err != 1)
++ return err;
++
++ mmc_card_cur->RCA = MMC_RELATIVE_CARD_ADDRESS;
++ argument = 0x00000000;
++
++ ocr_value = (0x1FF << 15);
++ err = mmc_send_cmd(MMC_CMD0, argument, resp);
++ if (err != 1)
++ return err;
++
++ argument = SD_CMD8_CHECK_PATTERN | SD_CMD8_2_7_3_6_V_RANGE;
++ err = mmc_send_cmd(MMC_SDCMD8, argument, resp);
++ hcs_val = (err == 1) ?
++ MMC_OCR_REG_HOST_CAPACITY_SUPPORT_SECTOR :
++ MMC_OCR_REG_HOST_CAPACITY_SUPPORT_BYTE;
++
++ argument = 0x0000 << 16;
++ err = mmc_send_cmd(MMC_CMD55, argument, resp);
++ if (err == 1) {
++ mmc_card_cur->card_type = SD_CARD;
++ ocr_value |= hcs_val;
++ ret_cmd41 = MMC_ACMD41;
++ } else {
++ mmc_card_cur->card_type = MMC_CARD;
++ ocr_value |= MMC_OCR_REG_ACCESS_MODE_SECTOR;
++ ret_cmd41 = MMC_CMD1;
++ OMAP_HSMMC_CON &= ~OD;
++ OMAP_HSMMC_CON |= OPENDRAIN;
++ }
++
++ argument = ocr_value;
++ err = mmc_send_cmd(ret_cmd41, argument, resp);
++ if (err != 1)
++ return err;
++
++ ocr_recvd = ((mmc_resp_r3 *) resp)->ocr;
++
++ while (!(ocr_recvd & (0x1 << 31)) && (retry_cnt > 0)) {
++ retry_cnt--;
++ if (mmc_card_cur->card_type == SD_CARD) {
++ argument = 0x0000 << 16;
++ err = mmc_send_cmd(MMC_CMD55, argument, resp);
++ }
++
++ argument = ocr_value;
++ err = mmc_send_cmd(ret_cmd41, argument, resp);
++ if (err != 1)
++ return err;
++ ocr_recvd = ((mmc_resp_r3 *) resp)->ocr;
++ }
++
++ if (!(ocr_recvd & (0x1 << 31)))
++ return 0;
++
++ if (mmc_card_cur->card_type == MMC_CARD) {
++ if ((ocr_recvd & MMC_OCR_REG_ACCESS_MODE_MASK) ==
++ MMC_OCR_REG_ACCESS_MODE_SECTOR) {
++ mmc_card_cur->mode = SECTOR_MODE;
++ } else {
++ mmc_card_cur->mode = BYTE_MODE;
++ }
++
++ ocr_recvd &= ~MMC_OCR_REG_ACCESS_MODE_MASK;
++ } else {
++ if ((ocr_recvd & MMC_OCR_REG_HOST_CAPACITY_SUPPORT_MASK)
++ == MMC_OCR_REG_HOST_CAPACITY_SUPPORT_SECTOR) {
++ mmc_card_cur->mode = SECTOR_MODE;
++ } else {
++ mmc_card_cur->mode = BYTE_MODE;
++ }
++ ocr_recvd &= ~MMC_OCR_REG_HOST_CAPACITY_SUPPORT_MASK;
++ }
++
++ ocr_recvd &= ~(0x1 << 31);
++ if (!(ocr_recvd & ocr_value))
++ return 0;
++
++ err = mmc_send_cmd(MMC_CMD2, argument, resp);
++ if (err != 1)
++ return err;
++
++ if (mmc_card_cur->card_type == MMC_CARD) {
++ argument = mmc_card_cur->RCA << 16;
++ err = mmc_send_cmd(MMC_CMD3, argument, resp);
++ if (err != 1)
++ return err;
++ } else {
++ argument = 0x00000000;
++ err = mmc_send_cmd(MMC_SDCMD3, argument, resp);
++ if (err != 1)
++ return err;
++
++ mmc_card_cur->RCA = ((mmc_resp_r6 *) resp)->newpublishedrca;
++ }
++
++ OMAP_HSMMC_CON &= ~OD;
++ OMAP_HSMMC_CON |= NOOPENDRAIN;
++ return 1;
++}
++
++unsigned char mmc_read_cardsize(mmc_card_data *mmc_dev_data,
++ mmc_csd_reg_t *cur_csd)
++{
++ mmc_extended_csd_reg_t ext_csd;
++ unsigned int size, count, blk_len, blk_no, card_size, argument;
++ unsigned char err;
++ unsigned int resp[4];
++
++ if (mmc_dev_data->mode == SECTOR_MODE) {
++ if (mmc_dev_data->card_type == SD_CARD) {
++ card_size =
++ (((mmc_sd2_csd_reg_t *) cur_csd)->
++ c_size_lsb & MMC_SD2_CSD_C_SIZE_LSB_MASK) |
++ ((((mmc_sd2_csd_reg_t *) cur_csd)->
++ c_size_msb & MMC_SD2_CSD_C_SIZE_MSB_MASK)
++ << MMC_SD2_CSD_C_SIZE_MSB_OFFSET);
++ mmc_dev_data->size = card_size * 1024;
++ if (mmc_dev_data->size == 0)
++ return 0;
++ } else {
++ argument = 0x00000000;
++ err = mmc_send_cmd(MMC_CMD8, argument, resp);
++ if (err != 1)
++ return err;
++ err = mmc_read_data((unsigned int *) &ext_csd);
++ if (err != 1)
++ return err;
++ mmc_dev_data->size = ext_csd.sectorcount;
++
++ if (mmc_dev_data->size == 0)
++ mmc_dev_data->size = 8388608;
++ }
++ } else {
++ if (cur_csd->c_size_mult >= 8)
++ return 0;
++
++ if (cur_csd->read_bl_len >= 12)
++ return 0;
++
++ /* Compute size */
++ count = 1 << (cur_csd->c_size_mult + 2);
++ card_size = (cur_csd->c_size_lsb & MMC_CSD_C_SIZE_LSB_MASK) |
++ ((cur_csd->c_size_msb & MMC_CSD_C_SIZE_MSB_MASK)
++ << MMC_CSD_C_SIZE_MSB_OFFSET);
++ blk_no = (card_size + 1) * count;
++ blk_len = 1 << cur_csd->read_bl_len;
++ size = blk_no * blk_len;
++ mmc_dev_data->size = size / MMCSD_SECTOR_SIZE;
++ if (mmc_dev_data->size == 0)
++ return 0;
++ }
++ return 1;
++}
++
++unsigned char omap_mmc_read_sect(unsigned int start_sec, unsigned int num_bytes,
++ mmc_card_data *mmc_c,
++ unsigned long *output_buf)
++{
++ unsigned char err;
++ unsigned int argument;
++ unsigned int resp[4];
++ unsigned int num_sec_val =
++ (num_bytes + (MMCSD_SECTOR_SIZE - 1)) / MMCSD_SECTOR_SIZE;
++ unsigned int sec_inc_val;
++
++ if (num_sec_val == 0)
++ return 1;
++
++ if (mmc_c->mode == SECTOR_MODE) {
++ argument = start_sec;
++ sec_inc_val = 1;
++ } else {
++ argument = start_sec * MMCSD_SECTOR_SIZE;
++ sec_inc_val = MMCSD_SECTOR_SIZE;
++ }
++
++ while (num_sec_val) {
++ err = mmc_send_cmd(MMC_CMD17, argument, resp);
++ if (err != 1)
++ return err;
++
++ err = mmc_read_data((unsigned int *) output_buf);
++ if (err != 1)
++ return err;
++
++ output_buf += (MMCSD_SECTOR_SIZE / 4);
++ argument += sec_inc_val;
++ num_sec_val--;
++ }
++ return 1;
++}
++
++unsigned char configure_mmc(mmc_card_data *mmc_card_cur)
++{
++ unsigned char ret_val;
++ unsigned int argument;
++ unsigned int resp[4];
++ unsigned int trans_clk, trans_fact, trans_unit, retries = 2;
++ mmc_csd_reg_t Card_CSD;
++ unsigned char trans_speed;
++
++ ret_val = mmc_init_setup();
++
++ if (ret_val != 1)
++ return ret_val;
++
++ do {
++ ret_val = mmc_detect_card(mmc_card_cur);
++ retries--;
++ } while ((retries > 0) && (ret_val != 1));
++
++ argument = mmc_card_cur->RCA << 16;
++ ret_val = mmc_send_cmd(MMC_CMD9, argument, resp);
++ if (ret_val != 1)
++ return ret_val;
++
++ ((unsigned int *) &Card_CSD)[3] = resp[3];
++ ((unsigned int *) &Card_CSD)[2] = resp[2];
++ ((unsigned int *) &Card_CSD)[1] = resp[1];
++ ((unsigned int *) &Card_CSD)[0] = resp[0];
++
++ if (mmc_card_cur->card_type == MMC_CARD)
++ mmc_card_cur->version = Card_CSD.spec_vers;
++
++ trans_speed = Card_CSD.tran_speed;
++
++ ret_val = mmc_send_cmd(MMC_CMD4, MMC_DSR_DEFAULT << 16, resp);
++ if (ret_val != 1)
++ return ret_val;
++
++ trans_unit = trans_speed & MMC_CSD_TRAN_SPEED_UNIT_MASK;
++ trans_fact = trans_speed & MMC_CSD_TRAN_SPEED_FACTOR_MASK;
++
++ if (trans_unit > MMC_CSD_TRAN_SPEED_UNIT_100MHZ)
++ return 0;
++
++ if ((trans_fact < MMC_CSD_TRAN_SPEED_FACTOR_1_0) ||
++ (trans_fact > MMC_CSD_TRAN_SPEED_FACTOR_8_0))
++ return 0;
++
++ trans_unit >>= 0;
++ trans_fact >>= 3;
++
++ trans_clk = mmc_transspeed_val[trans_fact - 1][trans_unit] * 2;
++ ret_val = mmc_clock_config(CLK_MISC, trans_clk);
++
++ if (ret_val != 1)
++ return ret_val;
++
++ argument = mmc_card_cur->RCA << 16;
++ ret_val = mmc_send_cmd(MMC_CMD7_SELECT, argument, resp);
++ if (ret_val != 1)
++ return ret_val;
++
++ /* Configure the block length to 512 bytes */
++ argument = MMCSD_SECTOR_SIZE;
++ ret_val = mmc_send_cmd(MMC_CMD16, argument, resp);
++ if (ret_val != 1)
++ return ret_val;
++
++ /* get the card size in sectors */
++ ret_val = mmc_read_cardsize(mmc_card_cur, &Card_CSD);
++ if (ret_val != 1)
++ return ret_val;
++
++ return 1;
++}
++unsigned long mmc_bread(int dev_num, unsigned long blknr, lbaint_t blkcnt,
++ void *dst)
++{
++ omap_mmc_read_sect(blknr, (blkcnt * MMCSD_SECTOR_SIZE), &cur_card_data,
++ (unsigned long *) dst);
++ return 1;
++}
++
++int mmc_init(int verbose)
++{
++ configure_mmc(&cur_card_data);
++
++ mmc_blk_dev.if_type = IF_TYPE_MMC;
++ mmc_blk_dev.part_type = PART_TYPE_DOS;
++ mmc_blk_dev.dev = 0;
++ mmc_blk_dev.lun = 0;
++ mmc_blk_dev.type = 0;
++
++ /* FIXME fill in the correct size (is set to 32MByte) */
++ mmc_blk_dev.blksz = MMCSD_SECTOR_SIZE;
++ mmc_blk_dev.lba = 0x10000;
++ mmc_blk_dev.removable = 0;
++ mmc_blk_dev.block_read = mmc_bread;
++
++ fat_register_device(&mmc_blk_dev, 1);
++ return 0;
++}
++
++int mmc_read(ulong src, uchar *dst, int size)
++{
++ return 0;
++}
++
++int mmc_write(uchar *src, ulong dst, int size)
++{
++ return 0;
++}
++
++int mmc2info(ulong addr)
++{
++ return 0;
++}
+diff --git a/cpu/omap3/start.S b/cpu/omap3/start.S
+new file mode 100644
+index 0000000..98706ad
+--- /dev/null
++++ b/cpu/omap3/start.S
+@@ -0,0 +1,517 @@
++/*
++ * armboot - Startup Code for OMAP3530/ARM Cortex CPU-core
++ *
++ * Copyright (c) 2004 Texas Instruments <r-woodruff2@ti.com>
++ *
++ * Copyright (c) 2001 Marius Gröger <mag@sysgo.de>
++ * Copyright (c) 2002 Alex Züpke <azu@sysgo.de>
++ * Copyright (c) 2002 Gary Jennejohn <gj@denx.de>
++ * Copyright (c) 2003 Richard Woodruff <r-woodruff2@ti.com>
++ * Copyright (c) 2003 Kshitij <kshitij@ti.com>
++ * Copyright (c) 2006-2008 Syed Mohammed Khasim <x0khasim@ti.com>
++ *
++ * 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>
++
++.globl _start
++_start: b reset
++ ldr pc, _undefined_instruction
++ ldr pc, _software_interrupt
++ ldr pc, _prefetch_abort
++ ldr pc, _data_abort
++ ldr pc, _not_used
++ ldr pc, _irq
++ ldr pc, _fiq
++
++_undefined_instruction: .word undefined_instruction
++_software_interrupt: .word software_interrupt
++_prefetch_abort: .word prefetch_abort
++_data_abort: .word data_abort
++_not_used: .word not_used
++_irq: .word irq
++_fiq: .word fiq
++_pad: .word 0x12345678 /* now 16*4=64 */
++.global _end_vect
++_end_vect:
++
++ .balignl 16,0xdeadbeef
++/*************************************************************************
++ *
++ * Startup Code (reset vector)
++ *
++ * do important init only if we don't start from memory!
++ * setup Memory and board specific bits prior to relocation.
++ * relocate armboot to ram
++ * setup stack
++ *
++ *************************************************************************/
++
++_TEXT_BASE:
++ .word TEXT_BASE
++
++.globl _armboot_start
++_armboot_start:
++ .word _start
++
++/*
++ * 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) */
++.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
++
++/*
++ * the actual reset code
++ */
++
++reset:
++ /*
++ * set the cpu to SVC32 mode
++ */
++ mrs r0,cpsr
++ bic r0,r0,#0x1f
++ orr r0,r0,#0xd3
++ msr cpsr,r0
++
++#if (CONFIG_OMAP34XX)
++ /* Copy vectors to mask ROM indirect addr */
++ adr r0, _start @ r0 <- current position of code
++ add r0, r0, #4 @ skip reset vector
++ mov r2, #64 @ r2 <- size to copy
++ add r2, r0, r2 @ r2 <- source end address
++ mov r1, #SRAM_OFFSET0 @ build vect addr
++ mov r3, #SRAM_OFFSET1
++ add r1, r1, r3
++ mov r3, #SRAM_OFFSET2
++ add r1, r1, r3
++next:
++ ldmia r0!, {r3-r10} @ copy from source address [r0]
++ stmia r1!, {r3-r10} @ copy to target address [r1]
++ cmp r0, r2 @ until source end address [r2]
++ bne next @ loop until equal */
++#if !defined(CFG_NAND_BOOT) && !defined(CFG_ONENAND_BOOT)
++ /* No need to copy/exec the clock code - DPLL adjust already done
++ * in NAND/oneNAND Boot.
++ */
++ bl cpy_clk_code @ put dpll adjust code behind vectors
++#endif /* NAND Boot */
++#endif
++ /* the mask ROM code should have PLL and others stable */
++#ifndef CONFIG_SKIP_LOWLEVEL_INIT
++ bl cpu_init_crit
++#endif
++
++#ifndef CONFIG_SKIP_RELOCATE_UBOOT
++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: @ copy 32 bytes at a time
++ 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
++#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
++
++ /* 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
++ and sp, sp, #~7 @ 8 byte alinged for (ldr/str)d
++
++ /* Clear BSS (if any). Is below tx (watch load addr - need space) */
++clear_bss:
++ ldr r0, _bss_start @ find start of bss segment
++ ldr r1, _bss_end @ stop here
++ mov r2, #0x00000000 @ clear value
++clbss_l:
++ str r2, [r0] @ clear BSS location
++ cmp r0, r1 @ are we at the end yet
++ add r0, r0, #4 @ increment clear index pointer
++ bne clbss_l @ keep clearing till at end
++
++ ldr pc, _start_armboot @ jump to C code
++
++_start_armboot: .word start_armboot
++
++
++/*************************************************************************
++ *
++ * CPU_init_critical registers
++ *
++ * setup important registers
++ * setup memory timing
++ *
++ *************************************************************************/
++cpu_init_crit:
++ /*
++ * Invalidate L1 I/D
++ */
++ mov r0, #0 @ set up for MCR
++ mcr p15, 0, r0, c8, c7, 0 @ invalidate TLBs
++ mcr p15, 0, r0, c7, c5, 0 @ invalidate icache
++
++ /*
++ * disable MMU stuff and caches
++ */
++ mrc p15, 0, r0, c1, c0, 0
++ bic r0, r0, #0x00002000 @ clear bits 13 (--V-)
++ bic r0, r0, #0x00000007 @ clear bits 2:0 (-CAM)
++ orr r0, r0, #0x00000002 @ set bit 1 (--A-) Align
++ orr r0, r0, #0x00000800 @ set bit 12 (Z---) BTB
++ mcr p15, 0, r0, c1, c0, 0
++
++ /*
++ * Jump to board specific initialization...
++ * The Mask ROM will have already initialized
++ * basic memory. Go here to bump up clock rate and handle
++ * wake up conditions.
++ */
++ mov ip, lr @ persevere link reg across call
++ bl lowlevel_init @ go setup pll,mux,memory
++ mov lr, ip @ restore link
++ mov pc, lr @ back to my caller
++/*
++ *************************************************************************
++ *
++ * Interrupt handling
++ *
++ *************************************************************************
++ */
++@
++@ IRQ stack frame.
++@
++#define S_FRAME_SIZE 72
++
++#define S_OLD_R0 68
++#define S_PSR 64
++#define S_PC 60
++#define S_LR 56
++#define S_SP 52
++
++#define S_IP 48
++#define S_FP 44
++#define S_R10 40
++#define S_R9 36
++#define S_R8 32
++#define S_R7 28
++#define S_R6 24
++#define S_R5 20
++#define S_R4 16
++#define S_R3 12
++#define S_R2 8
++#define S_R1 4
++#define S_R0 0
++
++#define MODE_SVC 0x13
++#define I_BIT 0x80
++
++/*
++ * use bad_save_user_regs for abort/prefetch/undef/swi ...
++ * use irq_save_user_regs / irq_restore_user_regs for IRQ/FIQ handling
++ */
++
++ .macro bad_save_user_regs
++ sub sp, sp, #S_FRAME_SIZE @ carve out a frame on current
++ @ user stack
++ stmia sp, {r0 - r12} @ Save user registers (now in
++ @ svc mode) r0-r12
++
++ ldr r2, _armboot_start
++ sub r2, r2, #(CFG_MALLOC_LEN)
++ sub r2, r2, #(CFG_GBL_DATA_SIZE+8) @ set base 2 words into abort
++ @ stack
++ ldmia r2, {r2 - r3} @ get values for "aborted" pc
++ @ and cpsr (into parm regs)
++ add r0, sp, #S_FRAME_SIZE @ grab pointer to old stack
++
++ add r5, sp, #S_SP
++ mov r1, lr
++ stmia r5, {r0 - r3} @ save sp_SVC, lr_SVC, pc, cpsr
++ mov r0, sp @ save current stack into r0
++ @ (param register)
++ .endm
++
++ .macro irq_save_user_regs
++ sub sp, sp, #S_FRAME_SIZE
++ stmia sp, {r0 - r12} @ Calling r0-r12
++ add r8, sp, #S_PC @ !! R8 NEEDS to be saved !!
++ @ a reserved stack spot would
++ @ be good.
++ stmdb r8, {sp, lr}^ @ Calling SP, LR
++ str lr, [r8, #0] @ Save calling PC
++ mrs r6, spsr
++ str r6, [r8, #4] @ Save CPSR
++ str r0, [r8, #8] @ Save OLD_R0
++ mov r0, sp
++ .endm
++
++ .macro irq_restore_user_regs
++ ldmia sp, {r0 - lr}^ @ Calling r0 - lr
++ mov r0, r0
++ ldr lr, [sp, #S_PC] @ Get PC
++ add sp, sp, #S_FRAME_SIZE
++ subs pc, lr, #4 @ return & move spsr_svc into
++ @ cpsr
++ .endm
++
++ .macro get_bad_stack
++ ldr r13, _armboot_start @ setup our mode stack (enter
++ @ in banked mode)
++ sub r13, r13, #(CFG_MALLOC_LEN) @ move past malloc pool
++ sub r13, r13, #(CFG_GBL_DATA_SIZE+8) @ move to reserved a couple
++ @ spots for abort stack
++
++ str lr, [r13] @ save caller lr in position 0
++ @ of saved stack
++ mrs lr, spsr @ get the spsr
++ str lr, [r13, #4] @ save spsr in position 1 of
++ @ saved stack
++
++ mov r13, #MODE_SVC @ prepare SVC-Mode
++ @ msr spsr_c, r13
++ msr spsr, r13 @ switch modes, make sure
++ @ moves will execute
++ mov lr, pc @ capture return pc
++ movs pc, lr @ jump to next instruction &
++ @ switch modes.
++ .endm
++
++ .macro get_bad_stack_swi
++ sub r13, r13, #4 @ space on current stack for
++ @ scratch reg.
++ str r0, [r13] @ save R0's value.
++ ldr r0, _armboot_start @ get data regions start
++ sub r0, r0, #(CFG_MALLOC_LEN) @ move past malloc pool
++ sub r0, r0, #(CFG_GBL_DATA_SIZE+8) @ move past gbl and a couple
++ @ spots for abort stack
++ str lr, [r0] @ save caller lr in position 0
++ @ of saved stack
++ mrs r0, spsr @ get the spsr
++ str lr, [r0, #4] @ save spsr in position 1 of
++ @ saved stack
++ ldr r0, [r13] @ restore r0
++ add r13, r13, #4 @ pop stack entry
++ .endm
++
++ .macro get_irq_stack @ setup IRQ stack
++ ldr sp, IRQ_STACK_START
++ .endm
++
++ .macro get_fiq_stack @ setup FIQ stack
++ ldr sp, FIQ_STACK_START
++ .endm
++
++/*
++ * exception handlers
++ */
++ .align 5
++undefined_instruction:
++ get_bad_stack
++ bad_save_user_regs
++ bl do_undefined_instruction
++
++ .align 5
++software_interrupt:
++ get_bad_stack_swi
++ bad_save_user_regs
++ bl do_software_interrupt
++
++ .align 5
++prefetch_abort:
++ get_bad_stack
++ bad_save_user_regs
++ bl do_prefetch_abort
++
++ .align 5
++data_abort:
++ get_bad_stack
++ bad_save_user_regs
++ bl do_data_abort
++
++ .align 5
++not_used:
++ get_bad_stack
++ bad_save_user_regs
++ bl do_not_used
++
++#ifdef CONFIG_USE_IRQ
++
++ .align 5
++irq:
++ get_irq_stack
++ irq_save_user_regs
++ bl do_irq
++ irq_restore_user_regs
++
++ .align 5
++fiq:
++ get_fiq_stack
++ /* someone ought to write a more effiction fiq_save_user_regs */
++ irq_save_user_regs
++ bl do_fiq
++ irq_restore_user_regs
++
++#else
++
++ .align 5
++irq:
++ get_bad_stack
++ bad_save_user_regs
++ bl do_irq
++
++ .align 5
++fiq:
++ get_bad_stack
++ bad_save_user_regs
++ bl do_fiq
++
++#endif
++ .align 5
++.global arm_cache_flush
++arm_cache_flush:
++ mcr p15, 0, r1, c7, c5, 0 @ invalidate I cache
++ mov pc, lr @ back to caller
++
++/*
++ * v7_flush_dcache_all()
++ *
++ * Flush the whole D-cache.
++ *
++ * Corrupted registers: r0-r5, r7, r9-r11
++ *
++ * - mm - mm_struct describing address space
++ */
++ .align 5
++.global v7_flush_dcache_all
++v7_flush_dcache_all:
++ stmfd r13!, {r0-r5, r7, r9-r12,r14}
++
++ mov r7, r0 @ take a backup of device type
++ cmp r0, #0x3 @ check if the device type is
++ @ GP
++ moveq r12, #0x1 @ set up to invalide L2
++smi: .word 0x01600070 @ Call SMI monitor (smieq)
++ cmp r7, #0x3 @ compare again in case its
++ @ lost
++ beq finished_inval @ if GP device, inval done
++ @ above
++
++ mrc p15, 1, r0, c0, c0, 1 @ read clidr
++ ands r3, r0, #0x7000000 @ extract loc from clidr
++ mov r3, r3, lsr #23 @ left align loc bit field
++ beq finished_inval @ if loc is 0, then no need to
++ @ clean
++ mov r10, #0 @ start clean at cache level 0
++inval_loop1:
++ add r2, r10, r10, lsr #1 @ work out 3x current cache
++ @ level
++ mov r1, r0, lsr r2 @ extract cache type bits from
++ @ clidr
++ and r1, r1, #7 @ mask of the bits for current
++ @ cache only
++ cmp r1, #2 @ see what cache we have at
++ @ this level
++ blt skip_inval @ skip if no cache, or just
++ @ i-cache
++ mcr p15, 2, r10, c0, c0, 0 @ select current cache level
++ @ in cssr
++ isb @ isb to sych the new
++ @ cssr&csidr
++ mrc p15, 1, r1, c0, c0, 0 @ read the new csidr
++ and r2, r1, #7 @ extract the length of the
++ @ cache lines
++ add r2, r2, #4 @ add 4 (line length offset)
++ ldr r4, =0x3ff
++ ands r4, r4, r1, lsr #3 @ find maximum number on the
++ @ way size
++ clz r5, r4 @ find bit position of way
++ @ size increment
++ ldr r7, =0x7fff
++ ands r7, r7, r1, lsr #13 @ extract max number of the
++ @ index size
++inval_loop2:
++ mov r9, r4 @ create working copy of max
++ @ way size
++inval_loop3:
++ orr r11, r10, r9, lsl r5 @ factor way and cache number
++ @ into r11
++ orr r11, r11, r7, lsl r2 @ factor index number into r11
++ mcr p15, 0, r11, c7, c6, 2 @ invalidate by set/way
++ subs r9, r9, #1 @ decrement the way
++ bge inval_loop3
++ subs r7, r7, #1 @ decrement the index
++ bge inval_loop2
++skip_inval:
++ add r10, r10, #2 @ increment cache number
++ cmp r3, r10
++ bgt inval_loop1
++finished_inval:
++ mov r10, #0 @ swith back to cache level 0
++ mcr p15, 2, r10, c0, c0, 0 @ select current cache level
++ @ in cssr
++ isb
++
++ ldmfd r13!, {r0-r5, r7, r9-r12,pc}
++
++
++ .align 5
++.global reset_cpu
++reset_cpu:
++ ldr r1, rstctl @ get addr for global reset
++ @ reg
++ mov r3, #0x2 @ full reset pll + mpu
++ str r3, [r1] @ force reset
++ mov r0, r0
++_loop_forever:
++ b _loop_forever
++rstctl:
++ .word PRM_RSTCTRL
++
+diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
+index 7dab786..7782e9d 100644
+--- a/drivers/i2c/omap24xx_i2c.c
++++ b/drivers/i2c/omap24xx_i2c.c
+@@ -22,11 +22,13 @@
+
+ #include <common.h>
+
+-#ifdef CONFIG_DRIVER_OMAP24XX_I2C
++#if defined(CONFIG_DRIVER_OMAP24XX_I2C) || defined(CONFIG_DRIVER_OMAP34XX_I2C)
+
+ #include <asm/arch/i2c.h>
+ #include <asm/io.h>
+
++#define inb(a) __raw_readb(a)
++#define outb(a,v) __raw_writeb(a,v)
+ #define inw(a) __raw_readw(a)
+ #define outw(a,v) __raw_writew(a,v)
+
+@@ -114,7 +116,11 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
+
+ status = wait_for_pin ();
+ if (status & I2C_STAT_RRDY) {
+- *value = inw (I2C_DATA);
++#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
++ *value = inb(I2C_DATA);
++#else
++ *value = inw(I2C_DATA);
++#endif
+ udelay (20000);
+ } else {
+ i2c_error = 1;
+@@ -155,8 +161,23 @@ static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value)
+ status = wait_for_pin ();
+
+ if (status & I2C_STAT_XRDY) {
+- /* send out two bytes */
+- outw ((value << 8) + regoffset, I2C_DATA);
++#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
++ /* send out 1 byte */
++ outb(regoffset, I2C_DATA);
++ outw(I2C_STAT_XRDY, I2C_STAT);
++ status = wait_for_pin();
++ if ((status & I2C_STAT_XRDY)) {
++ /* send out next 1 byte */
++ outb(value, I2C_DATA);
++ outw(I2C_STAT_XRDY, I2C_STAT);
++ } else {
++ i2c_error = 1;
++ }
++#else
++ /* send out two bytes */
++ outw ((value << 8) + regoffset, I2C_DATA);
++#endif
++
+ /* must have enough delay to allow BB bit to go low */
+ udelay (50000);
+ if (inw (I2C_STAT) & I2C_STAT_NACK) {
+@@ -193,7 +214,11 @@ static void flush_fifo(void)
+ while(1){
+ stat = inw(I2C_STAT);
+ if(stat == I2C_STAT_RRDY){
+- inw(I2C_DATA);
++#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
++ inb(I2C_DATA);
++#else
++ inw(I2C_DATA);
++#endif
+ outw(I2C_STAT_RRDY,I2C_STAT);
+ udelay(1000);
+ }else
+diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
+index 7e27ee1..e552e08 100644
+--- a/fs/jffs2/jffs2_1pass.c
++++ b/fs/jffs2/jffs2_1pass.c
+@@ -303,7 +303,9 @@ static inline void *get_node_mem_nor(u32 off)
+ */
+ static inline void *get_fl_mem(u32 off, u32 size, void *ext_buf)
+ {
++#if (defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)) || defined(ONFIG_CMD_FLASH)
+ struct mtdids *id = current_part->dev->id;
++#endif
+
+ #if defined(CONFIG_CMD_FLASH)
+ if (id->type == MTD_DEV_TYPE_NOR)
+@@ -321,7 +323,9 @@ static inline void *get_fl_mem(u32 off, u32 size, void *ext_buf)
+
+ static inline void *get_node_mem(u32 off)
+ {
+- struct mtdids *id = current_part->dev->id;
++#if (defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)) || defined(ONFIG_CMD_FLASH)
++ struct mtdids *id = current_part->dev->id;
++#endif
+
+ #if defined(CONFIG_CMD_FLASH)
+ if (id->type == MTD_DEV_TYPE_NOR)
+diff --git a/include/asm-arm/arch-omap3/bits.h b/include/asm-arm/arch-omap3/bits.h
+new file mode 100644
+index 0000000..8522335
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/bits.h
+@@ -0,0 +1,48 @@
++/* bits.h
++ * Copyright (c) 2004 Texas Instruments
++ *
++ * This package is free software; you can redistribute it and/or
++ * modify it under the terms of the license found in the file
++ * named COPYING that should have accompanied this file.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++#ifndef __bits_h
++#define __bits_h 1
++
++#define BIT0 (1<<0)
++#define BIT1 (1<<1)
++#define BIT2 (1<<2)
++#define BIT3 (1<<3)
++#define BIT4 (1<<4)
++#define BIT5 (1<<5)
++#define BIT6 (1<<6)
++#define BIT7 (1<<7)
++#define BIT8 (1<<8)
++#define BIT9 (1<<9)
++#define BIT10 (1<<10)
++#define BIT11 (1<<11)
++#define BIT12 (1<<12)
++#define BIT13 (1<<13)
++#define BIT14 (1<<14)
++#define BIT15 (1<<15)
++#define BIT16 (1<<16)
++#define BIT17 (1<<17)
++#define BIT18 (1<<18)
++#define BIT19 (1<<19)
++#define BIT20 (1<<20)
++#define BIT21 (1<<21)
++#define BIT22 (1<<22)
++#define BIT23 (1<<23)
++#define BIT24 (1<<24)
++#define BIT25 (1<<25)
++#define BIT26 (1<<26)
++#define BIT27 (1<<27)
++#define BIT28 (1<<28)
++#define BIT29 (1<<29)
++#define BIT30 (1<<30)
++#define BIT31 (1<<31)
++
++#endif
+diff --git a/include/asm-arm/arch-omap3/clocks.h b/include/asm-arm/arch-omap3/clocks.h
+new file mode 100644
+index 0000000..7cdd58c
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/clocks.h
+@@ -0,0 +1,62 @@
++/*
++ * (C) Copyright 2006-2008
++ * Texas Instruments, <www.ti.com>
++ * Richard Woodruff <r-woodruff2@ti.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.
++ *
++ * 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 _CLOCKS_H_
++#define _CLOCKS_H_
++
++#define LDELAY 12000000
++
++#define S12M 12000000
++#define S13M 13000000
++#define S19_2M 19200000
++#define S24M 24000000
++#define S26M 26000000
++#define S38_4M 38400000
++
++#define FCK_IVA2_ON 0x00000001
++#define FCK_CORE1_ON 0x03fffe29
++#define ICK_CORE1_ON 0x3ffffffb
++#define ICK_CORE2_ON 0x0000001f
++#define FCK_WKUP_ON 0x000000e9
++#define ICK_WKUP_ON 0x0000003f
++#define FCK_DSS_ON 0x00000005
++#define ICK_DSS_ON 0x00000001
++#define FCK_CAM_ON 0x00000001
++#define ICK_CAM_ON 0x00000001
++#define FCK_PER_ON 0x0003ffff
++#define ICK_PER_ON 0x0003ffff
++
++/* Used to index into DPLL parameter tables */
++typedef struct {
++ unsigned int m;
++ unsigned int n;
++ unsigned int fsel;
++ unsigned int m2;
++} dpll_param;
++
++/* Following functions are exported from lowlevel_init.S */
++extern dpll_param *get_mpu_dpll_param(void);
++extern dpll_param *get_iva_dpll_param(void);
++extern dpll_param *get_core_dpll_param(void);
++extern dpll_param *get_per_dpll_param(void);
++
++extern void *_end_vect, *_start;
++
++#endif
+diff --git a/include/asm-arm/arch-omap3/clocks_omap3.h b/include/asm-arm/arch-omap3/clocks_omap3.h
+new file mode 100644
+index 0000000..9bb4700
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/clocks_omap3.h
+@@ -0,0 +1,101 @@
++/*
++ * (C) Copyright 2006-2008
++ * Texas Instruments, <www.ti.com>
++ * Richard Woodruff <r-woodruff2@ti.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.
++ *
++ * 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 _CLOCKS_OMAP3_H_
++#define _CLOCKS_OMAP3_H_
++
++#define PLL_STOP 1 /* PER & IVA */
++#define PLL_LOW_POWER_BYPASS 5 /* MPU, IVA & CORE */
++#define PLL_FAST_RELOCK_BYPASS 6 /* CORE */
++#define PLL_LOCK 7 /* MPU, IVA, CORE & PER */
++
++/* The following configurations are OPP and SysClk value independant
++ * and hence are defined here. All the other DPLL related values are
++ * tabulated in lowlevel_init.S.
++ */
++
++/* CORE DPLL */
++# define CORE_M3X2 2 /* 332MHz : CM_CLKSEL1_EMU */
++# define CORE_SSI_DIV 3 /* 221MHz : CM_CLKSEL_CORE */
++# define CORE_FUSB_DIV 2 /* 41.5MHz: */
++# define CORE_L4_DIV 2 /* 83MHz : L4 */
++# define CORE_L3_DIV 2 /* 166MHz : L3 {DDR} */
++# define GFX_DIV 2 /* 83MHz : CM_CLKSEL_GFX */
++# define WKUP_RSM 2 /* 41.5MHz: CM_CLKSEL_WKUP */
++
++/* PER DPLL */
++# define PER_M6X2 3 /* 288MHz: CM_CLKSEL1_EMU */
++# define PER_M5X2 4 /* 216MHz: CM_CLKSEL_CAM */
++# define PER_M4X2 9 /* 96MHz : CM_CLKSEL_DSS-dss1 */
++# define PER_M3X2 16 /* 54MHz : CM_CLKSEL_DSS-tv */
++
++# define CLSEL1_EMU_VAL ((CORE_M3X2 << 16) | (PER_M6X2 << 24) | (0x0a50))
++
++# define M_12 0xA6
++# define N_12 0x05
++# define FSEL_12 0x07
++# define M2_12 0x01 /* M3 of 2 */
++
++# define M_12_ES1 0x19F
++# define N_12_ES1 0x0E
++# define FSL_12_ES1 0x03
++# define M2_12_ES1 0x1 /* M3 of 2 */
++
++# define M_13 0x14C
++# define N_13 0x0C
++# define FSEL_13 0x03
++# define M2_13 0x01 /* M3 of 2 */
++
++# define M_13_ES1 0x1B2
++# define N_13_ES1 0x10
++# define FSL_13_ES1 0x03
++# define M2_13_ES1 0x01 /* M3 of 2 */
++
++# define M_19p2 0x19F
++# define N_19p2 0x17
++# define FSEL_19p2 0x03
++# define M2_19p2 0x01 /* M3 of 2 */
++
++# define M_19p2_ES1 0x19F
++# define N_19p2_ES1 0x17
++# define FSL_19p2_ES1 0x03
++# define M2_19p2_ES1 0x01 /* M3 of 2 */
++
++# define M_26 0xA6
++# define N_26 0x0C
++# define FSEL_26 0x07
++# define M2_26 0x01 /* M3 of 2 */
++
++# define M_26_ES1 0x1B2
++# define N_26_ES1 0x21
++# define FSL_26_ES1 0x03
++# define M2_26_ES1 0x01 /* M3 of 2 */
++
++# define M_38p4 0x19F
++# define N_38p4 0x2F
++# define FSEL_38p4 0x03
++# define M2_38p4 0x01 /* M3 of 2 */
++
++# define M_38p4_ES1 0x19F
++# define N_38p4_ES1 0x2F
++# define FSL_38p4_ES1 0x03
++# define M2_38p4_ES1 0x01 /* M3 of 2 */
++
++#endif /* endif _CLOCKS_OMAP3_H_ */
+diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h
+new file mode 100644
+index 0000000..d47defb
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/cpu.h
+@@ -0,0 +1,250 @@
++/*
++ * (C) Copyright 2006-2008
++ * Texas Instruments, <www.ti.com>
++ *
++ * 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
++ *
++ */
++
++#ifndef _CPU_H
++#define _CPU_H
++
++/* Register offsets of common modules */
++/* Control */
++#define CONTROL_STATUS (OMAP34XX_CTRL_BASE + 0x2F0)
++#define OMAP34XX_MCR (OMAP34XX_CTRL_BASE + 0x8C)
++#define CONTROL_SCALABLE_OMAP_STATUS (OMAP34XX_CTRL_BASE + 0x44C)
++#define CONTROL_SCALABLE_OMAP_OCP (OMAP34XX_CTRL_BASE + 0x534)
++
++/* Tap Information */
++#define TAP_IDCODE_REG (OMAP34XX_TAP_BASE+0x204)
++#define PRODUCTION_ID (OMAP34XX_TAP_BASE+0x208)
++
++/* device type */
++#define DEVICE_MASK (BIT8|BIT9|BIT10)
++#define TST_DEVICE 0x0
++#define EMU_DEVICE 0x1
++#define HS_DEVICE 0x2
++#define GP_DEVICE 0x3
++
++/* GPMC CS3/cs4/cs6 not avaliable */
++#define GPMC_BASE (OMAP34XX_GPMC_BASE)
++#define GPMC_SYSCONFIG (OMAP34XX_GPMC_BASE+0x10)
++#define GPMC_IRQSTATUS (OMAP34XX_GPMC_BASE+0x18)
++#define GPMC_IRQENABLE (OMAP34XX_GPMC_BASE+0x1C)
++#define GPMC_TIMEOUT_CONTROL (OMAP34XX_GPMC_BASE+0x40)
++#define GPMC_CONFIG (OMAP34XX_GPMC_BASE+0x50)
++#define GPMC_STATUS (OMAP34XX_GPMC_BASE+0x54)
++
++#define GPMC_CONFIG_CS0 (OMAP34XX_GPMC_BASE+0x60)
++#define GPMC_CONFIG_WIDTH (0x30)
++
++#define GPMC_CONFIG1 (0x00)
++#define GPMC_CONFIG2 (0x04)
++#define GPMC_CONFIG3 (0x08)
++#define GPMC_CONFIG4 (0x0C)
++#define GPMC_CONFIG5 (0x10)
++#define GPMC_CONFIG6 (0x14)
++#define GPMC_CONFIG7 (0x18)
++#define GPMC_NAND_CMD (0x1C)
++#define GPMC_NAND_ADR (0x20)
++#define GPMC_NAND_DAT (0x24)
++
++#define GPMC_ECC_CONFIG (0x1F4)
++#define GPMC_ECC_CONTROL (0x1F8)
++#define GPMC_ECC_SIZE_CONFIG (0x1FC)
++#define GPMC_ECC1_RESULT (0x200)
++#define GPMC_ECC2_RESULT (0x204)
++#define GPMC_ECC3_RESULT (0x208)
++#define GPMC_ECC4_RESULT (0x20C)
++#define GPMC_ECC5_RESULT (0x210)
++#define GPMC_ECC6_RESULT (0x214)
++#define GPMC_ECC7_RESULT (0x218)
++#define GPMC_ECC8_RESULT (0x21C)
++#define GPMC_ECC9_RESULT (0x220)
++
++/* GPMC Mapping */
++# define FLASH_BASE 0x10000000 /* NOR flash, */
++ /* aligned to 256 Meg */
++# define FLASH_BASE_SDPV1 0x04000000 /* NOR flash, */
++ /* aligned to 64 Meg */
++# define FLASH_BASE_SDPV2 0x10000000 /* NOR flash, */
++ /* aligned to 256 Meg */
++# define DEBUG_BASE 0x08000000 /* debug board */
++# define NAND_BASE 0x30000000 /* NAND addr */
++ /* (actual size small port) */
++# define PISMO2_BASE 0x18000000 /* PISMO2 CS1/2 */
++# define ONENAND_MAP 0x20000000 /* OneNand addr */
++ /* (actual size small port) */
++
++/* SMS */
++#define SMS_SYSCONFIG (OMAP34XX_SMS_BASE+0x10)
++#define SMS_RG_ATT0 (OMAP34XX_SMS_BASE+0x48)
++#define SMS_CLASS_ARB0 (OMAP34XX_SMS_BASE+0xD0)
++#define BURSTCOMPLETE_GROUP7 BIT31
++
++/* SDRC */
++#define SDRC_SYSCONFIG (OMAP34XX_SDRC_BASE+0x10)
++#define SDRC_STATUS (OMAP34XX_SDRC_BASE+0x14)
++#define SDRC_CS_CFG (OMAP34XX_SDRC_BASE+0x40)
++#define SDRC_SHARING (OMAP34XX_SDRC_BASE+0x44)
++#define SDRC_DLLA_CTRL (OMAP34XX_SDRC_BASE+0x60)
++#define SDRC_DLLA_STATUS (OMAP34XX_SDRC_BASE+0x64)
++#define SDRC_DLLB_CTRL (OMAP34XX_SDRC_BASE+0x68)
++#define SDRC_DLLB_STATUS (OMAP34XX_SDRC_BASE+0x6C)
++#define DLLPHASE BIT1
++#define LOADDLL BIT2
++#define DLL_DELAY_MASK 0xFF00
++#define DLL_NO_FILTER_MASK (BIT8|BIT9)
++
++#define SDRC_POWER (OMAP34XX_SDRC_BASE+0x70)
++#define WAKEUPPROC BIT26
++
++#define SDRC_MCFG_0 (OMAP34XX_SDRC_BASE+0x80)
++#define SDRC_MR_0 (OMAP34XX_SDRC_BASE+0x84)
++#define SDRC_ACTIM_CTRLA_0 (OMAP34XX_SDRC_BASE+0x9C)
++#define SDRC_ACTIM_CTRLB_0 (OMAP34XX_SDRC_BASE+0xA0)
++#define SDRC_ACTIM_CTRLA_1 (OMAP34XX_SDRC_BASE+0xC4)
++#define SDRC_ACTIM_CTRLB_1 (OMAP34XX_SDRC_BASE+0xC8)
++#define SDRC_RFR_CTRL (OMAP34XX_SDRC_BASE+0xA4)
++#define SDRC_RFR_CTRL (OMAP34XX_SDRC_BASE+0xA4)
++#define SDRC_MANUAL_0 (OMAP34XX_SDRC_BASE+0xA8)
++#define OMAP34XX_SDRC_CS0 0x80000000
++#define OMAP34XX_SDRC_CS1 0xA0000000
++#define CMD_NOP 0x0
++#define CMD_PRECHARGE 0x1
++#define CMD_AUTOREFRESH 0x2
++#define CMD_ENTR_PWRDOWN 0x3
++#define CMD_EXIT_PWRDOWN 0x4
++#define CMD_ENTR_SRFRSH 0x5
++#define CMD_CKE_HIGH 0x6
++#define CMD_CKE_LOW 0x7
++#define SOFTRESET BIT1
++#define SMART_IDLE (0x2 << 3)
++#define REF_ON_IDLE (0x1 << 6)
++
++/* timer regs offsets (32 bit regs) */
++#define TIDR 0x0 /* r */
++#define TIOCP_CFG 0x10 /* rw */
++#define TISTAT 0x14 /* r */
++#define TISR 0x18 /* rw */
++#define TIER 0x1C /* rw */
++#define TWER 0x20 /* rw */
++#define TCLR 0x24 /* rw */
++#define TCRR 0x28 /* rw */
++#define TLDR 0x2C /* rw */
++#define TTGR 0x30 /* rw */
++#define TWPS 0x34 /* r */
++#define TMAR 0x38 /* rw */
++#define TCAR1 0x3c /* r */
++#define TSICR 0x40 /* rw */
++#define TCAR2 0x44 /* r */
++ /* enable sys_clk NO-prescale /1 */
++#define GPT_EN ((0<<2)|BIT1|BIT0)
++
++/* Watchdog */
++#define WWPS 0x34 /* r */
++#define WSPR 0x48 /* rw */
++#define WD_UNLOCK1 0xAAAA
++#define WD_UNLOCK2 0x5555
++
++/* PRCM */
++#define CM_FCLKEN_IVA2 0x48004000
++#define CM_CLKEN_PLL_IVA2 0x48004004
++#define CM_IDLEST_PLL_IVA2 0x48004024
++#define CM_CLKSEL1_PLL_IVA2 0x48004040
++#define CM_CLKSEL2_PLL_IVA2 0x48004044
++#define CM_CLKEN_PLL_MPU 0x48004904
++#define CM_IDLEST_PLL_MPU 0x48004924
++#define CM_CLKSEL1_PLL_MPU 0x48004940
++#define CM_CLKSEL2_PLL_MPU 0x48004944
++#define CM_FCLKEN1_CORE 0x48004a00
++#define CM_ICLKEN1_CORE 0x48004a10
++#define CM_ICLKEN2_CORE 0x48004a14
++#define CM_CLKSEL_CORE 0x48004a40
++#define CM_FCLKEN_GFX 0x48004b00
++#define CM_ICLKEN_GFX 0x48004b10
++#define CM_CLKSEL_GFX 0x48004b40
++#define CM_FCLKEN_WKUP 0x48004c00
++#define CM_ICLKEN_WKUP 0x48004c10
++#define CM_CLKSEL_WKUP 0x48004c40
++#define CM_IDLEST_WKUP 0x48004c20
++#define CM_CLKEN_PLL 0x48004d00
++#define CM_IDLEST_CKGEN 0x48004d20
++#define CM_CLKSEL1_PLL 0x48004d40
++#define CM_CLKSEL2_PLL 0x48004d44
++#define CM_CLKSEL3_PLL 0x48004d48
++#define CM_FCLKEN_DSS 0x48004e00
++#define CM_ICLKEN_DSS 0x48004e10
++#define CM_CLKSEL_DSS 0x48004e40
++#define CM_FCLKEN_CAM 0x48004f00
++#define CM_ICLKEN_CAM 0x48004f10
++#define CM_CLKSEL_CAM 0x48004F40
++#define CM_FCLKEN_PER 0x48005000
++#define CM_ICLKEN_PER 0x48005010
++#define CM_CLKSEL_PER 0x48005040
++#define CM_CLKSEL1_EMU 0x48005140
++
++#define PRM_CLKSEL 0x48306d40
++#define PRM_RSTCTRL 0x48307250
++#define PRM_CLKSRC_CTRL 0x48307270
++
++/* SMX-APE */
++#define PM_RT_APE_BASE_ADDR_ARM (SMX_APE_BASE + 0x10000)
++#define PM_GPMC_BASE_ADDR_ARM (SMX_APE_BASE + 0x12400)
++#define PM_OCM_RAM_BASE_ADDR_ARM (SMX_APE_BASE + 0x12800)
++#define PM_OCM_ROM_BASE_ADDR_ARM (SMX_APE_BASE + 0x12C00)
++#define PM_IVA2_BASE_ADDR_ARM (SMX_APE_BASE + 0x14000)
++
++#define RT_REQ_INFO_PERMISSION_1 (PM_RT_APE_BASE_ADDR_ARM + 0x68)
++#define RT_READ_PERMISSION_0 (PM_RT_APE_BASE_ADDR_ARM + 0x50)
++#define RT_WRITE_PERMISSION_0 (PM_RT_APE_BASE_ADDR_ARM + 0x58)
++#define RT_ADDR_MATCH_1 (PM_RT_APE_BASE_ADDR_ARM + 0x60)
++
++#define GPMC_REQ_INFO_PERMISSION_0 (PM_GPMC_BASE_ADDR_ARM + 0x48)
++#define GPMC_READ_PERMISSION_0 (PM_GPMC_BASE_ADDR_ARM + 0x50)
++#define GPMC_WRITE_PERMISSION_0 (PM_GPMC_BASE_ADDR_ARM + 0x58)
++
++#define OCM_REQ_INFO_PERMISSION_0 (PM_OCM_RAM_BASE_ADDR_ARM + 0x48)
++#define OCM_READ_PERMISSION_0 (PM_OCM_RAM_BASE_ADDR_ARM + 0x50)
++#define OCM_WRITE_PERMISSION_0 (PM_OCM_RAM_BASE_ADDR_ARM + 0x58)
++#define OCM_ADDR_MATCH_2 (PM_OCM_RAM_BASE_ADDR_ARM + 0x80)
++
++#define IVA2_REQ_INFO_PERMISSION_0 (PM_IVA2_BASE_ADDR_ARM + 0x48)
++#define IVA2_READ_PERMISSION_0 (PM_IVA2_BASE_ADDR_ARM + 0x50)
++#define IVA2_WRITE_PERMISSION_0 (PM_IVA2_BASE_ADDR_ARM + 0x58)
++
++#define IVA2_REQ_INFO_PERMISSION_1 (PM_IVA2_BASE_ADDR_ARM + 0x68)
++#define IVA2_READ_PERMISSION_1 (PM_IVA2_BASE_ADDR_ARM + 0x70)
++#define IVA2_WRITE_PERMISSION_1 (PM_IVA2_BASE_ADDR_ARM + 0x78)
++
++#define IVA2_REQ_INFO_PERMISSION_2 (PM_IVA2_BASE_ADDR_ARM + 0x88)
++#define IVA2_READ_PERMISSION_2 (PM_IVA2_BASE_ADDR_ARM + 0x90)
++#define IVA2_WRITE_PERMISSION_2 (PM_IVA2_BASE_ADDR_ARM + 0x98)
++
++#define IVA2_REQ_INFO_PERMISSION_3 (PM_IVA2_BASE_ADDR_ARM + 0xA8)
++#define IVA2_READ_PERMISSION_3 (PM_IVA2_BASE_ADDR_ARM + 0xB0)
++#define IVA2_WRITE_PERMISSION_3 (PM_IVA2_BASE_ADDR_ARM + 0xB8)
++
++/* I2C base */
++#define I2C_BASE1 (OMAP34XX_CORE_L4_IO_BASE + 0x70000)
++#define I2C_BASE2 (OMAP34XX_CORE_L4_IO_BASE + 0x72000)
++#define I2C_BASE3 (OMAP34XX_CORE_L4_IO_BASE + 0x60000)
++
++#endif /* _CPU_H */
+diff --git a/include/asm-arm/arch-omap3/i2c.h b/include/asm-arm/arch-omap3/i2c.h
+new file mode 100644
+index 0000000..5fb0979
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/i2c.h
+@@ -0,0 +1,128 @@
++/*
++ * (C) Copyright 2004-2008
++ * Texas Instruments, <www.ti.com>
++ *
++ * 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
++ */
++#ifndef _I2C_H_
++#define _I2C_H_
++
++#define I2C_DEFAULT_BASE I2C_BASE1
++
++#define I2C_REV (I2C_DEFAULT_BASE + 0x00)
++#define I2C_IE (I2C_DEFAULT_BASE + 0x04)
++#define I2C_STAT (I2C_DEFAULT_BASE + 0x08)
++#define I2C_IV (I2C_DEFAULT_BASE + 0x0c)
++#define I2C_BUF (I2C_DEFAULT_BASE + 0x14)
++#define I2C_CNT (I2C_DEFAULT_BASE + 0x18)
++#define I2C_DATA (I2C_DEFAULT_BASE + 0x1c)
++#define I2C_SYSC (I2C_DEFAULT_BASE + 0x20)
++#define I2C_CON (I2C_DEFAULT_BASE + 0x24)
++#define I2C_OA (I2C_DEFAULT_BASE + 0x28)
++#define I2C_SA (I2C_DEFAULT_BASE + 0x2c)
++#define I2C_PSC (I2C_DEFAULT_BASE + 0x30)
++#define I2C_SCLL (I2C_DEFAULT_BASE + 0x34)
++#define I2C_SCLH (I2C_DEFAULT_BASE + 0x38)
++#define I2C_SYSTEST (I2C_DEFAULT_BASE + 0x3c)
++
++/* I2C masks */
++
++/* I2C Interrupt Enable Register (I2C_IE): */
++#define I2C_IE_GC_IE (1 << 5)
++#define I2C_IE_XRDY_IE (1 << 4) /* Transmit data ready interrupt enable */
++#define I2C_IE_RRDY_IE (1 << 3) /* Receive data ready interrupt enable */
++#define I2C_IE_ARDY_IE (1 << 2) /* Register access ready interrupt enable */
++#define I2C_IE_NACK_IE (1 << 1) /* No acknowledgment interrupt enable */
++#define I2C_IE_AL_IE (1 << 0) /* Arbitration lost interrupt enable */
++
++/* I2C Status Register (I2C_STAT): */
++
++#define I2C_STAT_SBD (1 << 15) /* Single byte data */
++#define I2C_STAT_BB (1 << 12) /* Bus busy */
++#define I2C_STAT_ROVR (1 << 11) /* Receive overrun */
++#define I2C_STAT_XUDF (1 << 10) /* Transmit underflow */
++#define I2C_STAT_AAS (1 << 9) /* Address as slave */
++#define I2C_STAT_GC (1 << 5)
++#define I2C_STAT_XRDY (1 << 4) /* Transmit data ready */
++#define I2C_STAT_RRDY (1 << 3) /* Receive data ready */
++#define I2C_STAT_ARDY (1 << 2) /* Register access ready */
++#define I2C_STAT_NACK (1 << 1) /* No acknowledgment interrupt enable */
++#define I2C_STAT_AL (1 << 0) /* Arbitration lost interrupt enable */
++
++/* I2C Interrupt Code Register (I2C_INTCODE): */
++
++#define I2C_INTCODE_MASK 7
++#define I2C_INTCODE_NONE 0
++#define I2C_INTCODE_AL 1 /* Arbitration lost */
++#define I2C_INTCODE_NAK 2 /* No acknowledgement/general call */
++#define I2C_INTCODE_ARDY 3 /* Register access ready */
++#define I2C_INTCODE_RRDY 4 /* Rcv data ready */
++#define I2C_INTCODE_XRDY 5 /* Xmit data ready */
++
++/* I2C Buffer Configuration Register (I2C_BUF): */
++
++#define I2C_BUF_RDMA_EN (1 << 15) /* Receive DMA channel enable */
++#define I2C_BUF_XDMA_EN (1 << 7) /* Transmit DMA channel enable */
++
++/* I2C Configuration Register (I2C_CON): */
++
++#define I2C_CON_EN (1 << 15) /* I2C module enable */
++#define I2C_CON_BE (1 << 14) /* Big endian mode */
++#define I2C_CON_STB (1 << 11) /* Start byte mode (master mode only) */
++#define I2C_CON_MST (1 << 10) /* Master/slave mode */
++#define I2C_CON_TRX (1 << 9) /* Transmitter/receiver mode /*
++ /* (master mode only) */
++#define I2C_CON_XA (1 << 8) /* Expand address */
++#define I2C_CON_STP (1 << 1) /* Stop condition (master mode only) */
++#define I2C_CON_STT (1 << 0) /* Start condition (master mode only) */
++
++/* I2C System Test Register (I2C_SYSTEST): */
++
++#define I2C_SYSTEST_ST_EN (1 << 15) /* System test enable */
++#define I2C_SYSTEST_FREE (1 << 14) /* Free running mode, on brkpoint) */
++#define I2C_SYSTEST_TMODE_MASK (3 << 12) /* Test mode select */
++#define I2C_SYSTEST_TMODE_SHIFT (12) /* Test mode select */
++#define I2C_SYSTEST_SCL_I (1 << 3) /* SCL line sense input value */
++#define I2C_SYSTEST_SCL_O (1 << 2) /* SCL line drive output value */
++#define I2C_SYSTEST_SDA_I (1 << 1) /* SDA line sense input value */
++#define I2C_SYSTEST_SDA_O (1 << 0) /* SDA line drive output value */
++
++#define I2C_SCLL_SCLL (0)
++#define I2C_SCLL_SCLL_M (0xFF)
++#define I2C_SCLL_HSSCLL (8)
++#define I2C_SCLH_HSSCLL_M (0xFF)
++#define I2C_SCLH_SCLH (0)
++#define I2C_SCLH_SCLH_M (0xFF)
++#define I2C_SCLH_HSSCLH (8)
++#define I2C_SCLH_HSSCLH_M (0xFF)
++
++#define OMAP_I2C_STANDARD 100
++#define OMAP_I2C_FAST_MODE 400
++#define OMAP_I2C_HIGH_SPEED 3400
++
++#define SYSTEM_CLOCK_12 12000
++#define SYSTEM_CLOCK_13 13000
++#define SYSTEM_CLOCK_192 19200
++#define SYSTEM_CLOCK_96 96000
++
++#define I2C_IP_CLK SYSTEM_CLOCK_96
++#define I2C_PSC_MAX (0x0f)
++#define I2C_PSC_MIN (0x00)
++
++#endif /* _I2C_H_ */
+diff --git a/include/asm-arm/arch-omap3/mem.h b/include/asm-arm/arch-omap3/mem.h
+new file mode 100644
+index 0000000..2c5cc51
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/mem.h
+@@ -0,0 +1,220 @@
++/*
++ * (C) Copyright 2006-2008
++ * Texas Instruments, <www.ti.com>
++ * Richard Woodruff <r-woodruff2@ti.com>
++ *
++ * 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
++ */
++
++#ifndef _MEM_H_
++#define _MEM_H_
++
++#define SDRC_CS0_OSET 0x0
++#define SDRC_CS1_OSET 0x30 /* mirror CS1 regs appear offset 0x30 from CS0 */
++
++#ifndef __ASSEMBLY__
++
++typedef enum {
++ STACKED = 0,
++ IP_DDR = 1,
++ COMBO_DDR = 2,
++ IP_SDR = 3,
++} mem_t;
++
++#endif /* __ASSEMBLY__ */
++
++#define EARLY_INIT 1
++
++/* Slower full frequency range default timings for x32 operation*/
++#define SDP_SDRC_SHARING 0x00000100
++#define SDP_SDRC_MR_0_SDR 0x00000031
++
++/* optimized timings good for current shipping parts */
++#define SDP_3430_SDRC_RFR_CTRL_165MHz 0x0004e201 /* 7.8us/6ns - 50=0x4e2 */
++
++#define DLL_OFFSET 0
++#define DLL_WRITEDDRCLKX2DIS 1
++#define DLL_ENADLL 1
++#define DLL_LOCKDLL 0
++#define DLL_DLLPHASE_72 0
++#define DLL_DLLPHASE_90 1
++
++/* rkw - need to find of 90/72 degree recommendation for speed like before */
++#define SDP_SDRC_DLLAB_CTRL ((DLL_ENADLL << 3) | \
++ (DLL_LOCKDLL << 2) | (DLL_DLLPHASE_90 << 1))
++
++/* Infineon part of 3430SDP (165MHz optimized) 6.06ns
++ * ACTIMA
++ * TDAL = Twr/Tck + Trp/tck = 15/6 + 18/6 = 2.5 + 3 = 5.5 -> 6
++ * TDPL (Twr) = 15/6 = 2.5 -> 3
++ * TRRD = 12/6 = 2
++ * TRCD = 18/6 = 3
++ * TRP = 18/6 = 3
++ * TRAS = 42/6 = 7
++ * TRC = 60/6 = 10
++ * TRFC = 72/6 = 12
++ * ACTIMB
++ * TCKE = 2
++ * XSR = 120/6 = 20
++ */
++#define TDAL_165 6
++#define TDPL_165 3
++#define TRRD_165 2
++#define TRCD_165 3
++#define TRP_165 3
++#define TRAS_165 7
++#define TRC_165 10
++#define TRFC_165 12
++#define V_ACTIMA_165 ((TRFC_165 << 27) | (TRC_165 << 22) | (TRAS_165 << 18) \
++ | (TRP_165 << 15) | (TRCD_165 << 12) | (TRRD_165 << 9) | \
++ (TDPL_165 << 6) | (TDAL_165))
++
++#define TWTR_165 1
++#define TCKE_165 2
++#define TXP_165 2
++#define XSR_165 20
++#define V_ACTIMB_165 (((TCKE_165 << 12) | (XSR_165 << 0)) | \
++ (TXP_165 << 8) | (TWTR_165 << 16))
++
++# define SDP_SDRC_ACTIM_CTRLA_0 V_ACTIMA_165
++# define SDP_SDRC_ACTIM_CTRLB_0 V_ACTIMB_165
++# define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz
++
++/*
++ * GPMC settings -
++ * Definitions is as per the following format
++ * # define <PART>_GPMC_CONFIG<x> <value>
++ * Where:
++ * PART is the part name e.g. STNOR - Intel Strata Flash
++ * x is GPMC config registers from 1 to 6 (there will be 6 macros)
++ * Value is corresponding value
++ *
++ * For every valid PRCM configuration there should be only one definition of
++ * the same. if values are independent of the board, this definition will be
++ * present in this file if values are dependent on the board, then this should
++ * go into corresponding mem-boardName.h file
++ *
++ * Currently valid part Names are (PART):
++ * STNOR - Intel Strata Flash
++ * SMNAND - Samsung NAND
++ * MPDB - H4 MPDB board
++ * SBNOR - Sibley NOR
++ * MNAND - Micron Large page x16 NAND
++ * ONNAND - Samsung One NAND
++ *
++ * include/configs/file.h contains the defn - for all CS we are interested
++ * #define OMAP34XX_GPMC_CSx PART
++ * #define OMAP34XX_GPMC_CSx_SIZE Size
++ * #define OMAP34XX_GPMC_CSx_MAP Map
++ * Where:
++ * x - CS number
++ * PART - Part Name as defined above
++ * SIZE - how big is the mapping to be
++ * GPMC_SIZE_128M - 0x8
++ * GPMC_SIZE_64M - 0xC
++ * GPMC_SIZE_32M - 0xE
++ * GPMC_SIZE_16M - 0xF
++ * MAP - Map this CS to which address(GPMC address space)- Absolute address
++ * >>24 before being used.
++ */
++#define GPMC_SIZE_128M 0x8
++#define GPMC_SIZE_64M 0xC
++#define GPMC_SIZE_32M 0xE
++#define GPMC_SIZE_16M 0xF
++
++# define SMNAND_GPMC_CONFIG1 0x00000800
++# define SMNAND_GPMC_CONFIG2 0x00141400
++# define SMNAND_GPMC_CONFIG3 0x00141400
++# define SMNAND_GPMC_CONFIG4 0x0F010F01
++# define SMNAND_GPMC_CONFIG5 0x010C1414
++# define SMNAND_GPMC_CONFIG6 0x1F0F0A80
++# define SMNAND_GPMC_CONFIG7 0x00000C44
++
++# define M_NAND_GPMC_CONFIG1 0x00001800
++# define M_NAND_GPMC_CONFIG2 0x00141400
++# define M_NAND_GPMC_CONFIG3 0x00141400
++# define M_NAND_GPMC_CONFIG4 0x0F010F01
++# define M_NAND_GPMC_CONFIG5 0x010C1414
++# define M_NAND_GPMC_CONFIG6 0x1f0f0A80
++# define M_NAND_GPMC_CONFIG7 0x00000C44
++
++# define STNOR_GPMC_CONFIG1 0x3
++# define STNOR_GPMC_CONFIG2 0x00151501
++# define STNOR_GPMC_CONFIG3 0x00060602
++# define STNOR_GPMC_CONFIG4 0x11091109
++# define STNOR_GPMC_CONFIG5 0x01141F1F
++# define STNOR_GPMC_CONFIG6 0x000004c4
++
++# define SIBNOR_GPMC_CONFIG1 0x1200
++# define SIBNOR_GPMC_CONFIG2 0x001f1f00
++# define SIBNOR_GPMC_CONFIG3 0x00080802
++# define SIBNOR_GPMC_CONFIG4 0x1C091C09
++# define SIBNOR_GPMC_CONFIG5 0x01131F1F
++# define SIBNOR_GPMC_CONFIG6 0x1F0F03C2
++
++# define SDPV2_MPDB_GPMC_CONFIG1 0x00611200
++# define SDPV2_MPDB_GPMC_CONFIG2 0x001F1F01
++# define SDPV2_MPDB_GPMC_CONFIG3 0x00080803
++# define SDPV2_MPDB_GPMC_CONFIG4 0x1D091D09
++# define SDPV2_MPDB_GPMC_CONFIG5 0x041D1F1F
++# define SDPV2_MPDB_GPMC_CONFIG6 0x1D0904C4
++
++# define MPDB_GPMC_CONFIG1 0x00011000
++# define MPDB_GPMC_CONFIG2 0x001f1f01
++# define MPDB_GPMC_CONFIG3 0x00080803
++# define MPDB_GPMC_CONFIG4 0x1c0b1c0a
++# define MPDB_GPMC_CONFIG5 0x041f1F1F
++# define MPDB_GPMC_CONFIG6 0x1F0F04C4
++
++# define P2_GPMC_CONFIG1 0x0
++# define P2_GPMC_CONFIG2 0x0
++# define P2_GPMC_CONFIG3 0x0
++# define P2_GPMC_CONFIG4 0x0
++# define P2_GPMC_CONFIG5 0x0
++# define P2_GPMC_CONFIG6 0x0
++
++# define ONENAND_GPMC_CONFIG1 0x00001200
++# define ONENAND_GPMC_CONFIG2 0x000F0F01
++# define ONENAND_GPMC_CONFIG3 0x00030301
++# define ONENAND_GPMC_CONFIG4 0x0F040F04
++# define ONENAND_GPMC_CONFIG5 0x010F1010
++# define ONENAND_GPMC_CONFIG6 0x1F060000
++
++/* max number of GPMC Chip Selects */
++#define GPMC_MAX_CS 8
++/* max number of GPMC regs */
++#define GPMC_MAX_REG 7
++
++#define PISMO1_NOR 1
++#define PISMO1_NAND 2
++#define PISMO2_CS0 3
++#define PISMO2_CS1 4
++#define PISMO1_ONENAND 5
++#define DBG_MPDB 6
++#define PISMO2_NAND_CS0 7
++#define PISMO2_NAND_CS1 8
++
++/* make it readable for the gpmc_init */
++#define PISMO1_NOR_BASE FLASH_BASE
++#define PISMO1_NAND_BASE NAND_BASE
++#define PISMO2_CS0_BASE PISMO2_MAP1
++#define PISMO1_ONEN_BASE ONENAND_MAP
++#define DBG_MPDB_BASE DEBUG_BASE
++
++#endif /* endif _MEM_H_ */
+diff --git a/include/asm-arm/arch-omap3/mmc.h b/include/asm-arm/arch-omap3/mmc.h
+new file mode 100644
+index 0000000..8631aae
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/mmc.h
+@@ -0,0 +1,235 @@
++/*
++ * (C) Copyright 2008
++ * Texas Instruments, <www.ti.com>
++ * Syed Mohammed Khasim <khasim@ti.com>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation's version 2 of
++ * the License.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#ifndef MMC_H
++#define MMC_H
++
++#include "mmc_host_def.h"
++
++/* Responses */
++#define RSP_TYPE_NONE (RSP_TYPE_NORSP | CCCE_NOCHECK | CICE_NOCHECK)
++#define RSP_TYPE_R1 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK)
++#define RSP_TYPE_R1B (RSP_TYPE_LGHT48B | CCCE_CHECK | CICE_CHECK)
++#define RSP_TYPE_R2 (RSP_TYPE_LGHT136 | CCCE_CHECK | CICE_NOCHECK)
++#define RSP_TYPE_R3 (RSP_TYPE_LGHT48 | CCCE_NOCHECK | CICE_NOCHECK)
++#define RSP_TYPE_R4 (RSP_TYPE_LGHT48 | CCCE_NOCHECK | CICE_NOCHECK)
++#define RSP_TYPE_R5 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK)
++#define RSP_TYPE_R6 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK)
++#define RSP_TYPE_R7 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK)
++
++/* All supported commands */
++#define MMC_CMD0 (INDEX(0) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD1 (INDEX(1) | RSP_TYPE_R3 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD2 (INDEX(2) | RSP_TYPE_R2 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD3 (INDEX(3) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_SDCMD3 (INDEX(3) | RSP_TYPE_R6 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD4 (INDEX(4) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD6 (INDEX(6) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD7_SELECT (INDEX(7) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD7_DESELECT (INDEX(7) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD8 (INDEX(8) | RSP_TYPE_R1 | DP_DATA | DDIR_READ)
++#define MMC_SDCMD8 (INDEX(8) | RSP_TYPE_R7 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD9 (INDEX(9) | RSP_TYPE_R2 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD12 (INDEX(12) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD13 (INDEX(13) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD15 (INDEX(15) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD16 (INDEX(16) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_CMD17 (INDEX(17) | RSP_TYPE_R1 | DP_DATA | DDIR_READ)
++#define MMC_CMD24 (INDEX(24) | RSP_TYPE_R1 | DP_DATA | DDIR_WRITE)
++#define MMC_ACMD6 (INDEX(6) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_ACMD41 (INDEX(41) | RSP_TYPE_R3 | DP_NO_DATA | DDIR_WRITE)
++#define MMC_ACMD51 (INDEX(51) | RSP_TYPE_R1 | DP_DATA | DDIR_READ)
++#define MMC_CMD55 (INDEX(55) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE)
++
++#define MMC_AC_CMD_RCA_MASK (unsigned int)(0xFFFF << 16)
++#define MMC_BC_CMD_DSR_MASK (unsigned int)(0xFFFF << 16)
++#define MMC_DSR_DEFAULT (0x0404)
++#define SD_CMD8_CHECK_PATTERN (0xAA)
++#define SD_CMD8_2_7_3_6_V_RANGE (0x01 << 8)
++
++/* Clock Configurations and Macros */
++
++#define MMC_CLOCK_REFERENCE (96)
++#define MMC_RELATIVE_CARD_ADDRESS (0x1234)
++#define MMC_INIT_SEQ_CLK (MMC_CLOCK_REFERENCE * 1000 / 80)
++#define MMC_400kHz_CLK (MMC_CLOCK_REFERENCE * 1000 / 400)
++#define CLKDR(r, f, u) ((((r)*100) / ((f)*(u))) + 1)
++#define CLKD(f, u) (CLKDR(MMC_CLOCK_REFERENCE, f, u))
++
++#define MMC_OCR_REG_ACCESS_MODE_MASK (0x3 << 29)
++#define MMC_OCR_REG_ACCESS_MODE_BYTE (0x0 << 29)
++#define MMC_OCR_REG_ACCESS_MODE_SECTOR (0x2 << 29)
++
++#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_MASK (0x1 << 30)
++#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_BYTE (0x0 << 30)
++#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_SECTOR (0x1 << 30)
++
++#define MMC_SD2_CSD_C_SIZE_LSB_MASK (0xFFFF)
++#define MMC_SD2_CSD_C_SIZE_MSB_MASK (0x003F)
++#define MMC_SD2_CSD_C_SIZE_MSB_OFFSET (16)
++#define MMC_CSD_C_SIZE_LSB_MASK (0x0003)
++#define MMC_CSD_C_SIZE_MSB_MASK (0x03FF)
++#define MMC_CSD_C_SIZE_MSB_OFFSET (2)
++
++#define MMC_CSD_TRAN_SPEED_UNIT_MASK (0x07 << 0)
++#define MMC_CSD_TRAN_SPEED_FACTOR_MASK (0x0F << 3)
++#define MMC_CSD_TRAN_SPEED_UNIT_100MHZ (0x3 << 0)
++#define MMC_CSD_TRAN_SPEED_FACTOR_1_0 (0x01 << 3)
++#define MMC_CSD_TRAN_SPEED_FACTOR_8_0 (0x0F << 3)
++
++typedef struct {
++ unsigned not_used:1;
++ unsigned crc:7;
++ unsigned ecc:2;
++ unsigned file_format:2;
++ unsigned tmp_write_protect:1;
++ unsigned perm_write_protect:1;
++ unsigned copy:1;
++ unsigned file_format_grp:1;
++ unsigned content_prot_app:1;
++ unsigned reserved_1:4;
++ unsigned write_bl_partial:1;
++ unsigned write_bl_len:4;
++ unsigned r2w_factor:3;
++ unsigned default_ecc:2;
++ unsigned wp_grp_enable:1;
++ unsigned wp_grp_size:5;
++ unsigned erase_grp_mult:5;
++ unsigned erase_grp_size:5;
++ unsigned c_size_mult:3;
++ unsigned vdd_w_curr_max:3;
++ unsigned vdd_w_curr_min:3;
++ unsigned vdd_r_curr_max:3;
++ unsigned vdd_r_curr_min:3;
++ unsigned c_size_lsb:2;
++ unsigned c_size_msb:10;
++ unsigned reserved_2:2;
++ unsigned dsr_imp:1;
++ unsigned read_blk_misalign:1;
++ unsigned write_blk_misalign:1;
++ unsigned read_bl_partial:1;
++ unsigned read_bl_len:4;
++ unsigned ccc:12;
++ unsigned tran_speed:8;
++ unsigned nsac:8;
++ unsigned taac:8;
++ unsigned reserved_3:2;
++ unsigned spec_vers:4;
++ unsigned csd_structure:2;
++} mmc_csd_reg_t;
++
++/* csd for sd2.0 */
++typedef struct {
++ unsigned not_used:1;
++ unsigned crc:7;
++ unsigned reserved_1:2;
++ unsigned file_format:2;
++ unsigned tmp_write_protect:1;
++ unsigned perm_write_protect:1;
++ unsigned copy:1;
++ unsigned file_format_grp:1;
++ unsigned reserved_2:5;
++ unsigned write_bl_partial:1;
++ unsigned write_bl_len:4;
++ unsigned r2w_factor:3;
++ unsigned reserved_3:2;
++ unsigned wp_grp_enable:1;
++ unsigned wp_grp_size:7;
++ unsigned sector_size:7;
++ unsigned erase_blk_len:1;
++ unsigned reserved_4:1;
++ unsigned c_size_lsb:16;
++ unsigned c_size_msb:6;
++ unsigned reserved_5:6;
++ unsigned dsr_imp:1;
++ unsigned read_blk_misalign:1;
++ unsigned write_blk_misalign:1;
++ unsigned read_bl_partial:1;
++ unsigned read_bl_len:4;
++ unsigned ccc:12;
++ unsigned tran_speed:8;
++ unsigned nsac:8;
++ unsigned taac:8;
++ unsigned reserved_6:6;
++ unsigned csd_structure:2;
++} mmc_sd2_csd_reg_t;
++
++/* extended csd - 512 bytes long */
++typedef struct {
++ unsigned char reserved_1[181];
++ unsigned char erasedmemorycontent;
++ unsigned char reserved_2;
++ unsigned char buswidthmode;
++ unsigned char reserved_3;
++ unsigned char highspeedinterfacetiming;
++ unsigned char reserved_4;
++ unsigned char powerclass;
++ unsigned char reserved_5;
++ unsigned char commandsetrevision;
++ unsigned char reserved_6;
++ unsigned char commandset;
++ unsigned char extendedcsdrevision;
++ unsigned char reserved_7;
++ unsigned char csdstructureversion;
++ unsigned char reserved_8;
++ unsigned char cardtype;
++ unsigned char reserved_9[3];
++ unsigned char powerclass_52mhz_1_95v;
++ unsigned char powerclass_26mhz_1_95v;
++ unsigned char powerclass_52mhz_3_6v;
++ unsigned char powerclass_26mhz_3_6v;
++ unsigned char reserved_10;
++ unsigned char minreadperf_4b_26mhz;
++ unsigned char minwriteperf_4b_26mhz;
++ unsigned char minreadperf_8b_26mhz_4b_52mhz;
++ unsigned char minwriteperf_8b_26mhz_4b_52mhz;
++ unsigned char minreadperf_8b_52mhz;
++ unsigned char minwriteperf_8b_52mhz;
++ unsigned char reserved_11;
++ unsigned int sectorcount;
++ unsigned char reserved_12[288];
++ unsigned char supportedcommandsets;
++ unsigned char reserved_13[7];
++} mmc_extended_csd_reg_t;
++
++/* mmc sd responce */
++typedef struct {
++ unsigned int ocr;
++} mmc_resp_r3;
++
++typedef struct {
++ unsigned short cardstatus;
++ unsigned short newpublishedrca;
++} mmc_resp_r6;
++
++extern mmc_card_data mmc_dev;
++
++unsigned char mmc_lowlevel_init(void);
++unsigned char mmc_send_command(unsigned int cmd, unsigned int arg,
++ unsigned int *response);
++unsigned char mmc_setup_clock(unsigned int iclk, unsigned short clkd);
++unsigned char mmc_set_opendrain(unsigned char state);
++unsigned char mmc_read_data(unsigned int *output_buf);
++
++#endif /* MMC_H */
+diff --git a/include/asm-arm/arch-omap3/mmc_host_def.h b/include/asm-arm/arch-omap3/mmc_host_def.h
+new file mode 100644
+index 0000000..37aaa08
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/mmc_host_def.h
+@@ -0,0 +1,166 @@
++/*
++ * (C) Copyright 2008
++ * Texas Instruments, <www.ti.com>
++ * Syed Mohammed Khasim <khasim@ti.com>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation's version 2 of
++ * the License.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#ifndef MMC_HOST_DEF_H
++#define MMC_HOST_DEF_H
++
++/*
++ * OMAP HSMMC register definitions
++ */
++#define OMAP_HSMMC_SYSCONFIG (*(unsigned int *) 0x4809C010)
++#define OMAP_HSMMC_SYSSTATUS (*(unsigned int *) 0x4809C014)
++#define OMAP_HSMMC_CON (*(unsigned int *) 0x4809C02C)
++#define OMAP_HSMMC_BLK (*(unsigned int *) 0x4809C104)
++#define OMAP_HSMMC_ARG (*(unsigned int *) 0x4809C108)
++#define OMAP_HSMMC_CMD (*(unsigned int *) 0x4809C10C)
++#define OMAP_HSMMC_RSP10 (*(unsigned int *) 0x4809C110)
++#define OMAP_HSMMC_RSP32 (*(unsigned int *) 0x4809C114)
++#define OMAP_HSMMC_RSP54 (*(unsigned int *) 0x4809C118)
++#define OMAP_HSMMC_RSP76 (*(unsigned int *) 0x4809C11C)
++#define OMAP_HSMMC_DATA (*(unsigned int *) 0x4809C120)
++#define OMAP_HSMMC_PSTATE (*(unsigned int *) 0x4809C124)
++#define OMAP_HSMMC_HCTL (*(unsigned int *) 0x4809C128)
++#define OMAP_HSMMC_SYSCTL (*(unsigned int *) 0x4809C12C)
++#define OMAP_HSMMC_STAT (*(unsigned int *) 0x4809C130)
++#define OMAP_HSMMC_IE (*(unsigned int *) 0x4809C134)
++#define OMAP_HSMMC_CAPA (*(unsigned int *) 0x4809C140)
++
++/* T2 Register definitions */
++#define CONTROL_DEV_CONF0 (*(unsigned int *) 0x48002274)
++#define CONTROL_PBIAS_LITE (*(unsigned int *) 0x48002520)
++
++/*
++ * OMAP HS MMC Bit definitions
++ */
++#define MMC_SOFTRESET (0x1 << 1)
++#define RESETDONE (0x1 << 0)
++#define NOOPENDRAIN (0x0 << 0)
++#define OPENDRAIN (0x1 << 0)
++#define OD (0x1 << 0)
++#define INIT_NOINIT (0x0 << 1)
++#define INIT_INITSTREAM (0x1 << 1)
++#define HR_NOHOSTRESP (0x0 << 2)
++#define STR_BLOCK (0x0 << 3)
++#define MODE_FUNC (0x0 << 4)
++#define DW8_1_4BITMODE (0x0 << 5)
++#define MIT_CTO (0x0 << 6)
++#define CDP_ACTIVEHIGH (0x0 << 7)
++#define WPP_ACTIVEHIGH (0x0 << 8)
++#define RESERVED_MASK (0x3 << 9)
++#define CTPL_MMC_SD (0x0 << 11)
++#define BLEN_512BYTESLEN (0x200 << 0)
++#define NBLK_STPCNT (0x0 << 16)
++#define DE_DISABLE (0x0 << 0)
++#define BCE_DISABLE (0x0 << 1)
++#define ACEN_DISABLE (0x0 << 2)
++#define DDIR_OFFSET (4)
++#define DDIR_MASK (0x1 << 4)
++#define DDIR_WRITE (0x0 << 4)
++#define DDIR_READ (0x1 << 4)
++#define MSBS_SGLEBLK (0x0 << 5)
++#define RSP_TYPE_OFFSET (16)
++#define RSP_TYPE_MASK (0x3 << 16)
++#define RSP_TYPE_NORSP (0x0 << 16)
++#define RSP_TYPE_LGHT136 (0x1 << 16)
++#define RSP_TYPE_LGHT48 (0x2 << 16)
++#define RSP_TYPE_LGHT48B (0x3 << 16)
++#define CCCE_NOCHECK (0x0 << 19)
++#define CCCE_CHECK (0x1 << 19)
++#define CICE_NOCHECK (0x0 << 20)
++#define CICE_CHECK (0x1 << 20)
++#define DP_OFFSET (21)
++#define DP_MASK (0x1 << 21)
++#define DP_NO_DATA (0x0 << 21)
++#define DP_DATA (0x1 << 21)
++#define CMD_TYPE_NORMAL (0x0 << 22)
++#define INDEX_OFFSET (24)
++#define INDEX_MASK (0x3f << 24)
++#define INDEX(i) (i << 24)
++#define DATI_MASK (0x1 << 1)
++#define DATI_CMDDIS (0x1 << 1)
++#define DTW_1_BITMODE (0x0 << 1)
++#define DTW_4_BITMODE (0x1 << 1)
++#define SDBP_PWROFF (0x0 << 8)
++#define SDBP_PWRON (0x1 << 8)
++#define SDVS_1V8 (0x5 << 9)
++#define SDVS_3V0 (0x6 << 9)
++#define ICE_MASK (0x1 << 0)
++#define ICE_STOP (0x0 << 0)
++#define ICS_MASK (0x1 << 1)
++#define ICS_NOTREADY (0x0 << 1)
++#define ICE_OSCILLATE (0x1 << 0)
++#define CEN_MASK (0x1 << 2)
++#define CEN_DISABLE (0x0 << 2)
++#define CEN_ENABLE (0x1 << 2)
++#define CLKD_OFFSET (6)
++#define CLKD_MASK (0x3FF << 6)
++#define DTO_MASK (0xF << 16)
++#define DTO_15THDTO (0xE << 16)
++#define SOFTRESETALL (0x1 << 24)
++#define CC_MASK (0x1 << 0)
++#define TC_MASK (0x1 << 1)
++#define BWR_MASK (0x1 << 4)
++#define BRR_MASK (0x1 << 5)
++#define ERRI_MASK (0x1 << 15)
++#define IE_CC (0x01 << 0)
++#define IE_TC (0x01 << 1)
++#define IE_BWR (0x01 << 4)
++#define IE_BRR (0x01 << 5)
++#define IE_CTO (0x01 << 16)
++#define IE_CCRC (0x01 << 17)
++#define IE_CEB (0x01 << 18)
++#define IE_CIE (0x01 << 19)
++#define IE_DTO (0x01 << 20)
++#define IE_DCRC (0x01 << 21)
++#define IE_DEB (0x01 << 22)
++#define IE_CERR (0x01 << 28)
++#define IE_BADA (0x01 << 29)
++
++#define VS30_3V0SUP (1 << 25)
++#define VS18_1V8SUP (1 << 26)
++
++/* Driver definitions */
++#define MMCSD_SECTOR_SIZE (512)
++#define MMC_CARD 0
++#define SD_CARD 1
++#define BYTE_MODE 0
++#define SECTOR_MODE 1
++#define CLK_INITSEQ 0
++#define CLK_400KHZ 1
++#define CLK_MISC 2
++
++typedef struct {
++ unsigned int card_type;
++ unsigned int version;
++ unsigned int mode;
++ unsigned int size;
++ unsigned int RCA;
++} mmc_card_data;
++
++#define mmc_reg_out(addr, mask, val)\
++ (addr) = (((addr)) & (~(mask))) | ((val) & (mask));
++#define mmc_reg_out(addr, mask, val)\
++ (addr) = (((addr)) & (~(mask))) | ((val) & (mask));
++
++#endif /* MMC_HOST_DEF_H */
+diff --git a/include/asm-arm/arch-omap3/mux.h b/include/asm-arm/arch-omap3/mux.h
+new file mode 100644
+index 0000000..33947b9
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/mux.h
+@@ -0,0 +1,757 @@
++/*
++ * (C) Copyright 2006-2008
++ * Texas Instruments, <www.ti.com>
++ * Syed Mohammed Khasim <x0khasim@ti.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.
++ *
++ * 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 _MUX_H_
++#define _MUX_H_
++
++/*
++ * IEN - Input Enable
++ * IDIS - Input Disable
++ * PTD - Pull type Down
++ * PTU - Pull type Up
++ * DIS - Pull type selection is inactive
++ * EN - Pull type selection is active
++ * M0 - Mode 0
++ */
++
++#define IEN (1 << 8)
++
++#define IDIS (0 << 8)
++#define PTU (1 << 4)
++#define PTD (0 << 4)
++#define EN (1 << 3)
++#define DIS (0 << 3)
++
++#define M0 0
++#define M1 1
++#define M2 2
++#define M3 3
++#define M4 4
++#define M5 5
++#define M6 6
++#define M7 7
++
++/*
++ * To get the actual address the offset has to added
++ * with OMAP34XX_CTRL_BASE to get the actual address
++ */
++
++ /*SDRC*/
++#define CONTROL_PADCONF_SDRC_D0 0x0030
++#define CONTROL_PADCONF_SDRC_D1 0x0032
++#define CONTROL_PADCONF_SDRC_D2 0x0034
++#define CONTROL_PADCONF_SDRC_D3 0x0036
++#define CONTROL_PADCONF_SDRC_D4 0x0038
++#define CONTROL_PADCONF_SDRC_D5 0x003A
++#define CONTROL_PADCONF_SDRC_D6 0x003C
++#define CONTROL_PADCONF_SDRC_D7 0x003E
++#define CONTROL_PADCONF_SDRC_D8 0x0040
++#define CONTROL_PADCONF_SDRC_D9 0x0042
++#define CONTROL_PADCONF_SDRC_D10 0x0044
++#define CONTROL_PADCONF_SDRC_D11 0x0046
++#define CONTROL_PADCONF_SDRC_D12 0x0048
++#define CONTROL_PADCONF_SDRC_D13 0x004A
++#define CONTROL_PADCONF_SDRC_D14 0x004C
++#define CONTROL_PADCONF_SDRC_D15 0x004E
++#define CONTROL_PADCONF_SDRC_D16 0x0050
++#define CONTROL_PADCONF_SDRC_D17 0x0052
++#define CONTROL_PADCONF_SDRC_D18 0x0054
++#define CONTROL_PADCONF_SDRC_D19 0x0056
++#define CONTROL_PADCONF_SDRC_D20 0x0058
++#define CONTROL_PADCONF_SDRC_D21 0x005A
++#define CONTROL_PADCONF_SDRC_D22 0x005C
++#define CONTROL_PADCONF_SDRC_D23 0x005E
++#define CONTROL_PADCONF_SDRC_D24 0x0060
++#define CONTROL_PADCONF_SDRC_D25 0x0062
++#define CONTROL_PADCONF_SDRC_D26 0x0064
++#define CONTROL_PADCONF_SDRC_D27 0x0066
++#define CONTROL_PADCONF_SDRC_D28 0x0068
++#define CONTROL_PADCONF_SDRC_D29 0x006A
++#define CONTROL_PADCONF_SDRC_D30 0x006C
++#define CONTROL_PADCONF_SDRC_D31 0x006E
++#define CONTROL_PADCONF_SDRC_CLK 0x0070
++#define CONTROL_PADCONF_SDRC_DQS0 0x0072
++#define CONTROL_PADCONF_SDRC_DQS1 0x0074
++#define CONTROL_PADCONF_SDRC_DQS2 0x0076
++#define CONTROL_PADCONF_SDRC_DQS3 0x0078
++ /*GPMC*/
++#define CONTROL_PADCONF_GPMC_A1 0x007A
++#define CONTROL_PADCONF_GPMC_A2 0x007C
++#define CONTROL_PADCONF_GPMC_A3 0x007E
++#define CONTROL_PADCONF_GPMC_A4 0x0080
++#define CONTROL_PADCONF_GPMC_A5 0x0082
++#define CONTROL_PADCONF_GPMC_A6 0x0084
++#define CONTROL_PADCONF_GPMC_A7 0x0086
++#define CONTROL_PADCONF_GPMC_A8 0x0088
++#define CONTROL_PADCONF_GPMC_A9 0x008A
++#define CONTROL_PADCONF_GPMC_A10 0x008C
++#define CONTROL_PADCONF_GPMC_D0 0x008E
++#define CONTROL_PADCONF_GPMC_D1 0x0090
++#define CONTROL_PADCONF_GPMC_D2 0x0092
++#define CONTROL_PADCONF_GPMC_D3 0x0094
++#define CONTROL_PADCONF_GPMC_D4 0x0096
++#define CONTROL_PADCONF_GPMC_D5 0x0098
++#define CONTROL_PADCONF_GPMC_D6 0x009A
++#define CONTROL_PADCONF_GPMC_D7 0x009C
++#define CONTROL_PADCONF_GPMC_D8 0x009E
++#define CONTROL_PADCONF_GPMC_D9 0x00A0
++#define CONTROL_PADCONF_GPMC_D10 0x00A2
++#define CONTROL_PADCONF_GPMC_D11 0x00A4
++#define CONTROL_PADCONF_GPMC_D12 0x00A6
++#define CONTROL_PADCONF_GPMC_D13 0x00A8
++#define CONTROL_PADCONF_GPMC_D14 0x00AA
++#define CONTROL_PADCONF_GPMC_D15 0x00AC
++#define CONTROL_PADCONF_GPMC_nCS0 0x00AE
++#define CONTROL_PADCONF_GPMC_nCS1 0x00B0
++#define CONTROL_PADCONF_GPMC_nCS2 0x00B2
++#define CONTROL_PADCONF_GPMC_nCS3 0x00B4
++#define CONTROL_PADCONF_GPMC_nCS4 0x00B6
++#define CONTROL_PADCONF_GPMC_nCS5 0x00B8
++#define CONTROL_PADCONF_GPMC_nCS6 0x00BA
++#define CONTROL_PADCONF_GPMC_nCS7 0x00BC
++#define CONTROL_PADCONF_GPMC_CLK 0x00BE
++#define CONTROL_PADCONF_GPMC_nADV_ALE 0x00C0
++#define CONTROL_PADCONF_GPMC_nOE 0x00C2
++#define CONTROL_PADCONF_GPMC_nWE 0x00C4
++#define CONTROL_PADCONF_GPMC_nBE0_CLE 0x00C6
++#define CONTROL_PADCONF_GPMC_nBE1 0x00C8
++#define CONTROL_PADCONF_GPMC_nWP 0x00CA
++#define CONTROL_PADCONF_GPMC_WAIT0 0x00CC
++#define CONTROL_PADCONF_GPMC_WAIT1 0x00CE
++#define CONTROL_PADCONF_GPMC_WAIT2 0x00D0
++#define CONTROL_PADCONF_GPMC_WAIT3 0x00D2
++ /*DSS*/
++#define CONTROL_PADCONF_DSS_PCLK 0x00D4
++#define CONTROL_PADCONF_DSS_HSYNC 0x00D6
++#define CONTROL_PADCONF_DSS_VSYNC 0x00D8
++#define CONTROL_PADCONF_DSS_ACBIAS 0x00DA
++#define CONTROL_PADCONF_DSS_DATA0 0x00DC
++#define CONTROL_PADCONF_DSS_DATA1 0x00DE
++#define CONTROL_PADCONF_DSS_DATA2 0x00E0
++#define CONTROL_PADCONF_DSS_DATA3 0x00E2
++#define CONTROL_PADCONF_DSS_DATA4 0x00E4
++#define CONTROL_PADCONF_DSS_DATA5 0x00E6
++#define CONTROL_PADCONF_DSS_DATA6 0x00E8
++#define CONTROL_PADCONF_DSS_DATA7 0x00EA
++#define CONTROL_PADCONF_DSS_DATA8 0x00EC
++#define CONTROL_PADCONF_DSS_DATA9 0x00EE
++#define CONTROL_PADCONF_DSS_DATA10 0x00F0
++#define CONTROL_PADCONF_DSS_DATA11 0x00F2
++#define CONTROL_PADCONF_DSS_DATA12 0x00F4
++#define CONTROL_PADCONF_DSS_DATA13 0x00F6
++#define CONTROL_PADCONF_DSS_DATA14 0x00F8
++#define CONTROL_PADCONF_DSS_DATA15 0x00FA
++#define CONTROL_PADCONF_DSS_DATA16 0x00FC
++#define CONTROL_PADCONF_DSS_DATA17 0x00FE
++#define CONTROL_PADCONF_DSS_DATA18 0x0100
++#define CONTROL_PADCONF_DSS_DATA19 0x0102
++#define CONTROL_PADCONF_DSS_DATA20 0x0104
++#define CONTROL_PADCONF_DSS_DATA21 0x0106
++#define CONTROL_PADCONF_DSS_DATA22 0x0108
++#define CONTROL_PADCONF_DSS_DATA23 0x010A
++ /*CAMERA*/
++#define CONTROL_PADCONF_CAM_HS 0x010C
++#define CONTROL_PADCONF_CAM_VS 0x010E
++#define CONTROL_PADCONF_CAM_XCLKA 0x0110
++#define CONTROL_PADCONF_CAM_PCLK 0x0112
++#define CONTROL_PADCONF_CAM_FLD 0x0114
++#define CONTROL_PADCONF_CAM_D0 0x0116
++#define CONTROL_PADCONF_CAM_D1 0x0118
++#define CONTROL_PADCONF_CAM_D2 0x011A
++#define CONTROL_PADCONF_CAM_D3 0x011C
++#define CONTROL_PADCONF_CAM_D4 0x011E
++#define CONTROL_PADCONF_CAM_D5 0x0120
++#define CONTROL_PADCONF_CAM_D6 0x0122
++#define CONTROL_PADCONF_CAM_D7 0x0124
++#define CONTROL_PADCONF_CAM_D8 0x0126
++#define CONTROL_PADCONF_CAM_D9 0x0128
++#define CONTROL_PADCONF_CAM_D10 0x012A
++#define CONTROL_PADCONF_CAM_D11 0x012C
++#define CONTROL_PADCONF_CAM_XCLKB 0x012E
++#define CONTROL_PADCONF_CAM_WEN 0x0130
++#define CONTROL_PADCONF_CAM_STROBE 0x0132
++#define CONTROL_PADCONF_CSI2_DX0 0x0134
++#define CONTROL_PADCONF_CSI2_DY0 0x0136
++#define CONTROL_PADCONF_CSI2_DX1 0x0138
++#define CONTROL_PADCONF_CSI2_DY1 0x013A
++/*Audio Interface */
++#define CONTROL_PADCONF_McBSP2_FSX 0x013C
++#define CONTROL_PADCONF_McBSP2_CLKX 0x013E
++#define CONTROL_PADCONF_McBSP2_DR 0x0140
++#define CONTROL_PADCONF_McBSP2_DX 0x0142
++#define CONTROL_PADCONF_MMC1_CLK 0x0144
++#define CONTROL_PADCONF_MMC1_CMD 0x0146
++#define CONTROL_PADCONF_MMC1_DAT0 0x0148
++#define CONTROL_PADCONF_MMC1_DAT1 0x014A
++#define CONTROL_PADCONF_MMC1_DAT2 0x014C
++#define CONTROL_PADCONF_MMC1_DAT3 0x014E
++#define CONTROL_PADCONF_MMC1_DAT4 0x0150
++#define CONTROL_PADCONF_MMC1_DAT5 0x0152
++#define CONTROL_PADCONF_MMC1_DAT6 0x0154
++#define CONTROL_PADCONF_MMC1_DAT7 0x0156
++/*Wireless LAN */
++#define CONTROL_PADCONF_MMC2_CLK 0x0158
++#define CONTROL_PADCONF_MMC2_CMD 0x015A
++#define CONTROL_PADCONF_MMC2_DAT0 0x015C
++#define CONTROL_PADCONF_MMC2_DAT1 0x015E
++#define CONTROL_PADCONF_MMC2_DAT2 0x0160
++#define CONTROL_PADCONF_MMC2_DAT3 0x0162
++#define CONTROL_PADCONF_MMC2_DAT4 0x0164
++#define CONTROL_PADCONF_MMC2_DAT5 0x0166
++#define CONTROL_PADCONF_MMC2_DAT6 0x0168
++#define CONTROL_PADCONF_MMC2_DAT7 0x016A
++/*Bluetooth*/
++#define CONTROL_PADCONF_McBSP3_DX 0x016C
++#define CONTROL_PADCONF_McBSP3_DR 0x016E
++#define CONTROL_PADCONF_McBSP3_CLKX 0x0170
++#define CONTROL_PADCONF_McBSP3_FSX 0x0172
++#define CONTROL_PADCONF_UART2_CTS 0x0174
++#define CONTROL_PADCONF_UART2_RTS 0x0176
++#define CONTROL_PADCONF_UART2_TX 0x0178
++#define CONTROL_PADCONF_UART2_RX 0x017A
++/*Modem Interface */
++#define CONTROL_PADCONF_UART1_TX 0x017C
++#define CONTROL_PADCONF_UART1_RTS 0x017E
++#define CONTROL_PADCONF_UART1_CTS 0x0180
++#define CONTROL_PADCONF_UART1_RX 0x0182
++#define CONTROL_PADCONF_McBSP4_CLKX 0x0184
++#define CONTROL_PADCONF_McBSP4_DR 0x0186
++#define CONTROL_PADCONF_McBSP4_DX 0x0188
++#define CONTROL_PADCONF_McBSP4_FSX 0x018A
++#define CONTROL_PADCONF_McBSP1_CLKR 0x018C
++#define CONTROL_PADCONF_McBSP1_FSR 0x018E
++#define CONTROL_PADCONF_McBSP1_DX 0x0190
++#define CONTROL_PADCONF_McBSP1_DR 0x0192
++#define CONTROL_PADCONF_McBSP_CLKS 0x0194
++#define CONTROL_PADCONF_McBSP1_FSX 0x0196
++#define CONTROL_PADCONF_McBSP1_CLKX 0x0198
++/*Serial Interface*/
++#define CONTROL_PADCONF_UART3_CTS_RCTX 0x019A
++#define CONTROL_PADCONF_UART3_RTS_SD 0x019C
++#define CONTROL_PADCONF_UART3_RX_IRRX 0x019E
++#define CONTROL_PADCONF_UART3_TX_IRTX 0x01A0
++#define CONTROL_PADCONF_HSUSB0_CLK 0x01A2
++#define CONTROL_PADCONF_HSUSB0_STP 0x01A4
++#define CONTROL_PADCONF_HSUSB0_DIR 0x01A6
++#define CONTROL_PADCONF_HSUSB0_NXT 0x01A8
++#define CONTROL_PADCONF_HSUSB0_DATA0 0x01AA
++#define CONTROL_PADCONF_HSUSB0_DATA1 0x01AC
++#define CONTROL_PADCONF_HSUSB0_DATA2 0x01AE
++#define CONTROL_PADCONF_HSUSB0_DATA3 0x01B0
++#define CONTROL_PADCONF_HSUSB0_DATA4 0x01B2
++#define CONTROL_PADCONF_HSUSB0_DATA5 0x01B4
++#define CONTROL_PADCONF_HSUSB0_DATA6 0x01B6
++#define CONTROL_PADCONF_HSUSB0_DATA7 0x01B8
++#define CONTROL_PADCONF_I2C1_SCL 0x01BA
++#define CONTROL_PADCONF_I2C1_SDA 0x01BC
++#define CONTROL_PADCONF_I2C2_SCL 0x01BE
++#define CONTROL_PADCONF_I2C2_SDA 0x01C0
++#define CONTROL_PADCONF_I2C3_SCL 0x01C2
++#define CONTROL_PADCONF_I2C3_SDA 0x01C4
++#define CONTROL_PADCONF_I2C4_SCL 0x0A00
++#define CONTROL_PADCONF_I2C4_SDA 0x0A02
++#define CONTROL_PADCONF_HDQ_SIO 0x01C6
++#define CONTROL_PADCONF_McSPI1_CLK 0x01C8
++#define CONTROL_PADCONF_McSPI1_SIMO 0x01CA
++#define CONTROL_PADCONF_McSPI1_SOMI 0x01CC
++#define CONTROL_PADCONF_McSPI1_CS0 0x01CE
++#define CONTROL_PADCONF_McSPI1_CS1 0x01D0
++#define CONTROL_PADCONF_McSPI1_CS2 0x01D2
++#define CONTROL_PADCONF_McSPI1_CS3 0x01D4
++#define CONTROL_PADCONF_McSPI2_CLK 0x01D6
++#define CONTROL_PADCONF_McSPI2_SIMO 0x01D8
++#define CONTROL_PADCONF_McSPI2_SOMI 0x01DA
++#define CONTROL_PADCONF_McSPI2_CS0 0x01DC
++#define CONTROL_PADCONF_McSPI2_CS1 0x01DE
++/*Control and debug */
++#define CONTROL_PADCONF_SYS_32K 0x0A04
++#define CONTROL_PADCONF_SYS_CLKREQ 0x0A06
++#define CONTROL_PADCONF_SYS_nIRQ 0x01E0
++#define CONTROL_PADCONF_SYS_BOOT0 0x0A0A
++#define CONTROL_PADCONF_SYS_BOOT1 0x0A0C
++#define CONTROL_PADCONF_SYS_BOOT2 0x0A0E
++#define CONTROL_PADCONF_SYS_BOOT3 0x0A10
++#define CONTROL_PADCONF_SYS_BOOT4 0x0A12
++#define CONTROL_PADCONF_SYS_BOOT5 0x0A14
++#define CONTROL_PADCONF_SYS_BOOT6 0x0A16
++#define CONTROL_PADCONF_SYS_OFF_MODE 0x0A18
++#define CONTROL_PADCONF_SYS_CLKOUT1 0x0A1A
++#define CONTROL_PADCONF_SYS_CLKOUT2 0x01E2
++#define CONTROL_PADCONF_JTAG_nTRST 0x0A1C
++#define CONTROL_PADCONF_JTAG_TCK 0x0A1E
++#define CONTROL_PADCONF_JTAG_TMS 0x0A20
++#define CONTROL_PADCONF_JTAG_TDI 0x0A22
++#define CONTROL_PADCONF_JTAG_EMU0 0x0A24
++#define CONTROL_PADCONF_JTAG_EMU1 0x0A26
++#define CONTROL_PADCONF_ETK_CLK 0x0A28
++#define CONTROL_PADCONF_ETK_CTL 0x0A2A
++#define CONTROL_PADCONF_ETK_D0 0x0A2C
++#define CONTROL_PADCONF_ETK_D1 0x0A2E
++#define CONTROL_PADCONF_ETK_D2 0x0A30
++#define CONTROL_PADCONF_ETK_D3 0x0A32
++#define CONTROL_PADCONF_ETK_D4 0x0A34
++#define CONTROL_PADCONF_ETK_D5 0x0A36
++#define CONTROL_PADCONF_ETK_D6 0x0A38
++#define CONTROL_PADCONF_ETK_D7 0x0A3A
++#define CONTROL_PADCONF_ETK_D8 0x0A3C
++#define CONTROL_PADCONF_ETK_D9 0x0A3E
++#define CONTROL_PADCONF_ETK_D10 0x0A40
++#define CONTROL_PADCONF_ETK_D11 0x0A42
++#define CONTROL_PADCONF_ETK_D12 0x0A44
++#define CONTROL_PADCONF_ETK_D13 0x0A46
++#define CONTROL_PADCONF_ETK_D14 0x0A48
++#define CONTROL_PADCONF_ETK_D15 0x0A4A
++#define CONTROL_PADCONF_ETK_CLK_ES2 0x05D8
++#define CONTROL_PADCONF_ETK_CTL_ES2 0x05DA
++#define CONTROL_PADCONF_ETK_D0_ES2 0x05DC
++#define CONTROL_PADCONF_ETK_D1_ES2 0x05DE
++#define CONTROL_PADCONF_ETK_D2_ES2 0x05E0
++#define CONTROL_PADCONF_ETK_D3_ES2 0x05E2
++#define CONTROL_PADCONF_ETK_D4_ES2 0x05E4
++#define CONTROL_PADCONF_ETK_D5_ES2 0x05E6
++#define CONTROL_PADCONF_ETK_D6_ES2 0x05E8
++#define CONTROL_PADCONF_ETK_D7_ES2 0x05EA
++#define CONTROL_PADCONF_ETK_D8_ES2 0x05EC
++#define CONTROL_PADCONF_ETK_D9_ES2 0x05EE
++#define CONTROL_PADCONF_ETK_D10_ES2 0x05F0
++#define CONTROL_PADCONF_ETK_D11_ES2 0x05F2
++#define CONTROL_PADCONF_ETK_D12_ES2 0x05F4
++#define CONTROL_PADCONF_ETK_D13_ES2 0x05F6
++#define CONTROL_PADCONF_ETK_D14_ES2 0x05F8
++#define CONTROL_PADCONF_ETK_D15_ES2 0x05FA
++/*Die to Die */
++#define CONTROL_PADCONF_d2d_mcad0 0x01E4
++#define CONTROL_PADCONF_d2d_mcad1 0x01E6
++#define CONTROL_PADCONF_d2d_mcad2 0x01E8
++#define CONTROL_PADCONF_d2d_mcad3 0x01EA
++#define CONTROL_PADCONF_d2d_mcad4 0x01EC
++#define CONTROL_PADCONF_d2d_mcad5 0x01EE
++#define CONTROL_PADCONF_d2d_mcad6 0x01F0
++#define CONTROL_PADCONF_d2d_mcad7 0x01F2
++#define CONTROL_PADCONF_d2d_mcad8 0x01F4
++#define CONTROL_PADCONF_d2d_mcad9 0x01F6
++#define CONTROL_PADCONF_d2d_mcad10 0x01F8
++#define CONTROL_PADCONF_d2d_mcad11 0x01FA
++#define CONTROL_PADCONF_d2d_mcad12 0x01FC
++#define CONTROL_PADCONF_d2d_mcad13 0x01FE
++#define CONTROL_PADCONF_d2d_mcad14 0x0200
++#define CONTROL_PADCONF_d2d_mcad15 0x0202
++#define CONTROL_PADCONF_d2d_mcad16 0x0204
++#define CONTROL_PADCONF_d2d_mcad17 0x0206
++#define CONTROL_PADCONF_d2d_mcad18 0x0208
++#define CONTROL_PADCONF_d2d_mcad19 0x020A
++#define CONTROL_PADCONF_d2d_mcad20 0x020C
++#define CONTROL_PADCONF_d2d_mcad21 0x020E
++#define CONTROL_PADCONF_d2d_mcad22 0x0210
++#define CONTROL_PADCONF_d2d_mcad23 0x0212
++#define CONTROL_PADCONF_d2d_mcad24 0x0214
++#define CONTROL_PADCONF_d2d_mcad25 0x0216
++#define CONTROL_PADCONF_d2d_mcad26 0x0218
++#define CONTROL_PADCONF_d2d_mcad27 0x021A
++#define CONTROL_PADCONF_d2d_mcad28 0x021C
++#define CONTROL_PADCONF_d2d_mcad29 0x021E
++#define CONTROL_PADCONF_d2d_mcad30 0x0220
++#define CONTROL_PADCONF_d2d_mcad31 0x0222
++#define CONTROL_PADCONF_d2d_mcad32 0x0224
++#define CONTROL_PADCONF_d2d_mcad33 0x0226
++#define CONTROL_PADCONF_d2d_mcad34 0x0228
++#define CONTROL_PADCONF_d2d_mcad35 0x022A
++#define CONTROL_PADCONF_d2d_mcad36 0x022C
++#define CONTROL_PADCONF_d2d_clk26mi 0x022E
++#define CONTROL_PADCONF_d2d_nrespwron 0x0230
++#define CONTROL_PADCONF_d2d_nreswarm 0x0232
++#define CONTROL_PADCONF_d2d_arm9nirq 0x0234
++#define CONTROL_PADCONF_d2d_uma2p6fiq 0x0236
++#define CONTROL_PADCONF_d2d_spint 0x0238
++#define CONTROL_PADCONF_d2d_frint 0x023A
++#define CONTROL_PADCONF_d2d_dmareq0 0x023C
++#define CONTROL_PADCONF_d2d_dmareq1 0x023E
++#define CONTROL_PADCONF_d2d_dmareq2 0x0240
++#define CONTROL_PADCONF_d2d_dmareq3 0x0242
++#define CONTROL_PADCONF_d2d_n3gtrst 0x0244
++#define CONTROL_PADCONF_d2d_n3gtdi 0x0246
++#define CONTROL_PADCONF_d2d_n3gtdo 0x0248
++#define CONTROL_PADCONF_d2d_n3gtms 0x024A
++#define CONTROL_PADCONF_d2d_n3gtck 0x024C
++#define CONTROL_PADCONF_d2d_n3grtck 0x024E
++#define CONTROL_PADCONF_d2d_mstdby 0x0250
++#define CONTROL_PADCONF_d2d_swakeup 0x0A4C
++#define CONTROL_PADCONF_d2d_idlereq 0x0252
++#define CONTROL_PADCONF_d2d_idleack 0x0254
++#define CONTROL_PADCONF_d2d_mwrite 0x0256
++#define CONTROL_PADCONF_d2d_swrite 0x0258
++#define CONTROL_PADCONF_d2d_mread 0x025A
++#define CONTROL_PADCONF_d2d_sread 0x025C
++#define CONTROL_PADCONF_d2d_mbusflag 0x025E
++#define CONTROL_PADCONF_d2d_sbusflag 0x0260
++#define CONTROL_PADCONF_sdrc_cke0 0x0262
++#define CONTROL_PADCONF_sdrc_cke1 0x0264
++
++#define MUX_VAL(OFFSET,VALUE)\
++ __raw_writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET));
++
++#define CP(x) (CONTROL_PADCONF_##x)
++
++/*
++ * IEN - Input Enable
++ * IDIS - Input Disable
++ * PTD - Pull type Down
++ * PTU - Pull type Up
++ * DIS - Pull type selection is inactive
++ * EN - Pull type selection is active
++ * M0 - Mode 0
++ * The commented string gives the final mux configuration for that pin
++ */
++#define MUX_DEFAULT_ES2() \
++ /*SDRC*/\
++ MUX_VAL(CP(SDRC_D0), (IEN | PTD | DIS | M0)) /*SDRC_D0*/\
++ MUX_VAL(CP(SDRC_D1), (IEN | PTD | DIS | M0)) /*SDRC_D1*/\
++ MUX_VAL(CP(SDRC_D2), (IEN | PTD | DIS | M0)) /*SDRC_D2*/\
++ MUX_VAL(CP(SDRC_D3), (IEN | PTD | DIS | M0)) /*SDRC_D3*/\
++ MUX_VAL(CP(SDRC_D4), (IEN | PTD | DIS | M0)) /*SDRC_D4*/\
++ MUX_VAL(CP(SDRC_D5), (IEN | PTD | DIS | M0)) /*SDRC_D5*/\
++ MUX_VAL(CP(SDRC_D6), (IEN | PTD | DIS | M0)) /*SDRC_D6*/\
++ MUX_VAL(CP(SDRC_D7), (IEN | PTD | DIS | M0)) /*SDRC_D7*/\
++ MUX_VAL(CP(SDRC_D8), (IEN | PTD | DIS | M0)) /*SDRC_D8*/\
++ MUX_VAL(CP(SDRC_D9), (IEN | PTD | DIS | M0)) /*SDRC_D9*/\
++ MUX_VAL(CP(SDRC_D10), (IEN | PTD | DIS | M0)) /*SDRC_D10*/\
++ MUX_VAL(CP(SDRC_D11), (IEN | PTD | DIS | M0)) /*SDRC_D11*/\
++ MUX_VAL(CP(SDRC_D12), (IEN | PTD | DIS | M0)) /*SDRC_D12*/\
++ MUX_VAL(CP(SDRC_D13), (IEN | PTD | DIS | M0)) /*SDRC_D13*/\
++ MUX_VAL(CP(SDRC_D14), (IEN | PTD | DIS | M0)) /*SDRC_D14*/\
++ MUX_VAL(CP(SDRC_D15), (IEN | PTD | DIS | M0)) /*SDRC_D15*/\
++ MUX_VAL(CP(SDRC_D16), (IEN | PTD | DIS | M0)) /*SDRC_D16*/\
++ MUX_VAL(CP(SDRC_D17), (IEN | PTD | DIS | M0)) /*SDRC_D17*/\
++ MUX_VAL(CP(SDRC_D18), (IEN | PTD | DIS | M0)) /*SDRC_D18*/\
++ MUX_VAL(CP(SDRC_D19), (IEN | PTD | DIS | M0)) /*SDRC_D19*/\
++ MUX_VAL(CP(SDRC_D20), (IEN | PTD | DIS | M0)) /*SDRC_D20*/\
++ MUX_VAL(CP(SDRC_D21), (IEN | PTD | DIS | M0)) /*SDRC_D21*/\
++ MUX_VAL(CP(SDRC_D22), (IEN | PTD | DIS | M0)) /*SDRC_D22*/\
++ MUX_VAL(CP(SDRC_D23), (IEN | PTD | DIS | M0)) /*SDRC_D23*/\
++ MUX_VAL(CP(SDRC_D24), (IEN | PTD | DIS | M0)) /*SDRC_D24*/\
++ MUX_VAL(CP(SDRC_D25), (IEN | PTD | DIS | M0)) /*SDRC_D25*/\
++ MUX_VAL(CP(SDRC_D26), (IEN | PTD | DIS | M0)) /*SDRC_D26*/\
++ MUX_VAL(CP(SDRC_D27), (IEN | PTD | DIS | M0)) /*SDRC_D27*/\
++ MUX_VAL(CP(SDRC_D28), (IEN | PTD | DIS | M0)) /*SDRC_D28*/\
++ MUX_VAL(CP(SDRC_D29), (IEN | PTD | DIS | M0)) /*SDRC_D29*/\
++ MUX_VAL(CP(SDRC_D30), (IEN | PTD | DIS | M0)) /*SDRC_D30*/\
++ MUX_VAL(CP(SDRC_D31), (IEN | PTD | DIS | M0)) /*SDRC_D31*/\
++ MUX_VAL(CP(SDRC_CLK), (IEN | PTD | DIS | M0)) /*SDRC_CLK*/\
++ MUX_VAL(CP(SDRC_DQS0), (IEN | PTD | DIS | M0)) /*SDRC_DQS0*/\
++ MUX_VAL(CP(SDRC_DQS1), (IEN | PTD | DIS | M0)) /*SDRC_DQS1*/\
++ MUX_VAL(CP(SDRC_DQS2), (IEN | PTD | DIS | M0)) /*SDRC_DQS2*/\
++ MUX_VAL(CP(SDRC_DQS3), (IEN | PTD | DIS | M0)) /*SDRC_DQS3*/\
++ /*GPMC*/\
++ MUX_VAL(CP(GPMC_A1), (IDIS | PTD | DIS | M0)) /*GPMC_A1*/\
++ MUX_VAL(CP(GPMC_A2), (IDIS | PTD | DIS | M0)) /*GPMC_A2*/\
++ MUX_VAL(CP(GPMC_A3), (IDIS | PTD | DIS | M0)) /*GPMC_A3*/\
++ MUX_VAL(CP(GPMC_A4), (IDIS | PTD | DIS | M0)) /*GPMC_A4*/\
++ MUX_VAL(CP(GPMC_A5), (IDIS | PTD | DIS | M0)) /*GPMC_A5*/\
++ MUX_VAL(CP(GPMC_A6), (IDIS | PTD | DIS | M0)) /*GPMC_A6*/\
++ MUX_VAL(CP(GPMC_A7), (IDIS | PTD | DIS | M0)) /*GPMC_A7*/\
++ MUX_VAL(CP(GPMC_A8), (IDIS | PTD | DIS | M0)) /*GPMC_A8*/\
++ MUX_VAL(CP(GPMC_A9), (IDIS | PTD | DIS | M0)) /*GPMC_A9*/\
++ MUX_VAL(CP(GPMC_A10), (IDIS | PTD | DIS | M0)) /*GPMC_A10*/\
++ MUX_VAL(CP(GPMC_D0), (IEN | PTD | DIS | M0)) /*GPMC_D0*/\
++ MUX_VAL(CP(GPMC_D1), (IEN | PTD | DIS | M0)) /*GPMC_D1*/\
++ MUX_VAL(CP(GPMC_D2), (IEN | PTD | DIS | M0)) /*GPMC_D2*/\
++ MUX_VAL(CP(GPMC_D3), (IEN | PTD | DIS | M0)) /*GPMC_D3*/\
++ MUX_VAL(CP(GPMC_D4), (IEN | PTD | DIS | M0)) /*GPMC_D4*/\
++ MUX_VAL(CP(GPMC_D5), (IEN | PTD | DIS | M0)) /*GPMC_D5*/\
++ MUX_VAL(CP(GPMC_D6), (IEN | PTD | DIS | M0)) /*GPMC_D6*/\
++ MUX_VAL(CP(GPMC_D7), (IEN | PTD | DIS | M0)) /*GPMC_D7*/\
++ MUX_VAL(CP(GPMC_D8), (IEN | PTD | DIS | M0)) /*GPMC_D8*/\
++ MUX_VAL(CP(GPMC_D9), (IEN | PTD | DIS | M0)) /*GPMC_D9*/\
++ MUX_VAL(CP(GPMC_D10), (IEN | PTD | DIS | M0)) /*GPMC_D10*/\
++ MUX_VAL(CP(GPMC_D11), (IEN | PTD | DIS | M0)) /*GPMC_D11*/\
++ MUX_VAL(CP(GPMC_D12), (IEN | PTD | DIS | M0)) /*GPMC_D12*/\
++ MUX_VAL(CP(GPMC_D13), (IEN | PTD | DIS | M0)) /*GPMC_D13*/\
++ MUX_VAL(CP(GPMC_D14), (IEN | PTD | DIS | M0)) /*GPMC_D14*/\
++ MUX_VAL(CP(GPMC_D15), (IEN | PTD | DIS | M0)) /*GPMC_D15*/\
++ MUX_VAL(CP(GPMC_nCS0), (IDIS | PTU | EN | M0)) /*GPMC_nCS0*/\
++ MUX_VAL(CP(GPMC_nCS1), (IDIS | PTU | EN | M0)) /*GPMC_nCS1*/\
++ MUX_VAL(CP(GPMC_nCS2), (IDIS | PTU | EN | M0)) /*GPMC_nCS2*/\
++ MUX_VAL(CP(GPMC_nCS3), (IDIS | PTU | EN | M0)) /*GPMC_nCS3*/\
++ /* For Beagle Rev 2 boards*/\
++ MUX_VAL(CP(GPMC_nCS4), (IDIS | PTU | EN | M0))\
++ MUX_VAL(CP(GPMC_nCS5), (IDIS | PTD | DIS | M0))\
++ MUX_VAL(CP(GPMC_nCS6), (IEN | PTD | DIS | M1))\
++ MUX_VAL(CP(GPMC_nCS7), (IEN | PTU | EN | M1))\
++ MUX_VAL(CP(GPMC_nBE1), (IEN | PTD | DIS | M0))\
++ MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M0))\
++ MUX_VAL(CP(GPMC_WAIT3), (IEN | PTU | EN | M0))\
++ /* till here */ \
++ MUX_VAL(CP(GPMC_CLK), (IDIS | PTD | DIS | M0)) /*GPMC_CLK*/\
++ MUX_VAL(CP(GPMC_nADV_ALE), (IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\
++ MUX_VAL(CP(GPMC_nOE), (IDIS | PTD | DIS | M0)) /*GPMC_nOE*/\
++ MUX_VAL(CP(GPMC_nWE), (IDIS | PTD | DIS | M0)) /*GPMC_nWE*/\
++ MUX_VAL(CP(GPMC_nBE0_CLE), (IDIS | PTD | DIS | M0)) /*GPMC_nBE0_CLE*/\
++ MUX_VAL(CP(GPMC_nWP), (IEN | PTD | DIS | M0)) /*GPMC_nWP*/\
++ MUX_VAL(CP(GPMC_WAIT0), (IEN | PTU | EN | M0)) /*GPMC_WAIT0*/\
++ MUX_VAL(CP(GPMC_WAIT1), (IEN | PTU | EN | M0)) /*GPMC_WAIT1*/\
++ /*DSS*/\
++ MUX_VAL(CP(DSS_PCLK), (IDIS | PTD | DIS | M0)) /*DSS_PCLK*/\
++ MUX_VAL(CP(DSS_HSYNC), (IDIS | PTD | DIS | M0)) /*DSS_HSYNC*/\
++ MUX_VAL(CP(DSS_VSYNC), (IDIS | PTD | DIS | M0)) /*DSS_VSYNC*/\
++ MUX_VAL(CP(DSS_ACBIAS), (IDIS | PTD | DIS | M0)) /*DSS_ACBIAS*/\
++ MUX_VAL(CP(DSS_DATA0), (IDIS | PTD | DIS | M0)) /*DSS_DATA0*/\
++ MUX_VAL(CP(DSS_DATA1), (IDIS | PTD | DIS | M0)) /*DSS_DATA1*/\
++ MUX_VAL(CP(DSS_DATA2), (IDIS | PTD | DIS | M0)) /*DSS_DATA2*/\
++ MUX_VAL(CP(DSS_DATA3), (IDIS | PTD | DIS | M0)) /*DSS_DATA3*/\
++ MUX_VAL(CP(DSS_DATA4), (IDIS | PTD | DIS | M0)) /*DSS_DATA4*/\
++ MUX_VAL(CP(DSS_DATA5), (IDIS | PTD | DIS | M0)) /*DSS_DATA5*/\
++ MUX_VAL(CP(DSS_DATA6), (IDIS | PTD | DIS | M0)) /*DSS_DATA6*/\
++ MUX_VAL(CP(DSS_DATA7), (IDIS | PTD | DIS | M0)) /*DSS_DATA7*/\
++ MUX_VAL(CP(DSS_DATA8), (IDIS | PTD | DIS | M0)) /*DSS_DATA8*/\
++ MUX_VAL(CP(DSS_DATA9), (IDIS | PTD | DIS | M0)) /*DSS_DATA9*/\
++ MUX_VAL(CP(DSS_DATA10), (IDIS | PTD | DIS | M0)) /*DSS_DATA10*/\
++ MUX_VAL(CP(DSS_DATA11), (IDIS | PTD | DIS | M0)) /*DSS_DATA11*/\
++ MUX_VAL(CP(DSS_DATA12), (IDIS | PTD | DIS | M0)) /*DSS_DATA12*/\
++ MUX_VAL(CP(DSS_DATA13), (IDIS | PTD | DIS | M0)) /*DSS_DATA13*/\
++ MUX_VAL(CP(DSS_DATA14), (IDIS | PTD | DIS | M0)) /*DSS_DATA14*/\
++ MUX_VAL(CP(DSS_DATA15), (IDIS | PTD | DIS | M0)) /*DSS_DATA15*/\
++ MUX_VAL(CP(DSS_DATA16), (IDIS | PTD | DIS | M0)) /*DSS_DATA16*/\
++ MUX_VAL(CP(DSS_DATA17), (IDIS | PTD | DIS | M0)) /*DSS_DATA17*/\
++ MUX_VAL(CP(DSS_DATA18), (IDIS | PTD | DIS | M0)) /*DSS_DATA18*/\
++ MUX_VAL(CP(DSS_DATA19), (IDIS | PTD | DIS | M0)) /*DSS_DATA19*/\
++ MUX_VAL(CP(DSS_DATA20), (IDIS | PTD | DIS | M0)) /*DSS_DATA20*/\
++ MUX_VAL(CP(DSS_DATA21), (IDIS | PTD | DIS | M0)) /*DSS_DATA21*/\
++ MUX_VAL(CP(DSS_DATA22), (IDIS | PTD | DIS | M0)) /*DSS_DATA22*/\
++ MUX_VAL(CP(DSS_DATA23), (IDIS | PTD | DIS | M0)) /*DSS_DATA23*/\
++ /*CAMERA*/\
++ MUX_VAL(CP(CAM_HS), (IEN | PTU | EN | M0)) /*CAM_HS */\
++ MUX_VAL(CP(CAM_VS), (IEN | PTU | EN | M0)) /*CAM_VS */\
++ MUX_VAL(CP(CAM_XCLKA), (IDIS | PTD | DIS | M0)) /*CAM_XCLKA*/\
++ MUX_VAL(CP(CAM_PCLK), (IEN | PTU | EN | M0)) /*CAM_PCLK*/\
++ MUX_VAL(CP(CAM_FLD), (IDIS | PTD | DIS | M4)) /*GPIO_98*/\
++ /* - CAM_RESET*/\
++ MUX_VAL(CP(CAM_D0), (IEN | PTD | DIS | M0)) /*CAM_D0*/\
++ MUX_VAL(CP(CAM_D1), (IEN | PTD | DIS | M0)) /*CAM_D1*/\
++ MUX_VAL(CP(CAM_D2), (IEN | PTD | DIS | M0)) /*CAM_D2*/\
++ MUX_VAL(CP(CAM_D3), (IEN | PTD | DIS | M0)) /*CAM_D3*/\
++ MUX_VAL(CP(CAM_D4), (IEN | PTD | DIS | M0)) /*CAM_D4*/\
++ MUX_VAL(CP(CAM_D5), (IEN | PTD | DIS | M0)) /*CAM_D5*/\
++ MUX_VAL(CP(CAM_D6), (IEN | PTD | DIS | M0)) /*CAM_D6*/\
++ MUX_VAL(CP(CAM_D7), (IEN | PTD | DIS | M0)) /*CAM_D7*/\
++ MUX_VAL(CP(CAM_D8), (IEN | PTD | DIS | M0)) /*CAM_D8*/\
++ MUX_VAL(CP(CAM_D9), (IEN | PTD | DIS | M0)) /*CAM_D9*/\
++ MUX_VAL(CP(CAM_D10), (IEN | PTD | DIS | M0)) /*CAM_D10*/\
++ MUX_VAL(CP(CAM_D11), (IEN | PTD | DIS | M0)) /*CAM_D11*/\
++ MUX_VAL(CP(CAM_XCLKB), (IDIS | PTD | DIS | M0)) /*CAM_XCLKB*/\
++ MUX_VAL(CP(CAM_WEN), (IEN | PTD | DIS | M4)) /*GPIO_167*/\
++ MUX_VAL(CP(CAM_STROBE), (IDIS | PTD | DIS | M0)) /*CAM_STROBE*/\
++ MUX_VAL(CP(CSI2_DX0), (IEN | PTD | DIS | M0)) /*CSI2_DX0*/\
++ MUX_VAL(CP(CSI2_DY0), (IEN | PTD | DIS | M0)) /*CSI2_DY0*/\
++ MUX_VAL(CP(CSI2_DX1), (IEN | PTD | DIS | M0)) /*CSI2_DX1*/\
++ MUX_VAL(CP(CSI2_DY1), (IEN | PTD | DIS | M0)) /*CSI2_DY1*/\
++ /*Audio Interface */\
++ MUX_VAL(CP(McBSP2_FSX), (IEN | PTD | DIS | M0)) /*McBSP2_FSX*/\
++ MUX_VAL(CP(McBSP2_CLKX), (IEN | PTD | DIS | M0)) /*McBSP2_CLKX*/\
++ MUX_VAL(CP(McBSP2_DR), (IEN | PTD | DIS | M0)) /*McBSP2_DR*/\
++ MUX_VAL(CP(McBSP2_DX), (IDIS | PTD | DIS | M0)) /*McBSP2_DX*/\
++ /*Expansion card */\
++ MUX_VAL(CP(MMC1_CLK), (IDIS | PTU | EN | M0)) /*MMC1_CLK*/\
++ MUX_VAL(CP(MMC1_CMD), (IEN | PTU | EN | M0)) /*MMC1_CMD*/\
++ MUX_VAL(CP(MMC1_DAT0), (IEN | PTU | EN | M0)) /*MMC1_DAT0*/\
++ MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN | M0)) /*MMC1_DAT1*/\
++ MUX_VAL(CP(MMC1_DAT2), (IEN | PTU | EN | M0)) /*MMC1_DAT2*/\
++ MUX_VAL(CP(MMC1_DAT3), (IEN | PTU | EN | M0)) /*MMC1_DAT3*/\
++ MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M0)) /*MMC1_DAT4*/\
++ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M0)) /*MMC1_DAT5*/\
++ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)) /*MMC1_DAT6*/\
++ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M0)) /*MMC1_DAT7*/\
++ /*Wireless LAN */\
++ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\
++ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M4)) /*GPIO_131*/\
++ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M4)) /*GPIO_132*/\
++ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133*/\
++ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M4)) /*GPIO_134*/\
++ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\
++ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\
++ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\
++ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\
++ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\
++ /*Bluetooth*/\
++ MUX_VAL(CP(McBSP3_DX), (IDIS | PTD | DIS | M4)) /*GPIO_140*/\
++ MUX_VAL(CP(McBSP3_DR), (IDIS | PTD | DIS | M4)) /*GPIO_142*/\
++ MUX_VAL(CP(McBSP3_CLKX), (IDIS | PTD | DIS | M4)) /*GPIO_141*/\
++ MUX_VAL(CP(McBSP3_FSX), (IDIS | PTD | DIS | M4)) /*GPIO_143*/\
++ MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN | M0)) /*UART2_CTS*/\
++ MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\
++ MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/\
++ MUX_VAL(CP(UART2_RX), (IEN | PTD | DIS | M0)) /*UART2_RX*/\
++ /*Modem Interface */\
++ MUX_VAL(CP(UART1_TX), (IDIS | PTD | DIS | M0)) /*UART1_TX*/\
++ MUX_VAL(CP(UART1_RTS), (IDIS | PTD | DIS | M4)) /*GPIO_149*/ \
++ MUX_VAL(CP(UART1_CTS), (IDIS | PTD | DIS | M4)) /*GPIO_150*/ \
++ MUX_VAL(CP(UART1_RX), (IEN | PTD | DIS | M0)) /*UART1_RX*/\
++ MUX_VAL(CP(McBSP4_CLKX), (IEN | PTD | DIS | M1)) /*SSI1_DAT_RX*/\
++ MUX_VAL(CP(McBSP4_DR), (IEN | PTD | DIS | M1)) /*SSI1_FLAG_RX*/\
++ MUX_VAL(CP(McBSP4_DX), (IEN | PTD | DIS | M1)) /*SSI1_RDY_RX*/\
++ MUX_VAL(CP(McBSP4_FSX), (IEN | PTD | DIS | M1)) /*SSI1_WAKE*/\
++ MUX_VAL(CP(McBSP1_CLKR), (IDIS | PTD | DIS | M4)) /*GPIO_156*/\
++ MUX_VAL(CP(McBSP1_FSR), (IDIS | PTU | EN | M4)) /*GPIO_157*/\
++ /* - BT_WAKEUP*/\
++ MUX_VAL(CP(McBSP1_DX), (IDIS | PTD | DIS | M4)) /*GPIO_158*/\
++ MUX_VAL(CP(McBSP1_DR), (IDIS | PTD | DIS | M4)) /*GPIO_159*/\
++ MUX_VAL(CP(McBSP_CLKS), (IEN | PTU | DIS | M0)) /*McBSP_CLKS*/\
++ MUX_VAL(CP(McBSP1_FSX), (IDIS | PTD | DIS | M4)) /*GPIO_161*/\
++ MUX_VAL(CP(McBSP1_CLKX), (IDIS | PTD | DIS | M4)) /*GPIO_162*/\
++ /*Serial Interface*/\
++ MUX_VAL(CP(UART3_CTS_RCTX), (IEN | PTD | EN | M0)) /*UART3_CTS_*/\
++ /* RCTX*/\
++ MUX_VAL(CP(UART3_RTS_SD), (IDIS | PTD | DIS | M0)) /*UART3_RTS_SD */\
++ MUX_VAL(CP(UART3_RX_IRRX), (IEN | PTD | DIS | M0)) /*UART3_RX_IRRX*/\
++ MUX_VAL(CP(UART3_TX_IRTX), (IDIS | PTD | DIS | M0)) /*UART3_TX_IRTX*/\
++ MUX_VAL(CP(HSUSB0_CLK), (IEN | PTD | DIS | M0)) /*HSUSB0_CLK*/\
++ MUX_VAL(CP(HSUSB0_STP), (IDIS | PTU | EN | M0)) /*HSUSB0_STP*/\
++ MUX_VAL(CP(HSUSB0_DIR), (IEN | PTD | DIS | M0)) /*HSUSB0_DIR*/\
++ MUX_VAL(CP(HSUSB0_NXT), (IEN | PTD | DIS | M0)) /*HSUSB0_NXT*/\
++ MUX_VAL(CP(HSUSB0_DATA0), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA0*/\
++ MUX_VAL(CP(HSUSB0_DATA1), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA1*/\
++ MUX_VAL(CP(HSUSB0_DATA2), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA2*/\
++ MUX_VAL(CP(HSUSB0_DATA3), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA3*/\
++ MUX_VAL(CP(HSUSB0_DATA4), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA4*/\
++ MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA5*/\
++ MUX_VAL(CP(HSUSB0_DATA6), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA6*/\
++ MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7*/\
++ MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)) /*I2C1_SCL*/\
++ MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)) /*I2C1_SDA*/\
++ MUX_VAL(CP(I2C2_SCL), (IDIS | PTU | DIS | M4)) /*GPIO_168*/\
++ MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/\
++ MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN | M0)) /*I2C3_SCL*/\
++ MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN | M0)) /*I2C3_SDA*/\
++ MUX_VAL(CP(I2C4_SCL), (IEN | PTU | EN | M0)) /*I2C4_SCL*/\
++ MUX_VAL(CP(I2C4_SDA), (IEN | PTU | EN | M0)) /*I2C4_SDA*/\
++ MUX_VAL(CP(HDQ_SIO), (IDIS | PTU | EN | M4)) /*HDQ_SIO*/\
++ MUX_VAL(CP(McSPI1_CLK), (IEN | PTD | DIS | M0)) /*McSPI1_CLK*/\
++ MUX_VAL(CP(McSPI1_SIMO), (IEN | PTD | DIS | M0)) /*McSPI1_SIMO */\
++ MUX_VAL(CP(McSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI */\
++ MUX_VAL(CP(McSPI1_CS0), (IEN | PTD | EN | M0)) /*McSPI1_CS0*/\
++ MUX_VAL(CP(McSPI1_CS1), (IDIS | PTD | EN | M0)) /*McSPI1_CS1*/\
++ MUX_VAL(CP(McSPI1_CS2), (IDIS | PTD | DIS | M4)) /*GPIO_176*/\
++ /* - NOR_DPD*/\
++ MUX_VAL(CP(McSPI1_CS3), (IEN | PTD | EN | M0)) /*McSPI1_CS3*/\
++ MUX_VAL(CP(McSPI2_CLK), (IEN | PTD | DIS | M0)) /*McSPI2_CLK*/\
++ MUX_VAL(CP(McSPI2_SIMO), (IEN | PTD | DIS | M0)) /*McSPI2_SIMO*/\
++ MUX_VAL(CP(McSPI2_SOMI), (IEN | PTD | DIS | M0)) /*McSPI2_SOMI*/\
++ MUX_VAL(CP(McSPI2_CS0), (IEN | PTD | EN | M0)) /*McSPI2_CS0*/\
++ MUX_VAL(CP(McSPI2_CS1), (IEN | PTD | EN | M0)) /*McSPI2_CS1*/\
++ /*Control and debug */\
++ MUX_VAL(CP(SYS_32K), (IEN | PTD | DIS | M0)) /*SYS_32K*/\
++ MUX_VAL(CP(SYS_CLKREQ), (IEN | PTD | DIS | M0)) /*SYS_CLKREQ*/\
++ MUX_VAL(CP(SYS_nIRQ), (IEN | PTU | EN | M0)) /*SYS_nIRQ*/\
++ MUX_VAL(CP(SYS_BOOT0), (IEN | PTD | DIS | M4)) /*GPIO_2*/\
++ /* - PEN_IRQ */\
++ MUX_VAL(CP(SYS_BOOT1), (IEN | PTD | DIS | M4)) /*GPIO_3 */\
++ MUX_VAL(CP(SYS_BOOT2), (IEN | PTD | DIS | M4)) /*GPIO_4*/\
++ /* - MMC1_WP */\
++ MUX_VAL(CP(SYS_BOOT3), (IEN | PTD | DIS | M4)) /*GPIO_5*/\
++ /* - LCD_ENVDD*/\
++ MUX_VAL(CP(SYS_BOOT4), (IEN | PTD | DIS | M4)) /*GPIO_6*/\
++ /* - LAN_INTR0*/\
++ MUX_VAL(CP(SYS_BOOT5), (IEN | PTD | DIS | M4)) /*GPIO_7*/\
++ /* - MMC2_WP*/\
++ MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS | M4)) /*GPIO_8*/\
++ /* - LCD_ENBKL*/\
++ MUX_VAL(CP(SYS_OFF_MODE), (IEN | PTD | DIS | M0)) /*SYS_OFF_MODE*/\
++ MUX_VAL(CP(SYS_CLKOUT1), (IEN | PTD | DIS | M0)) /*SYS_CLKOUT1*/\
++ MUX_VAL(CP(SYS_CLKOUT2), (IEN | PTU | EN | M4)) /*GPIO_186*/\
++ MUX_VAL(CP(ETK_CLK_ES2), (IDIS | PTU | EN | M3)) /*HSUSB1_STP*/\
++ MUX_VAL(CP(ETK_CTL_ES2), (IDIS | PTD | DIS | M3)) /*HSUSB1_CLK*/\
++ MUX_VAL(CP(ETK_D0_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA0*/\
++ MUX_VAL(CP(ETK_D1_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA1*/\
++ MUX_VAL(CP(ETK_D2_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA2*/\
++ MUX_VAL(CP(ETK_D3_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA7*/\
++ MUX_VAL(CP(ETK_D4_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA4*/\
++ MUX_VAL(CP(ETK_D5_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA5*/\
++ MUX_VAL(CP(ETK_D6_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA6*/\
++ MUX_VAL(CP(ETK_D7_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA3*/\
++ MUX_VAL(CP(ETK_D8_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DIR*/\
++ MUX_VAL(CP(ETK_D9_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_NXT*/\
++ MUX_VAL(CP(ETK_D10_ES2), (IDIS | PTU | EN | M4)) /*GPIO_24*/\
++ MUX_VAL(CP(ETK_D15), (IEN | PTU | EN | M4)) /*GPIO_29*/\
++ MUX_VAL(CP(d2d_mcad1), (IEN | PTD | EN | M0)) /*d2d_mcad1*/\
++ MUX_VAL(CP(d2d_mcad2), (IEN | PTD | EN | M0)) /*d2d_mcad2*/\
++ MUX_VAL(CP(d2d_mcad3), (IEN | PTD | EN | M0)) /*d2d_mcad3*/\
++ MUX_VAL(CP(d2d_mcad4), (IEN | PTD | EN | M0)) /*d2d_mcad4*/\
++ MUX_VAL(CP(d2d_mcad5), (IEN | PTD | EN | M0)) /*d2d_mcad5*/\
++ MUX_VAL(CP(d2d_mcad6), (IEN | PTD | EN | M0)) /*d2d_mcad6*/\
++ MUX_VAL(CP(d2d_mcad7), (IEN | PTD | EN | M0)) /*d2d_mcad7*/\
++ MUX_VAL(CP(d2d_mcad8), (IEN | PTD | EN | M0)) /*d2d_mcad8*/\
++ MUX_VAL(CP(d2d_mcad9), (IEN | PTD | EN | M0)) /*d2d_mcad9*/\
++ MUX_VAL(CP(d2d_mcad10), (IEN | PTD | EN | M0)) /*d2d_mcad10*/\
++ MUX_VAL(CP(d2d_mcad11), (IEN | PTD | EN | M0)) /*d2d_mcad11*/\
++ MUX_VAL(CP(d2d_mcad12), (IEN | PTD | EN | M0)) /*d2d_mcad12*/\
++ MUX_VAL(CP(d2d_mcad13), (IEN | PTD | EN | M0)) /*d2d_mcad13*/\
++ MUX_VAL(CP(d2d_mcad14), (IEN | PTD | EN | M0)) /*d2d_mcad14*/\
++ MUX_VAL(CP(d2d_mcad15), (IEN | PTD | EN | M0)) /*d2d_mcad15*/\
++ MUX_VAL(CP(d2d_mcad16), (IEN | PTD | EN | M0)) /*d2d_mcad16*/\
++ MUX_VAL(CP(d2d_mcad17), (IEN | PTD | EN | M0)) /*d2d_mcad17*/\
++ MUX_VAL(CP(d2d_mcad18), (IEN | PTD | EN | M0)) /*d2d_mcad18*/\
++ MUX_VAL(CP(d2d_mcad19), (IEN | PTD | EN | M0)) /*d2d_mcad19*/\
++ MUX_VAL(CP(d2d_mcad20), (IEN | PTD | EN | M0)) /*d2d_mcad20*/\
++ MUX_VAL(CP(d2d_mcad21), (IEN | PTD | EN | M0)) /*d2d_mcad21*/\
++ MUX_VAL(CP(d2d_mcad22), (IEN | PTD | EN | M0)) /*d2d_mcad22*/\
++ MUX_VAL(CP(d2d_mcad23), (IEN | PTD | EN | M0)) /*d2d_mcad23*/\
++ MUX_VAL(CP(d2d_mcad24), (IEN | PTD | EN | M0)) /*d2d_mcad24*/\
++ MUX_VAL(CP(d2d_mcad25), (IEN | PTD | EN | M0)) /*d2d_mcad25*/\
++ MUX_VAL(CP(d2d_mcad26), (IEN | PTD | EN | M0)) /*d2d_mcad26*/\
++ MUX_VAL(CP(d2d_mcad27), (IEN | PTD | EN | M0)) /*d2d_mcad27*/\
++ MUX_VAL(CP(d2d_mcad28), (IEN | PTD | EN | M0)) /*d2d_mcad28*/\
++ MUX_VAL(CP(d2d_mcad29), (IEN | PTD | EN | M0)) /*d2d_mcad29*/\
++ MUX_VAL(CP(d2d_mcad30), (IEN | PTD | EN | M0)) /*d2d_mcad30*/\
++ MUX_VAL(CP(d2d_mcad31), (IEN | PTD | EN | M0)) /*d2d_mcad31*/\
++ MUX_VAL(CP(d2d_mcad32), (IEN | PTD | EN | M0)) /*d2d_mcad32*/\
++ MUX_VAL(CP(d2d_mcad33), (IEN | PTD | EN | M0)) /*d2d_mcad33*/\
++ MUX_VAL(CP(d2d_mcad34), (IEN | PTD | EN | M0)) /*d2d_mcad34*/\
++ MUX_VAL(CP(d2d_mcad35), (IEN | PTD | EN | M0)) /*d2d_mcad35*/\
++ MUX_VAL(CP(d2d_mcad36), (IEN | PTD | EN | M0)) /*d2d_mcad36*/\
++ MUX_VAL(CP(d2d_clk26mi), (IEN | PTD | DIS | M0)) /*d2d_clk26mi*/\
++ MUX_VAL(CP(d2d_nrespwron), (IEN | PTD | EN | M0)) /*d2d_nrespwron*/\
++ MUX_VAL(CP(d2d_nreswarm), (IEN | PTU | EN | M0)) /*d2d_nreswarm */\
++ MUX_VAL(CP(d2d_arm9nirq), (IEN | PTD | DIS | M0)) /*d2d_arm9nirq */\
++ MUX_VAL(CP(d2d_uma2p6fiq), (IEN | PTD | DIS | M0)) /*d2d_uma2p6fiq*/\
++ MUX_VAL(CP(d2d_spint), (IEN | PTD | EN | M0)) /*d2d_spint*/\
++ MUX_VAL(CP(d2d_frint), (IEN | PTD | EN | M0)) /*d2d_frint*/\
++ MUX_VAL(CP(d2d_dmareq0), (IEN | PTD | DIS | M0)) /*d2d_dmareq0*/\
++ MUX_VAL(CP(d2d_dmareq1), (IEN | PTD | DIS | M0)) /*d2d_dmareq1*/\
++ MUX_VAL(CP(d2d_dmareq2), (IEN | PTD | DIS | M0)) /*d2d_dmareq2*/\
++ MUX_VAL(CP(d2d_dmareq3), (IEN | PTD | DIS | M0)) /*d2d_dmareq3*/\
++ MUX_VAL(CP(d2d_n3gtrst), (IEN | PTD | DIS | M0)) /*d2d_n3gtrst*/\
++ MUX_VAL(CP(d2d_n3gtdi), (IEN | PTD | DIS | M0)) /*d2d_n3gtdi*/\
++ MUX_VAL(CP(d2d_n3gtdo), (IEN | PTD | DIS | M0)) /*d2d_n3gtdo*/\
++ MUX_VAL(CP(d2d_n3gtms), (IEN | PTD | DIS | M0)) /*d2d_n3gtms*/\
++ MUX_VAL(CP(d2d_n3gtck), (IEN | PTD | DIS | M0)) /*d2d_n3gtck*/\
++ MUX_VAL(CP(d2d_n3grtck), (IEN | PTD | DIS | M0)) /*d2d_n3grtck*/\
++ MUX_VAL(CP(d2d_mstdby), (IEN | PTU | EN | M0)) /*d2d_mstdby*/\
++ MUX_VAL(CP(d2d_swakeup), (IEN | PTD | EN | M0)) /*d2d_swakeup*/\
++ MUX_VAL(CP(d2d_idlereq), (IEN | PTD | DIS | M0)) /*d2d_idlereq*/\
++ MUX_VAL(CP(d2d_idleack), (IEN | PTU | EN | M0)) /*d2d_idleack*/\
++ MUX_VAL(CP(d2d_mwrite), (IEN | PTD | DIS | M0)) /*d2d_mwrite*/\
++ MUX_VAL(CP(d2d_swrite), (IEN | PTD | DIS | M0)) /*d2d_swrite*/\
++ MUX_VAL(CP(d2d_mread), (IEN | PTD | DIS | M0)) /*d2d_mread*/\
++ MUX_VAL(CP(d2d_sread), (IEN | PTD | DIS | M0)) /*d2d_sread*/\
++ MUX_VAL(CP(d2d_mbusflag), (IEN | PTD | DIS | M0)) /*d2d_mbusflag*/\
++ MUX_VAL(CP(d2d_sbusflag), (IEN | PTD | DIS | M0)) /*d2d_sbusflag*/\
++ MUX_VAL(CP(sdrc_cke0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
++ MUX_VAL(CP(sdrc_cke1), (IDIS | PTD | DIS | M7)) /*sdrc_cke1*/\
++ /* - not used */
++#endif
+diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h
+new file mode 100644
+index 0000000..095bb29
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/omap3.h
+@@ -0,0 +1,131 @@
++/*
++ * (C) Copyright 2006-2008
++ * Texas Instruments, <www.ti.com>
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Mohammed Khasim <x0khasim@ti.com>
++ *
++ * 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
++ */
++
++#ifndef _OMAP3_H_
++#define _OMAP3_H_
++
++/* Stuff on L3 Interconnect */
++#define SMX_APE_BASE 0x68000000
++
++/* GPMC */
++#define OMAP34XX_GPMC_BASE (0x6E000000)
++
++/* SMS */
++#define OMAP34XX_SMS_BASE 0x6C000000
++
++/* SDRC */
++#define OMAP34XX_SDRC_BASE 0x6D000000
++
++/*
++ * L4 Peripherals - L4 Wakeup and L4 Core now
++ */
++#define OMAP34XX_CORE_L4_IO_BASE 0x48000000
++#define OMAP34XX_WAKEUP_L4_IO_BASE 0x48300000
++#define OMAP34XX_L4_PER 0x49000000
++#define OMAP34XX_L4_IO_BASE OMAP34XX_CORE_L4_IO_BASE
++
++/* CONTROL */
++#define OMAP34XX_CTRL_BASE (OMAP34XX_L4_IO_BASE+0x2000)
++
++/* UART */
++#define OMAP34XX_UART1 (OMAP34XX_L4_IO_BASE+0x6a000)
++#define OMAP34XX_UART2 (OMAP34XX_L4_IO_BASE+0x6c000)
++#define OMAP34XX_UART3 (OMAP34XX_L4_PER+0x20000)
++
++/* General Purpose Timers */
++#define OMAP34XX_GPT1 0x48318000
++#define OMAP34XX_GPT2 0x49032000
++#define OMAP34XX_GPT3 0x49034000
++#define OMAP34XX_GPT4 0x49036000
++#define OMAP34XX_GPT5 0x49038000
++#define OMAP34XX_GPT6 0x4903A000
++#define OMAP34XX_GPT7 0x4903C000
++#define OMAP34XX_GPT8 0x4903E000
++#define OMAP34XX_GPT9 0x49040000
++#define OMAP34XX_GPT10 0x48086000
++#define OMAP34XX_GPT11 0x48088000
++#define OMAP34XX_GPT12 0x48304000
++
++/* WatchDog Timers (1 secure, 3 GP) */
++#define WD1_BASE (0x4830C000)
++#define WD2_BASE (0x48314000)
++#define WD3_BASE (0x49030000)
++
++/* 32KTIMER */
++#define SYNC_32KTIMER_BASE (0x48320000)
++#define S32K_CR (SYNC_32KTIMER_BASE+0x10)
++
++/* omap3 GPIO registers */
++#define OMAP34XX_GPIO1_BASE 0x48310000
++#define OMAP34XX_GPIO2_BASE 0x49050000
++#define OMAP34XX_GPIO3_BASE 0x49052000
++#define OMAP34XX_GPIO4_BASE 0x49054000
++#define OMAP34XX_GPIO5_BASE 0x49056000
++#define OMAP34XX_GPIO6_BASE 0x49058000
++
++/* base address for indirect vectors (internal boot mode) */
++#define SRAM_OFFSET0 0x40000000
++#define SRAM_OFFSET1 0x00200000
++#define SRAM_OFFSET2 0x0000F800
++#define SRAM_VECT_CODE (SRAM_OFFSET0|SRAM_OFFSET1|\
++ SRAM_OFFSET2)
++
++#define LOW_LEVEL_SRAM_STACK 0x4020FFFC
++
++#define DEBUG_LED1 149 /* gpio */
++#define DEBUG_LED2 150 /* gpio */
++
++#define XDR_POP 5 /* package on package part */
++#define SDR_DISCRETE 4 /* 128M memory SDR module */
++#define DDR_STACKED 3 /* stacked part on 2422 */
++#define DDR_COMBO 2 /* combo part on cpu daughter card */
++#define DDR_DISCRETE 1 /* 2x16 parts on daughter card */
++
++#define DDR_100 100 /* type found on most mem d-boards */
++#define DDR_111 111 /* some combo parts */
++#define DDR_133 133 /* most combo, some mem d-boards */
++#define DDR_165 165 /* future parts */
++
++#define CPU_3430 0x3430
++
++/* 343x real hardware:
++ * ES1 = rev 0
++ */
++
++/* 343x code defines:
++ * ES1 = 0+1 = 1
++ * ES1 = 1+1 = 1
++ */
++#define CPU_3430_ES1 1
++#define CPU_3430_ES2 2
++
++#define WIDTH_8BIT 0x0000
++#define WIDTH_16BIT 0x1000 /* bit pos for 16 bit in gpmc */
++
++/* SDP definitions according to FPGA Rev. Is this OK?? */
++#define SDP_3430_V1 0x1
++#define SDP_3430_V2 0x2
++
++#endif
+diff --git a/include/asm-arm/arch-omap3/sys_proto.h b/include/asm-arm/arch-omap3/sys_proto.h
+new file mode 100644
+index 0000000..271b554
+--- /dev/null
++++ b/include/asm-arm/arch-omap3/sys_proto.h
+@@ -0,0 +1,64 @@
++/*
++ * (C) Copyright 2004-2008
++ * Texas Instruments, <www.ti.com>
++ * Richard Woodruff <r-woodruff2@ti.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.
++ *
++ * 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 _SYS_PROTO_H_
++#define _SYS_PROTO_H_
++
++void prcm_init(void);
++void per_clocks_enable(void);
++
++void memif_init(void);
++void sdrc_init(void);
++void do_sdrc_init(u32, u32);
++void gpmc_init(void);
++
++void watchdog_init(void);
++void set_muxconf_regs(void);
++
++u32 get_cpu_type(void);
++u32 get_cpu_rev(void);
++u32 get_mem_type(void);
++u32 get_sysboot_value(void);
++u32 get_gpmc0_base(void);
++u32 is_gpmc_muxed(void);
++u32 get_gpmc0_type(void);
++u32 get_gpmc0_width(void);
++u32 get_board_type(void);
++void display_board_info(u32);
++u32 get_sdr_cs_size(u32 offset);
++u32 running_in_sdram(void);
++u32 running_in_sram(void);
++u32 running_in_flash(void);
++u32 running_from_internal_boot(void);
++u32 get_device_type(void);
++void l2cache_enable(void);
++void secureworld_exit(void);
++void setup_auxcr(void);
++void try_unlock_memory(void);
++u32 get_boot_type(void);
++void audio_init(void);
++void dss_init(void);
++void arm_cache_flush(void);
++void v7_flush_dcache_all(u32);
++void sr32(u32 addr, u32 start_bit, u32 num_bits, u32 value);
++u32 wait_on_value(u32 read_bit_mask, u32 match_value, u32 read_addr, u32 bound);
++void sdelay(unsigned long loops);
++
++#endif
+diff --git a/include/configs/omap3530beagle.h b/include/configs/omap3530beagle.h
+new file mode 100644
+index 0000000..fd21ab3
+--- /dev/null
++++ b/include/configs/omap3530beagle.h
+@@ -0,0 +1,292 @@
++/*
++ * (C) Copyright 2006-2008
++ * Texas Instruments.
++ * Richard Woodruff <r-woodruff2@ti.com>
++ * Syed Mohammed Khasim <x0khasim@ti.com>
++ *
++ * Configuration settings for the TI OMAP3530 Beagle board.
++ *
++ * 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
++ */
++
++#ifndef __CONFIG_H
++#define __CONFIG_H
++#include <asm/sizes.h>
++
++/*
++ * High Level Configuration Options
++ */
++#define CONFIG_ARMCORTEXA8 1 /* This is an ARM V7 CPU core */
++#define CONFIG_OMAP 1 /* in a TI OMAP core */
++#define CONFIG_OMAP34XX 1 /* which is a 34XX */
++#define CONFIG_OMAP3430 1 /* which is in a 3430 */
++#define CONFIG_OMAP3_BEAGLE 1 /* working with BEAGLE */
++#define CONFIG_DOS_PARTITION 1
++
++#include <asm/arch/cpu.h> /* get chip and board defs */
++#include <asm/arch/omap3.h>
++
++/* Clock Defines */
++#define V_OSCK 26000000 /* Clock output from T2 */
++#define V_SCLK (V_OSCK >> 1)
++
++#undef CONFIG_USE_IRQ /* no support for IRQs */
++#define CONFIG_MISC_INIT_R
++
++#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
++#define CONFIG_SETUP_MEMORY_TAGS 1
++#define CONFIG_INITRD_TAG 1
++#define CONFIG_REVISION_TAG 1
++
++/*
++ * Size of malloc() pool
++ */
++#define CFG_ENV_SIZE SZ_128K /* Total Size Environment Sector */
++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + SZ_128K)
++#define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */
++
++/*
++ * Hardware drivers
++ */
++
++/*
++ * NS16550 Configuration
++ */
++#define V_NS16550_CLK (48000000) /* 48MHz (APLL96/2) */
++
++#define CFG_NS16550
++#define CFG_NS16550_SERIAL
++#define CFG_NS16550_REG_SIZE (-4)
++#define CFG_NS16550_CLK V_NS16550_CLK
++
++/*
++ * select serial console configuration
++ */
++#define CONFIG_CONS_INDEX 3
++#define CFG_NS16550_COM3 OMAP34XX_UART3
++#define CONFIG_SERIAL3 3 /* UART3 on Beagle Rev 2 */
++
++/* allow to overwrite serial and ethaddr */
++#define CONFIG_ENV_OVERWRITE
++#define CONFIG_BAUDRATE 115200
++#define CFG_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600, 115200}
++#define CONFIG_MMC 1
++#define CFG_MMC_BASE 0xF0000000
++#define CONFIG_DOS_PARTITION 1
++
++/* commands to include */
++
++#define CONFIG_CMD_EXT2 /* EXT2 Support */
++#define CONFIG_CMD_FAT /* FAT support */
++#define CONFIG_CMD_JFFS2 /* JFFS2 Support */
++
++#define CONFIG_CMD_I2C /* I2C serial bus support */
++#define CONFIG_CMD_MMC /* MMC support */
++#define CONFIG_CMD_NAND /* NAND support */
++
++#define CONFIG_CMD_AUTOSCRIPT /* autoscript support */
++#define CONFIG_CMD_BDI /* bdinfo */
++#define CONFIG_CMD_BOOTD /* bootd */
++#define CONFIG_CMD_CONSOLE /* coninfo */
++#define CONFIG_CMD_ECHO /* echo arguments */
++#define CONFIG_CMD_ENV /* saveenv */
++#define CONFIG_CMD_ITEST /* Integer (and string) test */
++#define CONFIG_CMD_LOADB /* loadb */
++#define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop mtest */
++#define CONFIG_CMD_MISC /* misc functions like sleep etc*/
++#define CONFIG_CMD_RUN /* run command in env variable */
++
++#define CFG_NO_FLASH
++#define CFG_I2C_SPEED 100
++#define CFG_I2C_SLAVE 1
++#define CFG_I2C_BUS 0
++#define CFG_I2C_BUS_SELECT 1
++#define CONFIG_DRIVER_OMAP34XX_I2C 1
++
++/*
++ * Board NAND Info.
++ */
++#define CFG_NAND_ADDR NAND_BASE /* physical address to access nand */
++#define CFG_NAND_BASE NAND_BASE /* physical address to access nand at CS0 */
++#define CFG_NAND_WIDTH_16
++
++#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
++#define SECTORSIZE 512
++
++#define NAND_ALLOW_ERASE_ALL
++#define ADDR_COLUMN 1
++#define ADDR_PAGE 2
++#define ADDR_COLUMN_PAGE 3
++
++#define NAND_ChipID_UNKNOWN 0x00
++#define NAND_MAX_FLOORS 1
++#define NAND_MAX_CHIPS 1
++#define NAND_NO_RB 1
++#define CFG_NAND_WP
++
++#define CONFIG_JFFS2_NAND
++/* nand device jffs2 lives on */
++#define CONFIG_JFFS2_DEV "nand0"
++/* start of jffs2 partition */
++#define CONFIG_JFFS2_PART_OFFSET 0x680000
++#define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 partition */
++
++/* Environment information */
++#define CONFIG_BOOTDELAY 10
++
++#define CONFIG_BOOTCOMMAND "mmcinit;fatload mmc 0 0x80300000 uImage; fatload mmc 0 0x81600000 rd-ext2.bin; bootm 0x80300000\0"
++
++#define CONFIG_BOOTARGS "setenv bootargs console=ttyS2,115200n8 ramdisk_size=3072 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,3M "
++
++#define CONFIG_NETMASK 255.255.254.0
++#define CONFIG_IPADDR 128.247.77.90
++#define CONFIG_SERVERIP 128.247.77.158
++#define CONFIG_BOOTFILE "uImage"
++#define CONFIG_AUTO_COMPLETE 1
++/*
++ * Miscellaneous configurable options
++ */
++#define V_PROMPT "OMAP3 beagleboard.org # "
++
++#define CFG_LONGHELP /* undef to save memory */
++#define CFG_PROMPT V_PROMPT
++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
++/* Print Buffer Size */
++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)
++#define CFG_MAXARGS 16 /* max number of command args */
++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
++
++#define CFG_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest works on */
++#define CFG_MEMTEST_END (OMAP34XX_SDRC_CS0+0x01F00000) /* 31MB */
++
++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
++
++#define CFG_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load address */
++
++/* 2430 has 12 GP timers, they can be driven by the SysClk (12/13/19.2) or by
++ * 32KHz clk, or from external sig. This rate is divided by a local divisor.
++ */
++#define V_PVT 7
++
++#define CFG_TIMERBASE OMAP34XX_GPT2
++#define CFG_PVT V_PVT /* 2^(pvt+1) */
++#define CFG_HZ ((V_SCLK)/(2 << CFG_PVT))
++
++/*-----------------------------------------------------------------------
++ * Stack sizes
++ *
++ * The stack sizes are set up in start.S using the settings below
++ */
++#define CONFIG_STACKSIZE SZ_128K /* regular stack */
++#ifdef CONFIG_USE_IRQ
++#define CONFIG_STACKSIZE_IRQ SZ_4K /* IRQ stack */
++#define CONFIG_STACKSIZE_FIQ SZ_4K /* FIQ stack */
++#endif
++
++/*-----------------------------------------------------------------------
++ * Physical Memory Map
++ */
++#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
++#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
++#define PHYS_SDRAM_1_SIZE SZ_32M /* at least 32 meg */
++#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
++
++/* SDRAM Bank Allocation method */
++#define SDRC_R_B_C 1
++
++/*-----------------------------------------------------------------------
++ * FLASH and environment organization
++ */
++
++/* **** PISMO SUPPORT *** */
++
++/* Configure the PISMO */
++#define PISMO1_NOR_SIZE_SDPV2 GPMC_SIZE_128M
++#define PISMO1_NOR_SIZE GPMC_SIZE_64M
++
++#define PISMO1_NAND_SIZE GPMC_SIZE_128M
++#define PISMO1_ONEN_SIZE GPMC_SIZE_128M
++#define DBG_MPDB_SIZE GPMC_SIZE_16M
++#define PISMO2_SIZE 0
++
++#define CFG_MAX_FLASH_SECT (520) /* max number of sectors on one chip */
++#define CFG_MAX_FLASH_BANKS 2 /* max number of flash banks */
++#define CFG_MONITOR_LEN SZ_256K /* Reserve 2 sectors */
++
++#define PHYS_FLASH_SIZE_SDPV2 SZ_128M
++#define PHYS_FLASH_SIZE SZ_32M
++
++#define CFG_FLASH_BASE boot_flash_base
++#define PHYS_FLASH_SECT_SIZE boot_flash_sec
++/* Dummy declaration of flash banks to get compilation right */
++#define CFG_FLASH_BANKS_LIST {0, 0}
++
++#define CFG_MONITOR_BASE CFG_FLASH_BASE /* Monitor at start of flash */
++#define CFG_ONENAND_BASE ONENAND_MAP
++
++#define CFG_ENV_IS_IN_NAND 1
++#define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */
++#define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
++
++#define CFG_ENV_SECT_SIZE boot_flash_sec
++#define CFG_ENV_OFFSET boot_flash_off
++#define CFG_ENV_ADDR SMNAND_ENV_OFFSET
++
++/*-----------------------------------------------------------------------
++ * CFI FLASH driver setup
++ */
++/* timeout values are in ticks */
++#define CFG_FLASH_ERASE_TOUT (100*CFG_HZ) /* Timeout for Flash Erase */
++#define CFG_FLASH_WRITE_TOUT (100*CFG_HZ) /* Timeout for Flash Write */
++
++/* Flash banks JFFS2 should use */
++#define CFG_MAX_MTD_BANKS (CFG_MAX_FLASH_BANKS+CFG_MAX_NAND_DEVICE)
++#define CFG_JFFS2_MEM_NAND
++#define CFG_JFFS2_FIRST_BANK CFG_MAX_FLASH_BANKS /* use flash_info[2] */
++#define CFG_JFFS2_NUM_BANKS 1
++
++#define ENV_IS_VARIABLE 1
++
++#ifndef __ASSEMBLY__
++extern unsigned int nand_cs_base;
++extern unsigned int boot_flash_base;
++extern volatile unsigned int boot_flash_env_addr;
++extern unsigned int boot_flash_off;
++extern unsigned int boot_flash_sec;
++extern unsigned int boot_flash_type;
++#endif
++
++
++#define WRITE_NAND_COMMAND(d, adr)\
++ __raw_writew(d, (nand_cs_base + GPMC_NAND_CMD))
++#define WRITE_NAND_ADDRESS(d, adr)\
++ __raw_writew(d, (nand_cs_base + GPMC_NAND_ADR))
++#define WRITE_NAND(d, adr) __raw_writew(d, (nand_cs_base + GPMC_NAND_DAT))
++#define READ_NAND(adr) __raw_readw((nand_cs_base + GPMC_NAND_DAT))
++
++/* Other NAND Access APIs */
++#define NAND_WP_OFF()\
++ do {*(volatile u32 *)(GPMC_CONFIG) |= 0x00000010; } while (0)
++#define NAND_WP_ON()\
++ do {*(volatile u32 *)(GPMC_CONFIG) &= ~0x00000010; } while (0)
++#define NAND_DISABLE_CE(nand)
++#define NAND_ENABLE_CE(nand)
++#define NAND_WAIT_READY(nand) udelay(10)
++
++#endif /* __CONFIG_H */
diff --git a/packages/u-boot/u-boot-git/beagleboard/name.patch b/packages/u-boot/u-boot-git/beagleboard/name.patch
new file mode 100644
index 0000000000..1729662234
--- /dev/null
+++ b/packages/u-boot/u-boot-git/beagleboard/name.patch
@@ -0,0 +1,14 @@
+--- u-boot/Makefile-orig 2008-05-29 14:00:30.000000000 -0700
++++ u-boot/Makefile 2008-05-29 13:59:13.000000000 -0700
+@@ -2550,8 +2550,8 @@ omap2430sdp_config : unconfig
+ #########################################################################
+ ## ARM CORTEX Systems
+ #########################################################################
+-omap3530beagle_config : unconfig
+- @./mkconfig $(@:_config=) arm omap3 omap3530beagle
++beagleboard_config : unconfig
++ @./mkconfig omap3530beagle arm omap3 omap3530beagle
+
+ #########################################################################
+ ## XScale Systems
+
diff --git a/packages/u-boot/u-boot-omap3beagleboard-1.1.4/.mtn2git_empty b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/.mtn2git_empty
diff --git a/packages/u-boot/u-boot-omap3beagleboard-1.1.4/500mhz-l2enable.patch b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/500mhz-l2enable.patch
new file mode 100644
index 0000000000..0dce8f7904
--- /dev/null
+++ b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/500mhz-l2enable.patch
@@ -0,0 +1,42 @@
+--- u-boot.orig/board/omap3530beagle/clock.c
++++ u-boot/board/omap3530beagle/clock.c
+@@ -167,7 +167,7 @@ void prcm_init(void)
+ /* Getting the base address of Core DPLL param table*/
+ dpll_param_p = (dpll_param *)get_core_dpll_param();
+ /* Moving it to the right sysclk and ES rev base */
+- dpll_param_p = dpll_param_p + 2*clk_index + sil_index;
++ dpll_param_p = dpll_param_p + 3*clk_index + sil_index;
+ if(xip_safe){
+ /* CORE DPLL */
+ /* sr32(CM_CLKSEL2_EMU) set override to work when asleep */
+@@ -254,7 +254,7 @@ void prcm_init(void)
+ /* Getting the base address to MPU DPLL param table*/
+ dpll_param_p = (dpll_param *)get_mpu_dpll_param();
+ /* Moving it to the right sysclk and ES rev base */
+- dpll_param_p = dpll_param_p + 2*clk_index + sil_index;
++ dpll_param_p = dpll_param_p + 3*clk_index + sil_index;
+ /* MPU DPLL (unlocked already) */
+ sr32(CM_CLKSEL2_PLL_MPU, 0, 5, dpll_param_p->m2); /* Set M2 */
+ sr32(CM_CLKSEL1_PLL_MPU, 8, 11, dpll_param_p->m); /* Set M */
+@@ -266,7 +266,7 @@ void prcm_init(void)
+ /* Getting the base address to IVA DPLL param table*/
+ dpll_param_p = (dpll_param *)get_iva_dpll_param();
+ /* Moving it to the right sysclk and ES rev base */
+- dpll_param_p = dpll_param_p + 2*clk_index + sil_index;
++ dpll_param_p = dpll_param_p + 3*clk_index + sil_index;
+ /* IVA DPLL (set to 12*20=240MHz) */
+ sr32(CM_CLKEN_PLL_IVA2, 0, 3, PLL_STOP);
+ wait_on_value(BIT0, 0, CM_IDLEST_PLL_IVA2, LDELAY);
+--- u-boot_1_1_4_beagle.orig/cpu/omap3/cpu.c
++++ u-boot_1_1_4_beagle/cpu/omap3/cpu.c
+@@ -129,9 +129,7 @@ int cleanup_before_linux (void)
+
+ /* invalidate I-cache */
+ arm_cache_flush();
+-#ifndef CONFIG_L2_OFF
+- /* turn off L2 cache */
+- l2cache_disable();
++#ifndef CONFIG_L2_OFF
+ /* invalidate L2 cache also */
+ v7_flush_dcache_all(get_device_type());
+ #endif
diff --git a/packages/u-boot/u-boot-omap3beagleboard-1.1.4/armv7-a.patch b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/armv7-a.patch
new file mode 100644
index 0000000000..49f8de0879
--- /dev/null
+++ b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/armv7-a.patch
@@ -0,0 +1,11 @@
+--- u-boot/cpu/omap3/config.mk-orig 2008-05-27 16:46:45.000000000 -0700
++++ u-boot/cpu/omap3/config.mk 2008-05-29 12:50:49.000000000 -0700
+@@ -23,7 +23,7 @@
+ PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
+ -msoft-float
+
+-PLATFORM_CPPFLAGS += -march=armv7a
++PLATFORM_CPPFLAGS += -march=armv7-a
+ # =========================================================================
+ #
+ # Supply options according to compiler version
diff --git a/packages/u-boot/u-boot-omap3beagleboard-1.1.4/disable-tone-logo.patch b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/disable-tone-logo.patch
new file mode 100644
index 0000000000..829a72e2d5
--- /dev/null
+++ b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/disable-tone-logo.patch
@@ -0,0 +1,46 @@
+--- u-boot.orig/board/omap3530beagle/omap3530beagle.c
++++ u-boot/board/omap3530beagle/omap3530beagle.c
+@@ -33,7 +33,7 @@
+ #include <i2c.h>
+ #include <asm/mach-types.h>
+
+-#include "beagle_logo_FNL_2.h"
++//#include "beagle_logo_FNL_2.h"
+
+ #if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+ #include <linux/mtd/nand_legacy.h>
+@@ -230,6 +230,7 @@ void s_init(void)
+ sdrc_init();
+ }
+
++#if 0
+ ushort tone[] = {
+ 0x0ce4, 0x0ce4, 0x1985, 0x1985, 0x25A1, 0x25A1, 0x30FD, 0x30FE,
+ 0x3B56, 0x3B55, 0x447A, 0x447A, 0x4C3B, 0x4C3C, 0x526D, 0x526C,
+@@ -457,6 +458,7 @@ int audio_init()
+ }
+ }
+
++
+ dss_init()
+ {
+ unsigned int i;
+@@ -586,6 +588,7 @@ dss_init()
+ udelay(1000);
+
+ }
++#endif
+
+ /*******************************************************
+ * Routine: misc_init_r
+@@ -618,8 +621,10 @@ int misc_init_r(void)
+ *((uint *) 0x49058094) = 0x00000506;
+ *((uint *) 0x49056094) = 0xF060F000;
+
++#if 0
+ dss_init();
+ audio_init();
++#endif
+
+ return (0);
+ }
diff --git a/packages/u-boot/u-boot-omap3beagleboard-1.1.4/env.patch b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/env.patch
new file mode 100644
index 0000000000..582a6d6376
--- /dev/null
+++ b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/env.patch
@@ -0,0 +1,13 @@
+--- u-boot.orig/include/configs/omap3530beagle.h
++++ u-boot/include/configs/omap3530beagle.h
+@@ -261,8 +261,8 @@
+ #define CFG_ENV_IS_IN_NAND 1
+ #define CFG_ENV_IS_IN_ONENAND 1
+ #define CFG_ENV_IS_IN_FLASH 1
+-#define ONENAND_ENV_OFFSET 0xc0000 /* environment starts here */
+-#define SMNAND_ENV_OFFSET 0xc0000 /* environment starts here */
++#define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */
++#define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
+
+ #define CFG_ENV_SECT_SIZE boot_flash_sec
+ #define CFG_ENV_OFFSET boot_flash_off
diff --git a/packages/u-boot/u-boot-omap3beagleboard-1.1.4/name.patch b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/name.patch
new file mode 100644
index 0000000000..b854e3d146
--- /dev/null
+++ b/packages/u-boot/u-boot-omap3beagleboard-1.1.4/name.patch
@@ -0,0 +1,13 @@
+--- u-boot/Makefile-orig 2008-05-29 14:00:30.000000000 -0700
++++ u-boot/Makefile 2008-05-29 13:59:13.000000000 -0700
+@@ -1823,8 +1823,8 @@ omap2430sdp_config : unconfig
+ omap3430sdp_config : unconfig
+ @./mkconfig $(@:_config=) arm omap3 omap3430sdp
+
+-omap3530beagle_config : unconfig
+- @./mkconfig $(@:_config=) arm omap3 omap3530beagle
++beagleboard_config : unconfig
++ @./mkconfig omap3530beagle arm omap3 omap3530beagle
+
+ #========================================================================
+ # i386
diff --git a/packages/u-boot/u-boot-omap3beagleboard_1.1.4.bb b/packages/u-boot/u-boot-omap3beagleboard_1.1.4.bb
new file mode 100644
index 0000000000..e915e1e8f8
--- /dev/null
+++ b/packages/u-boot/u-boot-omap3beagleboard_1.1.4.bb
@@ -0,0 +1,16 @@
+require u-boot.inc
+PR="r1"
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://www.sakoman.net/omap3/u-boot.tar.gz \
+ file://name.patch;patch=1 \
+ file://armv7-a.patch;patch=1 \
+ file://500mhz-l2enable.patch;patch=1 \
+ file://disable-tone-logo.patch;patch=1 \
+ file://env.patch;patch=1 \
+ "
+
+S = "${WORKDIR}/u-boot"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
diff --git a/packages/u-boot/u-boot_git.bb b/packages/u-boot/u-boot_git.bb
index a05422ef50..68d5167b8b 100644
--- a/packages/u-boot/u-boot_git.bb
+++ b/packages/u-boot/u-boot_git.bb
@@ -1,14 +1,19 @@
require u-boot.inc
-PR="r1"
-DEFAULT_PREFERENCE = "-1"
+PR="r4"
SRCREV_davinci-sffsdr = "4ce1e23b5e12283579828b3d23e8fd6e1328a7aa"
+SRCREV_beagleboard = "a94f22f08f280905926219e568568964cb9eeb9d"
SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git "
SRC_URI_sequoia = "git://www.denx.de/git/u-boot.git;protocol=git;tag=cf3b41e0c1111dbb865b6e34e9f3c3d3145a6093 "
SRC_URI_append_davinci-sffsdr = " file://sffsdr-u-boot.patch;patch=1 "
+SRC_URI_append_beagleboard = "file://base.patch;patch=1 \
+ file://name.patch;patch=1 \
+ file://armv7-a.patch;patch=1 \
+ "
+
S = "${WORKDIR}/git"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/packages/uclibc/uclibc_0.9.29.bb b/packages/uclibc/uclibc_0.9.29.bb
index c62b984c18..4565f7dbb4 100644
--- a/packages/uclibc/uclibc_0.9.29.bb
+++ b/packages/uclibc/uclibc_0.9.29.bb
@@ -8,6 +8,7 @@
#
UCLIBC_BASE ?= "0.9.29"
PR = "r19"
+DEFAULT_PREFERENCE = "3"
require uclibc.inc
diff --git a/packages/update-modules/update-modules_1.0.bb b/packages/update-modules/update-modules_1.0.bb
index cc7a585207..17f9bb4f45 100644
--- a/packages/update-modules/update-modules_1.0.bb
+++ b/packages/update-modules/update-modules_1.0.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Script to manage module configuration files"
LICENSE = "GPLv2"
PACKAGE_ARCH = "all"
RDEPENDS = "${@base_contains("MACHINE_FEATURES", "kernel26", "module-init-tools-depmod","modutils-depmod",d)} "
-PR = "r6"
+PR = "r7"
SRC_URI = "file://update-modules"
diff --git a/packages/usbutils/usbutils_0.70.bb b/packages/usbutils/usbutils_0.70.bb
index 0dbd799993..891d66f381 100644
--- a/packages/usbutils/usbutils_0.70.bb
+++ b/packages/usbutils/usbutils_0.70.bb
@@ -1,10 +1,12 @@
DESCRIPTION = "Host side USB console utilities."
SECTION = "base"
-DEPENDS += "libusb"
+DEPENDS += "libusb-compat"
LICENSE = "GPL"
PRIORITY = "optional"
DEFAULT_PREFERENCE = "1"
+PR = "r1"
+
SRC_URI = "${SOURCEFORGE_MIRROR}/linux-usb/usbutils-${PV}.tar.gz"
S = "${WORKDIR}/usbutils-${PV}"
diff --git a/packages/usbutils/usbutils_cvs.bb b/packages/usbutils/usbutils_cvs.bb
index 4b084eb58c..5de33bbca3 100644
--- a/packages/usbutils/usbutils_cvs.bb
+++ b/packages/usbutils/usbutils_cvs.bb
@@ -1,10 +1,10 @@
DESCRIPTION = "Host side USB console utilities."
SECTION = "base"
-DEPENDS += "libusb"
+DEPENDS += "libusb-compat"
LICENSE = "GPL"
PRIORITY = "optional"
PV = "0.71+cvs${SRCDATE}"
-PR = "r3"
+PR = "r4"
SRC_URI = "cvs://anonymous@linux-usb.cvs.sourceforge.net/cvsroot/linux-usb;module=usbutils"
S = "${WORKDIR}/usbutils"
diff --git a/packages/usrp/usrp_0.12.bb b/packages/usrp/usrp_0.12.bb
index 7112fc621a..55ca84857a 100644
--- a/packages/usrp/usrp_0.12.bb
+++ b/packages/usrp/usrp_0.12.bb
@@ -2,9 +2,9 @@ DESCRIPTION = "Support software for the Universal Software Radio Peripheral (USR
LICENSE = "GPL"
HOMEPAGE = "http://comsec.com/wiki?UniversalSoftwareRadioPeripheral"
SECTION = "devel"
-DEPENDS = "swig-native sdcc-native libusb python boost"
+DEPENDS = "swig-native sdcc-native libusb-compat python boost"
RDEPENDS = "python-core"
-PR = "r0"
+PR = "r1"
SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/usrp-${PV}.tar.gz \
file://fix_compile_h.patch;patch=1;pnum=3 \
diff --git a/packages/util-linux/util-linux_2.12.bb b/packages/util-linux/util-linux_2.12.bb
index 368e127d28..5787e655ba 100644
--- a/packages/util-linux/util-linux_2.12.bb
+++ b/packages/util-linux/util-linux_2.12.bb
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
require util-linux.inc
diff --git a/packages/util-linux/util-linux_2.12o.bb b/packages/util-linux/util-linux_2.12o.bb
index 14e50d13ac..bb874d9573 100644
--- a/packages/util-linux/util-linux_2.12o.bb
+++ b/packages/util-linux/util-linux_2.12o.bb
@@ -1,3 +1,3 @@
require util-linux.inc
-PR = "r7"
+PR = "r8"
diff --git a/packages/util-linux/util-linux_2.12q.bb b/packages/util-linux/util-linux_2.12q.bb
index 92df2df532..5313ee838f 100644
--- a/packages/util-linux/util-linux_2.12q.bb
+++ b/packages/util-linux/util-linux_2.12q.bb
@@ -4,4 +4,4 @@ ARM_INSTRUCTION_SET = "arm"
require util-linux.inc
-PR = "r6"
+PR = "r7"
diff --git a/packages/util-linux/util-linux_2.12r.bb b/packages/util-linux/util-linux_2.12r.bb
index ece7b8b729..0498253a8d 100644
--- a/packages/util-linux/util-linux_2.12r.bb
+++ b/packages/util-linux/util-linux_2.12r.bb
@@ -6,4 +6,4 @@ SRC_URI += "file://glibc-umount2.patch;patch=1"
SRC_URI += "file://fdiskbsdlabel-avr32.patch;patch=1"
SRC_URI += "file://util-linux-2.12r-cramfs-1.patch;patch=1"
-PR = "r14"
+PR = "r15"
diff --git a/packages/v86d/v86d_0.1.3.bb b/packages/v86d/v86d_0.1.5.bb
index f870376029..12b7718279 100644
--- a/packages/v86d/v86d_0.1.3.bb
+++ b/packages/v86d/v86d_0.1.5.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "User support binary for the uvesafb kernel module"
-SRC_URI = "http://dev.gentoo.org/~spock/projects/uvesafb/archive/v86d-0.1.3.tar.bz2 \
+SRC_URI = "http://dev.gentoo.org/~spock/projects/uvesafb/archive/v86d-${PV}.tar.bz2 \
file://fbsetup"
DEPENDS = "virtual/kernel"
LICENSE = "GPLv2"
diff --git a/packages/vlc/vlc-davinci_0.8.6h.bb b/packages/vlc/vlc-davinci_0.8.6h.bb
new file mode 100644
index 0000000000..9ed6d46fd2
--- /dev/null
+++ b/packages/vlc/vlc-davinci_0.8.6h.bb
@@ -0,0 +1,59 @@
+DESCRIPTION = "Video player and streamer - GPE edition"
+HOMEPAGE = "http://www.videolan.org"
+LICENSE = "GPL"
+PRIORITY = "optional"
+SECTION = "multimedia"
+
+SRCREV = "116b6dff4996f494b54fc0f05695ba792086ea9e"
+
+PR = "r1"
+
+PV = "0.8.6h+${PR}+gitr${SRCREV}"
+
+DEPENDS = "dbus libxml2 gnutls tremor faad2 ffmpeg flac liba52 libid3tag libmad mpeg2dec"
+
+SRC_URI = "git://git.videolan.org/vlc.git;protocol=git;branch=0.8.6-neuros"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OECONF = "\
+ --with-contrib \
+ --disable-dvdread \
+ --disable-wxwidgets \
+ --disable-skins2 \
+ --disable-libmpeg2 \
+ --disable-dvdnav \
+ --disable-x11 --disable-xvideo --disable-opengl --disable-glx \
+ --disable-screen --disable-caca \
+ --disable-httpd --disable-vlm \
+ --disable-freetype \
+ --disable-sdl \
+ --enable-png \
+ --enable-live555 --enable-tremor \
+ --disable-mod \
+ --enable-davinci --enable-davincifb --enable-davinciresizer \
+ --enable-v4l2 --enable-aa --enable-wma --enable-faad \
+ --enable-dbus \
+"
+
+
+do_configure() {
+ ./bootstrap
+ gnu-configize
+ libtoolize --force
+ autoreconf --force -i
+ oe_runconf
+}
+
+do_stage() {
+ autotools_stage_all
+}
+
+RCONFLICTS_${PN} = "vlc"
+
+FILES_${PN} += "${bindir}/vlc \
+ ${datadir}/applications \
+ ${datadir}/vlc/ \
+ "
diff --git a/packages/vnc/libvncserver/clientlogger.patch b/packages/vnc/libvncserver/clientlogger.patch
new file mode 100644
index 0000000000..a3ce38ed7a
--- /dev/null
+++ b/packages/vnc/libvncserver/clientlogger.patch
@@ -0,0 +1,398 @@
+diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c
+index 6e87f69..35aab36 100644
+--- a/libvncclient/rfbproto.c
++++ b/libvncclient/rfbproto.c
+@@ -136,6 +136,7 @@ static void FillRectangle(rfbClient* client, int x, int y, int w, int h, uint32_
+ case 32: FILL_RECT(32); break;
+ default:
+ rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel);
++ client->ClientLogger(client, "Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel);
+ }
+ }
+
+@@ -157,6 +158,7 @@ static void CopyRectangle(rfbClient* client, uint8_t* buffer, int x, int y, int
+ case 32: COPY_RECT(32); break;
+ default:
+ rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel);
++ client->ClientLogger(client, "Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel);
+ }
+ }
+
+@@ -200,6 +202,7 @@ static void CopyRectangleFromRectangle(rfbClient* client, int src_x, int src_y,
+ case 32: COPY_RECT_FROM_RECT(32); break;
+ default:
+ rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel);
++ client->ClientLogger(client, "Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel);
+ }
+ }
+
+@@ -360,12 +363,14 @@ ConnectToRFBServer(rfbClient* client,const char *hostname, int port)
+
+ if (!rec->file) {
+ rfbClientLog("Could not open %s.\n",client->serverHost);
++ client->ClientLogger(client, "Could not open %s.\n",client->serverHost);
+ return FALSE;
+ }
+ setbuf(rec->file,NULL);
+ fread(buffer,1,strlen(magic),rec->file);
+ if (strncmp(buffer,magic,strlen(magic))) {
+- rfbClientLog("File %s was not recorded by vncrec.\n",client->serverHost);
++ rfbClientLog(client, "File %s was not recorded by vncrec.\n",client->serverHost);
++ client->ClientLogger(client, "File %s was not recorded by vncrec.\n",client->serverHost);
+ fclose(rec->file);
+ return FALSE;
+ }
+@@ -375,6 +380,7 @@ ConnectToRFBServer(rfbClient* client,const char *hostname, int port)
+
+ if (!StringToIPAddr(hostname, &host)) {
+ rfbClientLog("Couldn't convert '%s' to host address\n", hostname);
++ client->ClientLogger(client, "Couldn't convert '%s' to host address\n", hostname);
+ return FALSE;
+ }
+
+@@ -382,6 +388,7 @@ ConnectToRFBServer(rfbClient* client,const char *hostname, int port)
+
+ if (client->sock < 0) {
+ rfbClientLog("Unable to connect to VNC server\n");
++ client->ClientLogger(client, "Unable to connect to VNC server\n");
+ return FALSE;
+ }
+
+@@ -403,6 +410,7 @@ rfbHandleAuthResult(rfbClient* client)
+ switch (authResult) {
+ case rfbVncAuthOK:
+ rfbClientLog("VNC authentication succeeded\n");
++ client->ClientLogger(client, "VNC authentication succeeded\n");
+ return TRUE;
+ break;
+ case rfbVncAuthFailed:
+@@ -415,18 +423,23 @@ rfbHandleAuthResult(rfbClient* client)
+ if (!ReadFromRFBServer(client, reason, reasonLen)) { free(reason); return FALSE; }
+ reason[reasonLen]=0;
+ rfbClientLog("VNC connection failed: %s\n",reason);
++ client->ClientLogger(client, "VNC connection failed: %s\n",reason);
+ free(reason);
+ return FALSE;
+ }
+ rfbClientLog("VNC authentication failed\n");
++ client->ClientLogger(client, "VNC authentication failed\n");
+ return FALSE;
+ case rfbVncAuthTooMany:
+ rfbClientLog("VNC authentication failed - too many tries\n");
++ client->ClientLogger(client, "VNC authentication failed - too many tries\n");
+ return FALSE;
+ }
+
+ rfbClientLog("Unknown VNC authentication result: %d\n",
+ (int)authResult);
++ client->ClientLogger(client, "Unknown VNC authentication result: %d\n",
++ (int)authResult);
+ return FALSE;
+ }
+
+@@ -462,6 +475,7 @@ InitialiseRFBConnection(rfbClient* client)
+
+ if (sscanf(pv,rfbProtocolVersionFormat,&major,&minor) != 2) {
+ rfbClientLog("Not a valid VNC server (%s)\n",pv);
++ client->ClientLogger(client, "Not a valid VNC server (%s)\n",pv);
+ return FALSE;
+ }
+
+@@ -477,12 +491,14 @@ InitialiseRFBConnection(rfbClient* client)
+ /* UltraVNC uses minor codes 4 and 6 for the server */
+ if (major==3 && (minor==4 || minor==6)) {
+ rfbClientLog("UltraVNC server detected, enabling UltraVNC specific messages\n",pv);
++ client->ClientLogger(client, "UltraVNC server detected, enabling UltraVNC specific messages\n",pv);
+ DefaultSupportedMessagesUltraVNC(client);
+ }
+
+ /* TightVNC uses minor codes 5 for the server */
+ if (major==3 && minor==5) {
+ rfbClientLog("TightVNC server detected, enabling TightVNC specific messages\n",pv);
++ client->ClientLogger(client, "TightVNC server detected, enabling TightVNC specific messages\n",pv);
+ DefaultSupportedMessagesTightVNC(client);
+ }
+
+@@ -492,6 +508,8 @@ InitialiseRFBConnection(rfbClient* client)
+
+ rfbClientLog("VNC server supports protocol version %d.%d (viewer %d.%d)\n",
+ major, minor, rfbProtocolMajorVersion, rfbProtocolMinorVersion);
++ client->ClientLogger(client, "VNC server supports protocol version %d.%d (viewer %d.%d)\n",
++ major, minor, rfbProtocolMajorVersion, rfbProtocolMinorVersion);
+
+ sprintf(pv,rfbProtocolVersionFormat,client->major,client->minor);
+
+@@ -511,6 +529,7 @@ InitialiseRFBConnection(rfbClient* client)
+ if (count==0)
+ {
+ rfbClientLog("List of security types is ZERO, expecting an error to follow\n");
++ client->ClientLogger(client, "List of security types is ZERO, expecting an error to follow\n");
+
+ /* we have an error following */
+ if (!ReadFromRFBServer(client, (char *)&reasonLen, 4)) return FALSE;
+@@ -519,21 +538,25 @@ InitialiseRFBConnection(rfbClient* client)
+ if (!ReadFromRFBServer(client, reason, reasonLen)) { free(reason); return FALSE; }
+ reason[reasonLen]=0;
+ rfbClientLog("VNC connection failed: %s\n",reason);
++ client->ClientLogger(client, "VNC connection failed: %s\n",reason);
+ free(reason);
+ return FALSE;
+ }
+
+ rfbClientLog("We have %d security types to read\n", count);
++ client->ClientLogger(client, "We have %d security types to read\n", count);
+ /* now, we have a list of available security types to read ( uint8_t[] ) */
+ for (loop=0;loop<count;loop++)
+ {
+ if (!ReadFromRFBServer(client, (char *)&tAuth, 1)) return FALSE;
+ rfbClientLog("%d) Received security type %d\n", loop, tAuth);
++ client->ClientLogger(client, "%d) Received security type %d\n", loop, tAuth);
+ if ((flag==0) && ((tAuth==rfbVncAuth) || (tAuth==rfbNoAuth)))
+ {
+ flag++;
+ authScheme=tAuth;
+ rfbClientLog("Selecting security type %d (%d/%d in the list)\n", authScheme, loop, count);
++ client->ClientLogger(client, "Selecting security type %d (%d/%d in the list)\n", authScheme, loop, count);
+ /* send back a single byte indicating which security type to use */
+ if (!WriteToRFBServer(client, (char *)&tAuth, 1)) return FALSE;
+
+@@ -547,6 +570,7 @@ InitialiseRFBConnection(rfbClient* client)
+ }
+
+ rfbClientLog("Selected Security Scheme %d\n", authScheme);
++ client->ClientLogger(client, "Selected Security Scheme %d\n", authScheme);
+
+ switch (authScheme) {
+
+@@ -559,11 +583,13 @@ InitialiseRFBConnection(rfbClient* client)
+ if (!ReadFromRFBServer(client, reason, reasonLen)) { free(reason); return FALSE; }
+ reason[reasonLen]=0;
+ rfbClientLog("VNC connection failed: %s\n", reason);
++ client->ClientLogger(client, "VNC connection failed: %s\n", reason);
+ free(reason);
+ return FALSE;
+
+ case rfbNoAuth:
+ rfbClientLog("No authentication needed\n");
++ client->ClientLogger(client, "No authentication needed\n");
+
+ /* 3.8 and upwards sends a Security Result for rfbNoAuth */
+ if (client->major==3 && client->minor > 7)
+@@ -580,6 +606,7 @@ InitialiseRFBConnection(rfbClient* client)
+
+ if ((!passwd) || (strlen(passwd) == 0)) {
+ rfbClientLog("Reading password failed\n");
++ client->ClientLogger(client, "Reading password failed\n");
+ return FALSE;
+ }
+ if (strlen(passwd) > 8) {
+@@ -604,6 +631,8 @@ InitialiseRFBConnection(rfbClient* client)
+ default:
+ rfbClientLog("Unknown authentication scheme from VNC server: %d\n",
+ (int)authScheme);
++ client->ClientLogger(client, "Unknown authentication scheme from VNC server: %d\n",
++ (int)authScheme);
+ return FALSE;
+ }
+
+@@ -624,6 +653,8 @@ InitialiseRFBConnection(rfbClient* client)
+ if (!client->desktopName) {
+ rfbClientLog("Error allocating memory for desktop name, %lu bytes\n",
+ (unsigned long)client->si.nameLength);
++ client->ClientLogger(client, "Error allocating memory for desktop name, %lu bytes\n",
++ (unsigned long)client->si.nameLength);
+ return FALSE;
+ }
+
+@@ -632,11 +663,15 @@ InitialiseRFBConnection(rfbClient* client)
+ client->desktopName[client->si.nameLength] = 0;
+
+ rfbClientLog("Desktop name \"%s\"\n",client->desktopName);
++ client->ClientLogger(client, "Desktop name \"%s\"\n",client->desktopName);
+
+ rfbClientLog("Connected to VNC server, using protocol version %d.%d\n",
+ client->major, client->minor);
++ client->ClientLogger(client, "Connected to VNC server, using protocol version %d.%d\n",
++ client->major, client->minor);
+
+ rfbClientLog("VNC server default format:\n");
++ client->ClientLogger(client, "VNC server default format:\n");
+ PrintPixelFormat(&client->si.format);
+
+ return TRUE;
+@@ -729,6 +764,7 @@ SetFormatAndEncodings(rfbClient* client)
+ encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRRE);
+ } else {
+ rfbClientLog("Unknown encoding '%.*s'\n",encStrLen,encStr);
++ client->ClientLogger(client, "Unknown encoding '%.*s'\n",encStrLen,encStr);
+ }
+
+ encStr = nextEncStr;
+@@ -752,6 +788,7 @@ SetFormatAndEncodings(rfbClient* client)
+ if (!tunnelSpecified) {
+ */
+ rfbClientLog("Same machine: preferring raw encoding\n");
++ client->ClientLogger(client, "Same machine: preferring raw encoding\n");
+ encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRaw);
+ /*
+ } else {
+@@ -1157,6 +1194,7 @@ HandleRFBServerMessage(rfbClient* client)
+ client->MallocFrameBuffer(client);
+ SendFramebufferUpdateRequest(client, 0, 0, rect.r.w, rect.r.h, FALSE);
+ rfbClientLog("Got new framebuffer size: %dx%d\n", rect.r.w, rect.r.h);
++ client->ClientLogger(client, "Got new framebuffer size: %dx%d\n", rect.r.w, rect.r.h);
+ continue;
+ }
+
+@@ -1170,12 +1208,18 @@ HandleRFBServerMessage(rfbClient* client)
+ /* currently ignored by this library */
+
+ rfbClientLog("client2server supported messages (bit flags)\n");
++ client->ClientLogger(client, "client2server supported messages (bit flags)\n");
+ for (loop=0;loop<32;loop+=8)
+ rfbClientLog("%02X: %04x %04x %04x %04x - %04x %04x %04x %04x\n", loop,
+ client->supportedMessages.client2server[loop], client->supportedMessages.client2server[loop+1],
+ client->supportedMessages.client2server[loop+2], client->supportedMessages.client2server[loop+3],
+ client->supportedMessages.client2server[loop+4], client->supportedMessages.client2server[loop+5],
+ client->supportedMessages.client2server[loop+6], client->supportedMessages.client2server[loop+7]);
++ client->ClientLogger(client, "%02X: %04x %04x %04x %04x - %04x %04x %04x %04x\n", loop,
++ client->supportedMessages.client2server[loop], client->supportedMessages.client2server[loop+1],
++ client->supportedMessages.client2server[loop+2], client->supportedMessages.client2server[loop+3],
++ client->supportedMessages.client2server[loop+4], client->supportedMessages.client2server[loop+5],
++ client->supportedMessages.client2server[loop+6], client->supportedMessages.client2server[loop+7]);
+
+ rfbClientLog("server2client supported messages (bit flags)\n");
+ for (loop=0;loop<32;loop+=8)
+@@ -1184,6 +1228,11 @@ HandleRFBServerMessage(rfbClient* client)
+ client->supportedMessages.server2client[loop+2], client->supportedMessages.server2client[loop+3],
+ client->supportedMessages.server2client[loop+4], client->supportedMessages.server2client[loop+5],
+ client->supportedMessages.server2client[loop+6], client->supportedMessages.server2client[loop+7]);
++ client->ClientLogger(client, "%02X: %04x %04x %04x %04x - %04x %04x %04x %04x\n", loop,
++ client->supportedMessages.server2client[loop], client->supportedMessages.server2client[loop+1],
++ client->supportedMessages.server2client[loop+2], client->supportedMessages.server2client[loop+3],
++ client->supportedMessages.server2client[loop+4], client->supportedMessages.server2client[loop+5],
++ client->supportedMessages.server2client[loop+6], client->supportedMessages.server2client[loop+7]);
+ continue;
+ }
+
+@@ -1214,6 +1263,7 @@ HandleRFBServerMessage(rfbClient* client)
+ }
+ buffer[rect.r.w]=0; /* null terminate, just in case */
+ rfbClientLog("Connected to Server \"%s\"\n", buffer);
++ client->ClientLogger(client, "Connected to Server \"%s\"\n", buffer);
+ free(buffer);
+ continue;
+ }
+@@ -1226,6 +1276,8 @@ HandleRFBServerMessage(rfbClient* client)
+ {
+ rfbClientLog("Rect too large: %dx%d at (%d, %d)\n",
+ rect.r.w, rect.r.h, rect.r.x, rect.r.y);
++ client->ClientLogger(client, "Rect too large: %dx%d at (%d, %d)\n",
++ rect.r.w, rect.r.h, rect.r.x, rect.r.y);
+ return FALSE;
+ }
+
+@@ -1477,6 +1529,8 @@ HandleRFBServerMessage(rfbClient* client)
+ if(!handled) {
+ rfbClientLog("Unknown rect encoding %d\n",
+ (int)rect.encoding);
++ client->ClientLogger(client, "Unknown rect encoding %d\n",
++ (int)rect.encoding);
+ return FALSE;
+ }
+ }
+@@ -1536,16 +1590,19 @@ HandleRFBServerMessage(rfbClient* client)
+ switch(msg.tc.length) {
+ case rfbTextChatOpen:
+ rfbClientLog("Received TextChat Open\n");
++ client->ClientLogger(client, "Received TextChat Open\n");
+ if (client->HandleTextChat!=NULL)
+ client->HandleTextChat(client, (int)rfbTextChatOpen, NULL);
+ break;
+ case rfbTextChatClose:
+ rfbClientLog("Received TextChat Close\n");
++ client->ClientLogger(client, "Received TextChat Close\n");
+ if (client->HandleTextChat!=NULL)
+ client->HandleTextChat(client, (int)rfbTextChatClose, NULL);
+ break;
+ case rfbTextChatFinished:
+ rfbClientLog("Received TextChat Finished\n");
++ client->ClientLogger(client, "Received TextChat Finished\n");
+ if (client->HandleTextChat!=NULL)
+ client->HandleTextChat(client, (int)rfbTextChatFinished, NULL);
+ break;
+@@ -1559,6 +1616,7 @@ HandleRFBServerMessage(rfbClient* client)
+ /* Null Terminate <just in case> */
+ buffer[msg.tc.length]=0;
+ rfbClientLog("Received TextChat \"%s\"\n", buffer);
++ client->ClientLogger(client, "Received TextChat \"%s\"\n", buffer);
+ if (client->HandleTextChat!=NULL)
+ client->HandleTextChat(client, (int)msg.tc.length, buffer);
+ free(buffer);
+@@ -1577,6 +1635,7 @@ HandleRFBServerMessage(rfbClient* client)
+ client->MallocFrameBuffer(client);
+ SendFramebufferUpdateRequest(client, 0, 0, client->width, client->height, FALSE);
+ rfbClientLog("Got new framebuffer size: %dx%d\n", client->width, client->height);
++ client->ClientLogger(client, "Got new framebuffer size: %dx%d\n", client->width, client->height);
+ break;
+ }
+
+@@ -1590,6 +1649,7 @@ HandleRFBServerMessage(rfbClient* client)
+ client->MallocFrameBuffer(client);
+ SendFramebufferUpdateRequest(client, 0, 0, client->width, client->height, FALSE);
+ rfbClientLog("Got new framebuffer size: %dx%d\n", client->width, client->height);
++ client->ClientLogger(client, "Got new framebuffer size: %dx%d\n", client->width, client->height);
+ break;
+ }
+
+@@ -1606,6 +1666,8 @@ HandleRFBServerMessage(rfbClient* client)
+ char buffer[256];
+ rfbClientLog("Unknown message type %d from VNC server\n",msg.type);
+ ReadFromRFBServer(client, buffer, 256);
++ client->ClientLogger(client, "Unknown message type %d from VNC server\n",msg.type);
++ ReadFromRFBServer(client, buffer, 256);
+ return FALSE;
+ }
+ }
+diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c
+index 7f350e2..43823ce 100644
+--- a/libvncclient/sockets.c
++++ b/libvncclient/sockets.c
+@@ -144,6 +144,7 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n)
+ } else {
+ if (errorMessageOnReadFailure) {
+ rfbClientLog("VNC server closed connection\n");
++ client->ClientLogger(client, "VNC server closed connection\n");
+ }
+ return FALSE;
+ }
+@@ -176,6 +177,7 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n)
+ } else {
+ if (errorMessageOnReadFailure) {
+ rfbClientLog("VNC server closed connection\n");
++ client->ClientLogger(client, "VNC server closed connection\n");
+ }
+ return FALSE;
+ }
+diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
+index 975a66a..ee3bdc8 100644
+--- a/rfb/rfbclient.h
++++ b/rfb/rfbclient.h
+@@ -115,6 +115,8 @@ typedef void (*BellProc)(struct _rfbClient* client);
+ typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel);
+ typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y);
+
++typedef void (*ClientLoggerProc)(struct _rfbClient* client, const char *format, ...);
++
+ typedef struct _rfbClient {
+ uint8_t* frameBuffer;
+ int width, height;
+@@ -237,6 +239,8 @@ typedef struct _rfbClient {
+ GotCursorShapeProc GotCursorShape;
+ GotCopyRectProc GotCopyRect;
+
++ ClientLoggerProc ClientLogger;
++
+ /* Which messages are supported by the server
+ * This is a *guess* for most servers.
+ * (If we can even detect the type of server)
diff --git a/packages/vnc/libvncserver_0.9.1.bb b/packages/vnc/libvncserver_0.9.1.bb
index c079fdeb15..a6027e7918 100644
--- a/packages/vnc/libvncserver_0.9.1.bb
+++ b/packages/vnc/libvncserver_0.9.1.bb
@@ -5,12 +5,13 @@ SECTION = "libs"
PRIORITY = "optional"
LICENSE = "GPLv2"
DEPENDS = "zlib jpeg"
-PR = "r0"
+PR = "r1"
DEFAULT_PREFERENCE = "-1"
SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/LibVNCServer-${PV}.tar.gz \
- file://configure_ac.patch"
+ file://configure_ac.patch \
+ file://clientlogger.patch;patch=1"
S = "${WORKDIR}/LibVNCServer-${PV}"
# => create libvncserver only
@@ -20,6 +21,3 @@ inherit autotools
do_stage() {
autotools_stage_all
}
-
-
-
diff --git a/packages/webkit/files/Makefile b/packages/webkit/files/Makefile
index fa7ea02426..217a035483 100644
--- a/packages/webkit/files/Makefile
+++ b/packages/webkit/files/Makefile
@@ -16,6 +16,10 @@ universal u:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
+x86_64:
+ @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
+ if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
+
64:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
diff --git a/packages/webkit/files/Makefile.shared b/packages/webkit/files/Makefile.shared
index 096d32e948..dfad6fb54c 100644
--- a/packages/webkit/files/Makefile.shared
+++ b/packages/webkit/files/Makefile.shared
@@ -15,6 +15,9 @@ release r deployment dep deploy: force
universal u: force
( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) 'ARCHS=ppc i386' | grep -v setenv && exit $${PIPESTATUS[0]} )
+x86_64: force
+ ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) 'ARCHS=x86_64' | grep -v setenv && exit $${PIPESTATUS[0]} )
+
64: force
( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) 'ARCHS=i386 x86_64' | grep -v setenv && exit $${PIPESTATUS[0]} )
diff --git a/packages/webkit/files/acinclude.m4 b/packages/webkit/files/acinclude.m4
new file mode 100644
index 0000000000..8c75480ae0
--- /dev/null
+++ b/packages/webkit/files/acinclude.m4
@@ -0,0 +1,177 @@
+dnl dolt, a replacement for libtool
+dnl Copyright © 2007-2008 Josh Triplett <josh@freedesktop.org>
+dnl Copying and distribution of this file, with or without modification,
+dnl are permitted in any medium without royalty provided the copyright
+dnl notice and this notice are preserved.
+dnl
+dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
+dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
+dnl installed when running autoconf on your project.
+
+AC_DEFUN([DOLT], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+# dolt, a replacement for libtool
+# Josh Triplett <josh@freedesktop.org>
+AC_PATH_PROG(DOLT_BASH, bash)
+AC_MSG_CHECKING([if dolt supports this host])
+dolt_supported=yes
+if test x$DOLT_BASH = x; then
+ dolt_supported=no
+fi
+if test x$GCC != xyes; then
+ dolt_supported=no
+fi
+case $host in
+i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*)
+ pic_options='-fPIC'
+ ;;
+i?86-apple-darwin*)
+ pic_options='-fno-common'
+ ;;
+*)
+ dolt_supported=no
+ ;;
+esac
+if test x$dolt_supported = xno ; then
+ AC_MSG_RESULT([no, falling back to libtool])
+ LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
+ LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
+else
+ AC_MSG_RESULT([yes, replacing libtool])
+
+dnl Start writing out doltcompile.
+ cat <<__DOLTCOMPILE__EOF__ >doltcompile
+#!$DOLT_BASH
+__DOLTCOMPILE__EOF__
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+args=("$[]@")
+for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
+ if test x"${args@<:@$arg@:>@}" = x-o ; then
+ objarg=$((arg+1))
+ break
+ fi
+done
+if test x$objarg = x ; then
+ echo 'Error: no -o on compiler command line' 1>&2
+ exit 1
+fi
+lo="${args@<:@$objarg@:>@}"
+obj="${lo%.lo}"
+if test x"$lo" = x"$obj" ; then
+ echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
+ exit 1
+fi
+objbase="${obj##*/}"
+__DOLTCOMPILE__EOF__
+
+dnl Write out shared compilation code.
+ if test x$enable_shared = xyes; then
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+libobjdir="${obj%$objbase}.libs"
+if test ! -d "$libobjdir" ; then
+ mkdir_out="$(mkdir "$libobjdir" 2>&1)"
+ mkdir_ret=$?
+ if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
+ echo "$mkdir_out" 1>&2
+ exit $mkdir_ret
+ fi
+fi
+pic_object="$libobjdir/$objbase.o"
+args@<:@$objarg@:>@="$pic_object"
+__DOLTCOMPILE__EOF__
+ cat <<__DOLTCOMPILE__EOF__ >>doltcompile
+"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
+__DOLTCOMPILE__EOF__
+ fi
+
+dnl Write out static compilation code.
+dnl Avoid duplicate compiler output if also building shared objects.
+ if test x$enable_static = xyes; then
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+non_pic_object="$obj.o"
+args@<:@$objarg@:>@="$non_pic_object"
+__DOLTCOMPILE__EOF__
+ if test x$enable_shared = xyes; then
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
+__DOLTCOMPILE__EOF__
+ else
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+"${args@<:@@@:>@}" || exit $?
+__DOLTCOMPILE__EOF__
+ fi
+ fi
+
+dnl Write out the code to write the .lo file.
+dnl The second line of the .lo file must match "^# Generated by .*libtool"
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+{
+echo "# $lo - a libtool object file"
+echo "# Generated by doltcompile, not libtool"
+__DOLTCOMPILE__EOF__
+
+ if test x$enable_shared = xyes; then
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+echo "pic_object='.libs/${objbase}.o'"
+__DOLTCOMPILE__EOF__
+ else
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+echo pic_object=none
+__DOLTCOMPILE__EOF__
+ fi
+
+ if test x$enable_static = xyes; then
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+echo "non_pic_object='${objbase}.o'"
+__DOLTCOMPILE__EOF__
+ else
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+echo non_pic_object=none
+__DOLTCOMPILE__EOF__
+ fi
+
+ cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+} > "$lo"
+__DOLTCOMPILE__EOF__
+
+dnl Done writing out doltcompile; substitute it for libtool compilation.
+ chmod +x doltcompile
+ LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
+ LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
+
+dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
+dnl a target, so write out a libtool wrapper to handle that case.
+dnl Note that doltlibtool does not handle inferred tags or option arguments
+dnl without '=', because automake does not use them.
+ cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
+#!$DOLT_BASH
+__DOLTLIBTOOL__EOF__
+ cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
+top_builddir_slash="${0%%doltlibtool}"
+: ${top_builddir_slash:=./}
+args=()
+modeok=false
+tagok=false
+for arg in "$[]@"; do
+ case "$arg" in
+ --mode=compile) modeok=true ;;
+ --tag=CC|--tag=CXX) tagok=true ;;
+ *) args+=("$arg")
+ esac
+done
+if $modeok && $tagok ; then
+ . ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
+else
+ exec ${top_builddir_slash}libtool "$[]@"
+fi
+__DOLTLIBTOOL__EOF__
+
+dnl Done writing out doltlibtool; substitute it for libtool.
+ chmod +x doltlibtool
+ LIBTOOL='$(top_builddir)/doltlibtool'
+fi
+AC_SUBST(LTCOMPILE)
+AC_SUBST(LTCXXCOMPILE)
+# end dolt
+])
diff --git a/packages/webkit/files/update-webkit.sh b/packages/webkit/files/update-webkit.sh
new file mode 100644
index 0000000000..e4cc3ebefa
--- /dev/null
+++ b/packages/webkit/files/update-webkit.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+# usage: sh update-webkit.sh <revision>
+
+export rev=$1
+
+for i in acinclude.m4 autogen.sh configure.ac GNUmakefile.am Makefile Makefile.shared ; do
+ wget "http://trac.webkit.org/browser/trunk/$i?rev=$rev&format=raw" -O $i
+done
diff --git a/packages/webkit/webkit-gtk_svn.bb b/packages/webkit/webkit-gtk_svn.bb
index 3260bec414..11e08ac6ac 100644
--- a/packages/webkit/webkit-gtk_svn.bb
+++ b/packages/webkit/webkit-gtk_svn.bb
@@ -1,3 +1,4 @@
+DESCRIPTION = "WebKit browser engine, GTK+ edition"
DEPENDS = "curl icu libxml2 cairo libxslt libxt libidn gnutls gtk+ gstreamer gst-plugins-base gnome-vfs flex-native gperf-native perl-native sqlite3"
SRCREV_FORMAT = "webcore-rwebkit"
@@ -13,6 +14,7 @@ SRC_URI = "\
svn://svn.webkit.org/repository/webkit/trunk/;module=WebKit;proto=http;name=webkit \
svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitLibraries;proto=http \
svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitTools;proto=http \
+ file://acinclude.m4 \
file://Makefile \
file://Makefile.shared \
file://autogen.sh \
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/.mtn2git_empty b/packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/.mtn2git_empty
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/config.in b/packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/config.in
index a2bc086629..a2bc086629 100644
--- a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/config.in
+++ b/packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/config.in
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/only-the-modules.patch b/packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/only-the-modules.patch
index abb3b137da..abb3b137da 100644
--- a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/only-the-modules.patch
+++ b/packages/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/only-the-modules.patch
diff --git a/packages/wlan-ng/wlan-ng-modules_0.2.8+svn20080315.bb b/packages/wlan-ng/wlan-ng-modules_svn.bb
index 4a5df48ba9..c455181c6b 100644
--- a/packages/wlan-ng/wlan-ng-modules_0.2.8+svn20080315.bb
+++ b/packages/wlan-ng/wlan-ng-modules_svn.bb
@@ -1,9 +1,8 @@
require wlan-ng-modules.inc
-PR = "r1"
+PR = "r0"
-SRCDATE = "20080315"
-PV = "0.2.8+svn${SRCDATE}"
+PV = "0.2.8+svnr${SRCREV}"
SRC_URI += "svn://svn.shaftnet.org/linux-wlan-ng;module=trunk "
diff --git a/packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/.mtn2git_empty b/packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/.mtn2git_empty
diff --git a/packages/wlan-ng/wlan-ng-utils-0.2.8/config.in b/packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/config.in
index 298935770d..298935770d 100644
--- a/packages/wlan-ng/wlan-ng-utils-0.2.8/config.in
+++ b/packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/config.in
diff --git a/packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/only-the-utils.patch b/packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/only-the-utils.patch
new file mode 100644
index 0000000000..b6156da921
--- /dev/null
+++ b/packages/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/only-the-utils.patch
@@ -0,0 +1,22 @@
+--- trunk/src/Makefile.old 2008-06-05 14:52:31.000000000 -0500
++++ trunk/src/Makefile 2008-06-05 14:53:02.000000000 -0500
+@@ -44,7 +44,7 @@
+
+ -include ../config.mk
+
+-DIRS=mkmeta shared wlanctl nwepgen wlancfg p80211 prism2
++DIRS=mkmeta shared wlanctl nwepgen wlancfg prism2
+
+ ifneq ($(wildcard *.addon),)
+ DIRS+=`cat *.addon`
+--- trunk/src/prism2/Makefile.old 2008-06-05 14:52:47.000000000 -0500
++++ trunk/src/prism2/Makefile 2008-06-05 14:53:10.000000000 -0500
+@@ -44,7 +44,7 @@
+
+ -include ../../config.mk
+
+-DIRS=driver ridlist download
++DIRS=ridlist download
+
+ ifneq ($(wildcard *.addon),)
+ DIRS+=`cat *.addon`
diff --git a/packages/wlan-ng/wlan-ng-utils.inc b/packages/wlan-ng/wlan-ng-utils.inc
index bade47ce30..72976ce292 100644
--- a/packages/wlan-ng/wlan-ng-utils.inc
+++ b/packages/wlan-ng/wlan-ng-utils.inc
@@ -3,10 +3,8 @@ HOMEPAGE = "http://www.linux-wlan.org"
SECTION = "kernel/userland"
LICENSE = "GPL"
DEPENDS = "virtual/kernel"
-S = "${WORKDIR}/linux-wlan-ng-${PV}"
-SRC_URI = "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-${PV}.tar.bz2 \
- file://only-the-utils.patch;patch=1 \
+SRC_URI = "file://only-the-utils.patch;patch=1 \
file://wlan-ng.modutils \
file://wlan.agent \
file://usbctl \
diff --git a/packages/wlan-ng/wlan-ng-utils_0.2.7.bb b/packages/wlan-ng/wlan-ng-utils_0.2.7.bb
index 141ae42957..9946a4b670 100644
--- a/packages/wlan-ng/wlan-ng-utils_0.2.7.bb
+++ b/packages/wlan-ng/wlan-ng-utils_0.2.7.bb
@@ -1,7 +1,10 @@
require wlan-ng-utils.inc
-SRC_URI += "file://scripts-makefile-hostcc.patch;patch=1 \
+SRC_URI += "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-${PV}.tar.bz2 \
+ file://scripts-makefile-hostcc.patch;patch=1 \
file://pcmciasrc.patch;patch=1 \
file://hostldflags.patch;patch=1"
-PR = "r2"
+S = "${WORKDIR}/linux-wlan-ng-${PV}"
+
+PR = "r3"
diff --git a/packages/wlan-ng/wlan-ng-utils_0.2.8.bb b/packages/wlan-ng/wlan-ng-utils_0.2.8.bb
index 0b6f33e380..15d5e70f8e 100644
--- a/packages/wlan-ng/wlan-ng-utils_0.2.8.bb
+++ b/packages/wlan-ng/wlan-ng-utils_0.2.8.bb
@@ -1,7 +1,10 @@
require wlan-ng-utils.inc
-SRC_URI += "file://scripts-makefile-hostcc.patch;patch=1 \
+SRC_URI += "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-${PV}.tar.bz2 \
+ file://scripts-makefile-hostcc.patch;patch=1 \
file://pcmciasrc.patch;patch=1 \
file://hostldflags.patch;patch=1"
-PR = "r1"
+S = "${WORKDIR}/linux-wlan-ng-${PV}"
+
+PR = "r2"
diff --git a/packages/wlan-ng/wlan-ng-utils_svn.bb b/packages/wlan-ng/wlan-ng-utils_svn.bb
new file mode 100644
index 0000000000..096ac22055
--- /dev/null
+++ b/packages/wlan-ng/wlan-ng-utils_svn.bb
@@ -0,0 +1,12 @@
+require wlan-ng-utils.inc
+
+PR = "r0"
+
+PV = "0.2.8+svnr${SRCREV}"
+
+SRC_URI += "svn://svn.shaftnet.org/linux-wlan-ng;module=trunk \
+ file://scripts-makefile-hostcc.patch;patch=1 \
+ file://pcmciasrc.patch;patch=1 \
+ file://hostldflags.patch;patch=1"
+
+S = "${WORKDIR}/trunk"
diff --git a/packages/xfce/xfce4-panel.inc b/packages/xfce/xfce4-panel.inc
index dbd1baef60..6ad71fcf82 100644
--- a/packages/xfce/xfce4-panel.inc
+++ b/packages/xfce/xfce4-panel.inc
@@ -20,6 +20,7 @@ do_install() {
}
PACKAGES += "${PN}-plugins ${PN}-mcs-plugins"
-FILES_${PN}-plugins += "${libdir}/xfce4/panel-plugins/*.so*"
+FILES_${PN}-plugins += "${libdir}/xfce4/panel-plugins/*.so* \
+ ${datadir}/xfce4/panel-plugins/*.desktop"
FILES_${PN}-mcs-plugins += "${libdir}/xfce4/mcs-plugins/"
FILES_${PN}-dbg += "${libdir}/xfce4/mcs-plugins/.debug"
diff --git a/packages/xfce/xfdesktop.inc b/packages/xfce/xfdesktop.inc
index 50a4f488cc..bd5bb7223c 100644
--- a/packages/xfce/xfdesktop.inc
+++ b/packages/xfce/xfdesktop.inc
@@ -11,5 +11,7 @@ PACKAGES += "xfdesktop-backdrops ${PN}-mcs-plugins"
FILES_xfdesktop-backdrops="${datadir}/xfce4/backdrops/*"
FILES_${PN}-mcs-plugins += "${libdir}/xfce4/mcs-plugins/*.so"
-FILES_${PN} += "${libdir}/xfce4/panel-plugins/*.so"
+FILES_${PN} += "${libdir}/xfce4/panel-plugins/*.so \
+ ${libdir}/xfce4/panel-plugins/xfce4-menu-plugin \
+ ${datadir}/xfce4/panel-plugins/*.desktop"
FILES_${PN}-dbg += "/usr/libexec/xfce4/panel-plugins/.debug"
diff --git a/packages/xfce/xfwm4.inc b/packages/xfce/xfwm4.inc
index e7e5bc1862..e443a841ae 100644
--- a/packages/xfce/xfwm4.inc
+++ b/packages/xfce/xfwm4.inc
@@ -14,10 +14,6 @@ RDEPENDS = "xfwm4-theme-default"
EXTRA_OECONF += " --enable-startup-notification"
-do_configure_append() {
- sed -i s:/usr/include/xfce4::g mcs-plugin/Makefile
-}
-
PACKAGES_DYNAMIC = "xfwm4-theme-*"
python populate_packages_prepend () {
diff --git a/packages/xkeyboard-config/.mtn2git_empty b/packages/xkeyboard-config/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/xkeyboard-config/.mtn2git_empty
diff --git a/packages/xkeyboard-config/xkeyboard-config_1.3.bb b/packages/xkeyboard-config/xkeyboard-config_1.3.bb
new file mode 100644
index 0000000000..f69e63c824
--- /dev/null
+++ b/packages/xkeyboard-config/xkeyboard-config_1.3.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Common X11 Keyboard layouts"
+LICENSE = "MIT"
+DEPENDS = "intltool xkbcomp-native"
+RDEPENDS = "xkbcomp"
+
+SRC_URI = "http://xlibs.freedesktop.org/xkbdesc/xkeyboard-config-${PV}.tar.bz2"
+
+inherit autotools
+
+do_stage() {
+ autotools_stage_all
+}
+
+do_install_append () {
+ install -d ${D}/usr/share/X11/xkb/compiled
+}
diff --git a/packages/xorg-app/constype_1.0.1.bb b/packages/xorg-app/constype_1.0.1.bb
new file mode 100644
index 0000000000..96b340c8c7
--- /dev/null
+++ b/packages/xorg-app/constype_1.0.1.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "print an X window dump"
+DEPENDS += " libxmu virtual/libx11"
+PE = "1"
diff --git a/packages/xorg-app/editres_1.0.3.bb b/packages/xorg-app/editres_1.0.3.bb
new file mode 100644
index 0000000000..a307941b3a
--- /dev/null
+++ b/packages/xorg-app/editres_1.0.3.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+PE = "1"
+
+DEPENDS += " virtual/libx11 libxt libxmu libxaw"
+
diff --git a/packages/xorg-app/fonttosfnt_1.0.4.bb b/packages/xorg-app/fonttosfnt_1.0.4.bb
new file mode 100644
index 0000000000..8b7d7be108
--- /dev/null
+++ b/packages/xorg-app/fonttosfnt_1.0.4.bb
@@ -0,0 +1,7 @@
+require xorg-app-common.inc
+PE = "1"
+
+#DESCRIPTION = ""
+
+DEPENDS += " xproto freetype libfontenc"
+
diff --git a/packages/xorg-app/fslsfonts_1.0.2.bb b/packages/xorg-app/fslsfonts_1.0.2.bb
new file mode 100644
index 0000000000..9ba7ad6030
--- /dev/null
+++ b/packages/xorg-app/fslsfonts_1.0.2.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+PE = "1"
+
+DEPENDS += " virtual/libx11 libfs"
+
diff --git a/packages/xorg-app/fstobdf_1.0.3.bb b/packages/xorg-app/fstobdf_1.0.3.bb
new file mode 100644
index 0000000000..9ba7ad6030
--- /dev/null
+++ b/packages/xorg-app/fstobdf_1.0.3.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+PE = "1"
+
+DEPENDS += " virtual/libx11 libfs"
+
diff --git a/packages/xorg-app/mkfontscale-native_1.0.5.bb b/packages/xorg-app/mkfontscale-native_1.0.5.bb
new file mode 100644
index 0000000000..bae3416b67
--- /dev/null
+++ b/packages/xorg-app/mkfontscale-native_1.0.5.bb
@@ -0,0 +1,7 @@
+inherit native
+require mkfontscale_${PV}.bb
+
+DEPENDS = "libx11-native libfontenc-native freetype-native"
+
+S="${WORKDIR}/mkfontscale-${PV}"
+XORG_PN="mkfontscale"
diff --git a/packages/xorg-app/mkfontscale_1.0.5.bb b/packages/xorg-app/mkfontscale_1.0.5.bb
new file mode 100644
index 0000000000..126918b065
--- /dev/null
+++ b/packages/xorg-app/mkfontscale_1.0.5.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "a program to create an index of scalable font files for X"
+
+DEPENDS += " zlib libfontenc freetype virtual/libx11"
diff --git a/packages/xorg-app/rendercheck_1.3.bb b/packages/xorg-app/rendercheck_1.3.bb
new file mode 100644
index 0000000000..3a5e1ab574
--- /dev/null
+++ b/packages/xorg-app/rendercheck_1.3.bb
@@ -0,0 +1,4 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "a program to test Render extension implementations"
+DEPENDS += "libxrender"
diff --git a/packages/xorg-app/rgb_1.0.3.bb b/packages/xorg-app/rgb_1.0.3.bb
new file mode 100644
index 0000000000..5598b6c041
--- /dev/null
+++ b/packages/xorg-app/rgb_1.0.3.bb
@@ -0,0 +1,8 @@
+require xorg-app-common.inc
+PE = "1"
+
+DEPENDS += " xproto util-macros"
+
+FILES_${PN} += "${datadir}/X11"
+
+
diff --git a/packages/xorg-app/sessreg_1.0.4.bb b/packages/xorg-app/sessreg_1.0.4.bb
new file mode 100644
index 0000000000..bd81532513
--- /dev/null
+++ b/packages/xorg-app/sessreg_1.0.4.bb
@@ -0,0 +1,7 @@
+require xorg-app-common.inc
+PE = "1"
+
+DESCRIPTION = "a simple program for managing utmp/wtmp entries"
+
+DEPENDS += " virtual/libx11"
+
diff --git a/packages/xorg-app/showfont_1.0.2.bb b/packages/xorg-app/showfont_1.0.2.bb
new file mode 100644
index 0000000000..28c0f81c91
--- /dev/null
+++ b/packages/xorg-app/showfont_1.0.2.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+PE = "1"
+
+DEPENDS += " libfs"
+
diff --git a/packages/xorg-app/xdm_1.1.8.bb b/packages/xorg-app/xdm_1.1.8.bb
new file mode 100644
index 0000000000..eb153b1da9
--- /dev/null
+++ b/packages/xorg-app/xdm_1.1.8.bb
@@ -0,0 +1,10 @@
+require xorg-app-common.inc
+PE = "1"
+
+DESCRIPTION = "X display manager"
+
+DEPENDS += " libxmu libxinerama libxpm libxdmcp libxau virtual/libx11 libxext libxdmcp libxt libxaw"
+
+EXTRA_OECONF += " --with-random-device=/dev/urandom"
+
+FILES_${PN}-dbg += "${libdir}/X11/xdm/.debug/*"
diff --git a/packages/xorg-app/xdpyinfo_1.0.3.bb b/packages/xorg-app/xdpyinfo_1.0.3.bb
new file mode 100644
index 0000000000..2ecd1a6709
--- /dev/null
+++ b/packages/xorg-app/xdpyinfo_1.0.3.bb
@@ -0,0 +1,10 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X display information utility"
+LICENSE = "MIT"
+DEPENDS += "libxtst libxext libxxf86vm libxxf86dga libxxf86misc libxi libxrender libxinerama libdmx libxp libxau"
+PE = "1"
+
+SRC_URI += "file://disable-xkb.patch;patch=1"
+
+EXTRA_OECONF = "--disable-xkb"
diff --git a/packages/xorg-app/xfs_1.0.8.bb b/packages/xorg-app/xfs_1.0.8.bb
new file mode 100644
index 0000000000..8cef4bda9a
--- /dev/null
+++ b/packages/xorg-app/xfs_1.0.8.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X fontserver"
+DEPENDS += " libfs libxfont xtrans"
+PE = "1"
diff --git a/packages/xorg-app/xfsinfo_1.0.2.bb b/packages/xorg-app/xfsinfo_1.0.2.bb
new file mode 100644
index 0000000000..9ba7ad6030
--- /dev/null
+++ b/packages/xorg-app/xfsinfo_1.0.2.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+PE = "1"
+
+DEPENDS += " virtual/libx11 libfs"
+
diff --git a/packages/xorg-app/xinit_1.0.9.bb b/packages/xorg-app/xinit_1.0.9.bb
new file mode 100644
index 0000000000..ce82fb05d4
--- /dev/null
+++ b/packages/xorg-app/xinit_1.0.9.bb
@@ -0,0 +1,6 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X Window System initializer"
+PE = "1"
+
+FILES_${PN} += "${libdir}X11/xinit"
diff --git a/packages/xorg-app/xinit_1.1.0.bb b/packages/xorg-app/xinit_1.1.0.bb
new file mode 100644
index 0000000000..ce82fb05d4
--- /dev/null
+++ b/packages/xorg-app/xinit_1.1.0.bb
@@ -0,0 +1,6 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X Window System initializer"
+PE = "1"
+
+FILES_${PN} += "${libdir}X11/xinit"
diff --git a/packages/xorg-app/xkbcomp-native_1.0.5.bb b/packages/xorg-app/xkbcomp-native_1.0.5.bb
new file mode 100644
index 0000000000..ee7c25c407
--- /dev/null
+++ b/packages/xorg-app/xkbcomp-native_1.0.5.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "The X Keyboard Extension essentially replaces the core protocol definition of keyboard."
+
+SECTION = "x11/applications"
+LICENSE = "MIT-X"
+S="${WORKDIR}/xkbcomp-${PV}"
+
+DEPENDS = "libx11-native libxkbfile-native"
+
+SRC_URI = "${XORG_MIRROR}/individual/app/xkbcomp-${PV}.tar.bz2"
+
+inherit native autotools pkgconfig
diff --git a/packages/xorg-app/xkbcomp_1.0.5.bb b/packages/xorg-app/xkbcomp_1.0.5.bb
new file mode 100644
index 0000000000..ca6cdb8898
--- /dev/null
+++ b/packages/xorg-app/xkbcomp_1.0.5.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "The X Keyboard Extension essentially replaces the core protocol definition of keyboard."
+
+DEPENDS += " virtual/libx11 libxkbfile"
diff --git a/packages/xorg-doc/xorg-docs_1.4.bb b/packages/xorg-doc/xorg-docs_1.4.bb
new file mode 100644
index 0000000000..6b5cbad5f5
--- /dev/null
+++ b/packages/xorg-doc/xorg-docs_1.4.bb
@@ -0,0 +1,12 @@
+require xorg-doc-common.inc
+
+DESCRIPTION = "The documentation in this package is from xc/doc in the monolithic \
+source tree."
+
+DEPENDS += " intltool"
+
+PE = "1"
+
+FILES_${PN} += " /usr/share/X11/doc"
+
+EXTRA_OECONF += " ac_cv_file__usr_share_sgml_X11_defs_ent=no "
diff --git a/packages/xorg-driver/xf86-input-calcomp_1.1.2.bb b/packages/xorg-driver/xf86-input-calcomp_1.1.2.bb
new file mode 100644
index 0000000000..a309230801
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-calcomp_1.1.2.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- Calcomp input driver"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-input-digitaledge_1.1.1.bb b/packages/xorg-driver/xf86-input-digitaledge_1.1.1.bb
new file mode 100644
index 0000000000..311caf6553
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-digitaledge_1.1.1.bb
@@ -0,0 +1,3 @@
+require xorg-driver-input.inc
+PE = "1"
+
diff --git a/packages/xorg-driver/xf86-input-dmc_1.1.2.bb b/packages/xorg-driver/xf86-input-dmc_1.1.2.bb
new file mode 100644
index 0000000000..fea3ce83aa
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-dmc_1.1.2.bb
@@ -0,0 +1,5 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- DMC input driver"
+PE = "1"
+
diff --git a/packages/xorg-driver/xf86-input-dynapro_1.1.2.bb b/packages/xorg-driver/xf86-input-dynapro_1.1.2.bb
new file mode 100644
index 0000000000..0033ffe7fa
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-dynapro_1.1.2.bb
@@ -0,0 +1,5 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- Dynapro input driver"
+PE = "1"
+
diff --git a/packages/xorg-driver/xf86-input-elo2300_1.1.2.bb b/packages/xorg-driver/xf86-input-elo2300_1.1.2.bb
new file mode 100644
index 0000000000..7841287fb0
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-elo2300_1.1.2.bb
@@ -0,0 +1,5 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- ELO2300 input driver"
+PE = "1"
+
diff --git a/packages/xorg-driver/xf86-input-elographics_1.2.2.bb b/packages/xorg-driver/xf86-input-elographics_1.2.2.bb
new file mode 100644
index 0000000000..cb49a58d4c
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-elographics_1.2.2.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- ELOGraphics input driver"
+PE = "2"
diff --git a/packages/xorg-driver/xf86-input-evdev_1.99.4.bb b/packages/xorg-driver/xf86-input-evdev_1.99.4.bb
new file mode 100644
index 0000000000..792909621a
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-evdev_1.99.4.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- evdev input driver"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-input-fpit_1.2.0.bb b/packages/xorg-driver/xf86-input-fpit_1.2.0.bb
new file mode 100644
index 0000000000..311caf6553
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-fpit_1.2.0.bb
@@ -0,0 +1,3 @@
+require xorg-driver-input.inc
+PE = "1"
+
diff --git a/packages/xorg-driver/xf86-input-hyperpen_1.2.0.bb b/packages/xorg-driver/xf86-input-hyperpen_1.2.0.bb
new file mode 100644
index 0000000000..311caf6553
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-hyperpen_1.2.0.bb
@@ -0,0 +1,3 @@
+require xorg-driver-input.inc
+PE = "1"
+
diff --git a/packages/xorg-driver/xf86-input-jamstudio_1.2.0.bb b/packages/xorg-driver/xf86-input-jamstudio_1.2.0.bb
new file mode 100644
index 0000000000..34a497438b
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-jamstudio_1.2.0.bb
@@ -0,0 +1,2 @@
+require xorg-driver-input.inc
+PE = "1"
diff --git a/packages/xorg-driver/xf86-input-keyboard_1.3.1.bb b/packages/xorg-driver/xf86-input-keyboard_1.3.1.bb
new file mode 100644
index 0000000000..28a834a274
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-keyboard_1.3.1.bb
@@ -0,0 +1,6 @@
+require xorg-driver-input.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- keyboard input driver"
+
+DEPENDS += " kbproto"
diff --git a/packages/xorg-driver/xf86-input-magellan_1.2.0.bb b/packages/xorg-driver/xf86-input-magellan_1.2.0.bb
new file mode 100644
index 0000000000..2bbf253d53
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-magellan_1.2.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- Magellan input driver"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-input-microtouch_1.2.0.bb b/packages/xorg-driver/xf86-input-microtouch_1.2.0.bb
new file mode 100644
index 0000000000..9a90a80b9f
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-microtouch_1.2.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- MicroTouch input driver"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-input-mouse_1.3.0.bb b/packages/xorg-driver/xf86-input-mouse_1.3.0.bb
new file mode 100644
index 0000000000..e6325675f8
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-mouse_1.3.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- mouse input driver"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-input-mutouch_1.2.0.bb b/packages/xorg-driver/xf86-input-mutouch_1.2.0.bb
new file mode 100644
index 0000000000..cce8e75524
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-mutouch_1.2.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- muTouch input driver"
diff --git a/packages/xorg-driver/xf86-input-palmax_1.2.0.bb b/packages/xorg-driver/xf86-input-palmax_1.2.0.bb
new file mode 100644
index 0000000000..1334751ca6
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-palmax_1.2.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- Palmax input driver"
diff --git a/packages/xorg-driver/xf86-input-penmount_1.3.0.bb b/packages/xorg-driver/xf86-input-penmount_1.3.0.bb
new file mode 100644
index 0000000000..1ed62d4cad
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-penmount_1.3.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- Penmount input driver"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-input-summa_1.2.0.bb b/packages/xorg-driver/xf86-input-summa_1.2.0.bb
new file mode 100644
index 0000000000..84fee74e7b
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-summa_1.2.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- Summa input driver"
diff --git a/packages/xorg-driver/xf86-input-tek4957_1.2.0.bb b/packages/xorg-driver/xf86-input-tek4957_1.2.0.bb
new file mode 100644
index 0000000000..facf967f18
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-tek4957_1.2.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- Tek4957 input driver"
diff --git a/packages/xorg-driver/xf86-input-vmmouse_12.5.1.bb b/packages/xorg-driver/xf86-input-vmmouse_12.5.1.bb
new file mode 100644
index 0000000000..7a433df2a6
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-vmmouse_12.5.1.bb
@@ -0,0 +1,6 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- VMMouse input driver to use with VMWare"
+PE = "1"
+
+COMPATIBLE_HOST = 'i.86.*-linux'
diff --git a/packages/xorg-driver/xf86-video-apm/.mtn2git_empty b/packages/xorg-driver/xf86-video-apm/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-apm/.mtn2git_empty
diff --git a/packages/xorg-driver/xf86-video-apm/get-rid-of-host-includes.patch b/packages/xorg-driver/xf86-video-apm/get-rid-of-host-includes.patch
new file mode 100644
index 0000000000..a7e8a09916
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-apm/get-rid-of-host-includes.patch
@@ -0,0 +1,13 @@
+Index: xf86-video-apm-1.2.0/configure.ac
+===================================================================
+--- xf86-video-apm-1.2.0.orig/configure.ac 2008-06-13 20:04:44.000000000 +0200
++++ xf86-video-apm-1.2.0/configure.ac 2008-06-13 20:05:02.000000000 +0200
+@@ -63,7 +63,7 @@
+ AC_SUBST([XF86RUSH_CFLAGS])
+
+ CFLAGS="$CFLAGS $XORG_CFLAGS $XF86RUSH_CFLAGS"' -I$(top_srcdir)/src'
+-INCLUDES="$XORG_INCS -I${sdkdir} $XF86RUSH_INCS "'-I$(top_srcdir)/src -I$(prefix)/include'
++INCLUDES="$XORG_INCS $XF86RUSH_INCS "'-I$(top_srcdir)/src'
+ AC_SUBST([CFLAGS])
+ AC_SUBST([INCLUDES])
+
diff --git a/packages/xorg-driver/xf86-video-apm_1.2.0.bb b/packages/xorg-driver/xf86-video-apm_1.2.0.bb
new file mode 100644
index 0000000000..1cef0fbb55
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-apm_1.2.0.bb
@@ -0,0 +1,8 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "This is the Alliance Promotion driver for XFree86 4.0+"
+
+DEPENDS += " xf86rushproto"
+
+SRC_URI += "file://get-rid-of-host-includes.patch;patch=1"
diff --git a/packages/xorg-driver/xf86-video-ark/.mtn2git_empty b/packages/xorg-driver/xf86-video-ark/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-ark/.mtn2git_empty
diff --git a/packages/xorg-driver/xf86-video-ark/get-rid-of-host-includes.patch b/packages/xorg-driver/xf86-video-ark/get-rid-of-host-includes.patch
new file mode 100644
index 0000000000..654d5933cc
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-ark/get-rid-of-host-includes.patch
@@ -0,0 +1,13 @@
+Index: xf86-video-ark-0.7.0/configure.ac
+===================================================================
+--- xf86-video-ark-0.7.0.orig/configure.ac 2008-06-14 11:08:06.000000000 +0200
++++ xf86-video-ark-0.7.0/configure.ac 2008-06-14 11:08:17.000000000 +0200
+@@ -57,7 +57,7 @@
+ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+
+ CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
+-INCLUDES="$XORG_INCS -I${sdkdir} "'-I$(top_srcdir)/src -I$(prefix)/include'
++INCLUDES="$XORG_INCS "'-I$(top_srcdir)/src'
+ AC_SUBST([CFLAGS])
+ AC_SUBST([INCLUDES])
+
diff --git a/packages/xorg-driver/xf86-video-ark_0.7.0.bb b/packages/xorg-driver/xf86-video-ark_0.7.0.bb
new file mode 100644
index 0000000000..f62f5a3586
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-ark_0.7.0.bb
@@ -0,0 +1,6 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- ark display driver"
+
+SRC_URI += "file://get-rid-of-host-includes.patch;patch=1"
diff --git a/packages/xorg-driver/xf86-video-ast_0.85.0.bb b/packages/xorg-driver/xf86-video-ast_0.85.0.bb
new file mode 100644
index 0000000000..c2b6b7608a
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-ast_0.85.0.bb
@@ -0,0 +1,2 @@
+require xorg-driver-video.inc
+PE = "1"
diff --git a/packages/xorg-driver/xf86-video-chips_1.2.0.bb b/packages/xorg-driver/xf86-video-chips_1.2.0.bb
new file mode 100644
index 0000000000..9e09d8e81c
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-chips_1.2.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- Chips display driver"
diff --git a/packages/xorg-driver/xf86-video-cirrus_1.2.1.bb b/packages/xorg-driver/xf86-video-cirrus_1.2.1.bb
new file mode 100644
index 0000000000..ce19dd4f73
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-cirrus_1.2.1.bb
@@ -0,0 +1,4 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- Cirrus display driver"
diff --git a/packages/xorg-driver/xf86-video-dummy/.mtn2git_empty b/packages/xorg-driver/xf86-video-dummy/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-dummy/.mtn2git_empty
diff --git a/packages/xorg-driver/xf86-video-dummy/get-rid-of-host-includes.patch b/packages/xorg-driver/xf86-video-dummy/get-rid-of-host-includes.patch
new file mode 100644
index 0000000000..404e947b87
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-dummy/get-rid-of-host-includes.patch
@@ -0,0 +1,13 @@
+Index: xf86-video-dummy-0.3.0/configure.ac
+===================================================================
+--- xf86-video-dummy-0.3.0.orig/configure.ac 2008-06-14 12:20:36.000000000 +0200
++++ xf86-video-dummy-0.3.0/configure.ac 2008-06-14 12:20:58.000000000 +0200
+@@ -58,7 +58,7 @@
+ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+
+ CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
+-INCLUDES="$XORG_INCS -I${sdkdir} "'-I$(top_srcdir)/src -I$(prefix)/include'
++INCLUDES="$XORG_INCS "'-I$(top_srcdir)/src'
+ AC_SUBST([CFLAGS])
+ AC_SUBST([INCLUDES])
+
diff --git a/packages/xorg-driver/xf86-video-dummy_0.3.0.bb b/packages/xorg-driver/xf86-video-dummy_0.3.0.bb
new file mode 100644
index 0000000000..d85ae168b0
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-dummy_0.3.0.bb
@@ -0,0 +1,6 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- dummy display driver"
+
+SRC_URI += "file://get-rid-of-host-includes.patch;patch=1"
diff --git a/packages/xorg-driver/xf86-video-fbdev_0.4.0.bb b/packages/xorg-driver/xf86-video-fbdev_0.4.0.bb
new file mode 100644
index 0000000000..ee2ec96eb5
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-fbdev_0.4.0.bb
@@ -0,0 +1,6 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- fbdev display driver"
+
+#DEPENDS += " "
diff --git a/packages/xorg-driver/xf86-video-geode_2.9.0.bb b/packages/xorg-driver/xf86-video-geode_2.9.0.bb
new file mode 100644
index 0000000000..380ce2ea0b
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-geode_2.9.0.bb
@@ -0,0 +1,5 @@
+require xorg-driver-video.inc
+PE = "1"
+
+COMPATIBLE_HOST = 'i.86.*-linux'
+DESCRIPTION = "X.org server -- Geode GX2/LX display driver"
diff --git a/packages/xorg-driver/xf86-video-glint_1.2.0.bb b/packages/xorg-driver/xf86-video-glint_1.2.0.bb
new file mode 100644
index 0000000000..0426c98ff6
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-glint_1.2.0.bb
@@ -0,0 +1,11 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- Glint display driver"
+
+DEPENDS += " xf86dgaproto drm xf86driproto"
+
+EXTRA_OECONF += " \
+ ac_cv_file__usr_include_xorg_dri_h=yes \
+ ac_cv_file__usr_include_xorg_sarea_h=yes \
+ ac_cv_file__usr_include_xorg_dristruct_h=yes \
+"
diff --git a/packages/xorg-driver/xf86-video-i128_1.3.0.bb b/packages/xorg-driver/xf86-video-i128_1.3.0.bb
new file mode 100644
index 0000000000..78d5eda810
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-i128_1.3.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- i128 display driver"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-video-i740_1.2.0.bb b/packages/xorg-driver/xf86-video-i740_1.2.0.bb
new file mode 100644
index 0000000000..6c2ea7438b
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-i740_1.2.0.bb
@@ -0,0 +1,5 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- i740 display driver"
+
+PE = "1"
diff --git a/packages/xorg-driver/xf86-video-neomagic_1.2.1.bb b/packages/xorg-driver/xf86-video-neomagic_1.2.1.bb
new file mode 100644
index 0000000000..b519e60e58
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-neomagic_1.2.1.bb
@@ -0,0 +1,8 @@
+require xorg-driver-video.inc
+
+PE = "1"
+
+DESCRIPTION = "X11 driver for NeoMagic 2200, 2160, 2097, 2093, 2090, 2070"
+
+DEPENDS += " xf86dgaproto"
+
diff --git a/packages/xorg-driver/xf86-video-nv_2.1.9.bb b/packages/xorg-driver/xf86-video-nv_2.1.9.bb
new file mode 100644
index 0000000000..0d4ee2ed19
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-nv_2.1.9.bb
@@ -0,0 +1,4 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- NV display driver"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-video-radeonhd_1.2.0.bb b/packages/xorg-driver/xf86-video-radeonhd_1.2.0.bb
new file mode 100644
index 0000000000..ee92c364da
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-radeonhd_1.2.0.bb
@@ -0,0 +1,9 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- AMD/ATI r5xx, r6xx display driver"
+
+EXTRA_OECONF += " \
+ ac_cv_file___src_AtomBios_includes_atombios_h=yes \
+ ac_cv_file___src_AtomBios_includes_Decoder_h=yes \
+"
diff --git a/packages/xorg-driver/xf86-video-rendition_4.2.0.bb b/packages/xorg-driver/xf86-video-rendition_4.2.0.bb
new file mode 100644
index 0000000000..e6c89a8c74
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-rendition_4.2.0.bb
@@ -0,0 +1,6 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X11 driver supporting cards based on the V1000 or the V2x00."
+
+#DEPENDS += " "
diff --git a/packages/xorg-driver/xf86-video-s3_0.6.0.bb b/packages/xorg-driver/xf86-video-s3_0.6.0.bb
new file mode 100644
index 0000000000..b5fef823b6
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-s3_0.6.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- legacy S3 display driver"
diff --git a/packages/xorg-driver/xf86-video-s3virge_1.10.1.bb b/packages/xorg-driver/xf86-video-s3virge_1.10.1.bb
new file mode 100644
index 0000000000..5f7dd350ce
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-s3virge_1.10.1.bb
@@ -0,0 +1,4 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- S3 ViRGE display driver"
diff --git a/packages/xorg-driver/xf86-video-savage_2.2.1.bb b/packages/xorg-driver/xf86-video-savage_2.2.1.bb
new file mode 100644
index 0000000000..eafe3899e6
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-savage_2.2.1.bb
@@ -0,0 +1,12 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- Savage display driver"
+
+DEPENDS += " drm xf86driproto"
+
+EXTRA_OECONF += " \
+ ac_cv_file__usr_include_xorg_dri_h=yes \
+ ac_cv_file__usr_include_xorg_sarea_h=yes \
+ ac_cv_file__usr_include_xorg_dristruct_h=yes \
+"
diff --git a/packages/xorg-driver/xf86-video-siliconmotion_1.6.0.bb b/packages/xorg-driver/xf86-video-siliconmotion_1.6.0.bb
new file mode 100644
index 0000000000..5b9b4fc326
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-siliconmotion_1.6.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-video.inc
+
+PE = "1"
+DESCRIPTION = "X.Org X server -- SiliconMotion display driver"
diff --git a/packages/xorg-driver/xf86-video-sis_0.10.0.bb b/packages/xorg-driver/xf86-video-sis_0.10.0.bb
new file mode 100644
index 0000000000..dc083b3e88
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-sis_0.10.0.bb
@@ -0,0 +1,11 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- SiS display driver"
+DEPENDS += " xineramaproto xf86miscproto xf86dgaproto drm xf86driproto"
+PE = "1"
+
+EXTRA_OECONF += " \
+ ac_cv_file__usr_include_xorg_dri_h=yes \
+ ac_cv_file__usr_include_xorg_sarea_h=yes \
+ ac_cv_file__usr_include_xorg_dristruct_h=yes \
+"
diff --git a/packages/xorg-driver/xf86-video-sisusb_0.9.0.bb b/packages/xorg-driver/xf86-video-sisusb_0.9.0.bb
new file mode 100644
index 0000000000..8f6dfae1f6
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-sisusb_0.9.0.bb
@@ -0,0 +1,6 @@
+require xorg-driver-video.inc
+
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- SiS USB display driver"
+DEPENDS += " xineramaproto xf86miscproto"
diff --git a/packages/xorg-driver/xf86-video-tdfx_1.4.0.bb b/packages/xorg-driver/xf86-video-tdfx_1.4.0.bb
new file mode 100644
index 0000000000..fe52f5eb19
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-tdfx_1.4.0.bb
@@ -0,0 +1,12 @@
+require xorg-driver-video.inc
+PE = "1"
+
+#DESCRIPTION = ""
+
+DEPENDS += " drm xf86driproto"
+
+EXTRA_OECONF += " \
+ ac_cv_file__usr_include_xorg_dri_h=yes \
+ ac_cv_file__usr_include_xorg_sarea_h=yes \
+ ac_cv_file__usr_include_xorg_dristruct_h=yes \
+"
diff --git a/packages/xorg-driver/xf86-video-trident_1.3.0.bb b/packages/xorg-driver/xf86-video-trident_1.3.0.bb
new file mode 100644
index 0000000000..fe37be5d0b
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-trident_1.3.0.bb
@@ -0,0 +1,5 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.org X server -- Trident display driver"
+DEPENDS += " xf86dgaproto"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-video-tseng_1.2.0.bb b/packages/xorg-driver/xf86-video-tseng_1.2.0.bb
new file mode 100644
index 0000000000..843aa707b7
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-tseng_1.2.0.bb
@@ -0,0 +1,6 @@
+require xorg-driver-video.inc
+PE = "1"
+
+#DESCRIPTION = ""
+
+#DEPENDS += " "
diff --git a/packages/xorg-driver/xf86-video-v4l_0.2.0.bb b/packages/xorg-driver/xf86-video-v4l_0.2.0.bb
new file mode 100644
index 0000000000..9ebb9ad1f6
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-v4l_0.2.0.bb
@@ -0,0 +1,5 @@
+require xorg-driver-video.inc
+
+PE = "1"
+
+DESCRIPTION = "Video 4 Linux adaptor driver for X11"
diff --git a/packages/xorg-driver/xf86-video-vmware_10.16.1.bb b/packages/xorg-driver/xf86-video-vmware_10.16.1.bb
new file mode 100644
index 0000000000..994b8b6a3c
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-vmware_10.16.1.bb
@@ -0,0 +1,6 @@
+require xorg-driver-video.inc
+PE = "1"
+
+#DESCRIPTION = ""
+
+DEPENDS += " xineramaproto xf86miscproto drm xf86driproto"
diff --git a/packages/xorg-driver/xf86-video-voodoo_1.2.0.bb b/packages/xorg-driver/xf86-video-voodoo_1.2.0.bb
new file mode 100644
index 0000000000..bfceb2995c
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-voodoo_1.2.0.bb
@@ -0,0 +1,6 @@
+require xorg-driver-video.inc
+PE = "1"
+
+DESCRIPTION = "X11 driver for Voodoo/Voodoo2"
+
+DEPENDS += " xf86dgaproto"
diff --git a/packages/xorg-lib/libfs_1.0.1.bb b/packages/xorg-lib/libfs_1.0.1.bb
new file mode 100644
index 0000000000..2bc6b0ae38
--- /dev/null
+++ b/packages/xorg-lib/libfs_1.0.1.bb
@@ -0,0 +1,7 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "X11 Font Services library"
+DEPENDS += "xproto fontsproto xtrans"
+PE = "1"
+
+XORG_PN = "libFS"
diff --git a/packages/xorg-lib/libxau-native_1.0.3.bb b/packages/xorg-lib/libxau-native_1.0.3.bb
index 953a93adf1..3fc07b6ab6 100644
--- a/packages/xorg-lib/libxau-native_1.0.3.bb
+++ b/packages/xorg-lib/libxau-native_1.0.3.bb
@@ -1,6 +1,7 @@
require libxau_${PV}.bb
DEPENDS = "xproto-native util-macros-native"
+PROVIDES = ""
PR = "r1"
XORG_PN = "libXau"
diff --git a/packages/xorg-lib/pixman_0.10.0.bb b/packages/xorg-lib/pixman_0.10.0.bb
index 1269ff46a7..35f62990b5 100644
--- a/packages/xorg-lib/pixman_0.10.0.bb
+++ b/packages/xorg-lib/pixman_0.10.0.bb
@@ -4,7 +4,6 @@ DESCRIPTION = "Low-level pixel manipulation library."
LICENSE = "X11"
SRC_URI = "http://cairographics.org/releases/pixman-${PV}.tar.gz"
-S = "${WORKDIR}/pixman-${PV}"
inherit autotools pkgconfig
diff --git a/packages/xorg-lib/pixman_0.11.4.bb b/packages/xorg-lib/pixman_0.11.4.bb
new file mode 100644
index 0000000000..d9da96718f
--- /dev/null
+++ b/packages/xorg-lib/pixman_0.11.4.bb
@@ -0,0 +1,15 @@
+SECTION = "libs"
+PRIORITY = "optional"
+DESCRIPTION = "Low-level pixel manipulation library."
+LICENSE = "X11"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://cairographics.org/releases/pixman-${PV}.tar.gz"
+
+inherit autotools pkgconfig
+
+do_stage () {
+ autotools_stage_all
+}
+
diff --git a/packages/xorg-lib/xtrans_1.2.bb b/packages/xorg-lib/xtrans_1.2.bb
new file mode 100644
index 0000000000..42cf655a3f
--- /dev/null
+++ b/packages/xorg-lib/xtrans_1.2.bb
@@ -0,0 +1,7 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "network API translation layer to insulate X applications and \
+libraries from OS network vageries."
+PE = "1"
+
+SRC_URI += "file://fix-missing-includepath.patch;patch=1"
diff --git a/packages/xorg-proto/xextproto_7.0.3.bb b/packages/xorg-proto/xextproto_7.0.3.bb
new file mode 100644
index 0000000000..3637929316
--- /dev/null
+++ b/packages/xorg-proto/xextproto_7.0.3.bb
@@ -0,0 +1,3 @@
+require xorg-proto-common.inc
+
+PE = "1"
diff --git a/packages/xorg-util/util-macros-native_1.1.6.bb b/packages/xorg-util/util-macros-native_1.1.6.bb
new file mode 100644
index 0000000000..618e78f116
--- /dev/null
+++ b/packages/xorg-util/util-macros-native_1.1.6.bb
@@ -0,0 +1,7 @@
+require util-macros_${PV}.bb
+
+inherit native
+
+XORG_PN = "util-macros"
+
+S = "${WORKDIR}/util-macros-${PV}"
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/.mtn2git_empty b/packages/xorg-xserver/xserver-kdrive-1.4.2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/.mtn2git_empty
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/disable-xf86-dga-xorgcfg.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/disable-xf86-dga-xorgcfg.patch
new file mode 100644
index 0000000000..ccc19139c8
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/disable-xf86-dga-xorgcfg.patch
@@ -0,0 +1,39 @@
+Index: xorg-server-1.3.0.0/configure.ac
+===================================================================
+--- xorg-server-1.3.0.0.orig/configure.ac 2007-04-20 03:23:40.000000000 +0200
++++ xorg-server-1.3.0.0/configure.ac 2007-05-09 16:51:34.000000000 +0200
+@@ -520,7 +520,11 @@
+ XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
+
+ dnl Core modules for most extensions, et al.
++if test "$KDRIVE" = yes; then
++REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto [kbproto >= 1.0.3]"
++else
+ REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto [kbproto >= 1.0.3]"
++fi
+ REQUIRED_LIBS="xfont xau fontenc"
+
+ AM_CONDITIONAL(XV, [test "x$XV" = xyes])
+@@ -1603,7 +1607,9 @@
+ AC_SUBST(XKB_COMPILED_DIR)
+
+ dnl and the rest of these are generic, so they're in config.h
++if test ! x"$KDRIVE" = xyes; then
+ AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
++fi
+ AC_DEFINE(XResExtension, 1, [Build XRes extension])
+
+ AC_TRY_COMPILE([
+@@ -1616,10 +1622,12 @@
+
+ AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
+
++if test ! "x$KDRIVE" = xyes ; then
+ dnl xorgconfig CLI configuration utility
+ PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11])
+ AC_SUBST(XORGCONFIG_DEP_CFLAGS)
+ AC_SUBST(XORGCONFIG_DEP_LIBS)
++fi
+
+ dnl xorgcfg GUI configuration utility
+ AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-tslib.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-tslib.patch
new file mode 100644
index 0000000000..3746be5f53
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-tslib.patch
@@ -0,0 +1,24 @@
+Index: xorg-server-1.4/configure.ac
+===================================================================
+--- xorg-server-1.4.orig/configure.ac 2007-09-08 16:36:37.000000000 +0200
++++ xorg-server-1.4/configure.ac 2007-09-08 16:38:10.000000000 +0200
+@@ -1816,7 +1816,7 @@
+ AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt"))
+
+ if test "x$TSLIB" = xyes; then
+- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
++ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
+ if test "x$HAVE_TSLIB" = xno; then
+ AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/])
+ fi
+@@ -1840,8 +1840,8 @@
+ ;;
+ esac
+ KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
+- KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
+- KDRIVE_LIBS="$XSERVERLIBS_LIBS $KDRIVE_LOCAL_LIBS"
++ KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
++ KDRIVE_LIBS="$XSERVERLIBS_LIBS $TSLIB_LIBS $KDRIVE_LOCAL_LIBS"
+
+ # check if we can build Xephyr
+ PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-xcalibrate.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-xcalibrate.patch
new file mode 100644
index 0000000000..113f1cc584
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-xcalibrate.patch
@@ -0,0 +1,77 @@
+---
+ Xext/Makefile.am | 6 ++++++
+ configure.ac | 9 ++++++++-
+ include/kdrive-config.h.in | 3 +++
+ mi/miinitext.c | 6 ++++++
+ 4 files changed, 23 insertions(+), 1 deletion(-)
+
+Index: xorg-server-1.4/mi/miinitext.c
+===================================================================
+--- xorg-server-1.4.orig/mi/miinitext.c 2007-08-23 21:04:54.000000000 +0200
++++ xorg-server-1.4/mi/miinitext.c 2007-09-06 23:25:35.000000000 +0200
+@@ -374,6 +374,9 @@
+ #ifdef DMXEXT
+ extern void DMXExtensionInit(INITARGS);
+ #endif
++#ifdef XCALIBRATE
++extern void XCalibrateExtensionInit(INITARGS);
++#endif
+ #ifdef XEVIE
+ extern void XevieExtensionInit(INITARGS);
+ #endif
+@@ -666,6 +669,9 @@
+ #ifdef DAMAGE
+ if (!noDamageExtension) DamageExtensionInit();
+ #endif
++#ifdef XCALIBRATE
++ XCalibrateExtensionInit ();
++#endif
+ }
+
+ void
+Index: xorg-server-1.4/configure.ac
+===================================================================
+--- xorg-server-1.4.orig/configure.ac 2007-09-06 23:25:15.000000000 +0200
++++ xorg-server-1.4/configure.ac 2007-09-06 23:26:40.000000000 +0200
+@@ -500,6 +500,7 @@
+ AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto])
+ AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
+ AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE])
++AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
+ AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY])
+ AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
+ AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
+@@ -787,6 +788,12 @@
+ AC_DEFINE(XCSECURITY, 1, [Build Security extension])
+ fi
+
++AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes])
++if test "x$XCALIBRATE" = xyes; then
++ AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
++ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
++fi
++
+ AM_CONDITIONAL(XEVIE, [test "x$XEVIE" = xyes])
+ if test "x$XEVIE" = xyes; then
+ AC_DEFINE(XEVIE, 1, [Build XEvIE extension])
+@@ -1841,7 +1848,7 @@
+ ;;
+ esac
+ KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
+- KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
++ KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $KDRIVE_PURE_LIBS $KDRIVE_OS_LIB $KDRIVE_STUB_LIB"
+ KDRIVE_LIBS="$XSERVERLIBS_LIBS $TSLIB_LIBS $KDRIVE_LOCAL_LIBS"
+
+ # check if we can build Xephyr
+Index: xorg-server-1.4/include/kdrive-config.h.in
+===================================================================
+--- xorg-server-1.4.orig/include/kdrive-config.h.in 2007-08-23 21:04:54.000000000 +0200
++++ xorg-server-1.4/include/kdrive-config.h.in 2007-09-06 23:25:35.000000000 +0200
+@@ -31,4 +31,7 @@
+ /* Have execinfo.h for backtrace(). */
+ #undef HAVE_EXECINFO_H
+
++/* Enable XCalibrate extension */
++#undef XCALIBRATE
++
+ #endif /* _KDRIVE_CONFIG_H_ */
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/keyboard-resume-workaround.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/keyboard-resume-workaround.patch
new file mode 100644
index 0000000000..4964ff5479
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/keyboard-resume-workaround.patch
@@ -0,0 +1,16 @@
+Index: xorg-server-1.4/hw/kdrive/linux/keyboard.c
+===================================================================
+--- xorg-server-1.4.orig/hw/kdrive/linux/keyboard.c 2007-09-29 18:31:15.000000000 +0200
++++ xorg-server-1.4/hw/kdrive/linux/keyboard.c 2007-09-29 18:33:02.000000000 +0200
+@@ -743,11 +743,6 @@
+ cfsetispeed(&nTty, 9600);
+ cfsetospeed(&nTty, 9600);
+ tcsetattr(fd, TCSANOW, &nTty);
+- /*
+- * Flush any pending keystrokes
+- */
+- while ((n = read (fd, buf, sizeof (buf))) > 0)
+- ;
+ KdRegisterFd (fd, LinuxKeyboardRead, ki);
+ return Success;
+ }
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/linux-keyboard-mediumraw.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/linux-keyboard-mediumraw.patch
new file mode 100644
index 0000000000..36d2f8eae8
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/linux-keyboard-mediumraw.patch
@@ -0,0 +1,44 @@
+Index: git/hw/kdrive/linux/keyboard.c
+===================================================================
+--- git.orig/hw/kdrive/linux/keyboard.c 2007-11-14 21:30:45.000000000 +0000
++++ git/hw/kdrive/linux/keyboard.c 2007-11-15 12:00:11.000000000 +0000
+@@ -42,6 +42,8 @@
+ #include <sys/ioctl.h>
+
+ extern int LinuxConsoleFd;
++static unsigned char mediumraw_data, mediumraw_up;
++static enum { DEFAULT, EXTBYTE1, EXTBYTE2 } mediumraw_state = DEFAULT;
+
+ static const KeySym linux_to_x[256] = {
+ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
+@@ -701,7 +703,29 @@
+ else
+ #endif
+ scancode = b[0] & 0x7f;
+- KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80);
++ /* This is extended medium raw mode interpreter
++ see linux/drivers/keyboard.c (kbd->kbdmode == VC_MEDIUMRAW) */
++ switch (mediumraw_state)
++ {
++ case DEFAULT:
++ if (scancode == 0)
++ {
++ mediumraw_state = EXTBYTE1;
++ mediumraw_up = b[0] & 0x80;
++ }
++ else
++ KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80);
++ break;
++ case EXTBYTE1:
++ mediumraw_data = scancode;
++ mediumraw_state = EXTBYTE2;
++ break;
++ case EXTBYTE2:
++ /* Note: Only codes < 256 will pass correctly through KdEnqueueKeyboardEvent() */
++ KdEnqueueKeyboardEvent (closure, (int)mediumraw_data << 7 | scancode, mediumraw_up);
++ mediumraw_state = DEFAULT;
++ break;
++ }
+ b++;
+ }
+ }
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/no_xkb.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/no_xkb.patch
new file mode 100644
index 0000000000..779aa2d6ef
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/no_xkb.patch
@@ -0,0 +1,12 @@
+--- dix/devices.c~ 2008-04-16 13:01:08.000000000 +0200
++++ dix/devices.c 2008-04-16 13:01:08.000000000 +0200
+@@ -527,8 +527,8 @@
+ #ifdef XKB
+ if (dev->key->xkbInfo)
+ XkbFreeInfo(dev->key->xkbInfo);
+-#endif
+ dev->key->xkbInfo = NULL;
++#endif
+ xfree(dev->key->curKeySyms.map);
+ xfree(dev->key->modifierKeyMap);
+ xfree(dev->key);
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch
new file mode 100644
index 0000000000..0812a2e856
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch
@@ -0,0 +1,54 @@
+Index: xorg-server-1.4/hw/kdrive/Makefile.am
+===================================================================
+--- xorg-server-1.4.orig/hw/kdrive/Makefile.am 2007-09-06 23:32:04.000000000 +0200
++++ xorg-server-1.4/hw/kdrive/Makefile.am 2007-09-06 23:33:44.000000000 +0200
+@@ -11,6 +11,10 @@
+ XFAKE_SUBDIRS = fake
+ endif
+
++if KDRIVEW100
++W100_SUBDIRS = w100
++endif
++
+ if XSDLSERVER
+ XSDL_SUBDIRS = sdl
+ endif
+@@ -26,6 +30,7 @@
+ SERVER_SUBDIRS = \
+ $(XSDL_SUBDIRS) \
+ $(FBDEV_SUBDIRS) \
++ $(W100_SUBDIRS) \
+ $(VESA_SUBDIRS) \
+ $(XEPHYR_SUBDIRS) \
+ $(XFAKE_SUBDIRS)
+Index: xorg-server-1.4/configure.ac
+===================================================================
+--- xorg-server-1.4.orig/configure.ac 2007-09-06 23:32:05.000000000 +0200
++++ xorg-server-1.4/configure.ac 2007-09-06 23:34:41.000000000 +0200
+@@ -535,6 +535,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(w100, AS_HELP_STRING([--enable-w100], [Build the kdrive Xw100 server (default: no)]), [KDRIVEW100=$enableval], [KDRIVEW100=no])
+ AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto])
+ AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto])
+ AC_ARG_ENABLE(kdrive-vesa, AS_HELP_STRING([--enable-kdrive-vesa], [Build the kdrive VESA-based servers (default: auto)]), [KDRIVEVESA=$enableval], [KDRIVEVESA=auto])
+@@ -1669,6 +1670,10 @@
+ fi
+ AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes])
+
++AM_CONDITIONAL(KDRIVEW100, [test "x$KDRIVEW100" = xyes])
++if test "x$KDRIVEW100" = xyes; then
++ AC_DEFINE(KDRIVEW100, 1, [Build Xw100 server])
++fi
+
+ dnl XWin DDX
+
+@@ -2112,6 +2117,7 @@
+ hw/kdrive/epson/Makefile
+ hw/kdrive/fake/Makefile
+ hw/kdrive/fbdev/Makefile
++hw/kdrive/w100/Makefile
+ hw/kdrive/i810/Makefile
+ hw/kdrive/linux/Makefile
+ hw/kdrive/mach64/Makefile
diff --git a/packages/xorg-xserver/xserver-kdrive_1.4.2.bb b/packages/xorg-xserver/xserver-kdrive_1.4.2.bb
new file mode 100644
index 0000000000..5155a267b5
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive_1.4.2.bb
@@ -0,0 +1,33 @@
+require xserver-kdrive-common.inc
+
+DEPENDS += "hal libxkbfile libxcalibrate pixman"
+
+PE = "1"
+
+SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
+ ${KDRIVE_COMMON_PATCHES} \
+ file://enable-epson.patch;patch=1 \
+ file://fix_default_mode.patch;patch=1 \
+ file://enable-xcalibrate.patch;patch=1 \
+ file://hide-cursor-and-ppm-root.patch;patch=1 \
+ file://xcalibrate_coords.patch;patch=1 \
+ file://w100.patch;patch=1 \
+ file://w100-autofoo.patch;patch=1 \
+ file://w100-fix-offscreen-bmp.patch;patch=1 \
+ file://w100-new-input-world-order.patch;patch=1 \
+ file://linux-keyboard-mediumraw.patch;patch=1 \
+ file://xcalibrate-new-input-world-order.patch;patch=1 \
+ file://tslib-default-device.patch;patch=1 \
+ file://fbdev-evdev.patch;patch=1 \
+ file://keyboard-resume-workaround.patch;patch=1 \
+ file://xorg-avr32-support.diff;patch=1 \
+ file://pkgconfig_fix.patch;patch=1 \
+ file://no_xkb.patch;patch=1;pnum=0 \
+ "
+
+S = "${WORKDIR}/xorg-server-${PV}"
+
+W100_OECONF = "--disable-w100"
+W100_OECONF_arm = "--enable-w100"
+
+EXTRA_OECONF += "--enable-builtin-fonts"
diff --git a/packages/xorg-xserver/xserver-xorg-1.4.2/.mtn2git_empty b/packages/xorg-xserver/xserver-xorg-1.4.2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/xorg-xserver/xserver-xorg-1.4.2/.mtn2git_empty
diff --git a/packages/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch b/packages/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch
new file mode 100644
index 0000000000..a62a767f23
--- /dev/null
+++ b/packages/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch
@@ -0,0 +1,13 @@
+Index: xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am
+===================================================================
+--- xorg-server-1.4.orig/hw/xfree86/os-support/linux/Makefile.am 2007-08-23 21:04:53.000000000 +0200
++++ xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am 2008-03-13 18:27:23.000000000 +0100
+@@ -41,7 +41,7 @@
+
+ AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
+
+-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack
++INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
+
+ # FIXME: These need to be added to the build
+ LNX_EXTRA_SRCS = \
diff --git a/packages/xorg-xserver/xserver-xorg_1.4.2.bb b/packages/xorg-xserver/xserver-xorg_1.4.2.bb
new file mode 100644
index 0000000000..489e01742e
--- /dev/null
+++ b/packages/xorg-xserver/xserver-xorg_1.4.2.bb
@@ -0,0 +1,15 @@
+require xorg-xserver-common.inc
+
+DESCRIPTION = "the X.Org X server"
+DEPENDS += "pixman"
+PE = "1"
+
+SRC_URI += "file://drmfix.patch;patch=1 \
+ file://pkgconfig_fix.patch;patch=1 \
+ file://sysroot_fix.patch;patch=1"
+
+MESA_VER = "7.0.2"
+
+EXTRA_OECONF += " ac_cv_file__usr_share_sgml_X11_defs_ent=no "
+
+export LDFLAGS += " -ldl "
diff --git a/packages/xserver-common/files/kdrive-1.4-fixes-fix.patch b/packages/xserver-common/files/kdrive-1.4-fixes-fix.patch
new file mode 100644
index 0000000000..14b77e20e9
--- /dev/null
+++ b/packages/xserver-common/files/kdrive-1.4-fixes-fix.patch
@@ -0,0 +1,22 @@
+--- /tmp/12keymap 2008-06-07 12:24:24.425525517 +0200
++++ xserver-common-1.22/X11/Xinit.d/12keymap 2008-06-07 12:27:35.152175933 +0200
+@@ -2,9 +2,6 @@
+
+ MACHINE=`awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo`
+
+-# since kdrive 1.4 there is no default keymap in server
+-xmodmap - </etc/X11/default.xmodmap
+-
+ case $MACHINE in
+ "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
+ xmodmap - < /etc/X11/shepherd.xmodmap
+@@ -28,5 +25,9 @@
+ "Simpad" | "HP iPAQ"* | "Asus MyPal"*)
+ xmodmap - < /etc/X11/keyboardless.xmodmap
+ ;;
++ *)
++ # since kdrive 1.4 there is no default keymap in server
++ xmodmap - </etc/X11/default.xmodmap
++ ;;
+ esac
+
diff --git a/packages/xserver-common/xserver-common_1.22.bb b/packages/xserver-common/xserver-common_1.22.bb
index 25f2abf148..425e64c627 100644
--- a/packages/xserver-common/xserver-common_1.22.bb
+++ b/packages/xserver-common/xserver-common_1.22.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Common X11 scripts and support files"
LICENSE = "GPL"
SECTION = "x11"
RDEPENDS_${PN} = "xmodmap xrandr xdpyinfo"
-PR = "r4"
+PR = "r5"
PACKAGE_ARCH = "all"
@@ -10,7 +10,9 @@ PACKAGE_ARCH = "all"
inherit gpe
SRC_URI_append = " file://setDPI.sh "
-SRC_URI_append_angstrom = " file://kdrive-1.4-fixes.patch;patch=1"
+SRC_URI_append_angstrom = " file://kdrive-1.4-fixes.patch;patch=1 \
+ file://kdrive-1.4-fixes-fix.patch;patch=1 \
+"
do_install_append() {
install -m 0755 "${WORKDIR}/setDPI.sh" "${D}/etc/X11/Xinit.d/50setdpi"
diff --git a/packages/zeroconf/files/zeroconf-limits.h.patch b/packages/zeroconf/files/zeroconf-limits.h.patch
new file mode 100644
index 0000000000..46ba208fa5
--- /dev/null
+++ b/packages/zeroconf/files/zeroconf-limits.h.patch
@@ -0,0 +1,21 @@
+In newer glibc after this commit.
+
+http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/bits/socket.h.diff?r1=1.60&r2=1.61&cvsroot=glibc
+
+
+do not include limits.h indirectly through sockets.h so we would need to include limits.h explicitely.
+
+-Khem
+
+Index: zeroconf-0.9/zeroconf.c
+===================================================================
+--- zeroconf-0.9.orig/zeroconf.c 2008-05-27 16:56:05.000000000 -0700
++++ zeroconf-0.9/zeroconf.c 2008-05-27 16:56:20.000000000 -0700
+@@ -33,6 +33,7 @@
+ #include <net/if_arp.h>
+ #include <sys/time.h>
+ #include <signal.h>
++#include <limits.h>
+
+ #include "delay.h"
+
diff --git a/packages/zeroconf/zeroconf_0.9.bb b/packages/zeroconf/zeroconf_0.9.bb
index c8f7ddfa3a..5c42237888 100644
--- a/packages/zeroconf/zeroconf_0.9.bb
+++ b/packages/zeroconf/zeroconf_0.9.bb
@@ -5,10 +5,11 @@ LICENSE = "GPL"
SECTION = "net"
PRIORITY = "optional"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${PN}-${PV}.tar.gz \
file://zeroconf-default \
+ file://zeroconf-limits.h.patch;patch=1 \
file://debian-zeroconf"
do_install () {
diff --git a/packages/zlib/files/autotools.patch b/packages/zlib/files/autotools.patch
index d1dc8dd8d4..166e7669ad 100644
--- a/packages/zlib/files/autotools.patch
+++ b/packages/zlib/files/autotools.patch
@@ -464,7 +464,7 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
diff -Naur zlib-1.2.3/configure.ac zlib-1.2.3new/configure.ac
--- zlib-1.2.3/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ zlib-1.2.3new/configure.ac 2006-08-07 20:38:31.612402750 +0200
-@@ -0,0 +1,14 @@
+@@ -0,0 +1,17 @@
+AC_INIT(zlib,1.2.3)
+AC_CONFIG_SRCDIR(adler32.c)
+AM_INIT_AUTOMAKE(zlibs,1.2.3)
@@ -476,13 +476,16 @@ diff -Naur zlib-1.2.3/configure.ac zlib-1.2.3new/configure.ac
+
+AC_HEADER_STDC
+
-+AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([
++Makefile
++zlib.pc
++])
+
+AC_OUTPUT
diff -Naur zlib-1.2.3/Makefile.am zlib-1.2.3new/Makefile.am
--- zlib-1.2.3/Makefile.am 2006/10/14 05:35:40 1.1
+++ zlib-1.2.3new/Makefile.am 2006/10/14 05:36:49
-@@ -0,0 +1,8 @@
+@@ -0,0 +1,11 @@
+lib_LTLIBRARIES = libz.la
+
+libz_la_SOURCES = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c \
@@ -491,6 +494,9 @@ diff -Naur zlib-1.2.3/Makefile.am zlib-1.2.3new/Makefile.am
+libz_la_LDFLAGS = -version-number 1:2:3
+
+include_HEADERS = zconf.h zlib.h
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = zlib.pc
diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in
--- zlib-1.2.3/Makefile.in 2005-07-18 04:25:21.000000000 +0200
+++ zlib-1.2.3new/Makefile.in 1970-01-01 01:00:00.000000000 +0100
@@ -649,3 +655,18 @@ diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
+diff -Naur zlib-1.2.3/zlib.pc.in zlib-1.2.3New/zlib.pc.in
+--- zlib-1.2.3/zlib.pc.in 1970-01-01 01:00:00.000000000 +0100
++++ zlib-1.2.3New/zlib.pc.in 2006-12-07 10:55:45.000000000 +0100
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: zlib
++Description: Standard (de)compression library
++Version: @VERSION@
++Libs: -L${libdir} -lz
++Cflags: -I${includedir}
+
diff --git a/packages/zlib/zlib-sdk.inc b/packages/zlib/zlib-sdk.inc
new file mode 100644
index 0000000000..a5901300ee
--- /dev/null
+++ b/packages/zlib/zlib-sdk.inc
@@ -0,0 +1,9 @@
+ZLIB_EXTRA = ""
+inherit sdk
+
+do_stage() {
+ install -d ${STAGING_INCDIR}
+ install -m 0644 zlib.h ${STAGING_INCDIR}/zlib.h
+ install -m 0644 zconf.h ${STAGING_INCDIR}/zconf.h
+ oe_libinstall -a -so libz ${STAGING_LIBDIR}
+}
diff --git a/packages/zlib/zlib-sdk_1.2.3.bb b/packages/zlib/zlib-sdk_1.2.3.bb
new file mode 100644
index 0000000000..b6e15c3ae2
--- /dev/null
+++ b/packages/zlib/zlib-sdk_1.2.3.bb
@@ -0,0 +1,2 @@
+require zlib_${PV}.bb
+require zlib-sdk.inc
diff --git a/packages/zlib/zlib_1.2.3.bb b/packages/zlib/zlib_1.2.3.bb
index 629ee83efb..1f96816ae8 100644
--- a/packages/zlib/zlib_1.2.3.bb
+++ b/packages/zlib/zlib_1.2.3.bb
@@ -3,7 +3,7 @@ SECTION = "libs"
PRIORITY = "required"
HOMEPAGE = "http://www.gzip.org/zlib/"
LICENSE = "zlib"
-PR="r2"
+PR="r4"
SRC_URI = "http://www.zlib.net/zlib-1.2.3.tar.bz2 \
file://visibility.patch;patch=1 \
@@ -13,7 +13,7 @@ S = "${WORKDIR}/zlib-${PV}"
DEPENDS = "libtool-cross"
-inherit autotools
+inherit autotools pkgconfig
do_stage() {
install -m 0644 zlib.h ${STAGING_INCDIR}/zlib.h